Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🍒 🍍 🍓 🍊 🍌

Chaz Reid charlesreid1

💭
🍒 🍍 🍓 🍊 🍌
View GitHub Profile
@charlesreid1
charlesreid1 / blaseball_divisions.json
Created Sep 1, 2020
Blaseball team division and league information in JSON format
View blaseball_divisions.json
{
"Lawful Good": [
"Lovers",
"Tacos",
"Steaks",
"Breath Mints",
"Firefighters"
],
"Chaotic Good": [
"Shoe Thieves",
@charlesreid1
charlesreid1 / allstars.py
Last active Nov 7, 2020
quick-n-dirty script to get a list of all starred Github repos for a given user using Python and PyGithub
View allstars.py
from github import *
import sys
import json
def usage():
print("")
print("allstars.py: script to print all repos starred by a Github user")
print("Usage: python allstars.py [USERNAME]")
print("")
@charlesreid1
charlesreid1 / get_all_bundles.py
Last active Oct 22, 2019
output from DSSClient.get_bundles_all()
View get_all_bundles.py
import json
from hca.dss import DSSClient
dss = DSSClient()
print(dss.get_all_bundles(replica="gcp"))
print(dss.get_all_bundles(replica="aws"))
@charlesreid1
charlesreid1 / simple_arg.py
Created Jul 23, 2019
A very simple argparse example. Takes one argument, a path to a folder (-d or --dir); prints whether that folder exists.
View simple_arg.py
import os, sys
import argparse
"""
A Simple Argparse Program
That Works Just The Way
We Like It.
Charles Reid
View example_hyperas.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@charlesreid1
charlesreid1 / poly_circ_undirected.tex
Created Mar 17, 2019
TeX for drawing circles with inscribed polygons and labeled vertices, for the Josephus problem.
View poly_circ_undirected.tex
\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usepackage{xintexpr}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}[scale=3]
% make a node with variable name pol (with the list of features given) at the location (0,0), and don't label it
\node (pol) [draw=none, thick, black!90!black,rotate=0,minimum size=6cm,regular polygon, regular polygon sides=11] at (0,0) {};
@charlesreid1
charlesreid1 / poly_directed.tex
Last active Mar 17, 2019
TeX for drawing labeled polygons with directed and undirected paths (for illustrating solutions to the Josephus problem).
View poly_directed.tex
\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usepackage{xintexpr}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}[scale=3]
% make a node with variable name pol (with the list of features given) at the location (0,0), and don't label it
\node (pol) [draw, thick, black!90!black,rotate=0,minimum size=6cm,regular polygon, regular polygon sides=11] at (0,0) {};
@charlesreid1
charlesreid1 / polygon.tex
Last active Mar 17, 2019
TeX for drawing labeled polygons (for illustrating solutions to the Josephus problem).
View polygon.tex
\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usepackage{xintexpr}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}[scale=3]
% make a node with variable name pol (with the list of features given) at the location (0,0), and don't label it
\node (pol) [draw, thick, black!90!black,rotate=0,minimum size=6cm,regular polygon, regular polygon sides=11] at (0,0) {};
@charlesreid1
charlesreid1 / make_centillion_public.py
Last active Mar 4, 2019
Centillion Dead Person Switch: If this script is run for more than 72 hours continuously, it will make the dcppc/centillion repository public.
View make_centillion_public.py
#!/usr/bin/env python
import re, os
from github import Github
import time
'''
Centillion Dead Person Switch
If this script is run for
more than 72 hours continuously,
@charlesreid1
charlesreid1 / process.py
Last active Feb 25, 2019
Example Jinja template for yaml config files
View process.py
from jinja2 import Environment, PackageLoader, select_autoescape
def process(**kwargs):
# set up Jinja env
env = Environment(
loader=PackageLoader(''),
autoescape=select_autoescape(['html', 'xml'])
)