This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE calls ( | |
-- Kafka Message Details | |
timestamp DateTime, | |
partition UInt8, | |
offset UInt64, | |
-- Call Signature | |
service String, | |
method String, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Python 3.5.0 (default, Sep 23 2015, 04:42:00) | |
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.72)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import six | |
>>> six.binary_type(10) | |
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def foo(): | |
bar() | |
def bar(): | |
try: | |
baz() | |
except Exception as error: | |
import traceback | |
traceback.print_exc() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> t = int(time.time()) | |
>>> (int(datetime.datetime.utcfromtimestamp(t).strftime('%s')) - t) / 3600 | |
8 | |
>>> (int(datetime.datetime.utcfromtimestamp(t).replace(tzinfo=pytz.utc).strftime('%s')) - t) / 3600 | |
8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pprint | |
import itertools | |
import operator | |
import sys | |
from collections import namedtuple | |
Class = namedtuple('Class', [ | |
'old', | |
'new', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
click | |
redis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64, json, sys, zlib | |
request = sys.stdin.read() | |
headers, payload = request.split('\r\n\r\n', 1) | |
result = json.loads(zlib.decompress(base64.b64decode(payload))) | |
sys.stdout.write(json.dumps(result, indent=2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.pyc | |
schemata/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
makes text read like it was written by a drunk person | |
er, makes txet rea dlike i twas rwitten by a durnk persob | |
""" | |
import random | |
import sys | |
drinks = float(sys.argv[1]) |
NewerOlder