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/env python | |
import json | |
import random | |
filename = "test.json" | |
x = [{"ID": i, | |
"xxx": "".join(["f"] * random.randint(1, 20)), | |
"yyy": "".join(["f"] * random.randint(1, 20))} | |
for i in range(20)] |
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/env python | |
""" | |
Proof of concept scraper for pinnacle sports |
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
>>> p4 = pd.Panel4D({i: pd.Panel({j: pd.DataFrame(range(10)) for j in range(10)}) for i in range(10)}) | |
>>> p4.iloc[:,:,0] | |
<class 'pandas.core.panel.Panel'> | |
Dimensions: 10 (items) x 10 (major_axis) x 1 (minor_axis) | |
Items axis: 0 to 9 | |
Major_axis axis: 0 to 9 | |
Minor_axis axis: 0 to 0 | |
>>> p4.iloc[slice(None), slice(None), slice(0)] | |
<class 'pandas.core.panelnd.Panel4D'> | |
Dimensions: 10 (labels) x 10 (items) x 0 (major_axis) x 1 (minor_axis) |
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
every_nth = [2, 3] | |
index = pd.Series(range(len(df.index))) # or just df.index if it's already the 0-indexed indices | |
mask = reduce(np.logical_or, [index % i == 0 for i in every_nth]) | |
df[mask.astype(bool).values] |
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
{ | |
"metadata": { | |
"name": "Untitled0" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
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
ּ_בּ | |
בּ_בּ | |
טּ_טּ | |
כּ‗כּ | |
לּ_לּ | |
מּ_מּ | |
סּ_סּ | |
תּ_תּ | |
٩(×̯×)۶ | |
٩(̾●̮̮̃̾•̃̾)۶ |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Install tmux on Centos release 6.5 | |
# install deps | |
yum install gcc kernel-devel make ncurses-devel | |
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
tar -xvzf libevent-2.0.21-stable.tar.gz | |
cd libevent-2.0.21-stable | |
./configure --prefix=$HOME && |
NewerOlder