Skip to content

Instantly share code, notes, and snippets.

View balajikvijayan's full-sized avatar

Balaji Vijayan balajikvijayan

  • San Francisco, CA
View GitHub Profile
@balajikvijayan
balajikvijayan / README.md
Created December 11, 2015 01:33
AirBnB D3
@balajikvijayan
balajikvijayan / README.md
Last active December 9, 2015 01:32
D3 Intro
@balajikvijayan
balajikvijayan / rnn
Created December 3, 2015 22:06 — forked from tmramalho/rnn
import theano
import theano.tensor as T
import numpy as np
import cPickle
import random
import matplotlib.pyplot as plt
class RNN(object):
def __init__(self, nin, n_hidden, nout):
from gensim import models
sentence = models.doc2vec.LabeledSentence(
words=[u'so`bme', u'words', u'here'], tags=["SENT_0"])
sentence1 = models.doc2vec.LabeledSentence(
words=[u'here', u'we', u'go'], tags=["SENT_1"])
sentences = [sentence, sentence1]
class LabeledLineSentence(object):
@balajikvijayan
balajikvijayan / min-char-rnn.py
Created November 17, 2015 22:54 — 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)