Skip to content

Instantly share code, notes, and snippets.

View AndreasMadsen's full-sized avatar

Andreas Madsen AndreasMadsen

View GitHub Profile
'use strict';
var stream = require('stream');
var timer = new stream.Readable({
highWaterMark: 1,
read: function() {
console.log('read');
var self = this;
@AndreasMadsen
AndreasMadsen / rnn.py
Created March 11, 2015 15:12 — 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):
var stream = require('stream');
var s = new stream.Readable({
highWaterMark: 20,
read: function() {
setImmediate(this.push.bind(this, 'abc'));
}
});
s.pipe(process.stdout);
@AndreasMadsen
AndreasMadsen / test-methods.js
Created November 5, 2011 17:03 — forked from dominictarr/test-methods.js
node-http-proxy methods not working
var http = require('http')
, httpProxy = require('http-proxy');
httpProxy.createServer(function (req, res, proxy) {
//
// Put your custom server logic here
//
proxy.proxyRequest(req, res, {
host: 'localhost',
port: 9000
@AndreasMadsen
AndreasMadsen / test-methods.js
Created November 5, 2011 17:03 — forked from dominictarr/test-methods.js
node-http-proxy methods not working
var http = require('http')
, httpProxy = require('http-proxy');
httpProxy.createServer(function (req, res, proxy) {
//
// Put your custom server logic here
//
proxy.proxyRequest(req, res, {
host: 'localhost',
port: 9000