I hereby claim:
- I am mattprecious on github.
- I am mattprecious (https://keybase.io/mattprecious) on keybase.
- I have a public key ASCmyN9F2j0UwMNzaPKKAkdfYe80fFEPR0jRKm-h2J1kNwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/python | |
import argparse, datetime | |
def date(s): | |
try: | |
return datetime.datetime.strptime(s, "%Y-%m-%d") | |
except ValueError: | |
raise argparse.ArgumentTypeError("Not a valid date: '{0}'. Date must be in format 'YYYY-MM-DD'".format(s)) |
#!/usr/bin/python | |
import sys, re | |
def convert(s): | |
s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', s) | |
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower() | |
if __name__ == '__main__': | |
if len(sys.argv) == 1: |