Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Aarsh Talati aarshtalati

🎯
Focusing
View GitHub Profile
@aarshtalati
aarshtalati / PythonCommandLineArgumentParser.py
Created Mar 13, 2021
Python Command Line Argument Parser
View PythonCommandLineArgumentParser.py
#!/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 Apr 25, 2020
IMDB interface tsv files cross reference using Python Pandas
View imdb_pandas.py
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 Jul 7, 2018
Ubuntu MATE 18.04 LTS (Bionic) Login Automatically
View 12-autologin.conf
# 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
Restores original Mate panel view in Ubuntu Mate
View Xaniel-Mate-tweak.panel
[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 Jul 11, 2018
Restores original Mate panel view in Ubuntu Mate
View Xaniel-Mate-tweak.layout
[Toplevel top]
orientation=top
expand=true
size=28
[Toplevel bottom]
orientation=bottom
expand=true
size=28
@aarshtalati
aarshtalati / PersonController.java
Created May 14, 2018
SpringBoot MVC controller
View PersonController.java
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
SpringBoot REST API controller
View PersonApiController.java
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
Thymeleaf MVC fragments master template
View header.html
<!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
Thymeleaf MVC Index view template, using fragments
View index.html
<!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">
View docker_compose_mysql_error.txt
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...