This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env/ | |
__pycache__/ | |
*-app.py | |
*_files/ | |
*.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Untitled" | |
output: | |
revealjs::revealjs_presentation: | |
css: styles.css | |
--- | |
## R Markdown | |
This is an R Markdown presentation. Markdown is a simple formatting syntax for authoring HTML, PDF, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
# Define server logic required to generate and plot a random distribution | |
shinyServer(function(input, output) { | |
# Expression that generates a plot of the distribution. The expression | |
# is wrapped in a call to renderPlot to indicate that: | |
# | |
# 1) It is "reactive" and therefore should be automatically | |
# re-executed when inputs change |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''Train MNIST with tfrecords yielded from a TF Dataset | |
In order to run this example you should first run 'mnist_to_tfrecord.py' | |
which will download MNIST data and serialize it into 3 tfrecords files | |
(train.tfrecords, validation.tfrecords, and test.tfrecords). | |
This example demonstrates the use of TF Datasets wrapped by a generator | |
function. The example currently only works with a fork of keras that accepts | |
`workers=0` as an argument to fit_generator, etc. Passing `workers=0` results | |
in the generator function being run on the main thread (without this various |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
# Define server logic for random distribution application | |
shinyServer(function(input, output) { | |
# Reactive expression to generate the requested distribution. This is | |
# called whenever the inputs change. The output functions defined | |
# below then all use the value computed from this expression | |
data <- reactive({ | |
dist <- switch(input$dist, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Rcpp.h> | |
using namespace Rcpp; | |
class BinFixed { | |
double width_; | |
double origin_; | |
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(keras) | |
library(reticulate) | |
layer_multiplicative_lstm <-function( | |
object, units, activation = "tanh", recurrent_activation = "hard_sigmoid", use_bias = TRUE, | |
return_sequences = FALSE, return_state = FALSE, go_backwards = FALSE, stateful = FALSE, unroll = FALSE, | |
kernel_initializer = "glorot_uniform", recurrent_initializer = "orthogonal", bias_initializer = "zeros", | |
unit_forget_bias = TRUE, kernel_regularizer = NULL, recurrent_regularizer = NULL, bias_regularizer = NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras.models import Model | |
from keras import layers | |
from keras import Input | |
text_vocabulary_size = 10000 | |
question_vocabulary_size = 10000 | |
answer_vocabulary_size = 500 | |
text_input = Input(shape=(None,), dtype='int32', name='text') | |
embedded_text = layers.Embedding( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Rcpp.h> | |
using namespace Rcpp; | |
void finalizeInt(int* ptr) { | |
// do nothing | |
} | |
typedef XPtr<int,PreserveStorage,finalizeInt> XPtrInt; | |
// [[Rcpp::export]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Untitled" | |
output: revealjs::revealjs_presentation | |
--- | |
## R Markdown | |
This is an R Markdown presentation. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>. | |
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. |
NewerOlder