Skip to content

Instantly share code, notes, and snippets.

@codingneo
codingneo / min-char-rnn.py
Created November 18, 2015 23:38 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@codingneo
codingneo / r-github.md
Created November 28, 2015 02:14
[R] - Install R Package From GitHub
install.packages("devtools")

library(devtools)

dev_mode(on=T)

install_github("hadley/ggplot2")

# use dev ggplot2 now
@codingneo
codingneo / fpsg.md
Created December 2, 2015 15:27
Fast Parallel Stochastic Gradient (FPSG) For Matrix Factorization

Fast Parallel Stochastic Gradient (FPSG) For Matrix Factorization

Reference

@codingneo
codingneo / spark-r.md
Last active December 10, 2015 15:18
SparkR Tutorial

Installation

You can install SparkR from github directly.

if (!require('devtools')) install.packages('devtools')
devtools::install_github('apache/[email protected]', subdir='R/pkg')

You should choose tag (v1.4.0 above) corresponding to the version of Spark you use. You can find a full list of tags on the project page or directly from R using GitHub API:

jsonlite::fromJSON("https://api.github.com/repos/apache/spark/tags")$name
@codingneo
codingneo / gist:59c8a4fca6ff5b534bb7
Created December 21, 2015 14:58 — forked from karpathy/gist:587454dc0146a6ae21fc
An efficient, batched LSTM.
"""
This is a batched LSTM forward and backward pass
"""
import numpy as np
import code
class LSTM:
@staticmethod
def init(input_size, hidden_size, fancy_forget_bias_init = 3):
@codingneo
codingneo / adam.py
Created December 30, 2015 15:30 — forked from Newmu/adam.py
Adam Optimizer
"""
The MIT License (MIT)
Copyright (c) 2015 Alec Radford
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@codingneo
codingneo / iALM.md
Last active January 5, 2016 15:19
Asset Liability Management (ALM) For Personal Finance
@codingneo
codingneo / ppcl.md
Last active January 17, 2016 15:31
Privacy Preserving Collaborative Learning
@codingneo
codingneo / tensorflow-gpu-ec2.md
Last active April 23, 2016 16:14
Setup Tensorflow GPU Instance on AWS EC2
  1. Launch the g2.2xlarge instance, select a security group with SSH rule
  2. ssh to the instance
ssh -i [pem file] ubuntu@[Public DNS of the instance]
  1. Update the locale
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
sudo dpkg-reconfigure locales