This file contains hidden or 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
###### Gcloud: Jupyter Notebook with GPUs from browser | |
## First Step Install GCP 16.04 LTS with 20GB and Tesla K80 NVIDIA GPU and HTTP/HTTPS | |
## From Remote shell (*need to run twice after generating keys). Can also use SSH with default user | |
gcloud compute --project <project name> ssh --zone "us-central1-a" <gce name> | |
## Install Anaconda and setup path | |
# Required upfront: Installs nano / curl / bzip2 / etc. | |
sudo -s |
This file contains hidden or 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 | |
[email protected] | |
''' | |
from numpy import * |
This file contains hidden or 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 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 hidden or 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 hidden or 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 |