This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #' --- | |
| #' title: "Something fascinating" | |
| #' author: "Jenny Bryan" | |
| #' date: "`r format(Sys.Date())`" | |
| #' output: github_document | |
| #' --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:(function(){ | |
| var link = document.createElement( 'a' ); link.style.display = 'none'; document.body.appendChild( link ); | |
| function save( blob, filename ) { link.href = URL.createObjectURL( blob ); link.download = filename; link.click(); } | |
| function saveString( text, filename ) { save( new Blob( [ text ], { type: 'application/json' } ), filename );} | |
| var script=document.createElement('script'); | |
| script.src='https://threejs.org/examples/js/exporters/GLTFExporter.js'; | |
| script.onload = function () { | |
| var exporter = new THREE.GLTFExporter(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| simple_roc <- function(labels, scores){ | |
| labels <- labels[order(scores, decreasing=TRUE)] | |
| data.frame(TPR=cumsum(labels)/sum(labels), FPR=cumsum(!labels)/sum(!labels), labels) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| start on filesystem or runlevel [2345] | |
| stop on shutdown | |
| description "Jupyter / IPython Notebook Upstart script" | |
| script | |
| export HOME="/home/ubuntu/"; cd $HOME | |
| echo $$ > /var/run/ipython_start.pid | |
| exec su -s /bin/sh -c 'exec "$0" "$@"' ubuntu -- /home/ubuntu/anaconda2/bin/jupyter-notebook --config='/home/ubuntu/.jupyter/jupyter_notebook_config.py' | |
| end script |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #' Patch data on the fly. | |
| #' | |
| #' @param object to be patched | |
| #' @param cond logical condition(s) to be evaluated within scope of object | |
| #' @param \dots name-value pairs | |
| #' @param quiet suppress messages | |
| #' | |
| #' @examples | |
| #' patch(mtcars, where(vs == 0, am == 1), gear = Inf, carb = carb + 10) | |
| #' |