This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
that.autocomplete("/example/url" + this.rId + "/", { | |
autoFill: true, | |
delay: 20, | |
selectFirst: true | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm using this to experiment with writing a blog. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |