Created
May 7, 2021 02:35
-
-
Save RulerOf/9c812fbc33b2d43b242d698e0e83d93b to your computer and use it in GitHub Desktop.
Predictable Shuffle with Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
shuffle_key = "QRUzaKNB4V5pparzJWTa" | |
# Imagine we have a list of images that's 200k items long | |
frame_list = [*range(1,200000)] | |
# Shuffle the frame list with the key | |
random.Random(shuffle_key).shuffle(frame_list) | |
# Display our result | |
for x in range(10): | |
print(frame_list[x]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment