This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export GOPATH="$(pwd):$(pwd)/vendor" | |
export PATH="$(pwd)/bin:$PATH" | |
export CDPATH=.:$(pwd)/src/github.com:$(pwd)/vendor/src/golang.org:$(pwd)/src | |
if [ -f .env.secret ] ; then | |
source .env.secret | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package memoize | |
import ( | |
"fmt" | |
"reflect" | |
) | |
// fptr is a pointer to a function variable which will receive a | |
// memoized wrapper around function impl. Impl must have 1 or more | |
// arguments, all of which must be usable as map keys; and it must |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This program will select at random a set of speakers and look at the gender breakdown given 20% women | |
total_speakers = 15 | |
percentage_of_women = 0.25 | |
hist, list, results = {}, [], [] | |
(1000 * (1 - percentage_of_women)).floor.times{list << 0} | |
(1000 * percentage_of_women).floor.times{list << 1} |