Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- None or no argument seeds from current time or from an operating
- system specific randomness source if available.
- if a is None:
- try:
- a = long(_hexlify(_urandom(16)), 16)
- except NotImplementedError:
- import time
- a = long(time.time() * 256) # use fractional seconds
- random = self.random
- u = random()
- while u <= 1e-7:
- u = random()
- return -_log(u)/lambd
Add Comment
Please, Sign In to add comment