I hereby claim:
- I am agfor on github.
- I am agf (https://keybase.io/agf) on keybase.
- I have a public key whose fingerprint is 0648 5B84 A556 77B0 4442 6A36 74F0 4AF9 EEF6 7BB2
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python3 | |
import sys | |
assert sys.version[0] == '3' | |
from random import choice | |
from itertools import product | |
from collections import Counter, defaultdict | |
class Settings: |
>>> def foo(bar): | |
... if bar: | |
... def baz(): | |
... yield True | |
... return baz() | |
... else: | |
... return False | |
... | |
>>> foo(True) | |
<generator object baz at 0x100b82910> |
These notes are just what struck me as worth writing down. It was a pretty standard speech of his, so some of this is the color you wouldn't necessarily get by watching a video online. | |
-- | |
He ran down the aisle shouting "dammit dammit dammit" when he arrived, which made a toddler in the back of the room yell the same. | |
He picked his feet. | |
My tea's not hot enough. It needs to be run through the machine again. The water should fall right on the tea bag if possible. |
#based on http://ubuntuforums.org/showthread.php?t=500337 | |
import alsaaudio, time, audioop | |
talks = """OCaml | |
R | |
Swift | |
PostScript | |
QML | |
Ruby |
#Naive version. Takes a couple of minutes for 11 dice on my laptop | |
#from itertools import product | |
#from collections import Counter | |
# | |
#dice = int(input('How many dice? ')) | |
#result = Counter(map(sum, product(range(1, 7), repeat=dice))) | |
#print(result) | |
def choose(n, k): | |
""" |
import java.io.*; | |
import java.lang.Math; | |
public class Temporal_Noise { | |
public static void main(String[] args) { | |
Temporal_Noise tn = new Temporal_Noise(); | |
tn.run(null); | |
} | |
public void run(String dir_name) { | |
if (dir_name == null) |
import collections | |
import itertools | |
def last(iterable, deque=collections.deque): | |
return deque(iterable, maxlen = 1)[0] | |
def iterlen(iterable): | |
return sum(1 for _ in iterable) | |
def droptake(iterable, takecondition, dropcondition = None, |
from __future__ import with_statement | |
from heapq import heapify, heappop, heappushpop | |
from itertools import count | |
from mmap import mmap | |
try: | |
from collections import Counter | |
except: | |
def Counter(iterable): | |
frequencies = __import__('collections').defaultdict(int) | |
for item in iterable: |
from collections import OrderedDict | |
class OrderedSet(object): | |
def __init__(self, iterable = None): | |
self.storage = OrderedDict() | |
if iterable: | |
self.storage.update((elem, True) for elem in iterable) | |
def __contains__(self, elem): | |
return elem in self.storage | |
def __iter__(self): | |
return iter(self.storage) |