Skip to content

Instantly share code, notes, and snippets.

View kastnerkyle's full-sized avatar

Kyle Kastner kastnerkyle

View GitHub Profile
@kastnerkyle
kastnerkyle / Minimal Character Model.ipynb
Created May 18, 2017 02:01 — forked from kylemcdonald/Minimal Character Model.ipynb
Minimal character-level language model in Python. Always picks the same prediction from equally probably predictions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kastnerkyle
kastnerkyle / tweet_dumper.py
Created May 19, 2017 19:09 — forked from yanofsky/LICENSE
A script to download all of a user's tweets into a csv
#!/usr/bin/env python
# encoding: utf-8
import tweepy #https://github.com/tweepy/tweepy
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""
@kastnerkyle
kastnerkyle / pytorch+char-rnn.ipynb
Created May 26, 2017 16:21 — forked from kylemcdonald/pytorch+char-rnn.ipynb
Recreating char-rnn from the spro/practical-pytorch tutorials.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kastnerkyle
kastnerkyle / check_ordinal.py
Created June 26, 2017 19:30 — forked from fabianp/check_ordinal.py
Check that the gradient of the ordinal logistic regression is correct
"""
Check that the gradient of the logistic regression is correct
"""
import numpy as np
BIG = 1e12
def phi(t):
"""
@kastnerkyle
kastnerkyle / yellow_fin.py
Created July 4, 2017 11:46 — forked from botev/run_yellow_fin_vae.py
Theano Yellow Fin
import numpy as np
import theano
import theano.tensor as T
from theano.printing import Print
from collections import OrderedDict
def yellow_fin(loss, params, beta=0.99,
learning_rate_init=0.01, momentum_init=0.0,
t=None, window_width=20, debug=False):
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kastnerkyle
kastnerkyle / mini_sequence_labeler.py
Created August 22, 2017 12:56 — forked from kyunghyuncho/mini_sequence_labeler.py
PyTorch implementation of a sequence labeler (POS taggger).
"""
PyTorch implementation of a sequence labeler (POS taggger).
Basic architecture:
- take words
- run though bidirectional GRU
- predict labels one word at a time (left to right), using a recurrent neural network "decoder"
The decoder updates hidden state based on:
- most recent word
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.