Skip to content

Instantly share code, notes, and snippets.

@ShawonAshraf
Created October 8, 2021 15:00
Show Gist options
  • Save ShawonAshraf/385364efc5e2f1954c986ed31406ee51 to your computer and use it in GitHub Desktop.
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.
#! /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
email
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()
@ShawonAshraf
Copy link
Author

How to run

# make sure to have python3 installed!
python main.py

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