Skip to content

Instantly share code, notes, and snippets.

View matsimitsu's full-sized avatar

Robert Beekman matsimitsu

View GitHub Profile
@RedBeard0531
RedBeard0531 / functions.js
Created February 22, 2012 20:13
Min, Max, Sum, Count, Avg, and Std deviation using MongoDB MapReduce
// derived from http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Parallel_algorithm
function map() {
emit(1, // Or put a GROUP BY key here
{sum: this.value, // the field you want stats for
min: this.value,
max: this.value,
count:1,
diff: 0, // M2,n: sum((val-mean)^2)
});
@alloy
alloy / gist:3176014
Created July 25, 2012 12:50
Ha ha ha één, of toch maar niet?

Totaal niet semantisch. Ik bedoel “haa-één”??

<h1>Brekend: Kraai valt ouders op schoolplein lastig</h1>

Dit daarentegen begrijpt iedereen gelijk; opletten geblazen!