Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan Birmingham birm

View GitHub Profile
View Mlpack_Dockerfile
FROM ubuntu
RUN apt-get update -qq && \
apt-get install -y --no-install-recommends python-pip cmake wget sudo \
libopenblas-dev liblapack-dev binutils-dev libboost-all-dev pkg-config \
make txt2man git doxygen libarmadillo-dev build-essential
# Get mlpack version.
ARG mlpack_archive
View thumbgen.js
var http = require('http');
var fs = require('fs');
var fetch = require('node-fetch');
const exec = require('child_process').exec;
var sourceUrl = "http://172.20.11.223:9099/services/Camic_TCIA/Image/query/find"
function freeze(time) {
const stop = new Date().getTime() + time;
while(new Date().getTime() < stop);
@birm
birm / cloner.js
Last active Feb 14, 2018
Coordinated Drawing on Annotools.
View cloner.js
// call cloner with base and a list of items to clone (same type preferably) of the same type
function cloner(base, clones){
var handler = {
get(target, name, reciever){
if (typeof target[name] == "function"){
// call the function with args to all contexts
return function (...args){
clones.forEach((x) => x[name].apply(this, args));
// return whatever base returns
return target[name].apply(this, args)
View box_api.js
var rp = require('request-promise');
var fs = require('fs');
// use https://developer.box.com/v2.0/docs/the-box-file-picker
// options to get file
function download_file(url) =
return {
method: 'GET',
uri: url,
View data.json
{"data":[[457,"0",1,"Millet, Mr. Francis Davis","male",65,0,0,"13509",26.55,"E38","S",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],[7,"0",1,"McCarthy, Mr. Timothy J","male",54,0,0,"17463",51.8625,"E46","S",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],[22,"1",2,"Beesley, Mr. Lawrence","male",34,0,0,"248698",13,"D56","S",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],[873,"0",1,"Carlsson, Mr. Frans Olof","male",33,0,0,"695",5,"B51 B53 B
View custom_tile_sources.html
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/openseadragon/2.3.0/openseadragon.min.js"></script>
</head>
<body>
<div id="head"></div>
<div id="about"></div>
<div id="windows">
<div id="first" style="width: 800px; height: 600px;"></div>
</div>
@birm
birm / parallel_async.js
Last active Aug 25, 2017
Parallel Async
View parallel_async.js
// get the url
var apiurl = "";
// range to draw of each variable
var ranges = {"A":[0,15],"B":[10,20]};
// get filtered data from table api
function get_async(page){
var xhr = new XMLHttpRequest();
// while there's more to load
xhr.open("GET", apiurl, true);
@birm
birm / camic_state_link.html
Created Aug 9, 2017
A very simple site to generate state links for camicroscope
View camic_state_link.html
@birm
birm / A quick sample for using links to store state
Last active Jun 22, 2017
Url Variable Encoding and Decoding
View A quick sample for using links to store state
@birm
birm / restpost.html
Last active May 22, 2017
JNLP Form Independent Page
View restpost.html
<html>
<style>
.spinner {
width: 20px;
height: 20px;
position: relative;
margin: 15px;
}
.double-bounce1,
.double-bounce2 {
You can’t perform that action at this time.