I hereby claim:
- I am tim-cotten on github.
- I am cottenio (https://keybase.io/cottenio) on keybase.
- I have a public key ASDFxRUX5qqoXEy81j1Yl51yVt6ykbWwVKKiQki2QSbZhQo
To claim this, I am signing this object:
pragma solidity >=0.4.22 <0.6.0; | |
/** | |
* @title DepositAccount - simple contract that stores ether and allows full or | |
* partial withdrawals by the account owner. | |
* @author Tim Cotten <tim@cotten.io> | |
*/ | |
contract DepositAccount { | |
address private owner; | |
I hereby claim:
To claim this, I am signing this object:
uint256 constant MIN_COMMIT = 21000 + 396; // TX cost + initial gas spent reaching assignment of token_amt |
// Tim Cotten <tim@cotten.io> | |
// No copyright, no license, no warranty. | |
pragma solidity >=0.4.22 <0.7.0; | |
contract GasEater { | |
uint256 constant MIN_COMMIT = 21000 + 396; // TX cost + initial gas spent reaching assignment of token_amt | |
uint256 constant MIN_FINAL = 1110; // Required gas for finalizing mint | |
uint256 constant MIN_WITH_NON_ZERO = 5000 + MIN_FINAL; | |
uint256 constant MIN_WITH_ZERO = 20000 + MIN_FINAL; | |
try: | |
# download to /tmp | |
urllib.request.urlretrieve(endpoint, "/tmp/" + filename) | |
except Exception as e: | |
exc_info = sys.exc_info() | |
e = ''.join(traceback.format_exception(*exc_info)) | |
exit({ | |
"statusCode": 500, | |
"body": json.dumps("Could not download archive file: " + filename) + " " + json.dumps(e) |
try: | |
# extract archive | |
with zipfile.ZipFile("/tmp/" + filename, 'r') as archive: | |
archive.extractall("/tmp/") | |
except Exception as e: | |
exit({ | |
"statusCode": 500, | |
"body": json.dumps("Could not extract archive file: " + filename) | |
}) |
import sys | |
import os | |
import json | |
import configparser | |
import datetime | |
import urllib.request | |
import zipfile | |
import traceback | |
config = configparser.ConfigParser() |
import subprocess | |
grep_cmd = r'''/bin/grep "msclkid=.* HTTP" /var/log/httpd/ssl_request_log*''' | |
data = subprocess.check_output(grep_cmd, shell=True) | |
for line in data: | |
print(line) |
import subprocess | |
grep_cmd = r'''/bin/grep "msclkid=.* HTTP" /var/log/httpd/ssl_request_log*''' | |
data = subprocess.check_output(grep_cmd, shell=True, universal_newlines=True).splitlines() | |
for line in data: | |
print(line) |
import subprocess | |
class SEMClick: | |
def __init__(self, log_entry): | |
print(log_entry) | |
grep_cmd = r'''/bin/grep -h "msclkid=.* HTTP" /var/log/httpd/ssl_request_log*''' | |
data = subprocess.check_output(grep_cmd, shell=True, universal_newlines=True).splitlines() | |
for line in data: | |
c = SEMClick(line) |