Skip to content

Instantly share code, notes, and snippets.

View akshayrdeodhar's full-sized avatar

Akshay Deodhar akshayrdeodhar

View GitHub Profile
@akshayrdeodhar
akshayrdeodhar / stable_elective.py
Last active December 12, 2019 04:24
Python script for allocating elective subjects based on "College Admissions and the Stability of Marriage, by D. Gale and L. S. Shapley"
import pandas as pd
import sys
if __name__ == "__main__":
if len(sys.argv) != 3:
print("usage: python3 stable_elective.py <electivelist> <sheetname>", file = sys.stderr)
sys.exit(1)
# Note: Assuming Excel file with columns having following names:
@akshayrdeodhar
akshayrdeodhar / list_generation_helper.py
Created October 17, 2020 11:56
Way to find out people who have not attended a microsoft teams session given a list of their usernames, and the CSV generated by Teams
import pandas as pd
from sys import argv
if __name__ == "__main__":
n = len(argv)
if n != 2:
print("usage: python3 attendance.py <name_of_file>")
exit(1)
set_of_all = set()
@akshayrdeodhar
akshayrdeodhar / generate_from_jinja_template.py
Last active October 25, 2021 04:18
Use jinja for generating files from templates independent of web frameworks
import jinja2
from sys import argv, stderr, exit
def generate_combined(filename, processors, threads):
templateLoader = jinja2.FileSystemLoader(searchpath = './')
templateEnv = jinja2.Environment(loader = templateLoader)
template = templateEnv.get_template(filename)
nodestring = "1:ppn={}".format(threads)
tensorflow
ffmpeg-python
scikit-video
opencv-python
jupyter
jupyter-lab
jupyter-notebook
PIL
pillow
matplotlib