I hereby claim:
- I am garcia on github.
- I am garcia (https://keybase.io/garcia) on keybase.
- I have a public key ASACADhJrVlvsNQCi89p44aQ8bYZSnqPq-qaHJW9aYg3ywo
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| import colorsys | |
| import struct | |
| import sys | |
| f_in = open(sys.argv[1], 'rb') | |
| f_out = open(sys.argv[2], 'wb') | |
| # check header | |
| if f_in.read(3) != 'GIF': | |
| raise TypeError('not a GIF') |
| #!/usr/bin/env python | |
| import itertools | |
| import json | |
| import logging | |
| import sys | |
| import time | |
| import traceback | |
| # oauth2 is available at https://github.com/simplegeo/python-oauth2 | |
| import oauth2 |
| print'exec '+(lambda L,R:lambda C:R(L,R,C))((lambda L,R,c:'type((lambda:0).__code__)(%s)'%','.join(R(L,R,getattr(c,'co_'+n))for n in'argcount:nlocals:stacksize:flags:code:consts:names:varnames:filename:name:firstlineno:lnotab:freevars:cellvars'.split(':'))),(lambda L,R,o:L(L,R,o)if type(o).__name__=='code'else'('+''.join(R(L,R,n)+','for n in o)+')'if type(o).__name__=='tuple'else repr(o)))((lambda n:compile(open(n,'r').read(),n,'exec'))(__import__('sys').argv[-1])) |
| #!/usr/bin/env python | |
| import json | |
| import pickle | |
| import pprint | |
| import sys | |
| import time | |
| import traceback | |
| import oauth2 | |
| import requests |
| #!/usr/bin/env python | |
| import argparse | |
| import errno | |
| import itertools | |
| import json | |
| import os | |
| import requests | |
| import time | |
| WIDTHS = (1280, 500, 400, 250, 100, 75) |
| import ctypes | |
| import sys | |
| for b, boolean in enumerate((False, True)): | |
| (ctypes.c_char * sys.getsizeof(boolean)).from_address(id(boolean))[8] = chr(1 - b) |
| import ctypes | |
| import struct | |
| import sys | |
| # Goal: obtain something like "outer = (outer,)", even though that's impossible with vanilla Python | |
| inner = () | |
| outer = (inner,) | |
| # Get CPython's internal representation of the outer tuple | |
| c_outer = (ctypes.c_char * sys.getsizeof(outer)).from_address(id(outer)) |
| #!/usr/bin/env python | |
| def curry(f, args=None): | |
| def curried(arg): | |
| if args is None: | |
| args_ = [] | |
| else: | |
| args_ = args | |
| args_.append(arg) | |
| if len(args_) == f.__code__.co_argcount: |
| import itertools | |
| import math | |
| class _OR(object): | |
| def __radd__(self, lhs): | |
| if isinstance(lhs, PlusOrMinus): | |
| copy = PlusOrMinus(*lhs) | |
| else: | |
| copy = PlusOrMinus(lhs) | |
| copy.plusorminus = True |
I hereby claim:
To claim this, I am signing this object: