Skip to content

Instantly share code, notes, and snippets.

View uptownnickbrown's full-sized avatar

Nick Brown uptownnickbrown

View GitHub Profile
@uptownnickbrown
uptownnickbrown / coin-problem.py
Created April 26, 2015 15:50
Solving an annoying homework problem for @MatLock
# @uptownnickbrown
import random
from collections import Counter
# valid coin values
coins = [.01,.02,.05,.10,.20,.50,1.00,2.00]
# run one trial with the appropriate constraints (100 total coins, 5 coin types)
def run_trial(coins):
@uptownnickbrown
uptownnickbrown / keybase.md
Created June 11, 2015 03:41
Keybase proof of identity

Keybase proof

I hereby claim:

  • I am uptownnickbrown on github.
  • I am uptownnickbrown (https://keybase.io/uptownnickbrown) on keybase.
  • I have a public key whose fingerprint is 8E6D 5013 91F5 BB3F 2C5C 3F32 4A1A 6A03 3DE3 25CC

To claim this, I am signing this object:

import numpy
import matplotlib.pyplot as plt
taskLengths = range(1,6)
def runTrial():
minutesSinceOpening = 0
# Get length for the first task
amIStillBusy = numpy.random.choice(taskLengths)
#print 'my first task is ' + str(amIStillBusy) + ' minutes long'
isSheStillBusy = numpy.random.choice(taskLengths)
#print 'her first task is ' + str(isSheStillBusy) + ' minutes long'
@uptownnickbrown
uptownnickbrown / README.md
Last active April 23, 2016 17:55
exploring-trees
import sys
from timeit import timeit
TEST_CASES = [
0,
1,
-1,
2,
-2,
10,