Skip to content

Instantly share code, notes, and snippets.

View zhengyangchoong's full-sized avatar

Choong Zheng Yang zhengyangchoong

View GitHub Profile
@zhengyangchoong
zhengyangchoong / raffle.py
Last active October 19, 2017 15:05
raffle ticket simulator
from __future__ import division
import random
from scipy import stats
random.seed("asdfghjkl")
class Game:
def __init__(self,N):
self.cards = []
@zhengyangchoong
zhengyangchoong / gen.py
Created September 21, 2017 11:07
monster statblock generator (with fuzzy search)
# Writes to main.tex with \\latex code for monster manuals
# argparse to get monster names. Write to latex file with statblocks, and compile
# uses Evan Bergeron's awesome latex library. https://github.com/evanbergeron/DND-5e-LaTeX-Template
# and also a compiled json file of dnd stats by /u/droiddruid https://www.reddit.com/r/dndnext/comments/43a09o/srd_monsters_in_json_format/?ref=share&ref_source=link
import argparse
import subprocess
import json
import string
import os, sys
import numpy as np
import random
import csv
import collections
import matplotlib.pyplot as plt
import math
from sklearn import linear_model
from sklearn import svm
import cPickle as pickle
from __future__ import division
import os
import matplotlib
#matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.animation
import numpy as np
import subprocess
from mpl_toolkits.mplot3d import Axes3D

28 jan session

first session!

amber frostbeard and so-kehur mulan, dwarf cleric and noble fighter, meet at a tavern, with frostbeard having been a suspended soldier; a dwarf named gundren rockseeker gives them a quest to deliver mining supplies to a mining town of phandalin. rockseeker and sildar redwinter ride ahead of them, and are waylaid and captured, with their horses killed.

the duo find two horses dead on the road that belonged to sildar and rockseeker; they are ambushed by four goblins, of which they dispatch in short order; mulan charges and cleaves off the goblin heads with his great axe, with frostbeard trying and failing to suggest alternative methods of recourse.

they travel to the goblin hideout, which is called Cragmaw hideout. they encounter a high elf, ielnia liadon, presumably high on pot brownies.

Preamble:

Given the lack of adequate documentation in the photonics lab, it is difficult for any newcomer to start using the lab without a first-hand understanding of the previous habits and practices. The goal of this paper is to outline the current situation with regards to the IT components of the lab, and to also suggest modifications and changes where appropriate.

Jargon:

Github: Online repository for code, where multiple people can make edits to the same script, with these changes being tracked.

SSH: Secure Shell Tunneling. A protocol for remote execution/running of code on another terminal.

@zhengyangchoong
zhengyangchoong / raspi.md
Last active November 29, 2016 16:20
raspberry pi controller link dump
@zhengyangchoong
zhengyangchoong / runjumpfly.py
Created November 20, 2016 11:50
himcm question A plot generator
"""
categories: pro, premier, open.
cly --> strong men
ath --> strong women
swim, t1, bike, t2, run, total
where t1 and t2 refer to the times needed for the transition between the modes of exercise.
"""
import matplotlib.pyplot as plt