Skip to content

Instantly share code, notes, and snippets.

Seth Russell magic-lantern

  • University of Colorado
  • Colorado
Block or report user

Report or block magic-lantern

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
magic-lantern /
Last active Mar 13, 2020
Notes on setting up various Python deep learning libraries on CentOS 7

Eureka GPU Setup Guide


CentOS 7.6.1810 has a very old version of Git (v from ~ 2013). To install a current version of Git, you have a few options:

From Source

sudo yum -y install wget perl-CPAN gettext-devel perl-devel openssl-devel zlib-devel
View wt103-imdb.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
magic-lantern / cust_mac.json
Created Apr 20, 2019
anne pro2 macos keyboard layout
View cust_mac.json
magic-lantern /
Last active Apr 17, 2019
Small Python 3 script to show how to use multiprocessing for parallel processing of data
import pandas as pd
import numpy as np
import multiprocessing
from multiprocessing import Pool
num_processes = multiprocessing.cpu_count()
# on some systems, these next 2 lines will give better count for CPU intensive tasks
# import psutil
# num_processes = psutil.cpu_count(logical=False)
num_partitions = num_processes * 2 #smaller batches to get more frequent status updates
magic-lantern / sample_future_lapply.R
Created Apr 2, 2019
Small R script to show how to use future.apply and future_lapply
View sample_future_lapply.R
# set parallel_processing to TRUE if parallelization desired
parallel_processing <- TRUE
num_workers <- availableCores() # this option will automatically scale to fit current machine
# default plan for future.apply/future is sequential (no parallelization)
# plan(multiprocess) should pick recommended option based on OS
if (parallel_processing) {
plan(multiprocess, workers = num_workers)
magic-lantern /
Last active Feb 1, 2019
Steps to upgrade Ubuntu 16.04 LTS from R 3.4.x to R 3.5.x

Steps to upgrade r:

From linux command-line remove all existing R packages:

sudo apt-get update
sudo apt-get remove r-base r-base-dev r-base-core r-base-html r-cran-boot r-cran-class r-cran-cluster r-cran-codetools r-cran-foreign r-cran-kernsmooth r-cran-lattice r-cran-mass r-cran-matrix r-cran-mgcv r-cran-nlme r-cran-nnet r-cran-rpart  r-cran-spatial r-cran-survival r-doc-html r-recommended

Next, update /etc/apt/sources.list and add these lines (comment out old R version, add new pkg list):

magic-lantern /
Last active Nov 6, 2018
FHIR Introduction


Fast Healthcare Interoperability Resources ( - FHIR – is a standards framework created by Health Level 7 (HL7). FHIR combines the features of HL7's previous health data interchange standards including HL7 v2 , HL7 v3 and CDA. FHIR improves on previous standards by using more modern web standards for data exchange, supports many programming languages, and promostes human readability.


Start by reading through this first: "FHIR Drills"

magic-lantern / ngix-config
Last active Oct 26, 2018
Nginx Configuration for HTTPS RStudio Server reverse proxy
View ngix-config
# Customized Nginx configuration
server {
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name; # managed by Certbot
access_log /var/log/nginx/;
magic-lantern /
Created Sep 13, 2018
Beta Environment Connection Script
read -p "Run 'ssh -q -D 1081 localhost' in a separate window (or before running this script). When running, press enter to continue.
# import the common commands
TOOLSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
source $TOOLSDIR/
# grab the command line args
magic-lantern / proxy.pac
Last active Dec 13, 2018
Eureka Proxy.pac file for tunneling to App host
View proxy.pac
function FindProxyForURL(url, host) {
// the zotero service should only be local
if ( shExpMatch(url, "*") ) {
return "DIRECT";
// localhost and google stuff should go to through socks proxy
if ((isPlainHostName(host) && shExpMatch(host, "localhost")) ||
(shExpMatch(url, "**")))
You can’t perform that action at this time.