Skip to content

Instantly share code, notes, and snippets.

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
var hp = "<html xmlns=\x22http://www.w3.org/1999/xhtml\x22><head><link href=\x22css/style.css\x22 type=\x22text/css\x22 rel=\x22stylesheet\x22><link href=\x22css/fontstyle.css\x22 type=\x22text/css\x22 rel=\x22stylesheet\x22><title>Meny</title><meta name=\x22robots\x22 content=\x22index,follow\x22><meta name=\x22googlebot\x22 content=\x22index, follow\x22><meta http-equiv=\x22Content-Language\x22 content=\x22SE\x22><meta name=\x22description\x22 content=\x22\x22><meta name=\x22keywords\x22 content=\x22\x22><meta name=\x22distribution\x22 content=\x22Global\x22><meta name=\x22rating\x22 content=\x22general\x22><meta name=\x22copyright\x22 content=\x224D Profile\x22><meta name=\x22author\x22 content=\x22Marks & Bleeds\x22><script src=\x22jscripts/AC_RunActiveContent.js\x22 language=\x22javascript\x22></script><script type=\x22text/javascript\x22 src=\x22jscripts/prototype.js\x22></script><script type=\x22text/javascript\x22 src=\x22jscripts/scriptaculous.js?load=effects,builder\x22></script><script type=\x22tex
$(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")
@jacobk
jacobk / process_tornado_bm.py
Created December 9, 2010 20:04
Simple script to process raw data from Tornado BM
#!/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.
"""