Skip to content

Instantly share code, notes, and snippets.

Ming Han Teh minghan

Block or report user

Report or block minghan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
minghan / sphinx-autopackage
Created Jul 8, 2011
Sphinx autopackage guide
View sphinx-autopackage
Example usage:
./ ~/path/to/some/package -d ~/dest/path/
minghan /
Created Jul 7, 2011
Indent profile for --linux for older versions of indent
-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 /
Created Jul 7, 2011
Python Memoize Example
# 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.