Skip to content

Instantly share code, notes, and snippets.

View jwijffels's full-sized avatar

jwijffels

View GitHub Profile
{
"embeddings": [
{
"tensorName": "word2vec",
"tensorShape": [
1000,
50
],
"tensorPath": "https://gist.githubusercontent.com/jwijffels/e5c7df42611aa7adc17e346d67c2d40a/raw/161e91795793e6e02e1f6ae937c9a0426d3551d7/word_embeddings_vectors.tsv",
"metadataPath": "https://gist.githubusercontent.com/jwijffels/e5c7df42611aa7adc17e346d67c2d40a/raw/d7ae62b1dbc762e98a9f11900aeac04d97ebacfe/word_embeddings_metadata.tsv"
@jwijffels
jwijffels / gist:fd14531036363464e1c6f5ed5545da5d
Created December 4, 2018 16:42
Output for NanoGenMo 2018 Project X, logic and code are at https://github.com/NaNoGenMo/2018/issues/20
This file has been truncated, but you can view the full file.
Project x A Workbook object
+-+-+-+-+-+-+-+ +-+ +-+ +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+
|P|r|o|j|e|c|t| |x| |A| |W|o|r|k|b|o|o|k| |o|b|j|e|c|t|
+-+-+-+-+-+-+-+ +-+ +-+ +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+
Project x Output from mclustICL
_ __ __
' ) ) _/_ / ') _/_ _/_ /)
/--'__ __ o _ _. / _., / /. . / _ . . / // __ __ ______
@jwijffels
jwijffels / install-gitlab.R
Created May 19, 2016 20:22 — forked from nbenn/install-gitlab.R
Fetch latest build artifact from gitlab and install as R package.
#' Install an R package hosted as a build artifact on gitlab
#'
#' Gitlab supports the storage of build artifacts which may be utilized as
#' distribution mechanism for code binaries. Applying this to scheme to R, a
#' build task may be defined (for example for each tagged commit), yielding a
#' .zip file of the tar.gz package produced by R CMD build. This function
#' fetches the most recent build artifact and installs it as a package.
#'
#' @param gitlab A string representing the base url of the gitlab host
#' @param name The name of the package repository
@jwijffels
jwijffels / README.md
Created October 27, 2015 08:34 — forked from ramnathv/README.md
Leaflet Routing Machine with rCharts

Leaflet Routing Machine Plugin

I saw the following issue posted to the rMaps github repo today.

I am new to using rMaps and leaflet. I would like to plot the route between two locations. The leaflet routing machine plugin allows us to do this (https://github.com/perliedman/leaflet-routing-machine). I am not quite sure how to use the functions addAssets() and setTemplate() to be able to use this plugin.

This was a good exercise for me to test whether these newly introduced mechanisms addAssets and setTemplate would allow one to easily extend the base leaflet binding in rMaps.

Let us start by creating the base map.

myformatCats <- function (tab, nam, tr, type, group.freq, npct, pctdig, exclude1,
long, prtest, latex = FALSE, testUsed = character(0), npct.size = "scriptsize",
pdig = 3, eps = 0.001, footnoteTest = TRUE, dotchart = FALSE)
{
gnames <- names(group.freq)
nr <- nrow(tab)
if (ncol(tab) < length(group.freq)) {
tabfull <- matrix(NA, nrow = nr, ncol = length(group.freq),
dimnames = list(dimnames(tab)[[1]], gnames))
tabfull[, dimnames(tab)[[2]]] <- tab
@jwijffels
jwijffels / gist:5239198
Created March 25, 2013 18:00
S3 methods for streaming modelling with R package stream and for data in an ffdf
DSD_FFDFstream <- function(x, k=NA, assignment=NULL, loop=FALSE) {
stopifnot(is.ffdf(x))
open(x)
state <- new.env()
assign("counter", 1L, envir = state)
l <- list(description = "FF Data Stream",
strm = x,
state = state,
d = ncol(x),
k = k,