Skip to content

Instantly share code, notes, and snippets.

View vancelopez's full-sized avatar

Vance Lopez vancelopez

View GitHub Profile
@rasmusab
rasmusab / tensorflow_in_r_using_rpython.R
Last active April 25, 2018 02:35
An example of building a TensorFlow model from R using rPython
### An example of building a TensorFlow model from R using rPython ###
# For this script you need to
# 1. Have python 2.7 installed.
# 2. Install the rPython package in R.
# 3. Install Google's TensorFlow library as per these instructions:
# http://www.tensorflow.org/get_started/os_setup.md#binary_installation
### Here is how to setup and run a trivial TensorFlow model ###
# Load TensorFlow (I couldn't get this to work without setting sys.argv... )
@jcheng5
jcheng5 / pauseable.R
Last active July 2, 2020 12:53
Pauseable Shiny reactives
# See ?reactive for meanings of x, env, quoted, and domain.
# paused indicates the starting state of the pauseable reactive.
pauseableReactive <- function(x, env = parent.frame(), quoted = FALSE,
priority = 0, domain = shiny::getDefaultReactiveDomain(), paused = FALSE) {
shiny::installExprFunction(x, "func", eval.env = env, quoted = quoted)
vals <- shiny::reactiveValues(value = NULL)
obs <- shiny::observe(vals$value <- func(), priority = priority,
domain = domain, suspended = paused)
return(structure(
@xiaodaigh
xiaodaigh / README.md
Last active February 1, 2017 02:15
== actionButton styling == The Twitter Bootstrap allows for many class styles for buttons. http://getbootstrap.com/2.3.2/base-css.html#buttons Added support for these styles to the actionButton.