Skip to content

Instantly share code, notes, and snippets.

Avatar

Nick Brown uptownnickbrown

View GitHub Profile
View equals.py
import sys
from timeit import timeit
TEST_CASES = [
0,
1,
-1,
2,
-2,
10,
View the-riddler-12-22.py
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 / keybase.md
Created Jun 11, 2015
Keybase proof of identity
View keybase.md

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:

@uptownnickbrown
uptownnickbrown / coin-problem.py
Created Apr 26, 2015
Solving an annoying homework problem for @MatLock
View coin-problem.py
# @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):