Skip to content

Instantly share code, notes, and snippets.

@merl-dev
merl-dev / app.R
Created September 8, 2018 21:33 — forked from gluc/app.R
Shiny CRUD
library(shiny)
library(shinyjs)
# Get table metadata. For now, just the fields
# Further development: also define field types
# and create inputs generically
GetTableMetadata <- function() {
fields <- c(id = "Id",
@merl-dev
merl-dev / Shiny server with OAuth2.md
Created August 7, 2017 11:01 — forked from cosmincatalin/Shiny server with OAuth2.md
Shiny community server with OAuth on Amazon EC2

Shiny community server with OAuth on Amazon EC2

Description

This is detailed description of how to set-up a Shiny server (community edition) on an AWS EC2 instance, behind an OAuth2 security layer (Google OAuth2 in this case, but it can be something else).

Prerequisites

  • A Google Developer account
  • An Amazon Web Services account
@merl-dev
merl-dev / Plot_Examples.md
Created March 28, 2017 20:56 — forked from gizmaa/Plot_Examples.md
Various Julia plotting examples using PyPlot
@merl-dev
merl-dev / setup_julia.sh
Created March 22, 2017 17:12 — forked from jiahao/setup_julia.sh
Setting up Julia on an Amazon EC2 instance
#Set up data partition
sudo mkdir /data
sudo chmod 777 /data
sudo "echo /dev/xvdb /data ext4 rw,user,exec,comment=cloudconfig 0 2 >> /etc/fstab"
sudo mount /data
#Install build environment
sudo sed -i "s/enabled=0/enabled=1" /etc/yum.repos.d/epel.epo
sudo yum -y update
sudo yum -y upgrade
@merl-dev
merl-dev / WordCounters.jl
Created May 28, 2016 00:28
simple word counter
module WordCounters
export createWordList, wordCount
function createWordList(dictfile, nsamples)
dictwords = readdlm(dictfile,'\n',AbstractString)
ln = length(dictwords)
# vector of random indices
rindices = rand(1:ln, nsamples)
# vector of random words
@merl-dev
merl-dev / savitzkygolay.jl
Created May 24, 2016 21:39 — forked from jiahao/savitzkygolay.jl
An implementation of the Savitzky-Golay filter using generated functions. Accompanies https://medium.com/@acidflask/smoothing-data-with-julia-s-generated-functions-c80e240e05f3
"""
Savitzky-Golay filter of window half-width M and degree N
M is the number of points before and after to interpolate, i.e. the full width
of the window is 2M+1
"""
immutable SavitzkyGolayFilter{M,N} end
@generated function Base.call{M,N,T}(::Type{SavitzkyGolayFilter{M,N}},
data::AbstractVector{T})