Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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/spark@v1.4.0', 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 / 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 / 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 / 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 / growth-hacking.md
Last active October 2, 2015 13:11
Growth Hacking Resources
@codingneo
codingneo / recsys.md
Last active November 27, 2015 15:43
A Collection Of Recent Ideas About Recommendation System

Recent Ideas About Recommendation System

Recommendation Paradigm

  • Content-based -
  • Social/demographic - suggest items liked by friends, friends of friends, and demographic similar people
  • Contextual - recommend items based on current context
  • Collaborative Filtering - suggest items based on user behaviours

Articles

  1. Yanir Seroussi, The Wonderful World Of Recommendation Systems