Skip to content

Instantly share code, notes, and snippets.

View ck37's full-sized avatar

Chris Kennedy ck37

View GitHub Profile
@tdavis-ourfuture
tdavis-ourfuture / googlecheck.php
Last active July 9, 2018 15:05
Quick and dirty php command line script to check a list of domains for those that use gmail. For email nerds, fanboys and geniuses only.
#!/usr/bin/php
<?php
/**
* Checks a list of domains and outputs any that use Google.
*
* usage: php ./googlecheck.php filewithdomains
*
*/
stream_set_blocking(STDIN, 0);
@zachmayer
zachmayer / 2.15.sh
Last active December 19, 2015 14:09
cd /Library/Frameworks/R.framework/Resources/lib
# for vecLib use
ln -sf libRblas.vecLib.dylib libRblas.dylib
# for R reference BLAS use
ln -sf libRblas.0.dylib libRblas.dylib
@cheuerde
cheuerde / R_OpenBLAS
Last active March 20, 2023 18:06
Compiling R against OpenBLAS #install #R
#####################################################
### How to compile R and link it against OpenBLAS ###
#####################################################
# Assuming no root priviledges on the destination machine,
# so we have to compile our software locally
# set default installation directory:
INSTDIR=$HOME/opt
@benmarwick
benmarwick / common-sci-symbols.md
Last active December 20, 2022 18:39
Commonly used scientific symbols in pandoc markdown

Commonly used scientific symbols in pandoc markdown

encoding is UTF-8, needs xelatex, like this:

---
output:
  pdf_document:
    latex_engine: xelatex
---
@domenic
domenic / 0-github-actions.md
Last active May 26, 2024 07:43
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
@andrie
andrie / foreach-parallel-progressbar.R
Created February 21, 2015 13:53
Creating progress bars from each parallel worker using foreach and doParallel
library(foreach)
library(iterators)
library(doParallel)
library(tcltk)
# Choose number of iterations
n <- 1000
cl <- makeCluster(8)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dgrapov
dgrapov / plotly_select_DT.R
Last active September 10, 2020 01:25
ggplot2 to plotly to shiny to box/lasso select to DT
#plotly box or lasso select linked to
# DT data table
# using Wage data
# the out group: is sex:Male, region:Middle Atlantic +
library(ggplot2)
library(plotly)
library(dplyr)
library(ISLR)
@mcburton
mcburton / jupyter-on-a-supercomputer.md
Last active April 9, 2024 12:03
A short(ish) guide on how to get Jupyter Notebooks up and running on the Bridges supercomputer.

Running Jupyter on a Supercomputer

This quick guide for getting a Jupyter Notebook up and running on Bridges, a supercomputer managed by the Pittsburgh Supercomputing Center. Bridges is a new machine designed to accommodate non-traditional uses of High Performance Computing (HPC) resources like data science and digital humanities. Bridges is available through XSEDE, which is the system that manages access to multiple supercomputing resources. Through XSEDE, Bridges is available researchers or educators at US academic or non-profit research institutions (see the XSEDE eligibility policies) Allocations are free, but there is a somewhat difficult to understand application process filled with jargon and acronyms that take time to understand. See the XSEDE getting started guide for more information about getting acc

@ledell
ledell / h2o_rf_sigopt_demo_iris.R
Last active June 3, 2017 04:56
Demo of how to use the SigOpt API with H2O in R
# Set API Key
Sys.setenv(SIGOPT_API_TOKEN="HERE")
# Start a local H2O cluster for training models
library(h2o)
h2o.init(nthreads = -1)
# Load a dataset
data(iris)
y <- "Species"