Skip to content

Instantly share code, notes, and snippets.

View aarshtalati's full-sized avatar
🎯
Focusing

Aarsh Talati aarshtalati

🎯
Focusing
View GitHub Profile
@aarshtalati
aarshtalati / PythonCommandLineArgumentParser.py
Created March 13, 2021 06:20
Python Command Line Argument Parser
#!/usr/bin/env python3
"""
Implement command argument parser
"""
__author__ = "Aarsh Talati"
__version__ = "1.0.0"
__license__ = "GNU General Public License v3.0"
import sys
@aarshtalati
aarshtalati / imdb_pandas.py
Created April 25, 2020 04:22
IMDB interface tsv files cross reference using Python Pandas
import pandas as pd
import numpy as np
import csv
basics_file_loc = 'title.basics.tsv' # https://datasets.imdbws.com/title.basics.tsv.gz
ratings_file_loc = 'title.ratings.tsv' # https://datasets.imdbws.com/title.ratings.tsv.gz
basics_fields = ['tconst', 'titleType', 'primaryTitle',
'originalTitle', 'startYear', 'genres']
df_basics = pd.read_table(basics_file_loc, sep='\t', engine='c', skipinitialspace=True, usecols=basics_fields, dtype={
@aarshtalati
aarshtalati / 12-autologin.conf
Last active July 7, 2018 19:59
Ubuntu MATE 18.04 LTS (Bionic) Login Automatically
# create /etc/lightdm/lightdm.conf.d/12-autologin.conf, if it doesn't exist
# sudo nano /etc/lightdm/lightdm.conf.d/12-autologin.conf
[SeatDefaults]
autologin-user=username
# source: https://askubuntu.com/a/456957/490067
@aarshtalati
aarshtalati / Xaniel-Mate-tweak.panel
Last active May 11, 2019 08:42
Restores original Mate panel view in Ubuntu Mate
[general]
object-id-list=['firefox', 'notification-area', 'indicatorappletcomplete', 'clock', 'show-desktop', 'window-list', 'workspace-switcher', 'trashapplet', 'object-1', 'object_0']
toplevel-id-list=['top', 'bottom']
[toplevels/bottom]
expand=true
orientation='bottom'
screen=0
y-bottom=0
size=28
@aarshtalati
aarshtalati / Xaniel-Mate-tweak.layout
Last active July 11, 2018 14:30
Restores original Mate panel view in Ubuntu Mate
[Toplevel top]
orientation=top
expand=true
size=28
[Toplevel bottom]
orientation=bottom
expand=true
size=28
@aarshtalati
aarshtalati / PersonController.java
Created May 14, 2018 18:27
SpringBoot MVC controller
package edu.gatech.epidemics.controllers;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
/**
* @author atalati
*/
@Controller
public class PersonController {
@aarshtalati
aarshtalati / PersonApiController.java
Created May 14, 2018 18:27
SpringBoot REST API controller
package edu.gatech.epidemics.api;
import edu.gatech.epidemics.entities.Person;
import edu.gatech.epidemics.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
@aarshtalati
aarshtalati / header.html
Created May 14, 2018 17:56
Thymeleaf MVC fragments master template
<!DOCTYPE html>
<html lang="en" xmlns:th="http://thymeleaf.org">
<head lang="en" th:fragment="head">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html"; charset="UTF-8">
<link rel="stylesheet" href="/webjars/bootswatch/3.3.7/flatly/bootstrap.min.css">
<link rel="stylesheet" href="/webjars/toastr/2.1.0/toastr.min.css">
</head>
<body>
@aarshtalati
aarshtalati / index.html
Created May 14, 2018 17:54
Thymeleaf MVC Index view template, using fragments
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>All patients</title>
<!--/*/ <th:block th:include="fragments/header :: head"></th:block> /*/-->
</head>
<body>
<!--/*/ <th:block th:include="fragments/header :: header"></th:block> /*/-->
<div class="table-responsive">
Trying to reach FHIR server at fhir:8080...
Trying to reach FHIR server at fhir:8080...
Trying to reach FHIR server at fhir:8080...
Trying to reach FHIR server at fhir:8080...
Trying to reach FHIR server at fhir:8080...
Trying to reach FHIR server at fhir:8080...
Trying to reach FHIR server at fhir:8080...
Trying to reach FHIR server at fhir:8080...
Trying to reach FHIR server at fhir:8080...
Trying to reach FHIR server at fhir:8080...