Skip to content

Instantly share code, notes, and snippets.

@rcloran
rcloran / gist:1186578
Created September 1, 2011 16:29 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
entry = {
"Day job": "Programmer"
"Favorite Python project": "ibid"
"Favorite Conference": "UDS"
"Python Experience Level": "Daily use on a large Twisted system, 7/10"
}
enter(entry)
@rcloran
rcloran / index.html
Last active December 15, 2015 06:19 — forked from mbostock/.block
<!DOCTYPE html>
<meta charset="utf-8">
<style>
path {
stroke-linejoin: round;
}
.land {
fill: #ddd;
<!DOCTYPE html>
<meta charset="utf-8">
<style>
path {
stroke-linejoin: round;
}
.land {
fill: #ddd;
class Empty:
pass
class AVLTree(object):
value = None
left = None
right = None
def __init__(self, value=Empty, left=None, right=None, parent=None):
if value is Empty and parent:
from avltree import AVLTree
class AVLMap(object):
def __init__(self):
self._store = AVLTree()
def __setitem__(self, key, value):
self._store.insert((key, value))
def __getitem__(self, key):
import random
RUNS = 10**6
APPLICANTS = 124000
ACCEPTED_1 = 20000
ACCEPTED_2 = 65000
FRIENDS = 4
import random
RUNS = 10**3
APPLICANTS = 124000
ACCEPTED_1 = 20000
ACCEPTED_2 = 65000
FRIENDS = 4
import random
RUNS = 10**4
APPLICANTS = 124000
ACCEPTED_1 = 20000
ACCEPTED_2 = 65000
FRIENDS = 4
@rcloran
rcloran / japh.py
Last active August 29, 2015 14:00
japh2
#!/usr/bin/env python
print open(__file__).read(),