Skip to content

Instantly share code, notes, and snippets.

@JoaquinAcuna97
Created August 6, 2021 16:35
Show Gist options
  • Save JoaquinAcuna97/a51b16c8ff35a99890426373ee51cfa5 to your computer and use it in GitHub Desktop.
Save JoaquinAcuna97/a51b16c8ff35a99890426373ee51cfa5 to your computer and use it in GitHub Desktop.
from __future__ import print_function
import random
character = (
"Hero",
"Recruit",
"Invader",
"Commander",
"Children",
"Spies",
"Commanders",
"Soldier",
"Droids",
"Veterans",
"Beasts",
"Chase",
"Construction",
"Honor",
"Confinement",
"Defenseless",
"Alerted",
"Light",
"Afraid",
"Failing",
"Courage",
"Demand",
"Life"
)
final_phrase = (
"Men's Legacy",
"The Flight",
"Tentacles",
"Men's Legacy",
"New Worlds",
"The Future",
"Four Eyes",
"Everywhere",
"Guests",
"Robots",
"Directors",
"Armies",
"Outer Space",
"Honor",
"The Droids",
"The New World",
"The Void Of Space",
"Time Travel",
"Orbit",
"The Mists",
"The New World",
"New Earth",
"My Journey",
"The Machines"
)
connectors = (
"Of",
"In",
"With",
"And",
"By",
"For",
"Against"
)
def sample(the_sample= None, n = 1):
result = random.sample(the_sample, n)
if n == 1:
return result[0]
return result
def generate_movie():
phrase = ' '.join([sample(character), sample(connectors), sample(final_phrase)])
return phrase.title()
if __name__ == "__main__":
print(generate_movie())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment