This file contains hidden or 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 as r;_,N=range,1e6;l=_(13)*4 | |
print sum([r.shuffle(l)or 0in[x-y for x,y in zip(l[1:],l)]for i in _(N)])/N |
This file contains hidden or 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
$(function() { | |
$("div.content").live("showoff:show", function(evt) { | |
var bg_img = $("img[alt=background]", evt.target); | |
if (bg_img.size() > 0) { | |
var src = bg_img.attr("src"); | |
bg_img.hide(); | |
// Set new background on body | |
$("body").css("background", "url(" + src + ") no-repeat center center fixed") | |
.css("-webkit-background-size", "cover") |
This file contains hidden or 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
#!/usr/bin/env python | |
# encoding: utf-8 | |
# | |
# Requires statlib http://code.google.com/p/python-statlib/ | |
""" | |
process_tornado_bm.py | |
Created by Jacob Kristhammar on 2010-12-09. | |
""" |
NewerOlder