git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
# After Ubuntu 16.04, Systemd becomes the default. | |
# It is simpler than https://gist.github.com/Doowon/38910829898a6624ce4ed554f082c4dd | |
[Unit] | |
Description=Jupyter Notebook | |
[Service] | |
Type=simple | |
PIDFile=/run/jupyter.pid | |
ExecStart=/home/phil/Enthought/Canopy_64bit/User/bin/jupyter-notebook --config=/home/phil/.jupyter/jupyter_notebook_config.py |
import numpy as np | |
def xgb_quantile_eval(preds, dmatrix, quantile=0.2): | |
""" | |
Customized evaluational metric that equals | |
to quantile regression loss (also known as | |
pinball loss). | |
Quantile regression is regression that |
#!/usr/bin/env python | |
""" | |
Robust non-linear feature estimation with scikit-learn applied to | |
the Fourier Transform. | |
""" | |
from matplotlib import pyplot as plt | |
import numpy as np | |
from sklearn.base import TransformerMixin | |
from sklearn.pipeline import make_pipeline |
#!/usr/bin/env python | |
""" | |
Robust B-Spline regression with scikit-learn | |
""" | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import scipy.interpolate as si | |
from sklearn.base import TransformerMixin | |
from sklearn.pipeline import make_pipeline |
#!/usr/bin/env python | |
""" | |
ND Bspline basis class for Python | |
""" | |
import numpy as np | |
import scipy.interpolate as si | |
import matplotlib.pyplot as plt | |
import itertools |
""" | |
Create train, valid, test iterators for CIFAR-10 [1]. | |
Easily extended to MNIST, CIFAR-100 and Imagenet. | |
[1]: https://discuss.pytorch.org/t/feedback-on-pytorch-for-kaggle-competitions/2252/4 | |
""" | |
import torch | |
import numpy as np |
from urllib.parse import urlparse | |
import lightgbm as lgb | |
import threading | |
def _parse_machines(workers, listen_port): | |
"""From dask worker info to LightGBM mlist""" | |
# TODO: Assert that we're using TCP? | |
mlist = ['127.0.0.1:{}'.format(listen_port)] + [urlparse(worker).netloc | |
for worker in workers] |
#!/usr/bin/env python | |
"""Mini implementation of continuous wavelet transform (Morlet wavelet).""" | |
import numpy as np | |
import matplotlib.pyplot as plt | |
def continuous_wavelet_transform(signal, frequencies, time_step=1.0, | |
wavelet_width=5): |