I hereby claim:
- I am hugoarts on github.
- I am hugoarts (https://keybase.io/hugoarts) on keybase.
- I have a public key ASCVbHHGuyO5sEzyzoBdJXbp0sIsEyF9B-8wkCNwc0scsAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| import timeit | |
| import bisect | |
| r = 10000 | |
| s = "a = range(%s);" % r | |
| print('starting timing...') | |
| a = timeit.Timer(setup=s, stmt="55555 in a") | |
| print('timing list: %s' % a.repeat(3, r)) |
| cat /dev/urandom | tr -dc 'a-zA-Z0-9-_!@#$%^&*()_+{}|:<>?='| fold -w 12 | head -n 1 | grep -i '[!@#$%^&*()_+{}|:<>?= |
| binder = event.Binder(pygame.KEYDOWN, {'unicode': 'a'}, function_or_method) | |
| manager.bind(binder) |
| @gunge.event.bind(pygame.QUIT) | |
| def on_quit(event): | |
| gunge.manager.keeprunning = False | |
| gunge.manager.mainloop() |
| while 1: | |
| for event in pygame.event.get(): | |
| if event.type == pygame.QUIT: | |
| return | |
| # et cetera |
| def inside((x, y)): | |
| return 0 < x < 20 and 0 < y < 20 | |
| @gunge.event.bind(pygame.MOUSEMOTION, {'pos': inside , 'rel': set([(5, 5), (-5,-5)]), 'buttons': (1, 0, 1)}) | |
| def on_mousemotion(event): | |
| print "event called" |