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
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | |
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
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 | |
RESULT_FILE=/tmp/result_$$ | |
rm -rf $HOME/tmp-fio | |
mkdir -p $HOME/tmp-fio && cd $HOME/tmp-fio | |
echo "Starting storage tests" | |
echo "Results will be saved in $RESULT_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
# Gawk version | |
# Remote | |
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($3,index($3,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($3,i,2))}{print x":"strtonum("0x"substr($3,index($3,":")+1,4))}' | |
# Local | |
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($2,index($2,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($2,i,2))}{print x":"strtonum("0x"substr($2,index($2,":")+1,4))}' | |
# No Gawk | |
# Local | |
grep -v "rem_address" /proc/net/tcp | awk 'function hextodec(str,ret,n,i,k,c){ |
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
curl -Lo docker-machine-driver-hyperkit https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-hyperkit \ | |
&& chmod +x docker-machine-driver-hyperkit \ | |
&& sudo cp docker-machine-driver-hyperkit /usr/local/bin/ \ | |
&& rm docker-machine-driver-hyperkit \ | |
&& sudo chown root:wheel /usr/local/bin/docker-machine-driver-hyperkit \ | |
&& sudo chmod u+s /usr/local/bin/docker-machine-driver-hyperkit |
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
source ~/.zplug/init.zsh | |
zplug "zsh-users/zsh-syntax-highlighting", defer:2 | |
zplug "chrissicool/zsh-256color" | |
zplug "srijanshetty/docker-zsh" | |
zplug "unixorn/git-extra-commands" | |
zplug "zsh-users/zsh-autosuggestions" | |
zplug "zsh-users/zsh-history-substring-search" | |
zplug "plugins/git", from:oh-my-zsh | |
zplug "plugins/jira", from:oh-my-zsh |
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
""" | |
Module for building a complete dataset from local directory with csv files. | |
""" | |
import os | |
import glob | |
import logbook | |
import requests | |
#from retry import retry | |
from numpy import empty, NaN |
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 | |
#https://github.com/RomelTorres/alpha_vantage | |
from alpha_vantage.timeseries import TimeSeries | |
ALPHA_VANTAGE_KEY = 'XXXXXXXXXXXX' | |
################################## | |
# Alpha vantage version of data.history and data.current | |
def av_data_history(assets, fields, bar_count, frequency): | |
ts = TimeSeries(key=ALPHA_VANTAGE_KEY, output_format='pandas') |
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 numpy as np | |
import pandas as pd | |
from pandas_datareader.data import DataReader | |
from pandas_datareader._utils import RemoteDataError | |
import requests | |
from zipline.utils.cli import maybe_show_progress |
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 glob | |
import numpy as np | |
import pandas as pd | |
import requests | |
from pandas_datareader.data import DataReader | |
from pandas_datareader._utils import RemoteDataError |
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 glob | |
import numpy as np | |
import pandas as pd | |
from pandas_datareader.data import DataReader | |
import datetime | |
import requests | |
from zipline.utils.calendars import get_calendar |