Skip to content

Instantly share code, notes, and snippets.

Avatar

Andreas Madsen AndreasMadsen

View GitHub Profile
View gist:17c9e6683d795434c5e1
var stream = require('stream');
var s = new stream.Readable({
highWaterMark: 20,
read: function() {
setImmediate(this.push.bind(this, 'abc'));
}
});
s.pipe(process.stdout);
View rnn.py
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):
View gist:36692deccfcf474854e1
'use strict';
var stream = require('stream');
var timer = new stream.Readable({
highWaterMark: 1,
read: function() {
console.log('read');
var self = this;
@AndreasMadsen
AndreasMadsen / test-methods.js
Created Nov 5, 2011 — forked from dominictarr/test-methods.js
node-http-proxy methods not working
View test-methods.js
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 Nov 5, 2011 — forked from dominictarr/test-methods.js
node-http-proxy methods not working
View test-methods.js
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
You can’t perform that action at this time.