Skip to content

Instantly share code, notes, and snippets.

View vyraun's full-sized avatar

Vikas Raunak vyraun

View GitHub Profile
"""Visualize stability of stochastic gradient descent for finding a linear
separator."""
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
np.random.seed(1)
mpl.rcParams['axes.linewidth'] = 0.0
@vyraun
vyraun / ProgrammaticNotebook.ipynb
Created February 23, 2017 07:43 — forked from fperez/ProgrammaticNotebook.ipynb
Creating an IPython Notebook programatically
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vyraun
vyraun / DCGAN.ipynb
Created March 1, 2017 07:12 — forked from awjuliani/DCGAN.ipynb
An implementation of DCGAN in Tensorflow and Python.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vyraun
vyraun / pca_animation.m
Created March 1, 2017 10:06 — forked from anonymous/pca_animation.m
Matlab code to produce PCA animations
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Matlab code to produce PCA animations shown here:
% http://stats.stackexchange.com/questions/2691
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Static image
clear all
rng(42)
@vyraun
vyraun / treernn.py
Created March 17, 2017 01:02 — forked from volkancirik/treernn.py
Pytorch TreeRNN
"""
TreeLSTM[1] implementation in Pytorch
Based on dynet benchmarks :
https://github.com/neulab/dynet-benchmark/blob/master/dynet-py/treenn.py
https://github.com/neulab/dynet-benchmark/blob/master/chainer/treenn.py
Other References:
https://github.com/pytorch/examples/tree/master/word_language_model
https://github.com/pfnet/chainer/blob/29c67fe1f2140fa8637201505b4c5e8556fad809/chainer/functions/activation/slstm.py
https://github.com/stanfordnlp/treelstm
@vyraun
vyraun / treernn.py
Created March 17, 2017 01:02 — forked from volkancirik/treernn.py
Pytorch TreeRNN
"""
TreeLSTM[1] implementation in Pytorch
Based on dynet benchmarks :
https://github.com/neulab/dynet-benchmark/blob/master/dynet-py/treenn.py
https://github.com/neulab/dynet-benchmark/blob/master/chainer/treenn.py
Other References:
https://github.com/pytorch/examples/tree/master/word_language_model
https://github.com/pfnet/chainer/blob/29c67fe1f2140fa8637201505b4c5e8556fad809/chainer/functions/activation/slstm.py
https://github.com/stanfordnlp/treelstm
@vyraun
vyraun / workfreq.py
Created March 20, 2017 04:46 — forked from mhermans/workfreq.py
Python snippet for generating word frequencies for Wordle (using NLTK)
#! /usr/bin/env python
# wordcount.py: parse & return word frequency
import sys, nltk
f = open(sys.argv[1], 'rU')
txt = f.read()
f.close()
tokens = nltk.word_tokenize(txt) # tokenize text
clean_tokens = []
@vyraun
vyraun / workfreq.py
Created March 20, 2017 04:46 — forked from mhermans/workfreq.py
Python snippet for generating word frequencies for Wordle (using NLTK)
#! /usr/bin/env python
# wordcount.py: parse & return word frequency
import sys, nltk
f = open(sys.argv[1], 'rU')
txt = f.read()
f.close()
tokens = nltk.word_tokenize(txt) # tokenize text
clean_tokens = []
@vyraun
vyraun / start_python.md
Created March 20, 2017 04:49 — forked from mhermans/start_python.md
A very opinionated Python getting-started guide

A very opinionated Python getting-started guide

Setup your Python packages environment

  • Install globally pip, package manager for Python packages.
@vyraun
vyraun / start_python.md
Created March 20, 2017 04:49 — forked from mhermans/start_python.md
A very opinionated Python getting-started guide

A very opinionated Python getting-started guide

Setup your Python packages environment

  • Install globally pip, package manager for Python packages.