Skip to content

Instantly share code, notes, and snippets.

@thepushkarp
Last active February 6, 2021 05:14
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 thepushkarp/eb04d8037a0c567a66694ea031b580b1 to your computer and use it in GitHub Desktop.
Save thepushkarp/eb04d8037a0c567a66694ea031b580b1 to your computer and use it in GitHub Desktop.
Email generation script for batch mails of IIIT Vadodara
"""
Email generation script for batch mails of IIIT Vadodara
"""
# import pyperclip # Use pyperclip if you want to paste emails directly to clipboard
emails = ""
# Batch of 2016
# for i in range(1, 62 + 1): # CSE
# emails += (f"201651{str(i).zfill(3)}@iiitvadodara.ac.in\n")
# for i in range(1, 30 + 1): # IT
# emails += (f"201652{str(i).zfill(3)}@iiitvadodara.ac.in\n")
# Batch of 2017
# for i in range(1, 68 + 1): # CSE
# emails += (f"201751{str(i).zfill(3)}@iiitvadodara.ac.in\n")
# for i in range(1, 43 + 1): # IT
# emails += (f"201752{str(i).zfill(3)}@iiitvadodara.ac.in\n")
# Batch of 2018
for i in range(1, 155 + 1): # CSE
emails += (f"201851{str(i).zfill(3)}@iiitvadodara.ac.in\n")
for i in range(1, 31 + 1): # IT
emails += (f"201852{str(i).zfill(3)}@iiitvadodara.ac.in\n")
# Batch of 2019
for i in range(1, 195 + 1): # CSE
emails += (f"201951{str(i).zfill(3)}@iiitvadodara.ac.in\n")
for i in range(1, 42 + 1): # IT
emails += (f"2019522{str(i).zfill(2)}@iiitvadodara.ac.in\n")
# pyperclip.copy(emails) # Install pyperclip and import it to use this
# Saves emails to 'emails.txt'
with open('emails.txt', 'w') as email_file:
email_file.write(emails)
@thepushkarp
Copy link
Author

Usage:

  • Comment the batches/streams you do not want to send mail to.
  • Run
$ python emails.py

The emails would be saved in emails.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment