-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathUtilities.py
34 lines (26 loc) · 2.11 KB
/
Utilities.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
# Utitlities
def remove_prefix(text, prefix):
if text.startswith(prefix):
return text[len(prefix):]
return text
def remove_suffix(text, suffix):
return text[:-(len(suffix))]
def comment_suffix(text):
if text.endswith('s'):
return remove_suffix(text, 'comments')
else:
return remove_suffix(text, 'comment')
comment_list = ['Keep your face to the sunshine and you cannot see a shadow.',
'Once you replace negative thoughts with positive ones, you’ll start having positive results.',
'Yesterday is not ours to recover, but tomorrow is ours to win or lose.',
'In order to carry a positive action we must develop here a positive vision.',
'I always like to look on the optimistic side of life, but I am realistic enough to know that life is a complex matter.',
'Positive thinking will let you do everything better than negative thinking will.',
'Pessimism leads to weakness, optimism to power.',
'You can’t make positive choices for the rest of your life without an environment that makes those choices easy, natural, and enjoyable.',
'The thing that lies at the foundation of positive change, the way I see it, is service to a fellow human being.',
'Positive thinking is more than just a tagline. It changes the way we behave. And I firmly believe that when I am positive, it not only makes me better, but it also makes those around me better.',
'In every day, there are 1,440 minutes. That means we have 1,440 daily opportunities to make a positive impact.',
'I’m a very positive thinker, and I think that is what helps me the most in difficult moments.',
'Perpetual optimism is a force multiplier.', 'Attitude is a little thing that makes a big difference.',
'Let us rise up and be thankful, for if we didn’t learn a lot today, at least we learned a little, and if we didn’t learn a little, at least we didn’t get sick, and if we got sick, at least we didn’t die; so let us all be thankful.']