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) |
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
/* | |
A neuron is basically the sum of its synapses. | |
Along with a trigger threshold, that's all we need to calculate | |
whether or not it will trigger at any given moment: | |
*/ | |
const neuron = ({ synapses = [], threshold = 1 } = {}) => ({ | |
synapses, | |
threshold | |
}); |
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
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
ServerName cuboid.io | |
ServerAlias www.cuboid.io | |
DocumentRoot /var/www/cuboidio | |
<Directory /> | |
Options -Indexes +FollowSymLinks | |
AllowOverride None | |
Require all granted | |
</Directory> |
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
<VirtualHost *:80> | |
ServerName Bonfire.local | |
DocumentRoot /var/www/Bonfire.local | |
<Directory /var/www/Bonfire.local> | |
Options FollowSymLinks | |
AllowOverride All | |
</Directory> | |
</VirtualHost> |
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
/** | |
* Combination Constructor/Prototype Pattern | |
*/ | |
//constructor | |
function Something(name){ | |
//properties | |
this.name = name; | |
} | |
//prototype |
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
/* Simple JavaScript Inheritance | |
* By John Resig http://ejohn.org/ | |
* MIT Licensed. | |
*/ | |
// Inspired by base2 and Prototype | |
(function(){ | |
var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/; | |
// The base Class implementation (does nothing) | |
this.Class = function(){}; |
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
export ANDROID_HOME=/home/bonnie/Android/Sdk | |
export PATH=${ANDROID_HOME}/tools:${PATH} | |
export PATH=${ANDROID_HOME}/platform-tools:${PATH} | |
export PATH=${ANDROID_HOME}/build-toold:${PATH} | |
export PATH=${ANDROID_HOME}/../android-ndk-r10e:${PATH} | |
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 | |
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
/** | |
* fullscreenify() | |
* Stretch canvas to size of window. | |
* | |
* Zachary Johnson | |
* http://www.zachstronaut.com/ | |
* | |
* See also: https://gist.github.com/1178522 | |
*/ |
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
cordova build android -- --ant |
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 app = require("express")(); | |
app.get('/user', function(req, res){ | |
res.send(200, { name: 'marcus' }); | |
}); | |
// In order to reach the app from other modules | |
// we need to export the express application | |
module.exports.getApp = app; |