Cope 2.5.0
My personal "standard library" of all the generally useful code I've written for various projects over the years
Loading...
Searching...
No Matches
boilerplate.py
1"""
2Some stuff that I always forget the syntax for, or things which are useful so you don't have to
3retype them
4"""
5
6decorator = """
7 def decorator(*decoratorArgs, **decoratorKwArgs):
8 def wrap(func):
9 def innerWrap(*funcArgs, **funcKwArgs):
10 return func(*funcArgs, **funcKwArgs)
11 return innerWrap
12 return wrap
13 """
14
15
16class CommonResponses:
17 """ A collection of default responses for inputs. Make sure to use .lower() when testing agaisnt these.
18 Note: There is some overlap between them, so testing order matters.
19 """
20 YES = ('y', 'yes', 'ya', 'yeah', 'si', 'true', 'definitely', 'accurate', 'totally', 'yup')
21 NO = ('n', 'no', 'not', 'nien', 'false', 'nope', 'not really', 'nah')
22 MAYBE = ('sure', 'kinda', 'i guess', 'kind of', 'maybe', 'ish', 'sorta')
23 NA = ('none', 'na', 'n/a', 'not applicable')
24 HIGH_AMOUNT = ('very', 'much', 'very much', 'extremely', 'quite', 'quite a bit', 'lot', 'a lot', 'lots',
25 'super', 'high', 'ton', 'a ton', 'bunch', 'a bunch')
26 MODERATE_AMOUNT = ('fairly', 'somewhat', 'enough')
27 SOME_AMOUNT = ('a little bit', 'a bit', 'a little', 'ish', 'not a lot', 'not a ton', 'some', 'mostly')
28 LOW_AMOUNT = ("not at all", 'not very', 'not much', 'low', 'none', 'none at all', 'not terribly')