Skip to content

Instantly share code, notes, and snippets.

View NeptuneProjects's full-sized avatar

William Jenkins NeptuneProjects

View GitHub Profile
@NeptuneProjects
NeptuneProjects / rapids_cuml_demo.py
Last active October 27, 2020 23:28
A quick example of how you can use CUML in place of the scikit-learn library for GPU-based machine learning functions.
"""
Written by Billy Jenkins, 27 Oct 2020, Scripps Institution of Oceanography
wjenkins (at) ucsd.edu
Demonstration of interchangeability between sk-learn & CUML libraries.
For more information, visit https://docs.rapids.ai/api/cuml/stable/
Unfortunately, CUML only supports 'Linux-like' platforms at this time, so for
Apple or Windows machines, you are stuck with the scikit-learn library and your
CPU. If you have a Linux machine with a CUDA device available, the CUML
@NeptuneProjects
NeptuneProjects / MassDownloader.py
Created August 8, 2020 13:46
Python-based FDSN mass downloader based on Obspy
def mass_data_downloader(savepath, start='20141201', stop='20161201',
Network='XH', Station='*', Channel='HH*'):
'''
This function uses the FDSN mass data downloader to automatically download
data from the XH network deployed on the RIS from Nov 2014 - Nov 2016.
More information on the Obspy mass downloader available at:
https://docs.obspy.org/packages/autogen/obspy.clients.fdsn.mass_downloader.html
Inputs:
savepath: "[string to savepath]"
start: "YYYYMMDD"