This file contains 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
# Reference makefile: | |
# https://gist.github.com/anonymous/b469f85762e93ea1b51f0f0f97e19acc | |
# All the flags created by configure | |
OPT = [ | |
"-DNDEBUG", | |
"-g", | |
"-fwrapv", | |
"-O3", | |
"-Wall", |
This file contains 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
#!/usr/bin/env python | |
# usage: choices choice_a 1 choice_b 5 choice_c 4 | |
# will return choice_a 10% of the time, choice_b 50% of the time | |
# and choice_c 40% of the time | |
from random import randrange | |
import sys | |
options = [] |