$ scp source_file_path destination_file_path
Single file
import ipaddress | |
for host in ipaddress.ip_network('204.93.240.0/24').hosts(): | |
print(host) |
SELECT TRIM(pgn.nspname) AS SCHEMA, | |
TRIM(a.name) AS TABLE, | |
id AS TableId, | |
decode(pgc.reldiststyle, | |
0, 'EVEN', | |
1,det.distkey , | |
8,'ALL' | |
) AS DistKey, | |
decode(pgc.reldiststyle, | |
8,NULL, |
import string | |
import random | |
chars = string.ascii_letters + string.digits + string.punctuation | |
chars = string.ascii_letters + string.digits | |
pwd_length = 16 | |
''.join((random.choice(chars)) for x in range(pwd_length)) |
cursor = None | |
rows = [] | |
total_rows = -1 | |
while(True): | |
try: | |
total_rows += 1 | |
row = next(cursor) | |
rows.append(row) | |
except bson.errors.InvalidBSON: | |
logger.exception('Failed to parse document') |
sudo python -m smtpd -n -c DebuggingServer localhost:25 |
[credential] | |
helper = cache --timeout=3600 | |
[status] | |
submoduleSummary = true | |
[alias] | |
work = log --pretty=format:\"%C(yellow)%h %ar (%ai) %C(auto)%d %Creset %s , %Cblue%cn\" --graph --all |
/* https://stackoverflow.com/a/30783772/3149679 */ | |
WHERE | |
created >= date_trunc('week', CURRENT_TIMESTAMP - interval '1 week') | |
AND | |
created < date_trunc('week', CURRENT_TIMESTAMP) | |
from time import sleep | |
def try(): | |
success = False | |
retries = 0 | |
max_retries = N | |
while not success: | |
# Execute task, success = True if successful | |
if retries == max_retries: |