forked from DMUCTNOTOSWWGS/jetmemes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjetmemes.py
More file actions
executable file
·40 lines (24 loc) · 735 Bytes
/
jetmemes.py
File metadata and controls
executable file
·40 lines (24 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env python3
import itertools
from random import shuffle, choice
l = ['jet', 'fuel', 'melt', 'steel', 'beams', 'meme']
def jet_melt():
perm = list(itertools.permutations(l))
shuffle(perm)
return perm
def melt_meme(a):
b = choice(a)
return melt_meme(b) if isinstance(b, list) else b
def steel_fuel(a):
return "{}can't{}".format("{} " * 2, " {}" * 3).format(a[0][0].upper() + a[0][1:], *a[1:len(l)])
def beam_memes():
perm = jet_melt()
print("\n".join([steel_fuel(melt_meme(a)) for a in perm]))
def jet_beams():
perm = jet_melt()[0]
return steel_fuel(perm)
# A helpful alias
def create_commit_message():
return jet_beams()
if __name__ == "__main__":
beam_memes()