-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
172 lines (169 loc) · 15.9 KB
/
main.py
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
import random
from PIL import Image, ImageDraw, ImageFont
# ef.com/wwen/english-resources/english-idioms/ => idioms list used here
idioms = [
["A blessing in disguise","a good thing that seemed bad at first","as part of a sentence", "Most common"],
["A dime a dozen","Something common","as part of a sentence", "Most common"],
["Beat around the bush","Avoid saying what you mean, usually because it is uncomfortable","as part of a sentence", "Most common"],
["Better late than never","Better to arrive late than not to come at all","by itself", "Most common"],
["Bite the bullet","To get something over with because it is inevitable","as part of a sentence", "Most common"],
["Break a leg","Good luck","by itself", "Most common"],
["Call it a day","Stop working on something","as part of a sentence", "Most common"],
["Cut somebody some slack","Don't be so critical","as part of a sentence", "Most common"],
["Cutting corners","Doing something poorly in order to save time or money","as part of a sentence", "Most common"],
["Easy does it","Slow down","by itself", "Most common"],
["Get out of hand","Get out of control","as part of a sentence", "Most common"],
["Get something out of your system","Do the thing you've been wanting to do so you can move on","as part of a sentence", "Most common"],
["Get your act together","Work better or leave","by itself", "Most common"],
["Give someone the benefit of the doubt","Trust what someone says","as part of a sentence", "Most common"],
["Go back to the drawing board","Start over","as part of a sentence", "Most common"],
["Hang in there","Don't give up","by itself", "Most common"],
["Hit the sack","Go to sleep","as part of a sentence", "Most common"],
["It's not rocket science","It's not complicated","by itself", "Most common"],
["Let someone off the hook","To not hold someone responsible for something","as part of a sentence", "Most common"],
["Make a long story short","Tell something briefly","as part of a sentence", "Most common"],
["Miss the boat","It's too late","as part of a sentence", "Most common"],
["No pain, no gain","You have to work for what you want","by itself", "Most common"],
["On the ball","Doing a good job","as part of a sentence", "Most common"],
["Pull someone's leg","To joke with someone","as part of a sentence", "Most common"],
["Pull yourself together","Calm down","by itself", "Most common"],
["So far so good","Things are going well so far","by itself", "Most common"],
["Speak of the devil","The person we were just talking about showed up!","by itself", "Most common"],
["That's the last straw","My patience has run out","by itself", "Most common"],
["The best of both worlds","An ideal situation","as part of a sentence", "Most common"],
["Time flies when you're having fun","You don't notice how long something lasts when it's fun","by itself", "Most common"],
["To get bent out of shape","To get upset","as part of a sentence", "Most common"],
["To make matters worse","Make a problem worse","as part of a sentence", "Most common"],
["Under the weather","Sick","as part of a sentence", "Most common"],
["We'll cross that bridge when we come to it","Let's not talk about that problem right now","by itself", "Most common"],
["Wrap your head around something","Understand something complicated","as part of a sentence", "Most common"],
["You can say that again","That's true, I agree","by itself", "Most common"],
["Your guess is as good as mine","I have no idea","by itself", "Most common"],
["A bird in the hand is worth two in the bush","What you have is worth more than what you might have later","by itself", "Common"],
["A penny for your thoughts","Tell me what you're thinking","by itself", "Common"],
["A penny saved is a penny earned","Money you save today you can spend later","by itself", "Common"],
["A perfect storm","the worst possible situation","as part of a sentence", "Common"],
["A picture is worth 1000 words","Better to show than tell","by itself", "Common"],
["Actions speak louder than words","Believe what people do and not what they say","by itself", "Common"],
["Add insult to injury","To make a bad situation worse","as part of a sentence", "Common"],
["Barking up the wrong tree","To be mistaken, to be looking for solutions in the wrong place","as part of a sentence", "Common"],
["Birds of a feather flock together","People who are alike are often friends (usually used negatively)","by itself", "Common"],
["Bite off more than you can chew","Take on a project that you cannot finish","as part of a sentence", "Common"],
["Break the ice","Make people feel more comfortable","as part of a sentence", "Common"],
["By the skin of your teeth","Just barely","as part of a sentence", "Common"],
["Comparing apples to oranges","Comparing two things that cannot be compared","as part of a sentence", "Common"],
["Costs an arm and a leg","Very expensive","as part of a sentence", "Common"],
["Do something at the drop of a hat","Do something without having planned beforehand","as part of a sentence", "Common"],
["Do unto others as you would have them do unto you","Treat people fairly. Also known as \"The Golden Rule\"","by itself", "Common"],
["Don't count your chickens before they hatch","Don't count on something good happening until it's happened.","by itself", "Common"],
["Don't cry over spilt milk","There's no reason to complain about something that can't be fixed","by itself", "Common"],
["Don't give up your day job","You're not very good at this","by itself", "Common"],
["Don't put all your eggs in one basket","What you're doing is too risky","by itself", "Common"],
["Every cloud has a silver lining","Good things come after bad things","by itself", "Common"],
["Get a taste of your own medicine","Get treated the way you've been treating others (negative)","as part of a sentence", "Common"],
["Give someone the cold shoulder","Ignore someone","as part of a sentence", "Common"],
["Go on a wild goose chase","To do something pointless","as part of a sentence", "Common"],
["Good things come to those who wait","Be patient","by itself", "Common"],
["He has bigger fish to fry","He has bigger things to take care of than what we are talking about now","by itself", "Common"],
["He's a chip off the old block","The son is like the father","by itself", "Common"],
["Hit the nail on the head","Get something exactly right","by itself", "Common"],
["Ignorance is bliss","You're better off not knowing","by itself", "Common"],
["It ain't over till the fat lady sings","This isn't over yet","by itself", "Common"],
["It takes one to know one","You're just as bad as I am","by itself", "Common"],
["It's a piece of cake","It's easy","by itself", "Common"],
["It's raining cats and dogs","It's raining hard","by itself", "Common"],
["Kill two birds with one stone","Get two things done with a single action","by itself", "Common"],
["Let the cat out of the bag","Give away a secret","as part of a sentence", "Common"],
["Live and learn","I made a mistake","by itself", "Common"],
["Look before you leap","Take only calculated risks","by itself", "Common"],
["On thin ice","On probation. If you make another mistake, there will be trouble.","as part of a sentence", "Common"],
["Once in a blue moon","Rarely","as part of a sentence", "Common"],
["Play devil's advocate","To argue the opposite, just for the sake of argument","as part of a sentence", "Common"],
["Put something on ice","Put a projet on hold","as part of a sentence", "Common"],
["Rain on someone's parade","To spoil something","as part of a sentence", "Common"],
["Saving for a rainy day","Saving money for later","as part of a sentence", "Common"],
["Slow and steady wins the race","Reliability is more important than speed","by itself", "Common"],
["Spill the beans","Give away a secret","as part of a sentence", "Common"],
["Take a rain check","Postpone a plan","as part of a sentence", "Common"],
["Take it with a grain of salt","Don’t take it too seriously","as part of a sentence", "Common"],
["The ball is in your court","It's your decision","by itself", "Common"],
["The best thing since sliced bread","A really good invention","as part of a sentence", "Common"],
["The devil is in the details","It looks good from a distance, but when you look closer, there are problems","by itself", "Common"],
["The early bird gets the worm","The first people who arrive will get the best stuff","by itself", "Common"],
["The elephant in the room","The big issue, the problem people are avoiding","as part of a sentence", "Common"],
["The whole nine yards","Everything, all the way.","as part of a sentence", "Common"],
["There are other fish in the sea","It's ok to miss this opportunity. Others will arise.","by itself", "Common"],
["There's a method to his madness","He seems crazy but actually he's clever","by itself", "Common"],
["There's no such thing as a free lunch","Nothing is entirely free","by itself", "Common"],
["Throw caution to the wind","Take a risk","as part of a sentence", "Common"],
["You can't have your cake and eat it too","You can't have everything","by itself", "Common"],
["You can't judge a book by its cover","This person or thing may look bad, but it's good inside","by itself", "Common"],
["A little learning is a dangerous thing","People who don't understand something fully are dangerous","by itself", "Familiar"],
["A snowball effect","Events have momentum and build upon each other","as part of a sentence", "Familiar"],
["A snowball's chance in hell","No chance at all","as part of a sentence", "Familiar"],
["A stitch in time saves nine","Fix the problem now because it will get worse later","by itself", "Familiar"],
["A storm in a teacup","A big fuss about a small problem","as part of a sentence", "Familiar"],
["An apple a day keeps the doctor away","Apples are good for you","by itself", "Familiar"],
["An ounce of prevention is worth a pound of cure","You can prevent a problem with little effort. Fixing it later is harder.","by itself", "Familiar"],
["As right as rain","Perfect","as part of a sentence", "Familiar"],
["Bolt from the blue","Something that happened without warning","as part of a sentence", "Familiar"],
["Burn bridges","Destroy relationships","as part of a sentence", "Familiar"],
["Calm before the storm","Something bad is coming, but right now it's calm","as part of a sentence", "Familiar"],
["Come rain or shine","No matter what","as part of a sentence", "Familiar"],
["Curiosity killed the cat","Stop asking questions","by itself", "Familiar"],
["Cut the mustard","Do a good job","as part of a sentence", "Familiar"],
["Don't beat a dead horse","Move on, this subject is over","by itself", "Familiar"],
["Every dog has his day","Everyone gets a chance at least once","by itself", "Familiar"],
["Familiarity breeds contempt","The better you know someone the less you like him","by itself", "Familiar"],
["Fit as a fiddle","In good health","as part of a sentence", "Familiar"],
["Fortune favours the bold","Take risks","by itself", "Familiar"],
["Get a second wind","Have more energy after having been tired","as part of a sentence", "Familiar"],
["Get wind of something","Hear news of something secret","as part of a sentence", "Familiar"],
["Go down in flames","Fail spectacularly","as part of a sentence", "Familiar"],
["Haste makes waste","You'll make mistakes if you rush through something","by itself", "Familiar"],
["Have your head in the clouds","Not be concentrating","as part of a sentence", "Familiar"],
["He who laughs last laughs loudest","I'll get you back for what you did","by itself", "Familiar"],
["Hear something straight from the horse's mouth","Hear something from the person involved","as part of a sentence", "Familiar"],
["He's not playing with a full deck","He's dumb","by itself", "Familiar"],
["He's off his rocker","He's crazy","by itself", "Familiar"],
["He's sitting on the fence","He can't make up his mind","by itself", "Familiar"],
["It is a poor workman who blames his tools","If you can't do the job, don't blame it on others","by itself", "Familiar"],
["It is always darkest before the dawn","Things are going to get better","by itself", "Familiar"],
["It takes two to tango","One person alone isn't responsible. Both people are involved.","by itself", "Familiar"],
["Jump on the bandwagon","Follow a trend, do what everyone else is doing","as part of a sentence", "Familiar"],
["Know which way the wind is blowing","Understand the situation (usually negative)","as part of a sentence", "Familiar"],
["Leave no stone unturned","Look everywhere","as part of a sentence", "Familiar"],
["Let sleeping dogs lie","Stop discussing an issue","as part of a sentence", "Familiar"],
["Like riding a bicycle","Something you never forget how to do","as part of a sentence", "Familiar"],
["Like two peas in a pod","They're always together","as part of a sentence", "Familiar"],
["Make hay while the sun shines","Take advantage of a good situation","as part of a sentence", "Familiar"],
["On cloud nine","Very happy","as part of a sentence", "Familiar"],
["Once bitten, twice shy","You're more cautious when you've been hurt before","by itself", "Familiar"],
["Out of the frying pan and into the fire","Things are going from bad to worse","by itself", "Familiar"],
["Run like the wind","Run fast","as part of a sentence", "Familiar"],
["Shape up or ship out","Work better or leave","by itself", "Familiar"],
["Snowed under","Busy","as part of a sentence", "Familiar"],
["That ship has sailed","It's too late","by itself", "Familiar"],
["The pot calling the kettle black","Someone criticizing someone else he is just as bad","as part of a sentence", "Familiar"],
["There are clouds on the horizon","Trouble is coming","by itself", "Familiar"],
["Those who live in glass houses shouldn't throw stones","People who are morally questionable shouldn't criticize others","by itself", "Familiar"],
["Through thick and thin","In good times and in bad times","as part of a sentence", "Familiar"],
["Time is money","Work quickly","by itself", "Familiar"],
["Waste not, want not","Don't waste things and you'll always have enough","by itself", "Familiar"],
["We see eye to eye","We agree","by itself", "Familiar"],
["Weather the storm","Go through something difficult","as part of a sentence", "Familiar"],
["Well begun is half done","Getting a good start is important","by itself", "Familiar"],
["When it rains it pours","Everything is going wrong at once","by itself", "Familiar"],
["You can catch more flies with honey than you can with vinegar","You'll get what you want by being nice","by itself", "Familiar"],
["You can lead a horse to water, but you can't make him drink","You can't force someone to make the right decision","by itself", "Familiar"],
["You can't make an omelet without breaking some eggs","There's always a cost to doing something","by itself", "Familiar"],
]
for index, text in enumerate(idioms):
img = Image.new('RGB', (1920, 1080), color = (random.randint(20, 50), random.randint(20, 50), random.randint(20, 50)))
fnt = ImageFont.truetype("Merriweather-Regular.ttf", 40)
d = ImageDraw.Draw(img)
d.text((400,400), '"'+text[0]+'"', font=fnt, fill=(random.randint(150, 255), random.randint(150, 255), random.randint(150, 255)))
d.text((400,600), '- '+text[1], font=fnt, fill=(random.randint(150, 255), random.randint(150, 255), random.randint(150, 255)))
d.text((1200,800), 'Used '+text[2], font=fnt, fill=(random.randint(150, 255), random.randint(150, 255), random.randint(150, 255)))
# Adding frequency (seems awkward for some idioms) """d.text((800,100), 'Is '+text[3], font=fnt, fill=(random.randint(150, 255), random.randint(150, 255), random.randint(150, 255)))"""
img.save(str(index)+'.png')