Skip to content

Instantly share code, notes, and snippets.

@ZeccaLehn
ZeccaLehn / GPUjupyter.txt
Created January 22, 2019 17:59
Gcloud: Jupyter Notebook with GPUs from browser
###### 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
@ZeccaLehn
ZeccaLehn / directEconometric.py
Created January 18, 2019 21:12
Econometric Python Direct Install
# Adapted for python 3
# https://github.com/pbharrin/pyconometrics
'''
Created on Aug 17, 2010
@author: Peter Harrington
[email protected]
'''
from numpy import *
@ZeccaLehn
ZeccaLehn / AnacondaSpark.py
Last active December 20, 2023 07:44
Install Anaconda and Spark
######################## 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
@ZeccaLehn
ZeccaLehn / neo4j-GrapheneDB.ipynb
Last active December 19, 2018 01:32
Booting-Up Your Network with GrapheneDB using Neo4j and Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ZeccaLehn
ZeccaLehn / gistExplore.ipynb
Last active January 11, 2023 14:32
Blog: Level-Up using Gists with Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ZeccaLehn
ZeccaLehn / gist1.py
Last active December 6, 2018 03:52
Test Dual Gist
test1
@ZeccaLehn
ZeccaLehn / etfStats.ipynb
Created July 5, 2018 02:11
Multiple ETF/ETN Tickers and Stats in Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ZeccaLehn
ZeccaLehn / multipleStocks.py
Last active June 22, 2023 23:31
Download multiple stocks with Python Pandas
# 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
@ZeccaLehn
ZeccaLehn / RandPythonCondaGPU.txt
Created March 22, 2018 03:01
Automatic GPUs: A reproducible R / Python approach to getting up and running quickly on GCloud with GPUs in Tensorflow
### 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
@ZeccaLehn
ZeccaLehn / condaRandPython.txt
Last active May 22, 2019 08:50
GCP/GCloud VM setup running R/Python using Anaconda
####### 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