This file contains hidden or 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
| // Parts from Ace; see <https://raw.githubusercontent.com/ajaxorg/ace/master/LICENSE> | |
| CodeMirror.defineMode("asciidoc", function(cmCfg, modeCfg) { | |
| // Ace highlight rules function imported below. | |
| var HighlightRules = function() { | |
| var identifierRe = "[a-zA-Z\u00a1-\uffff]+\\b"; | |
| this.$rules = { | |
| "start": [ | |
| {token: "empty", regex: /$/}, |
This file contains hidden or 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
| (defn config-files | |
| "Returns a sequence of configuration files | |
| that should be loaded by Immuconf." | |
| ([] | |
| (config-files (env :environment))) | |
| ([current-env] | |
| (let [converter (comp (map (partial str "config/")) | |
| (map io/resource) | |
| (remove nil?)) |
This file contains hidden or 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
| ;; Copyright (c) Alan Dipert. All rights reserved. | |
| ;; The use and distribution terms for this software are covered by the | |
| ;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) | |
| ;; By using this software in any fashion, you are agreeing to be bound by | |
| ;; the terms of this license. | |
| ;; You must not remove this notice, or any other, from this software. | |
| (ns alandipert.kahn | |
| (:require [clojure.set :refer [difference union intersection]])) |
This file contains hidden or 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
| (defn debounce [c ms] | |
| (let [queued? (atom false)] | |
| (with-let [ret (cell @c)] | |
| (add-watch c (gensym) | |
| #(when-not @queued? | |
| (reset! queued? true) | |
| (with-timeout ms | |
| (reset! queued? false) | |
| (reset! ret @c))))))) |
This file contains hidden or 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
| """ | |
| This is a batched LSTM forward and backward pass | |
| """ | |
| import numpy as np | |
| import code | |
| class LSTM: | |
| @staticmethod | |
| def init(input_size, hidden_size, fancy_forget_bias_init = 3): |
This file contains hidden or 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
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |
NewerOlder