This file has been truncated, but you can view the full file.
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
{'message': 'when are you going to lift the no trade on sia', 'username': 'Taniwha', 'time': 1496044046, 'reputation': 0} | |
{'message': 'guys just buy stratis', 'username': 'Konbro', 'time': 1496044046, 'reputation': 0} | |
{'message': 'DocNuance, hiiiii o/', 'username': 'Thehobbitwith9fingers', 'time': 1496044046, 'reputation': 315} | |
{'message': 'how come all cryptos are going down? its been like this for 3 days', 'username': 'nickleijenhorst', 'time': 1496044046, 'reputation': 0} | |
{'message': 'is there a reason bits is down?', 'username': 'nucleartrashout', 'time': 1496044049, 'reputation': 31} | |
{'message': 'Ban him. Mod spam', 'username': 'gamegrounds', 'time': 1496044053, 'reputation': 7} | |
{'message': 'Hotmetal, but not that slow. From what I gather, API users are able to push trades faster than we on the UI here', 'username': 'dlight_2016', 'time': 1496044059, 'reputation': 28} | |
{'message': 'd', 'username': 'Xinord', 'time': 1496044059, 'reputation': 31} | |
{'message': 'nickleijenhorst, what goes up comes down. easy |
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
#! /usr/bin/python3 | |
import random | |
def luhn_residue(digits): | |
return sum(sum(divmod(int(d)*(1 + i%2), 10)) | |
for i, d in enumerate(digits[::-1])) % 10 | |
def get_valid_luhn(N, preamble = ""): | |
part = preamble+''.join(str(random.randrange(0,9)) for _ in range(N-1-len(preamble))) | |
res = luhn_residue('{}{}'.format(part, 0)) |
We can't make this file beautiful and searchable because it's too large.
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
Zip Code,Place Name,State,State,State Abbreviation,Latitude,Longitude | |
00501,Holtsville,New York,NY,Suffolk,40.8154,-73.0451 | |
00544,Holtsville,New York,NY,Suffolk,40.8154,-73.0451 | |
01001,Agawam,Massachusetts,MA,Hampden,42.0702,-72.6227 | |
01002,Amherst,Massachusetts,MA,Hampshire,42.3671,-72.4646 | |
01003,Amherst,Massachusetts,MA,Hampshire,42.3919,-72.5248 | |
01004,Amherst,Massachusetts,MA,Hampshire,42.3845,-72.5132 | |
01005,Barre,Massachusetts,MA,Worcester,42.4097,-72.1084 | |
01007,Belchertown,Massachusetts,MA,Hampshire,42.2751,-72.411 | |
01008,Blandford,Massachusetts,MA,Hampden,42.1829,-72.9361 |
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 aioudp | |
import asyncio | |
async def in_or_nothing(reader, duration = 1): | |
if reader == None: | |
return None | |
try: | |
return await asyncio.wait_for(reader.read(128), duration) | |
except asyncio.TimeoutError: | |
return None |
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
### Keybase proof | |
I hereby claim: | |
* I am itdaniher on github. | |
* I am itdaniher (https://keybase.io/itdaniher) on keybase. | |
* I have a public key whose fingerprint is BC42 5D3A 8091 B5D8 A819 5EE5 529B 51AA B9C6 FF82 | |
To claim this, I am signing this object: |
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
""" | |
Small benchmark that compares a plain NumPy array copy against | |
compression through different compressors in Blosc. | |
""" | |
from __future__ import print_function | |
import numpy as np | |
import time | |
import blosc | |
import ctypes |
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 uuid | |
import timeit | |
import lz4 | |
import os | |
from timeit import Timer | |
import sys | |
import blosc | |
DATA = open(sys.argv[1], "rb").read() | |
LZ4_DATA = lz4.block.compress(DATA) |
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 numpy as np | |
import itertools | |
def rle(x): | |
where = np.flatnonzero | |
x = np.asarray(x) | |
n = len(x) | |
if n == 0: | |
return np.array([], dtype=int) | |
starts = np.r_[0, where(~np.isclose(x[1:], x[:-1], equal_nan=True)) + 1] |
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 urllib | |
from bs4 import BeautifulSoup | |
soup = BeautifulSoup(urllib.urlopen("http://www.chem.qmul.ac.uk/iupac/AtWt/index.html").read()) | |
t = soup.findAll("table")[2] | |
print [ [item.text for item in row.findAll("td")] for row in t.findAll("tr") ] |
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
# EAGLE Parameter File (generated by EAGLE Version 5.11.0 - DO NOT EDIT!) | |
Attribute.HeaderA = "1 0:100 1:100 2:100 3:25 4:100" | |
Brd.Key.A+BS = "Undo" | |
Brd.Key.A+F2 = "Window fit" | |
Brd.Key.A+F7 = "Group" | |
Brd.Key.A+F9 = "Ripup" | |
Brd.Key.A+F10 = "Grid mm 1 on; Grid alt mm 0.1;" | |
Brd.Key.A+F11 = "display none; display 17 20 21 23 27 31 45 51; display -25 -26 -28;" | |
Brd.Key.F2 = "Window;" |