Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
#!/usr/bin/env python | |
# encoding: utf-8 | |
# | |
# Copyright © 2014 deanishe@deanishe.net | |
# | |
# MIT Licence. See http://opensource.org/licenses/MIT | |
# | |
# Created on 2014-03-08 | |
# |
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 |
#!/usr/bin/python | |
# encoding: utf-8 | |
# | |
# Copyright © 2015 Dean Jackson <deanishe@deanishe.net> | |
# | |
# MIT Licence. See http://opensource.org/licenses/MIT | |
# | |
# Created on 2015-04-20 | |
# |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
""" | |
from __future__ import print_function | |
import sys | |
import os |
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# vim: fileencoding=utf-8 | |
""" | |
Search Mac Address Book contacts via official API | |
""" | |
from __future__ import print_function, unicode_literals | |
import sys | |
from time import time |
#!/usr/bin/env python | |
# encoding: utf-8 | |
# | |
# Copyright © 2014 deanishe@deanishe.net | |
# | |
# MIT Licence. See http://opensource.org/licenses/MIT | |
# | |
# Created on 2014-04-02 | |
# |
#!/usr/bin/env zsh | |
pkgs=() | |
packages() { | |
while read ln; do | |
echo -n "$( echo $ln | cut -d " " -f2 ) " | |
done | |
} |
#!/usr/bin/env python | |
# encoding: utf-8 | |
# | |
# Copyright © 2014 deanishe@deanishe.net | |
# | |
# MIT Licence. See http://opensource.org/licenses/MIT | |
# | |
# Created on 2014-03-03 | |
# |
#!/usr/bin/env python | |
# encoding: utf-8 | |
# | |
# Copyright (c) 2016 Dean Jackson <deanishe@deanishe.net> | |
# | |
# MIT Licence. See http://opensource.org/licenses/MIT | |
# | |
# Created on 2016-12-19 | |
# |