Skip to content

Instantly share code, notes, and snippets.

@spences10
Last active December 21, 2016 11:54
Show Gist options
  • Save spences10/1b1518fe23f25d163ccbf55dc3f753c3 to your computer and use it in GitHub Desktop.
Save spences10/1b1518fe23f25d163ccbf55dc3f753c3 to your computer and use it in GitHub Desktop.
Great way to generate comments
def generate_comment(self):
c_list = list(itertools.product(
["this", "the", "your"],
["photo", "picture", "pic", "shot", "snapshot"],
["is", "looks", "feels", "is really"],
["great", "super", "good", "very good",
"good", "wow", "WOW", "cool",
"GREAT", "magnificent", "magical", "very cool",
"stylish", "so stylish", "beautiful",
"so beautiful", "so stylish", "so professional",
"lovely", "so lovely", "very lovely",
"glorious", "so glorious", "very glorious",
"adorable", "excellent", "amazing"],
[".", "..", "...", "!", "!!", "!!!"]))
repl = [(" ", " "), (" .", "."), (" !", "!")]
res = " ".join(random.choice(c_list))
for s, r in repl:
res = res.replace(s, r)
return res.capitalize()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment