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
# Adapted for python 3 | |
# https://github.com/pbharrin/pyconometrics | |
''' | |
Created on Aug 17, 2010 | |
@author: Peter Harrington | |
peter.b.harrington@gmail.com | |
''' | |
from numpy import * |
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
######################## Linux ############################# | |
### Auto Install Anaconda in Linux | |
mkdir Downloads | |
cd Downloads | |
wget "https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh" -O "Anaconda3-5.0.1-Linux-x86_64.sh" | |
chmod +x Anaconda3-5.0.1-Linux-x86_64.sh | |
sudo sh "Anaconda3-5.0.1-Linux-x86_64.sh" -b | |
cd $HOME | |
rm -r Downloads |
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
test1 |
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
# Clone and pip install pandas_datareader from Github first | |
# pip install fix_yahoo_finance --upgrade --no-cache-dir | |
# conda install -c https://conda.anaconda.org/anaconda pandas-datareader | |
import pandas as pd | |
pd.core.common.is_list_like = pd.api.types.is_list_like | |
from pandas.api.types import is_list_like | |
from pandas_datareader import data as pdr | |
import fix_yahoo_finance as yf |
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
### Automatic GPUs: | |
### A reproducible R / Python approach to getting up and running quickly on GCloud with GPUs in Tensorflow | |
### https://medium.com/@zecca/automatic-gpus-46aa08f01886 | |
# Check for CUDA and try to install. | |
if ! dpkg-query -W cuda; then | |
# Start Timer here | |
START=$(date +%s) # Time script |
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
####### GCP/GCloud VM setup running R/Python using Anaconda ######## | |
# Prepared as part of a guest lecture series in parallel programming and GCloud setup | |
# at Pepperdine University for their inaugural ML class on 3/16/2018. | |
# Rights: MIT Licence | |
## 10 easy steps: Running R/Python in the cloud | |
1) Log into GCP | |
2) Create a project (if not done already), and log into <your project> from top of screen |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.