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
import math | |
import random | |
def convert_num_to_word(num): | |
'''given a 2 digit number, convert to word''' | |
assert(num <= 99) | |
d = { 1: 'one', 2: 'two', 3:'three', 4:'four', 5:'five', 6:'six', \ | |
7:'seven',8:'eight', 9:'nine', 10 : 'ten', 11 : 'eleven', \ | |
12 : 'twelve', 13: 'thirteen', 14: 'fourteen', \ |
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
import math | |
import random | |
def convert_num_to_word(num): | |
'''given a number, convert to word''' | |
d = { 1: 'one', 2: 'two', 3:'three', 4:'four', 5:'five', 6:'six', \ | |
7:'seven',8:'eight', 9:'nine', 10 : 'ten', 11 : 'eleven', \ | |
12 : 'twelve', 13: 'thirteen', 14: 'fourteen', \ | |
15 : 'fifteen', 16 : 'sixteen', 17: 'seventeen', \ |
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
console.log("espn.js is running."); | |
jQuery("#videoPlayer").ready(function(){ | |
jQuery("param[name|='flashVars']").attr("value", function(){ | |
var str = this.value; | |
console.log(str); | |
return str.replace("autostart=true","autostart=false"); | |
} | |
); | |
jQuery("param[name|='play']").attr("value", "false"); | |
jQuery("div.mod-inline.video-player.full-box").next().insertAfter("<script>espn.video.embeded.pause();</script>"); |
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
import copy | |
file_loc = '/usr/share/dict/words' | |
words = {} | |
with open(file_loc) as f: | |
word = f.readline() | |
while word != '': | |
words[word[:-1]] = True | |
word = f.readline() |
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 | |
import itertools | |
combos = ['a','b','c','d','e','f'] | |
solver_length = 4 | |
#initialize all possible choices | |
c = [] | |
for i in itertools.permutations(combos, solver_length): | |
c.append(i) |
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
import copy | |
import pdb | |
import re | |
file_loc = '/usr/share/dict/words' | |
words = {} | |
with open(file_loc) as f: | |
word = f.readline() | |
while word != '': | |
words[word[:-1]] = True |
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
\documentclass{article} | |
\usepackage{enumitem} | |
\pagestyle{empty} | |
\setlength{\topmargin}{0in} | |
\setlength{\headsep}{0in} | |
\setlength{\headheight}{0in} | |
\setlength{\textheight}{9in} | |
\setlength{\oddsidemargin}{0.0in} | |
\setlength{\textwidth}{6.5in} | |
\setlength{\parindent}{0pt} |
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
import copy | |
import re | |
file_loc = '/usr/share/dict/words' | |
words = {} | |
with open(file_loc) as f: | |
word = f.readline() | |
while word != '': | |
words[word[:-1]] = True | |
word = f.readline() |
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 | |
import itertools | |
combos = ['a','b','c','d','e','f'] | |
solver_length = 4 | |
#initialize all possible choices | |
c = [] | |
for i in itertools.permutations(combos, solver_length): | |
c.append(i) |
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
# XXX this is awkward | |
maybe_s = "" | |
maybe_s = "s" if list_size > 1 |
OlderNewer