Skip to content

Instantly share code, notes, and snippets.

View mschubert's full-sized avatar
🧬

Michael Schubert mschubert

🧬
View GitHub Profile
@kaneplusplus
kaneplusplus / glmnet-ref.r
Last active January 17, 2016 20:40
A minimal glmnet implementation in R
soft_thresh = function(x, g) {
x = as.vector(x)
w1 = which(g >= abs(x))
w2 = which(g < abs(x) & x > 0)
w3 = which(g < abs(x) & x < 0)
ret = x
ret[w1] = 0
ret[w2] = x[w2]-g
ret[w3] = x[w3]+g
ret
@klmr
klmr / log-command
Last active August 29, 2015 14:27
Command line drop-in substitute to log diagnostics; simply create a symlink to this wrapper with the target somewhere inside the $PATH, and its name that of a tool to wrap.
#!/usr/bin/env bash
logfile="${SHELL_USAGE_LOG-$HOME/shell-usage.log}"
cmd=$(basename "$0")
real_cmd=$(type -ap "$cmd" | sed -n 2p)
echo "[$(date +"%Y-%m-%dT%H:%M")] $(whoami) $SHELL $cmd" >> "$logfile"
$real_cmd "$@"
@yannabraham
yannabraham / doseResponsePython.ipynb
Last active December 20, 2023 19:07
How to do Dose/Response curve fitting in Python for Drug Discovery
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.