Skip to content

Instantly share code, notes, and snippets.

@gregorykremler
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregorykremler/6bc64e551ee33a7c91fd to your computer and use it in GitHub Desktop.
Save gregorykremler/6bc64e551ee33a7c91fd to your computer and use it in GitHub Desktop.
Generates secret santa list for Enigma.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import random
TEAM_MEMBERS = [
'Marc DaCosta',
'Craig Danton',
'Mike Flowers',
'Hicham Oudghiri',
'Brian Abelson',
'Michael Benoit',
'Clemente Cuevas',
'Raluca Dragusanu',
'Jeremy Bronfman',
'Ben Gelb',
'Matt Horan',
'Courtney Johnson',
'Ken Keiter',
'Gregory Kremler',
'Jeremy Krinsley',
'Destine Özuygur',
'Jarrod Parker',
'Brian Seitz',
'Jeremy Ulman',
'Byron Wong'
]
def gen_santas(lst):
"""Randomly associate pairwise elements."""
lst_copy = lst[:]
random.shuffle(lst_copy)
secret_santas = zip(TEAM_MEMBERS, lst_copy)
for gifter, giftee in secret_santas:
print "{} is a secrect santa for {}.".format(gifter, giftee)
def main():
gen_santas(TEAM_MEMBERS)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment