Take I-30 eastbound to Exit 52 or 59. Go left for about forty miles. Now make a left and you should see a man sellling newspapers on the south corner. Don't be alarmed if he's not there, though; sometimes a different guy fills in for him. Continue on Comstock for 3.2 miles, and when it hits Towerview (Road or Place--I forget which, but no matter, because those two streets are /not/ parallel), make a full ninety-degree turn at my friend Patty Ann's place. (Be careful, because the sign really jumps out at you.) Continue for about eighty or ninety minutes until you see a gravel road (if you see a stop sign that is slightly lighter than the usual hue you've gone about seventy miles too far). Turn left onto the access road (it'll look like you're heading off a cliff), then drive a considerable distance forward and take I-80 West (Scranton) to Exit 65B/I-195 South (Vancouver). You idiot! Make a narrow ri
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
def say_hello_glen(): | |
return 'hello, glen' | |
def say_hello(name): | |
return 'hello, ' + name | |
def greet(name, language): | |
if language is 'spanish': | |
return 'hola, ' + name | |
if language is 'english': |
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 time | |
from watchdog.observers import Observer | |
from watchdog.events import FileSystemEventHandler | |
import envoy | |
import os | |
import datetime | |
class NotebookConverterHandler(FileSystemEventHandler): | |
def on_modified(self, event): | |
if event.src_path.endswith('.ipynb'): |
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
var percentChance = function(integerPercent) { | |
return Math.random()*100 < integerPercent; | |
}; |
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 easygui # easy_install easygui | |
some_input = easygui.enterbox( | |
msg="Enter some text below!", | |
title="Title of window", | |
strip=True, # will remove whitespace around whatever the user types in | |
default="This will show up in the box by default") |
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/python | |
# a script to get all the common tropes for media from tv tropes | |
# usage: | |
# python tv_tropes_matcher.py name1 name2 [name3...nameN] | |
# please put names with spaces or special characters in quotes | |
# you can also pass in the urls if it won't automatch by name. | |
# pip install pattern | |
# pip install pyquery |
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 operator | |
def geometric_mean(iterable): | |
return (reduce(operator.mul, iterable)) ** (1.0/len(iterable)) |
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
function charCount(str) { | |
if (!str || typeof str !== 'string') { | |
throw 'must provide a string'; | |
} | |
var letter, | |
countObj = {}, | |
alphabeticalLetters = [], | |
outputString = '', | |
letterCount; |
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
Aikman, Troy : ['isle of man', 'oman'] | |
Davis, Bob : ['saint kitts and nevis'] | |
Boeckman, Todd : ['isle of man', 'oman'] | |
Hilger, Rusty : ['niger'] | |
Bomar, Rhett : ['myanmar'] | |
Lamonica, Daryle : ['antarctica', 'costa rica', 'dominica', 'jamaica', 'south africa'] | |
Jaynes, David : ['philippines', 'saint vincent and the grenadines'] | |
Davis, Nate : ['saint kitts and nevis'] | |
Roethlisberger, Ben : ['niger'] | |
Long, Chuck : ['hong kong'] |
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
Jordan, Homer : ['jordan'] | |
Testaverde, Vinny : ['cape verde'] | |
Riordan, Tim : ['jordan'] | |
Germaine, Joe : ['ukraine'] | |
Lamonica, Daryle : ['dominica'] | |
O'Hara, Pat : ['western sahara'] | |
Dorsey, Ken : ['jersey'] | |
Verica, Marc : ['costa rica', 'south africa'] | |
Froman, Adam : ['oman'] | |
Humphries, Stan : ['french southern territories'] |