Skip to content

Instantly share code, notes, and snippets.

View robertvunabandi's full-sized avatar

Robert M. Vunabandi robertvunabandi

View GitHub Profile
@robertvunabandi
robertvunabandi / webpack.config.js
Created August 12, 2021 03:45
Example webpack config that uses one entry per file (see `clientEntry` function).
/**
* Copyright 2020 Robert M. Vunabandi. All Rights Reserved.
*/
const fs = require("fs")
const path = require("path")
const nodeExternals = require("webpack-node-externals");
const webpack = require("webpack")
@robertvunabandi
robertvunabandi / antitrust_cases.txt
Created March 6, 2021 05:39
List of US Anti-Trust Cases as of March 4, 2021
U.S. v. A&L Mayer Associates, Inc.
U.S. v. A&L Mayer Associates, Inc.; A&L Mayer, Inc.; and Fibras Saltillo, S.A. de C.V.
U.S. v. A-1 Auto Glass, Inc.
U.S. v. The AAV Companies; ARA Services Inc., and Western Vending Machine Company
U.S. v. ABB Middle East & Africa Participations AG
U.S. v. Abitibi-Consolidated Inc. and Bowater Inc.
U.S. v. Thomas J. Abraham
U.S. v. Danny Abrishamian, a/k/a "Kamran Abrishamian"
U.S. v. Ace Schiffli Emboidery Co., Inc.
U.S. v. Acme Meat Co; Bristol foods, Inc, d/b/a Gold Pak Meat Co; Delta Meat Packing Co; Federal Meat Co; Gem Packing Co; Globe Packing Co; Great Western Packing Co; Meat Packers, Inc; O.K. Meat Packing Co; Quality Meat Packing Co; Serv-U Meat Packing Co; Shamrock Meats, Inc; Union Packing Co; and Ward Foods, Inc.
@robertvunabandi
robertvunabandi / parse_raw_grape_data.py
Created April 7, 2020 14:52
A script to convert the grapes data from https://www.ncdc.noaa.gov/paleo-search/study/13194 into just one table with fields year, location, abbreviation, latitude, longitude, value (which is harvest_days_after_august_31st)
from typing import Dict, Generic, List, Tuple, TypeVar
T = TypeVar("T")
S = TypeVar("T")
class Pair(Generic[T, S]):
pass
# filenames. Note that for the first 3 filenames, we named them this way.
# so the name mapping must remain the same or you'd need to change the name
@robertvunabandi
robertvunabandi / p_to_g_map.json
Last active March 28, 2020 21:19
A dictionary of the form Dict[A, List[INDEX, G]] such that G^INDEX = A MOD M where M is the M defined in AES. Some interesting patterns emerge!
This file has been truncated, but you can view the full file.
{
1: [[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
#2
#3
5
7
11
13
17
19
23
29
# This is used to solve problem 1-2 of the problem set.
# ------------------------------------- #
# 6.009 LAB 6 Trie Implementation START #
# ------------------------------------- #
class Trie:
ALLOWED_TYPES = [str, tuple]
def __init__(self, type_=None):
self.value = None
@robertvunabandi
robertvunabandi / asa-trivia-questions-spring-2018.json
Last active January 19, 2020 22:10
Questions people came up with for the Trivia event we did in April 2018 for ASA.
[
{
"answer": "Paul Kagame",
"question": "Who is the President of Rwanda",
"choices": [
"Paul Kagame",
"Hastings Banda",
"Helen Johnson Sirleaf",
"Gregoire Kayibanda"
]
# A list of game ids that we have already scraped.
59881742
59881743
59881744
59881745
59881746
59881747
59881748
59881749
59881750
const INFO = {
APP_ID: "MY-APP-ID-HERE",
isMessenger: null,
thread_type: null,
tid: null,
psid: null,
};
/**
* Thread types returned when getting the context
int most_significant_bit_position(size_t value) {
// int count = 0;
// while (value != 0) {
// value >>= 1;
// count++;
// }
// return count;
assert(value > 0);
value = (uint64_t) value;
int count = 0;