Skip to content

Instantly share code, notes, and snippets.

@chinskiy
Created June 3, 2019 20:26
Show Gist options
  • Save chinskiy/4a8895af1d22a68a0b83bc24b39c5acc to your computer and use it in GitHub Desktop.
Save chinskiy/4a8895af1d22a68a0b83bc24b39c5acc to your computer and use it in GitHub Desktop.
def get_flag_value(flag_name, uid, pct=50):
random = Random()
random.seed("%s-%s" % (uid, flag_name))
return random.randint(1, 100) <= pct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment