This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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) |