changed to more widely available random number generator, random()
Merge remote-tracking branch 'upstream/pydecode' into pydecode
add seed as parameter