Skip to content

Instantly share code, notes, and snippets.

@jkbrzt
jkbrzt / gist:4227667
Created December 6, 2012 19:44 — forked from shazow/gist:4227021
Closure scopes in JavaScript.
(function() {
// This is a new closure. If things that happen here don't have side-effects on outside scope,
// then whatever happens here will not be visible outside of it.
(function() {
// You can make closures inside of closure (inside of closures). Wee.
})();
})();
@jkbrzt
jkbrzt / birthday_paradox.py
Last active October 6, 2015 11:47
Birthday paradox
from __future__ import division
from operator import mul
def Q(n):
"""
Let Q(n) be the probability that
no two people have a common birthday.
"""