vagrant box add ubuntu/trusty64
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
(scoped | |
;; adaptive button panel test | |
(def gen-panel (label action) | |
{ label: label | |
xlen: 1 | |
ylen: 1 | |
action: action }) | |
(def calculate-strength (item-key world) | |
;; naive calculator, take previous usage time; |
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
//# sourceMappingURL=../maps/browser.map | |
; | |
this.sibilant = (function() { | |
/* src/browser.sibilant:4:5 */ | |
var sibilant = { }, | |
exports = sibilant; | |
var error = (function error$(str) { | |
/* error src/browser.sibilant:6:6 */ | |
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
//# sourceMappingURL=../maps/browser.map | |
; | |
this.sibilant = (function() { | |
/* src/browser.sibilant:4:5 */ | |
var sibilant = { }, | |
exports = sibilant; | |
var error = (function error$(str) { | |
/* error src/browser.sibilant:6:6 */ | |
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
;; based on http://jsfiddle.net/ramnathv/kmkL2gvr/6/ | |
;; assumes d3.js, d3-scale.js, d3-selection-multi.js included in html with <div id="container"></div> | |
(scoped | |
(var | |
data [ {x: 0.1 y: 0.1} | |
{x: 0.2 y: 0.2} | |
{x: 0.4 y: 0.3} | |
{x: 0.6 y: 0.4} ] | |
Chart { controller: (#(args) | |
{ draw: (#(el isinit context) |
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
;; reload css | |
(scoped | |
(var all-link (document.getElementsByTagName "link") | |
i 0) | |
(while (< i all-link.length) | |
(var link (get all-link i)) | |
(when (< -1 (|> (link.getAttribute "type") | |
(.indexOf "css"))) | |
(console.log "reload " link) | |
(assign link.href (+ link.href "?t=" (|> (new Date) |
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
(var DEBUG-LEVEL 10 | |
console-log-orig console.log) | |
(assign console.log | |
(#(...argv) | |
(when (< 0 DEBUG-LEVEL) | |
(console-log-orig.apply console argv)))) | |
;; comment this out to preserve console.log in js output | |
(macro console.log (...body) `(comment ...@body)) |
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
(ns cwilso.metronome) | |
;; ref https://github.com/cwilso/metronome/blob/master/js/metronome.js | |
;; with the metronomeworker.js inlined directly. | |
;; it is not a completely swappable port. | |
;; in particular, it assumes WebAudio compliance (thus does not assume cwilso's monkey patch is applied) | |
;; also, init() expects an existing AudioContext which is initialized elsewhere; the assumed use-case is | |
;; to use the scheduling technique as a part of a larger setup, where the context is managed separately. |
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
(var myState (object inArray false)) | |
(var myStack (array)) | |
(var rxOpenBracket (regex ^\\[)) | |
(var rxCloseBracket (regex \\]$)) | |
(var strTail | |
(function (s) | |
(return ((. s substring) 1)))) |
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
import nipype.pipeline.engine as pe | |
from nipype.interfaces.utility import Function | |
def func_A(subject): | |
return '%s --> [A]'%subject | |
def func_B(subject, in_file): | |
return '%s --> B[%s]'%(subject,in_file) | |
def func_C(in_file): | |
return '%s --> [C]'%in_file | |
def func_D(in_files): |