<jupyter_start><jupyter_text>Generating the list  List of names for the draw and associated contacts (email, skype, slack...)<jupyter_code>names = ["Bill","Bob","Alice","<NAME>","Timmy","<NAME>","Dave"]
contacts = ["<EMAIL>","<EMAIL>","<EMAIL>","<EMAIL>","<EMAIL>","<EMAIL>","<EMAIL>"]<jupyter_output><empty_output><jupyter_text>Any excluded pairings? (spouses, siblings, people already giving gifts...)<jupyter_code>exclusions = [["Bill","Bob"],["<NAME>","<NAME>"],["Bob","Dave"]]<jupyter_output><empty_output><jupyter_text>Tell Santa all this information<jupyter_code>persons = make_dict_of_persons(names,contacts,exclusions)
santa = Santa(persons)<jupyter_output><empty_output><jupyter_text>Let's have a look at this data<jupyter_code>print(persons['Alice'].contact)
print(persons['Bob'].exclusions)<jupyter_output><EMAIL>
[Bill, Dave]<jupyter_text>Santa makes a list<jupyter_code>random.seed(123456789) # Optionally seed the RNG with an integer 
gifts = santa.make_a_list()
santa.display() # If you want to keep it secret from yourself, don't run this!<jupyter_output>Assigned gifts:
Bill ==> <NAME>
Bob ==> <NAME>
Alice ==> Dave
<NAME> ==> Timmy
Timmy ==> Bob
<NAME> ==> Alice
Dave ==> Bill<jupyter_text>Email each person the recipient for their gift  Custom body for email<jupyter_code>message = """\
Subject: Secret santa - your giftee
Hi {name},

Your secret santa has been drawn! You have been assigned to give a gift to: {gift_reciever}

This secret santa has been organised by a computer https://github.com/gdold/secretsanta

Have a great solstice!"""<jupyter_output><empty_output><jupyter_text>Send messages<jupyter_code>smtp_server = 'smtp.gmail.com'
elves = Elves(persons,gifts,message,smtp_server)
elves.send_email()<jupyter_output>This will send the assigned secret santas to the gifters via email.
You will be asked to confirm before the messages are sent.
{'fraction_non_alphanumeric': 0.14628937533368927, 'fraction_numerical': 0.004805125467164976, 'mean_word_length': 8.053140096618357, 'pattern_counts': {'":': 0, '<': 42, '<?xml version=': 0, '>': 49, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '384520', 'license': 'MIT', 'n_tokens_mistral': 678, 'n_tokens_neox': 654, 'n_words': 158, 'path': 'docs/secretsanta_example.ipynb', 'repo_name': 'gdold/secretsanta', 'size': '1989'}