View new.edn
({:args (:state/process-generation-input), :samples 6, :fn clojush.bench.helpers/process-generation-deserialize, :score-error 4.046196493848768, :index 0, :score-confidence [117.56223226848456 125.6546252561821], :name :process-generation, :mode :single-shot, :params {:process_generation_input_id "3714-33fc8276-c3d3-4405-931b-4f087df5a415"}, :statistics {:max 124.171268052, :mean 121.60842876233333, :min 119.726577712, :n 6, :percentiles {0.0 119.726577712, 50.0 121.3598037545, 90 124.171268052, 95 124.171268052, 99 124.171268052, 99.9 124.171268052, 99.99 124.171268052, 99.999 124.171268052, 99.9999 124.171268052, 100 124.171268052}, :stdev 1.4429126470638984, :sum 729.650572574, :variance 2.081996907056946}, :threads 1, :score [121.60842876233333 "s/op"]} {:args (:state/process-generation-input), :samples 6, :fn clojush.bench.helpers/process-generation-deserialize, :score-error 1.2430860914703907, :index 0, :score-confidence [50.49914804452961 52.98532022747039], :name :process-generation, :mode :single-sho
View main.clj
(defn private-field [obj fn-name-string]
(let [m (.. obj getClass (getDeclaredField fn-name-string))]
(. m (setAccessible true))
(. m (get obj))))
(def c (org.nustaq.serialization.FSTConfiguration/getDefaultConfiguration))
(def f (private-field (.getCLInfoRegistry c) "mInfos"))
(defn ->classes []
(into #{} (filter some? (into [] (.mKeys f)))))
View interpreter.clj
(s/def ::tag integer?)
(def instructions
docker build -t cerebral-baobab .
docker run --rm -it -v $PWD:/src/ cerebral-baobab
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o xtrace
set -o pipefail
git remote set-url origin https://$$TRAVIS_REPO_SLUG.git
View .travis.yml
sudo: true
language: clojure
before_install: yes y | sudo lein upgrade
- lein test
after_success: ./scripts/ 2>&1 | sed "s/$GITHUB_TOKEN/<hidden github token>/"
View fun play.alda
riff = a1/c16/e+ c/e c/e- c/e+ > f f f
riff2 = o8 c16 d-
o1 riff*5
o5 a1/c16/e+ c/e c/e- c/e+
> f f f f f
riff2*4 (vol 80) riff2*4 (vol 50) riff2*4 (vol 20) riff2*4 (vol 10) riff2*4
View little thing.clj
(s/def ::edge-fn fn?)
(s/def ::input (s/coll-of keyword?))
(s/def ::output (s/coll-of keyword?))
(s/def ::edge (s/keys :req [::edge-fn ::input ::output]))
(s/def ::dynamic-edge-fn (s/fn :ret ::edge))
(s/def ::dynamic-edge (s/keys :req [::dynamic-edge-fn ::input]))
(s/def ::graph (s/coll-of (s/or ::edge ::dynamic-edge)))
(s/def ::state
View structured_logger.clj
;; terms:
;; label: is the name of an event we want to log, i.e. :start, :end, etc
;; input: is the stuff you want to log i.e. {:id 1 :start-time 20}
;; compute-graph: is a graph that that takes in the existing mapping of labels->computed
;; along with the `input`, and returns the new `computed` for the event.
;; computed: is the return value of compute-graph
;; handler: map of label to handle function. Each handle function is called with the `labels->computed`
;; that exist when the that event is called.
View utils.clj
(defn map-vals-w-keys
"Takes each [k v] in map m and changes it to [k (f k v)] "
[f m]
(into {}
(for [[k v] m]
[k (f k v)])))