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
export RUBY_PREFIX="$HOME/.ruby" | |
export PATH="$RUBY_PREFIX/bin/:$RUBY_PREFIX/lib/ruby/gems/1.8/bin/:$PATH" | |
export GEM_HOME="$RUBY_PREFIX/lib/ruby/gems/1.8" | |
export GEM_PATH="$GEM_HOME" | |
export RUBYLIB="$RUBY_PREFIX/lib/ruby:$RUBY_PREFIX/lib:$RUBY_PREFIX/lib/site_ruby/1.8" |
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
#!/bin/bash | |
find . -name "*.mkv" | while read FILE | |
do | |
# What would the output file be? | |
DST=/Volumes/USBRAID/Converted/$(dirname "$FILE") | |
MKV=$(basename "$FILE") | |
MP4=${MKV%%.mkv}.mp4 | |
# If it already exists, don't overwrite it | |
if [ -e "$DST/$MP4" ] |
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 re | |
filelist = ["foo.txt", "__foo.html", "bar.txt", "__bar.html", "baz.mp3"] | |
matchfiles = [i for i in filelist if i.startswith("__")] | |
matchre = [i for i in filelist if re.search('o+', i)] | |
print matchfiles | |
print matchre |
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 sys | |
import random | |
friends = int(sys.argv[1]) | |
counts = {} | |
iterations = 1000 | |
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 | |
''' | |
Based on http://ginstrom.com/scribbles/2012/05/10/continuous-integration-in-python-using-watchdog/ | |
Dependencies: ``watchdog`` (pip install watchdog) | |
Montiors the whole tree for changes. | |
Check for all changes to any files and test the associated package; we might want to test changes to a pyramid test.ini, say, or a file rename as part of a refactor. |
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 | |
from collections import Counter | |
import pandas as pd | |
import glob | |
""" Open a bunch of .csv files which have columns that look like | |
startdate, enddate, account, service, 2010-01, 2010-02, 2010-03, ... | |
Sum the date-like columns across all of the .csv files and display. |
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 sys | |
import os | |
import glob | |
import re | |
def octo_parse(octo_post): | |
""" |
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 | |
def get_yn(question): | |
prompt = question + " [y/n]: " | |
ok = {'y', 'n'} | |
answer = None | |
while answer not in ok: | |
answer = raw_input(prompt).strip().lower() | |
return answer == 'y' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from scene import * | |
import time | |
import clipboard | |
import sys | |
import speech | |
class SimpleSinister(object): | |
def __init__(self): | |
OlderNewer