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)])))
View event_based.clj
(ns clojush.log
(require [plumbing.graph :as graph]
[plumbing.core :as plumbing]
[ :as map]
[plumbing.fnk.pfnk :as pfnk]
[lazy-map.core :as lazy-map]))
(defmacro lazy-map-self


# kubernetes
brew cask install minikube
minikube start

# helm
brew install kubernetes-helm
helm init
View main.go
package main
import (
View clojush.proto
message Run {
required Configuration config = 1;
repeated Generation generations = 2;
message Configuration {
required string problemFile = 1;
// arguments are stored as EDN export of clojure types
required map<string, string> arguments = 2;
View ideal point.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This is a working example on how to store CryptoKeys locally in your browser. We are able to save the objects, without serializing them. This means we can keep them not exportable (which might be more secure?? not sure what attack vectors this prevents).

To try out this example, first make sure you are in a browser that has support for async...await and indexedDB (latest chrome canary with chrome://flags "Enable Experimental Javascript" works). Load some page and copy and paste this code into the console. Then call encryptDataSaveKey(). This will create a private/public key pair and encrypted some random data with the private key. Then save both of them. Now reload the page, copy in the code, and run loadKeyDecryptData(). It will load the keys and encrypted data and decrypt it. You should see the same data logged both times.