[ create a new paste ] login | about

Link: http://codepad.org/8cBmtjSj    [ raw code | fork ]

Python, pasted on Sep 1:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
>>> from school.models import Measurement, Asset
>>> a = Asset.objects.get(id=1)
>>> m = Measurement(content_object=a)
>>> m.sample(10)
>>> m.sample(4)
>>> m.sample(20)
>>> m.sample(1)
>>> m.sample(23)
>>> m.save()
>>> m.sd
9.6591925128346
>>> m.mean
11.6
>>> m.sum
58.0
>>> m.count
5.0
>>> m.sumsq
1046.0


Create a new paste based on this one


Comments: