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
(require '[clojure.core.async :as a]) | |
(def xform (comp (map inc) | |
(filter even?) | |
(dedupe) | |
(flatmap range) | |
(partition-all 3) | |
(partition-by #(< (apply + %) 7)) | |
(flatmap flatten) | |
(random-sample 1.0) |
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 bytes-to-int | |
([bytes] | |
(bytes-to-int bytes 0)) | |
([bytes offset] | |
(reduce + 0 | |
(map (fn [i] | |
(let [shift (* (- 4 1 i) | |
8)] | |
(bit-shift-left (bit-and (nth bytes (+ i offset)) | |
0x000000FF) |
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
$ git remote rm origin | |
$ git remote add origin <git_repo> | |
$ git config master.remote origin | |
$ git config master.merge refs/heads/master |