start new:
tmux
start new with session name:
tmux new -s myname
| # (C) Mathieu Blondel, November 2013 | |
| # License: BSD 3 clause | |
| import numpy as np | |
| def ranking_precision_score(y_true, y_score, k=10): | |
| """Precision at rank k | |
| Parameters |
| # Kevin Gilbert | |
| # CMU CS '14 | |
| # Formulas in R are hard to manipulate, and cannot have string functions applied to them. This fixes that. | |
| # ---------- ---------- ---------- ---------- ---------- | |
| # given two formulas, merge their predictors |
| ### for brand-new only | |
| sudo apt-get update | |
| sudo apt-get install htop | |
| sudo apt-get install build-essential | |
| wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh | |
| bash Miniconda3-latest-Linux-x86_64.sh | |
| rm Miniconda3-latest-Linux-x86_64.sh |
| Xft.dpi: 120 | |
| Xft.antialias: true | |
| Xft.hinting: true | |
| Xft.rgba: rgb | |
| Xft.hintstyle: hintslight | |
| rofi.color-enabled: true | |
| rofi.color-window: #282828, #282828, #268bd2 | |
| rofi.color-normal: #282828, #ffffff, #282828, #268bd2, #ffffff | |
| rofi.color-active: #282828, #268bd2, #282828, #268bd2, #205171 |
| #!/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 |
| import numpy as np | |
| EPSILON = 1e-10 | |
| def _error(actual: np.ndarray, predicted: np.ndarray): | |
| """ Simple error """ | |
| return actual - predicted |
renderDeps <- function(widget,dir=".",libdir="lib") {
rendered <- htmltools::renderTags(widget)
deps <- lapply(rendered1$dependencies, function(dep) {
dep <- htmltools::copyDependencyToDir(dep, libdir, FALSE)
dep <- htmltools::makeDependencyRelative(dep, dir, FALSE)| #!/usr/bin/env python | |
| """ | |
| Fast duplicate file finder. | |
| Usage: duplicates.py <folder> [<folder>...] | |
| Based on https://stackoverflow.com/a/36113168/300783 | |
| Modified for Python3 with some small code improvements. | |
| """ | |
| import os | |
| import sys |