I hereby claim:
- I am dhaffner on github.
- I am dhaffner (https://keybase.io/dhaffner) on keybase.
- I have a public key ASAKv3xsaN4c1hBlqC-e_JS6i3Hpa4G8CieKFGT8dtwMZAo
To claim this, I am signing this object:
| import inspect | |
| from random import random | |
| def foo_iterator(): | |
| while True: | |
| caller_frame = inspect.currentframe().f_back | |
| frame_info = inspect.getframeinfo(caller_frame) | |
| if '.send(' in frame_info.code_context[0]: |
I hereby claim:
To claim this, I am signing this object:
| # found this from Armin R. on Twitter, what a beautiful gem ;) | |
| import ctypes | |
| from types import DictProxyType, MethodType | |
| # figure out side of _Py_ssize_t | |
| if hasattr(ctypes.pythonapi, 'Py_InitModule4_64'): | |
| _Py_ssize_t = ctypes.c_int64 | |
| else: | |
| _Py_ssize_t = ctypes.c_int |
| #!/usr/bin/env python | |
| from random import randint | |
| def compose(*funcs): | |
| '''Return a function that represents the composition | |
| of an arbitrary number of functions. | |
| ''' | |
| compose_once = lambda f, g: lambda x: f(g(x)) | |
| return reduce(compose_once, funcs) |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
| <title>title</title> | |
| <style type="text/css"> | |
| body, html { | |
| width: 100%; | |
| height: 100%; |