prof

Sign up for a GitHub account Sign in All Gists lykkin / gist:cf115bb24a5f93e8f7c9 Created November 21, 2014 Code Revisions 1 /.sunken-menu-group /.sunken-menu-contents Embed HTTPS SSH You can clone with HTTPS or SSH . Download Gist /.only-with-full-nav prof View gist:cf115bb24a5f93e8f7c9 gistfile1.txt Raw File suppressed. Click to show. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 from functools import wraps from datetime import datetime def memo(f): cache = {} @wraps(f) def inner(*args, **kwargs): key = str(args) + str(kwargs) try: return cache[key] except KeyError: cache[key] ...

Linked on 2014-11-21 19:51:00 | Similar Links