I hereby claim:
- I am rxacevedo on github.
 - I am rxacevedo (https://keybase.io/rxacevedo) on keybase.
 - I have a public key whose fingerprint is 1553 A223 5BED 37A0 1539 CD4F 1794 5A14 8A10 5A97
 
To claim this, I am signing this object:
| #!/usr/bin/env bash | |
| # This script assumes that you already have the following VMs or hosts in place/accessible via docker-machine: | |
| # consul | |
| # nginx (in my case, dev) | |
| # swarm-master | |
| # swarm-node-00 | |
| # swarm-node-01 | |
| CONSUL_HOST_NAME='consul' | 
| #!/usr/bin/env bash | |
| # The host machine needs access to the proper certs in order for the container to be able to talk to swarm nodes using TLS client auth. | |
| # These don't exist in the container by, and need to be volume mounted in from the Boot2docker host. Port 3376 also needs to be exposed | |
| # on the host since the individual agent processes on the other nodes will be conencting directly to the hsot on which the manager is | |
| # running. | |
| # | |
| # ¯\_(ツ)_/¯ | |
| set -e | 
        | (let [data (for [i (range 10)] | |
| [i i]) | |
| h (fn [theta-0 theta-1] | |
| (fn [x] (+ theta-0 (* theta-1 x)))) | |
| j (fn [theta-0 theta-1] | |
| (* (/ 1 (* 2 (count data))) | |
| (apply + (map (fn [[x y]] | |
| (pow (- ((h theta-0 theta-1) x) y) 2)) | |
| data)))) | 
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env bash | |
| # | |
| # Bootstrap my Mac | |
| set -e | |
| echo '' | |
| echo 'Boostrapping...' | |
| echo '' | 
| ;; test suite to go with hashing code | |
| (ns user.test.sha256 | |
| (:use [clojure.test] | |
| [clojure.string :only [join]] | |
| [user.hash])) | |
| (def sha256-test-vectors | |
| #^{:doc "test vectors from the NESSIE project (http://is.gd/jdM99e)"} | |
| [{ :message "" | |
| :expected "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"} | 
| (require '[clojure [repl :refer :all]] | |
| '[clojure.core [reducers :as rd]]) | |
| ;; => K done | |
| (defn no-consecutive-ones-fsa [strings] | |
| "An FSA that only accepts strings with no consecutive ones." | |
| (letfn [(no-ones-seen [[x & xs :as xss]] | |
| (fn [] | |
| (if (seq xss) | |
| (case x | 
| (require '[clojure.core.reducers :as rd]) | |
| ;; => nil | |
| (letfn [(monoid-mapping [f] | |
| (rd/monoid | |
| (fn [l r] (conj l (f r))) vector)) | |
| (monoid-reducer-map [f coll] | |
| (reduce (monoid-mapping f) | |
| ((monoid-mapping f)) | |
| coll))] |