Skip to content

Instantly share code, notes, and snippets.

View rom1504's full-sized avatar

Romain Beaumont rom1504

View GitHub Profile
@roblabla
roblabla / proxy_raw.js
Created October 18, 2015 11:17
A raw proxy for NMP
var mc = require('minecraft-protocol') // import nmp
, states = mc.states // import states as var from nmp
, server = new mc.Server();
server.listen(25565);
server.on('connection', function(client) {
var addr = client.socket.remoteAddress; // get the ip
console.log('Incoming connection', '(' + addr + ')'); // print ip on connection
var endedClient = false;
@karpathy
karpathy / min-char-rnn.py
Last active October 3, 2024 11:59
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)