Skip to content

Instantly share code, notes, and snippets.

@64lines
Last active March 2, 2018 04:36
Show Gist options
  • Save 64lines/69b60bc6eb73800ab2ef5cf8a4e6ae2f to your computer and use it in GitHub Desktop.
Save 64lines/69b60bc6eb73800ab2ef5cf8a4e6ae2f to your computer and use it in GitHub Desktop.
The Philosopher: A program that generates philosophic quotes...
##################################
# The Philosopher: A program that
# generates philosophic quotes...
#################################
import random
R = ["without", "under",
"between", "over", "on",
"after", "by", "because of", "next to", "on top",
"like", "through", "until", "from", "into", "to", "in",
"since"]
T = ["laughter", "man", "pain",
"building", "magic", "wealth", "water",
"spoon", "day", "sister", "train",
"pleasure", "potato", "price", "rhythm", "woman",
"world", "person", "theory", "problem", "bird",
"understanding", "control", "power", "country", "mountain"]
N = ["a", "any", "another", "other"]
M = ["wasted", "beautiful", "elegant",
"easy", "absolute", "careful", "abandoned", "empty", "accurate",
"accomplished", "authentic", "clumsy", "calm", "crazy", "creepy",
"enlightened"]
string = "S"
string = string.replace("S", "X V Z") \
.replace("X", "Y O") \
.replace("Z", "Y M") \
.replace("O", "R Y") \
.replace("Y", "N T") \
.replace("R", random.choice(R)) \
.replace("T", random.choice(T), 1) \
.replace("T", random.choice(T), 1) \
.replace("T", random.choice(T), 1) \
.replace("N", random.choice(N), 1) \
.replace("N", random.choice(N), 1) \
.replace("N", random.choice(N), 1) \
.replace("M", random.choice(M)) \
.replace("V", "is")
print string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment