Skip to content

Instantly share code, notes, and snippets.

Avatar

Ming Han Teh minghan

View GitHub Profile
@minghan
minghan / sphinx-autopackage
Created Jul 8, 2011
Sphinx autopackage guide
View sphinx-autopackage
https://bitbucket.org/etienned/sphinx-autopackage-script/src/7199e9725789/generate_modules.py
Example usage:
./generate_modules.py ~/path/to/some/package -d ~/dest/path/
@minghan
minghan / .indent.pro
Created Jul 7, 2011
Indent profile for --linux for older versions of indent
View .indent.pro
-nbad -bap -nbc -bbo -hnl -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -d0 -di1 -nfc1 -i4 -ip0 -l80 -lp -npcs -nprs -npsl -sai -saf -saw -ncs -nsc -sob -nfca -cp33 -ss -ts8000
@minghan
minghan / memoize.py
Created Jul 7, 2011
Python Memoize Example
View memoize.py
# Memoize Example
class Pak(object):
# Do not use @staticmethod here
def memoize(key):
def decfunc(f):
def newfunc(self):
if not hasattr(self, key):
setattr(self, key, f(self))
You can’t perform that action at this time.