Created
October 8, 2021 15:00
-
-
Save ShawonAshraf/385364efc5e2f1954c986ed31406ee51 to your computer and use it in GitHub Desktop.
A script to generate information for filling out the annoying davinci resolve download form.
This file contains hidden or 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
#! /usr/bin/python3 | |
import random | |
""" | |
A script to generate information for filling out the | |
annoying davinci resolve download form. | |
Required fields in the Davinci Resolve Download form: | |
first name | |
last name | |
phone | |
city | |
""" | |
# characters to pick from | |
charmap = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', | |
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] | |
# for phone number | |
nummap = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] | |
def generate_form_info(): | |
# pick 3 random characters | |
char_count = 3 | |
# ============== first name ============== | |
fname_chars = random.sample(charmap, char_count) | |
# gg is a placeholder in case sample returns nothing | |
fname = "gg".join(i for i in fname_chars) | |
print("First Name : ", fname) | |
# ============== last name ============== | |
lname_chars = random.sample(charmap, char_count) | |
lname = "wp".join(i for i in lname_chars) | |
print("Last Name : ", lname) | |
# ================= email ================= | |
email = f"{fname}@{lname}.com" | |
print("Email : ", email) | |
# ================= phone ================= | |
phone_digits = random.sample(nummap, 7) | |
phone_number = "".join(i for i in phone_digits) | |
print("Phone Number : ", phone_number) | |
# ================= city ================= | |
# why bother generating a random city name eh? | |
print("City : ", "New York") | |
if __name__ == "__main__": | |
generate_form_info() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to run
# make sure to have python3 installed! python main.py