Skip to content

Instantly share code, notes, and snippets.

View deanishe's full-sized avatar

Dean Jackson deanishe

View GitHub Profile
@deanishe
deanishe / tree.md
Created January 3, 2013 23:14 — forked from hrldcpr/tree.md

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@deanishe
deanishe / uninstall_py2.7.sh
Last active August 29, 2015 14:02 — forked from munhitsu/gist:1034761
Uninstall a framework Python on OS X
sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7
sudo rm -rf "/Applications/Python 2.7"
cd /usr/local/bin
ls -l . | grep '../Library/Frameworks/Python.framework/Versions/2.7' | awk '{print $9}' | xargs rm