This is a markdown file to explain how the script works
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 | |
from math import sqrt | |
def compute(gen): | |
def stat(x): | |
stat.max = x if stat.max is None else stat.max | |
stat.min = x if stat.min is None else stat.min | |
stat.sum += x | |
stat.sum2 += x*x |
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
!DOCTYPE html> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script src="https://github.com/mbostock/d3/blob/master/d3.v2.min.js"></script> | |
<style> | |
body { | |
font: 10px sans-serif; | |
} | |