+# Date: 27th January 2011
+# Author: James Mills, prologic at shortcircuit dot net au
+Module of small useful math tools aka common math routines.
+ """Calculate the mean of a list of numbers given by xs"""
+ return sum(xs) / len(xs)
+ """Calculate the standard deviation of a list of numbers give by xs"""
+ dxs = (x - m for x in xs)
+ qdxs = (x * x for x in dxs)
+ return sqrt(sum(qdxs) / (len(qdxs) - 1))