Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View juestr's full-sized avatar

Jürgen Strobel juestr

View GitHub Profile
@juestr
juestr / gist:fce0da0c981513589dc1247a5f3a63d7
Last active February 27, 2018 02:40
expected blocktime by random time selection
#!/usr/bin/env python3
from numpy import *
nblocks = 10000
nsamples= 10000
def random_block_duration(_acc=1, _steps=512):
nz = nonzero(random.poisson(1/600., size=_steps))[0]
return _acc + nz[0] if len(nz) else random_block_duration(_acc + _steps, _steps)

Keybase proof

I hereby claim:

  • I am juestr on github.
  • I am juestr (https://keybase.io/juestr) on keybase.
  • I have a public key ASAeA4cjKxIOSLqMgmNA61wyFzThm2Rx6pV8PPkYGqBVfAo

To claim this, I am signing this object: