Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rjpower
rjpower / docker-init.sh
Created August 24, 2016 23:00
simple user script for running docker in AWS
#!/bin/bash
# INSERT VARIABLES HERE
# e.g.
#
# export PACKAGE_TAG=...
# export CLUSTER_TAG=...
export DEPLOY_DIR=/media/ephemeral0/deploy
@rjpower
rjpower / keyphrase.ipynb
Created July 12, 2016 16:31
keyphrase classification
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rjpower
rjpower / fizzbuzz.ipynb
Last active July 6, 2016 20:47
fizzbuzz w/ maxout dense
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rjpower
rjpower / fizzbuzz.ipynb
Created June 28, 2016 18:01
fizzbuzz with one-hot encoding
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rjpower
rjpower / document-embeddings.ipynb
Created June 20, 2016 23:24
word2vec in keras
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rjpower
rjpower / custom.html
Last active June 16, 2016 21:25
jupyter styling
<!-- originally from: https://raw.githubusercontent.com/barbagroup/CFDPython/master/styles/custom.css -->
<link href='http://fonts.googleapis.com/css?family=Fenix' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Alegreya+Sans:100,300,400,500,700,800,900,100italic,300italic,400italic,500italic,700italic,800italic,900italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:300,400' rel='stylesheet' type='text/css'>
<style>
@font-face {
font-family: "Computer Modern";
src: url('http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf');
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rjpower
rjpower / bow-embedding-keras.py
Created June 2, 2016 22:08
BOW embedding layers for Keras
class BOW(Embedding):
'''
Bag-of-words embedding layer.
The default embedding layer outputs the concatenation of [W_t * one_hot(input)];
this layer simply sums over the resulting output.
'''
def get_output_shape_for(self, input_shape):
return (input_shape[0], self.output_dim)