daily pastebin goal
62%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import numpy as np
  2. import datetime
  3. seed = hash(datetime.datetime.day)
  4. salt = hash('We accept your preregistration')
  5. seed = (salt + seed) % (2**32-1)
  6. np.random.seed(seed)
  7. nums = np.random.permutation(range(0,5,1))
  8. np.random.seed(seed)
  9. test_nums = np.random.permutation(range(0,5,1))
  10. assert np.equal(test_nums, nums).all()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top