Skip to content

Instantly share code, notes, and snippets.

View kno3comma14's full-sized avatar
🎯
Focused

Enyert Vinas kno3comma14

🎯
Focused
View GitHub Profile
(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)
@kno3comma14
kno3comma14 / bytes_to_int.clj
Created November 21, 2022 13:44 — forked from pingles/bytes_to_int.clj
Clojure code to convert a byte array to an integer
(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)
$ git remote rm origin
$ git remote add origin <git_repo>
$ git config master.remote origin
$ git config master.merge refs/heads/master