Using SHA1 as RNG
dradul at yahoo.com
Sat Mar 15 12:45:58 CET 2003
On Sat, 15 Mar 2003 06:56:15 +0000 (UTC), Klaus Alexander Seistrup
<spam at magnetic-ink.dk> wrote:
>Paul Foley wrote:
>> Isn't there an MT-19937 random module? Use that instead.
>> [If not, write one, but I think there is]
>Python 2.3 is using the MT-19937 PRNG. I don't yet know if the
>python wrapper is easily portable to Python 2.2, but I'll give
>it a try.
If you can't, try with crng:
crng - Random-number generators implemented as C extension types.
The generators are uniform in the open interval (0.0,1.0).
Instance objects are callable; calls are equivalent to the 'next'
Random-number generator types
ParkMiller -- Park-Miller 'minimal standard'
WichmannHill -- Wichmann-Hill portable RNG (algorithm AS 183)
LEcuyer -- Pierre L'Ecuyer's MLCG of 1988
Ranlux -- Martin Luescher's RANLUX
Taus88 -- three-component combined Tausworthe RNG by
MRG32k3a -- combined multiple recursive 32-bit RNG by
MT19937 -- Mersenne Twister by Matsumoto and Nishimura
Alejandro Lopez-Valencia tora no shinden
python -c "print('ZHJhZHVsQDAwN211bmRvLmNvbQ=='.decode('base64'))"
More information about the Python-list