Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print(sys.path)
['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']
>>>
jay@dev:~$ python3
Python 3.6.5 (default, Apr 1 2018, 05:46:30)
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 pandas as pd | |
from analysis_engine.algo import EquityAlgo | |
ticker = 'SPY' | |
demo_algo = EquityAlgo( | |
ticker=ticker, | |
balance=1000.00, | |
commission=6.00, | |
name='test-{}'.format(ticker)) | |
date_key = '{}_2018-11-05'.format( | |
ticker) |
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 pytz | |
import zipline | |
import datetime | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
import analysis_engine.extract as extract | |
from collections import OrderedDict | |
from zipline.api import order |
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 os | |
import sys | |
from unittest.mock import MagicMock | |
from recommonmark.parser import CommonMarkParser | |
from pprint import pprint | |
on_rtd = os.getenv("READTHEDOCS", "") != "" | |
# Using working source code sphinx conf.py on read the docs: | |
# https://github.com/mahmoud/boltons/blob/master/docs/conf.py#L20 |
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
function sl() { | |
use_namespace="default" | |
pod_name=$(kubectl get pods -n ${use_namespace} | awk '{print $1}' | grep api | head -1) | |
kubectl exec -it \ | |
${pod_name} \ | |
-n ${use_namespace} \ | |
-- bash -c ". /opt/venv/bin/activate && sp -q 'index=\"antinex\" AND ${@}' -u trex -p 123321 -i antinex -a splunk-svc:8089 | grep -v urllib3.connectionpool" | |
# -- bash -c ". /opt/venv/bin/activate && echo \"sp -q 'index=\"antinex\" AND ${@}' -u trex -p 123321 -a splunk-svc:8089 | grep -v urllib3\" && sp -q '${@}' -u trex -p 123321 -i antinex -a splunk-svc:8089 | grep -v urllib3.connectionpool" | |
} |
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
"2016-11-10 v1 - start" | |
" set tabstop=4 | |
" set shiftwidth=4 | |
" set smartindent | |
" set pastetoggle=<F10> | |
"2016-11-10 v1 - end" | |
"2016-11-10 v2 - start" | |
set pastetoggle=<F10> | |
set autoindent " always set autoindenting on" |
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
{ | |
"Use Non-ASCII Font" : false, | |
"Tags" : [ | |
], | |
"Ansi 12 Color" : { | |
"Red Component" : 0, | |
"Color Space" : "sRGB", | |
"Blue Component" : 0.985260009765625, | |
"Alpha Component" : 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
#!/bin/bash | |
on_darwin=$(uname -s | grep -i darwin | wc -l) | |
test_brew_exists=$(which brew | wc -l) | |
if [[ "${test_brew_exists}" != "0" ]]; then | |
brew install cmake | |
fi | |
mkdir ~/.vim | |
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim |
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
alias t='pushd /opt/sa && source /opt/venv/bin/activate && py.test --maxfail=1 && flake8 . && pycodestyle . && popd' | |
alias lsprice='source /opt/venv/bin/activate && aws --endpoint-url http://localhost:9000 s3 ls s3://pricing' | |
alias lsbucket='source /opt/venv/bin/activate && aws --endpoint-url http://localhost:9000 s3 ls' | |
use_aws() { | |
export S3_ACCESS_KEY=ACCESS | |
export S3_SECRET_KEY=SECRET | |
export S3_ADDRESS=s3.us-east-1.amazonaws.com | |
export S3_BUCKET=BUCKET_NAME | |
export S3_REGION_NAME=us-east-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
ip_vs | |
ip_vs_rr | |
ip_vs_wrr | |
ip_vs_sh | |
nf_conntrack_ipv4 |