The following module handles parsing a URL in JavaScript. If this script is run outside of a browser, where the DOM is inaccessible, a regular expression will be executed to parse the provided URL.
[@JSFiddle][1]
""" | |
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) |
/** | |
* Takes a function and returns the names of its parameters. | |
* @see https://gist.github.com/westc/b9c62d86efc015d1a444#file-getparamnames-js | |
* @param {Function} fn | |
* The function for which to get the parameter names. | |
* @returns {string[] | undefined} | |
* If `fn` is really a function and when using its `toString()` the parameters | |
* could be seen as a string then this will be an array of all of the | |
* parameters in this function. Otherwise `undefined` will be returned. | |
*/ |
#!/usr/bin/env bash | |
# vim:noet:sts=4:ts=4:sw=4:tw=120 | |
#======================================================================================================================= | |
# (c) 2014 Clemens Lang, neverpanic.de | |
# See https://neverpanic.de/blog/2014/03/19/downloading-google-web-fonts-for-local-hosting/ for details. | |
# | |
# With modifications by | |
# - Chris Jung, campino2k.de, and | |
# - Robert, github.com/rotx. |
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback | |
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB; | |
// Open (or create) the database | |
var open = indexedDB.open("MyDatabase", 1); | |
// Create the schema | |
open.onupgradeneeded = function() { | |
var db = open.result; | |
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"}); |
function param(arrFields, callback) { | |
for (var t, o = {}, defaults = [], len = arrFields.length, i = len; i--;) { | |
t = o.toString.call(t = arrFields[i]) == '[object Array]' ? t : [t]; | |
defaults[i] = t[1]; | |
arrFields[i] = t[0]; | |
} | |
return function(fields) { | |
for (var t, args = arrFields.slice.call(arguments, 0), i = len; i--;) { | |
args.unshift(fields && (o.hasOwnProperty.call(fields, t=arrFields[i]) ? fields[t] : defaults[i])); |
## Start .gitignore | |
*.log | |
.htaccess | |
/index.php | |
license.txt | |
readme.html | |
sitemap.xml | |
sitemap.xml.gz | |
wp-activate.php |
// Refer to https://gist.github.com/remy/350433 | |
try { | |
// Test webstorage existence. | |
if (!window.localStorage || !window.sessionStorage) throw "exception"; | |
// Test webstorage accessibility - Needed for Safari private browsing. | |
localStorage.setItem('storage_test', 1); | |
localStorage.removeItem('storage_test'); | |
} catch(e) { | |
(function () { | |
var Storage = function (type) { |
ruby: | |
google_analytics_key = 'UA-XXXXXXXX-X' # your key may have more or less characters | |
page_title = '' | |
page_description = '' | |
doctype html | |
== conditional_html_tags_for_ie_versions 7..8, lang: 'en' | |
head | |
meta charset="utf-8" | |
meta http-equiv="X-UA-Compatible" content="IE=edge; chrome=1" |