I hereby claim:
- I am jjmark15 on github.
- I am ohblondone (https://keybase.io/ohblondone) on keybase.
- I have a public key ASBUVFCTX7jaQp_Dv-PMN010plPZdchSF4WBp9wtoGwyxwo
To claim this, I am signing this object:
| def num_input(prompt='Enter value: '): | |
| again = True | |
| while again: | |
| inp = input(prompt) | |
| if len(inp) == 0: | |
| return 0 | |
| else: | |
| try: | |
| inp = float(inp) | |
| if inp.is_integer(): |
I hereby claim:
To claim this, I am signing this object:
| # The MIT License (MIT) | |
| # Copyright (c) 2016 Vladimir Ignatev | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining | |
| # a copy of this software and associated documentation files (the "Software"), | |
| # to deal in the Software without restriction, including without limitation | |
| # the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
| # and/or sell copies of the Software, and to permit persons to whom the Software | |
| # is furnished to do so, subject to the following conditions: | |
| # |
| from ftplib import FTP | |
| ftp = FTP('domainname.com') | |
| ftp.login(user='username', passwd='password') | |
| ftp.cwd('/specificdomain-or-location/') | |
| def grabFile(): | |
| filename = 'filename.txt' | |
| localfile = open(filename, 'wb') |
| import argparse | |
| import sys | |
| def main(): | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument('--x', type=float, default=1.0, | |
| help='What is the first number?') | |
| parser.add_argument('--y', type=float, default=1.0, | |
| help='What is the second number?') | |
| parser.add_argument('--operation', type=str, default='add', |
| def our_decorator(func): | |
| def function_wrapper(x): | |
| print("Before calling " + func.__name__) | |
| res = func(x) | |
| print(res) | |
| print("After calling " + func.__name__) | |
| return function_wrapper | |
If you want to test different ways of creating a unique array in terms of speed check out here
| #!/bin/env bash | |
| set -euo pipefail | |
| IFS=$'\n\t' |