Skip to content

Instantly share code, notes, and snippets.

spitis

Block or report user

Report or block spitis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View experiment.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View ptb_iterator.py
import numpy as np
def ptb_iterator(raw_data, batch_size, num_steps, steps_ahead=1):
"""Iterate on the raw PTB data.
This generates batch_size pointers into the raw PTB data, and allows
minibatch iteration along these pointers.
Args:
raw_data: one of the raw data outputs from ptb_raw_data.
batch_size: int, the batch size.
num_steps: int, the number of unrolls.
View random_optimization_python.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View ternary_and_one_hot_neurons.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@spitis
spitis / bnlstm.py
Created Feb 2, 2017
Batch normalized LSTM Cell for Tensorflow
View bnlstm.py
"""adapted from https://github.com/OlavHN/bnlstm to store separate population statistics per state"""
import tensorflow as tf, numpy as np
RNNCell = tf.nn.rnn_cell.RNNCell
class BNLSTMCell(RNNCell):
'''Batch normalized LSTM as described in arxiv.org/abs/1603.09025'''
def __init__(self, num_units, is_training_tensor, max_bn_steps, initial_scale=0.1, activation=tf.tanh, decay=0.95):
"""
* max bn steps is the maximum number of steps for which to store separate population stats
"""
View Binary Stochastic Neurons in Tensorflow.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View variousscripts.txt
This file has been truncated, but you can view the full file.
Star Wars: Episode 1:The Phantom Menace
TITLE CARD : A long time ago in a galaxy far, far away....
A vast sea of stars serves as the backdrop for the main title, followed by
a roll up, which crawls up into infinity.
EPISODE 1 THE PHANTOM MENACE
View wikifil.pl
#!/usr/bin/perl
# Program to filter Wikipedia XML dumps to "clean" text consisting only of lowercase
# letters (a-z, converted from A-Z), and spaces (never consecutive).
# All other characters are converted to spaces. Only text which normally appears
# in the web browser is displayed. Tables are removed. Image captions are
# preserved. Links are converted to normal text. Digits are spelled out.
# Written by Matt Mahoney, June 10, 2006. This program is released to the public domain.
@spitis
spitis / gist:47a243774808a9c124f9
Last active Oct 18, 2015
Simple node tictactoe
View gist:47a243774808a9c124f9
var assert = require('assert');
var readline = require('readline');
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
function game() {
var board = [
@spitis
spitis / JSProblems.md
Created Dec 24, 2014
JS Problem Samples
View JSProblems.md

##Problem Samples

####Logging hello world How would you output the string "Hello world!" to the javascript console.

Answer:

console.log("Hello World!");

You can’t perform that action at this time.