Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
# This file: (find-angg ".pythonrc.py") # http://angg.twu.net/.pythonrc.py.html # See: (find-angg ".zshrc" "python") # (find-angg ".faceutils/vars.py") # (find-es "python" "PYTHONSTARTUP") # (find-es "python" "execfile") # (find-eevrc ".pythonrc.py") # (defun u () (interactive) (find-angg-upload-links "" ".pythonrc.py")) # (defun d () (interactive) (find-wget "http://angg.twu.net/.pythonrc.py")) # «.imports» (to "imports") # «.ee_dofile» (to "ee_dofile") # (find-angg ".faceutils/vars.py") # (find-es "facebook" "explorer") # https://developers.facebook.com/tools/explorer # (find-angg "fbcache/p.py") # token = "CAACE..." # «imports» (to ".imports") # (find-es "sympy" "re-regex-gitter-question") # import re import os import re as stdlib_re def ee_expand (fname): fname = stdlib_re.sub("^~", os.getenv("HOME"), fname) # fname = re.sub("^\\$([A-Za-z0-9_]+)", lambda (m): os.getenv(m.group(1)), fname) fname = stdlib_re.sub("^\\$([A-Za-z0-9_]+)", lambda m: os.getenv(m.group(1)), fname) return fname def ee_readfile(fname): f = open(ee_expand(fname)) bigstr = f.read() f.close() return bigstr def ee_writefile(fname, bigstr): f = open(ee_expand(fname), "w") f.write(bigstr) f.close() # «ee_dofile» (to ".ee_dofile") # (find-es "python" "execfile") def ee_dofile (fname): fname = ee_expand(fname) exec(compile(open(fname).read(), fname, "exec"), globals()) # (find-es "python" "pprint") import pprint def pp (o): pprint.pprint(o) # (find-pydoc "library/pprint") # (find-pydoc "library/pprint#pprint.pprint") # (find-pydoc "library/pprint#pprint.PrettyPrinter") # (find-pydoc "library/os") # (find-pydoc "library/os#os.getenv") # (find-pydoc "library/re") # (find-pydoc "library/re#re.sub") # # pprinter = pprint.PrettyPrinter(indent=4, width=150) # def pp(o): # pprint.pprint(o) # def po(o): # pp(ggo(o)) # def ggo(o): # return graph.get_object(o) # (find-es "python" "dict") # import facebook # graph = facebook.GraphAPI(token) def ggo (query): return graph.get_object("/v2.1/%s" % (query)) def testid (id): try: print(id + ":", ggo(id).keys()) except: print("fail")