Skip to content

Instantly share code, notes, and snippets.

@chrisedgemon
chrisedgemon / autocomplete.example.js
Created July 12, 2011 22:42
An example autocomplete call
that.autocomplete("/example/url" + this.rId + "/", {
autoFill: true,
delay: 20,
selectFirst: true
});
@chrisedgemon
chrisedgemon / blog
Created July 5, 2011 05:07
just a blog about my life.
I'm using this to experiment with writing a blog.
>>> def x(lst, cols):
... if cols == 0: return []
... slice = len(lst) / cols
... if len(lst) % cols:
... slice += 1
... return [lst[:slice]] + x(lst[slice:], cols-1)
@chrisedgemon
chrisedgemon / collatz.py
Created April 28, 2010 19:09 — forked from bkonkle/collatz.py
Collatz Conjecture
import random
def collatz(n):
"""
Run the collatz conjecture for integer n
http://en.wikipedia.org/wiki/Collatz_conjecture
"""
step = lambda m: m * 3 + 1 if m % 2 else m / 2