more control

more control

--- src/s7p/master/web.clj
+++ src/s7p/master/web.clj
@@ -14,7 +14,14 @@
    [s7p.master.core :refer [remove-dsp create-dsp change-qps start-query stop-query qp100ms timer]]))

-(def testing? (atom 1))
+(def testing (atom 1))
+(def queries (atom nil))
+
+(defn running? []
+  @queries)
+
+(defn testing? []
+  (= @testing 1))

 (defn page []
   (html
@@ -26,24 +33,26 @@
              (submit-button "new dsp")])
    (form-to [:post "/control/qps"]
             [:div
-             "qps"        [:input {:name :qps :value (* 10 @qp100ms)}]
+             "qps: " (str (* 10 @qp100ms)) [:input {:name :qps :value (* 10 @qp100ms)}]
              (submit-button "change qps")])
-   [:div "mode: " (if (= 1 @testing?) "test" "prd")]
+   [:div "mode: " (if (testing?) "test" "prd")]
    [:div
-    [:span "status: "]
-    [:ul {:style "list-style: none"}
-          [:li {:style "float: left"} (form-to [:post "/control/start"] (submit-button "start"))]
-          [:li {:style "float: left"} (form-to [:post "/control/stop"]  (submit-button "stop"))]]]
-   [:ul
+    (if (testing?)
+      (form-to [:post "/control/prd"] (submit-button "production"))
+      (form-to [:post "/control/test"]  (submit-button "test")))]
+   [:div "status: " (if (running?) "running" "suspended")]
+   [:div
+    (if (running?)
+      (form-to [:post "/control/stop"]  (submit-button "stop"))
+      (form-to [:post "/control/start"] (submit-button "start")))]
+   [:table {:style "clear: left"}
+    [:tr [:th "id"] [:th "api url"] [:th "winnotice url"] [:th ""]]
     (for [dsp @config/dsps]
-      [:li (form-to [:post "/dsp/delete"]
-                    ;; TODO: visibility
-                    [:input {:name :id :visibility :hidden :value (:id dsp)}]
-                    [:ul {:style "list-style: none"}
-                     [:li {:style "float: left"} (:id dsp)]
-                     [:li {:style "float: left"} (:url dsp)]
-                     [:li {:style "float: left"} (:winnotice dsp)]
-                     (submit-button "delete")])])]))
+      [:tr [:input {:name :id :type :hidden :value (:id dsp)}]
+       [:td (:id dsp)]
+       [:td (:url dsp)]
+       [:td (:winnotice dsp)]
+       [:td (form-to [:post "/dsp/delete"] (submit-button "delete"))]])]))

 (defn to-req [line]
@@ -53,13 +62,12 @@
      :floorPrice (if (= "NA" fp) nil (Integer. fp))
      :device     (line 2)
      :user       (line 3)
-     :test       @testing?}
+     :test       @testing}
     :result      (mapv #(Integer. %) (subvec line 4))}))

 (defn -main [& args]
   (let [context (zmq/zcontext 1)
-        queries (atom nil)
         ;; somehow cannot use with-open
         in-file (io/reader (first args))
         pub (doto (zmq/socket context :pub)
@@ -71,14 +79,17 @@
         (GET "/" [] (fn [req] (page)))
         (POST "/dsp/create" {{id :id url :url winnotice :winnotice} :params}
               (fn [req]
+                (println "create" {:id id :url url :winnotice winnotice})
                 (create-dsp pub {:id id :url url :winnotice winnotice})
                 (redirect "/")))
         (POST "/dsp/delete" {{id :id} :params}
               (fn [req]
+                (println "delete" id)
                 (remove-dsp pub id)
                 (redirect "/")))
         (POST "/control/qps" {{qps :qps} :params}
               (fn [req]
+                (println "qps: " qps)
                 (change-qps (Integer. qps))
                 (redirect "/")))
         (POST "/control/start" []
@@ -94,12 +105,14 @@
                   (stop-query @queries)
                   (reset! queries nil))
                 (redirect "/")))
-        (POST "/mode/test" []
+        (POST "/control/test" []
               (fn [req]
-                (reset! testing? 1)
+                (println "test")
+                (reset! testing 1)
                 (redirect "/")))
-        (POST "/mode/prd" []
+        (POST "/control/prd" []
               (fn [req]
-                (reset! testing? 0)
+                (println "prd")
+                (reset! testing 0)
                 (redirect "/"))))
       (run-server (site #'routes) {:port 8080}))))


placeholder: maps in Clojure

placeholder: maps in Clojure

error: pathspec 'clojure/maps.clj' did not match any file(s) known to git

--- clojure/maps.clj
+++ clojure/maps.clj
@@ -0,0 +1,65 @@
+(def scores {"Fred"  1400
+             "Bob"   1240
+             "Angela" 1024})
+(println scores)
+
+;; same as the last one!
+(def scores {"Fred" 1400, "Bob" 1240, "Angela" 1024})
+(println scores)
+
+(def scores (assoc scores "Sally" 1080))
+(println scores)
+
+(def scores (assoc scores "Bob" 0))
+(println scores)
+
+(def scores (dissoc scores "Fred"))
+(println scores)
+
+(println (get scores "Angela"))
+(println (get scores "Fred"))
+(println (get scores "Fred" "default"))
+
+(def directions {:north 0
+                 :east 1
+                 :south 2
+                 :west 3})
+
+(println (directions :north))
+(println (directions :foo))
+(println (directions :foo "bar"))
+
+(println (contains? scores "Fred"))
+(println (contains? scores "Angela"))
+(println (find scores "Angela"))
+
+(println (keys scores))
+(println (vals scores))
+
+(def players #{"Alice" "Angela" "Kelly"})
+(println (zipmap players (repeat 0)))
+
+(println "p1")
+;; with map and into
+(def new-scores (into {} (map (fn [player] [player 0]) players)))
+(println new-scores)
+
+(println "p2")
+;; with reduce
+(def new-scores (reduce (fn [acc player] (assoc acc player 0)) {} players))
+(println new-scores)
+
+(def newest-scores (merge scores new-scores))
+(println newest-scores)
+
+(def newest-scores (merge-with + scores new-scores))
+(println newest-scores)
+
+(def sm (sorted-map
+         "Bravo" 204
+         "Alfa" 35
+         "Sigma" 99
+         "Charlie" 100))
+(println sm)
+(println (keys sm))
+(println (vals sm))


pp22201

error: pathspec 'examples/GG/P/P_2_2_2_01.clj' did not match any file(s) known to git

--- examples/GG/P/P_2_2_2_01.clj
+++ examples/GG/P/P_2_2_2_01.clj
@@ -0,0 +1,2 @@
+(ns examples.GG.P.P-2-2-2-01
+  (:require [clojure2d.core :refer :all]))


Revert upgrade of swagger-ui (#219)

Revert upgrade of swagger-ui (#219)

We found some problems in posting XML: neither the content-type nor the body were posted.

--- ext/swagger/project.clj
+++ ext/swagger/project.clj
@@ -11,5 +11,5 @@
                  [yada/bidi ~VERSION]
                  [yada/webjars ~VERSION]
                  [metosin/ring-swagger "0.22.12" :exclusions [org.clojure/clojure]]
-                 [org.webjars/swagger-ui "3.9.3"]]
+                 [org.webjars/swagger-ui "2.2.6"]]
   )


change debugging email destination

change debugging email destination

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/starcity-properties/odin.git/'


Backpressure test

Backpressure test

error: pathspec 'test/onyx/plugin/bench_plugin_backpressure_test.clj' did not match any file(s) known to git

--- test/onyx/plugin/bench_plugin_backpressure_test.clj
+++ test/onyx/plugin/bench_plugin_backpressure_test.clj
@@ -0,0 +1,203 @@
+(ns onyx.plugin.bench-plugin-backpressure-test
+  (:require [clojure.core.async :refer [chan dropping-buffer put! >! <! <!! go >!!]]
+            [taoensso.timbre :refer [info warn trace fatal] :as timbre]
+            [onyx.peer.pipeline-extensions :as p-ext]
+            [onyx.plugin.bench-plugin]
+            [taoensso.timbre.appenders.rotor :as rotor]
+            [interval-metrics.core :as im]
+            [onyx.static.logging-configuration :as log-config]
+            [onyx.plugin.core-async]
+            [onyx.api])
+  (:import [onyx.plugin RandomInputPlugin]
+           [onyx.plugin JavaFn]))
+
+(def id (java.util.UUID/randomUUID))
+
+(def scheduler :onyx.job-scheduler/balanced)
+
+(def messaging :aeron)
+
+(def env-config
+  {:zookeeper/address "127.0.0.1:2189"
+   :zookeeper/server? true
+   :zookeeper.server/port 2189
+   :onyx/id id
+   :onyx.log/config {:appenders {:standard-out {:enabled? false}
+                                 :spit {:enabled? false}
+                                 :rotor {:min-level :trace
+                                         :enabled? true
+                                         :async? false
+                                         :max-message-per-msecs nil
+                                         :fn rotor/appender-fn}}
+                     :shared-appender-config {:rotor {:path "onyx.log"
+                                                      :max-size (* 512 102400) :backlog 5}}}
+   :onyx.peer/job-scheduler scheduler})
+
+(def pending-timeout 60000)
+
+(def peer-config
+  {:zookeeper/address "127.0.0.1:2189"
+   :onyx/id id
+   ;:onyx.peer/backpressure-check-interval 1000000
+   ;:onyx.peer/backpressure-low-water-pct 300
+   ;:onyx.peer/backpressure-high-water-pct 600
+   :onyx.messaging/ack-daemon-timeout pending-timeout
+   :onyx.messaging.aeron/idle-strategy :high-restart-latency
+   :onyx.messaging/bind-addr "127.0.0.1"
+   :onyx.messaging/peer-ports (vec (range 40000 40200))
+   :onyx.peer/job-scheduler scheduler
+   :onyx.messaging/impl messaging})
+
+
+(println "Starting env")
+(def env (onyx.api/start-env env-config))
+
+(def peer-group
+  (onyx.api/start-peer-group peer-config))
+
+(def batch-size 20)
+(def batch-timeout 100)
+
+(def counter (atom 0))
+(def retry-counter (atom 0))
+(def messages-tracking (atom {}))
+(def rate+latency (im/rate+latency {:rate-unit :nanoseconds
+                                    :latency-unit :nanoseconds}))
+
+(defn my-inc [{:keys [n] :as segment}]
+  ;(info "Received segment " segment)
+  (when (zero? (rand-int 100000))
+    (Thread/sleep 4000))
+  (assoc segment :n (inc n)))
+
+(def catalog
+  [{:onyx/name :in
+    :onyx/ident :onyx.plugin.bench-plugin/generator
+    ;:onyx/ident :onyx.plugin.RandomInputPlugin
+    :onyx/type :input
+    :onyx/medium :generator
+    :onyx/max-pending 500000
+    :onyx/pending-timeout pending-timeout
+    :onyx/batch-timeout batch-timeout
+    :onyx/batch-size batch-size}
+
+   {:onyx/name :inc1
+    :onyx/fn :onyx.plugin.bench-plugin-backpressure-test/my-inc
+    ;:onyx/fn :onyx.plugin.JavaFn/testFn
+    :onyx/type :function
+    :onyx/batch-timeout batch-timeout
+    :onyx/batch-size batch-size}
+
+   {:onyx/name :inc2
+    :onyx/fn :onyx.plugin.bench-plugin-backpressure-test/my-inc
+    ;:onyx/fn :onyx.plugin.JavaFn/testFn
+    :onyx/type :function
+    :onyx/batch-timeout batch-timeout
+    :onyx/batch-size batch-size}
+
+   {:onyx/name :inc3
+    :onyx/fn :onyx.plugin.bench-plugin-backpressure-test/my-inc
+    ;:onyx/fn :onyx.plugin.JavaFn/testFn
+    :onyx/type :function
+    :onyx/batch-timeout batch-timeout
+    :onyx/batch-size batch-size}
+
+   {:onyx/name :inc4
+    :onyx/fn :onyx.plugin.bench-plugin-backpressure-test/my-inc
+    :onyx/type :function
+    :onyx/batch-timeout batch-timeout
+    :onyx/batch-size batch-size}
+
+   {:onyx/name :no-op
+    :onyx/ident :onyx.plugin.core-async/output
+    :onyx/type :output
+    :onyx/medium :core.async
+    :onyx/batch-timeout batch-timeout
+    :onyx/batch-size batch-size
+    :onyx/doc "Drops messages on the floor"}])
+
+;; TO TEST
+
+(def workflow [[:in :inc1]
+               [:inc1 :inc2]
+               [:inc2 :inc3]
+               [:inc3 :inc4]
+               [:inc4 :no-op]])
+
+
+(println "starting Vpeers")
+(def v-peers (onyx.api/start-peers 6 peer-group))
+
+(println "Started vpeers")
+(def bench-length 30000000)
+
+(Thread/sleep 10000)
+
+(def start-time (java.util.Date.))
+
+(def start-time-millis (System/currentTimeMillis))
+
+(def bench-calls
+  {:lifecycle/before-task-start (fn inject-counter-before-task [event lifecycle]
+                                  {:counter counter
+                                   :retry-counter retry-counter})
+   :lifecycle/after-batch (fn after-batch [event lifecycle]
+                            (swap! (:counter event) + (count (:onyx.core/batch event)))
+                            {})})
+
+
+(def in-calls
+  {:lifecycle/before-task-start (fn inject-no-op-ch [event lifecycle]
+                                  {:core.async/chan (chan (dropping-buffer 1))})})
+
+(def lifecycles
+  [{:lifecycle/task :no-op
+    :lifecycle/calls :onyx.plugin.bench-plugin-backpressure-test/in-calls}
+   {:lifecycle/task :no-op
+    :lifecycle/calls :onyx.plugin.core-async/writer-calls}
+   {:lifecycle/task :in
+    :lifecycle/calls :onyx.plugin.bench-plugin-backpressure-test/bench-calls}
+   {:lifecycle/task :in
+    :lifecycle/calls :onyx.plugin.bench-plugin-backpressure-test/latency-calls}
+   {:lifecycle/task :in
+    :lifecycle/calls :onyx.plugin.bench-plugin/reader-calls}
+   {:lifecycle/task :inc1
+    :lifecycle/calls :onyx.plugin.bench-plugin-backpressure-test/bench-calls}
+   {:lifecycle/task :inc2
+    :lifecycle/calls :onyx.plugin.bench-plugin-backpressure-test/bench-calls}
+   {:lifecycle/task :inc3
+    :lifecycle/calls :onyx.plugin.bench-plugin-backpressure-test/bench-calls}
+   {:lifecycle/task :inc4
+    :lifecycle/calls :onyx.plugin.bench-plugin-backpressure-test/bench-calls}
+   {:lifecycle/task :no-op
+    :lifecycle/calls :onyx.plugin.bench-plugin-backpressure-test/bench-calls}])
+
+(println "Starting job at " (java.util.Date.))
+(onyx.api/submit-job
+  peer-config
+  {:catalog catalog
+   :workflow workflow
+   :lifecycles lifecycles
+   :task-scheduler :onyx.task-scheduler/balanced})
+
+(println "Done starting job at " (java.util.Date.))
+
+(future
+  (while true
+    (println "Retry counter " @retry-counter)
+    (println "Update " @counter (float (/ @counter
+                                          (/ (- (System/currentTimeMillis) start-time-millis)
+                                             1000))) "/sec")
+    (Thread/sleep 10000)))
+
+
+(Thread/sleep bench-length)
+(println "Done at " start-time (java.util.Date.) @counter
+         (float (* 1000 (/ @counter bench-length))) "/sec")
+
+(doseq [v-peer v-peers]
+  (onyx.api/shutdown-peer v-peer))
+
+(onyx.api/shutdown-peer-group peer-group)
+
+(onyx.api/shutdown-env env)


Add routes for single-query tests, revert special quote escaping

1. The single-query test should not return an array, so create routes
/db and /dbraw that run a single query and return the first response.

2. Remove calls to vec that apparently were not needed. (oops)

3. Revert special escaping for quotes.

--- compojure/hello/src/hello/handler.clj
+++ compojure/hello/src/hello/handler.clj
@@ -11,8 +11,7 @@
   (:require [compojure.handler :as handler]
             [compojure.route :as route]
             [clojure.java.jdbc :as jdbc]
-            [clojure.java.jdbc.sql :as sql]
-            [net.cgrand.enlive-html :as html]))
+            [clojure.java.jdbc.sql :as sql]))

 ; Database connection
 (defdb db (mysql {:subname "//localhost:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true"
@@ -39,11 +38,10 @@

 ; Run the specified number of queries, return the results
 (defn run-queries [queries]
-  (vec ; Return as a vector
    (flatten ; Make it a list of maps
     (take
      queries ; Number of queries to run
-     (repeatedly get-world)))))
+     (repeatedly get-world))))

 ; Database connection for java.jdbc "raw"
 ; https://github.com/clojure/java.jdbc/blob/master/doc/clojure/java/jdbc/ConnectionPooling.md
@@ -80,11 +78,10 @@

 ; Run the specified number of queries, return the results
 (defn run-queries-raw [queries]
-  (vec ; Return as a vector
    (flatten ; Make it a list of maps
     (take
      queries ; Number of queries to run
-     (repeatedly get-world-raw)))))
+     (repeatedly get-world-raw))))

 (defn get-query-count [queries]
   "Parse provided string value of query count, clamping values to between 1 and 500."
@@ -115,31 +112,21 @@
   (let [fortunes (conj (get-all-fortunes) {:id 0 :message "Additional fortune added at request time."} )]
     (sort-by #(:message %) fortunes)))

-(defn escape-html-local
-  "Change special characters into HTML character entities."
-  [text]
-  (.. ^String (as-str text)
-    (replace "&" "&")
-    (replace "<" "<")
-    (replace ">" ">")
-    (replace "\"" """)
-    (replace "'" "'")))
-
 (defn fortunes-hiccup [fortunes]
   "Render the given fortunes to simple HTML using Hiccup."
   (html5
-    [:head
-     [:title "Fortunes"]]
-    [:body
-     [:table
-      [:tr
-       [:th "id"]
-       [:th "message"]]
-      (for [x fortunes]
-        [:tr
-         [:td (:id x)]
-         [:td (escape-html-local (:message x))]])
-      ]]))
+   [:head
+    [:title "Fortunes"]]
+   [:body
+    [:table
+     [:tr
+      [:th "id"]
+      [:th "message"]]
+     (for [x fortunes]
+       [:tr
+        [:td (:id x)]
+        [:td (escape-html (:message x))]])
+     ]]))

 (defn fortunes-enlive [fortunes]
   "Render the given fortunes to simple HTML using Enlive."
@@ -153,7 +140,9 @@
         :headers {"Content-Type" "text/plain; charset=utf-8"}
         :body "Hello, World!"})
   (GET "/json" [] (response {:message "Hello, World!"}))
+  (GET "/db" [] (response (first (run-queries (get-query-count 1)))))
   (GET "/db/:queries" [queries] (response (run-queries (get-query-count queries))))
+  (GET "/dbraw" [] (response (first (run-queries-raw (get-query-count 1)))))
   (GET "/dbraw/:queries" [queries] (response (run-queries-raw (get-query-count queries))))
   (GET "/fortune" [] (response (get-fortunes)))
   (GET "/fortune-hiccup" [] (fortunes-hiccup (get-fortunes)))


CMR-512: Added messages namespace for error messages.

error: pathspec 'src/cmr/indexer/services/messages.clj' did not match any file(s) known to git

--- src/cmr/indexer/services/messages.clj
+++ src/cmr/indexer/services/messages.clj
@@ -0,0 +1,20 @@
+(ns cmr.indexer.services.messages)
+
+(defn bulk-indexing-error-msg
+  "Creates a message saying bulk indexing failed with during a given batch."
+  [batch-index response]
+  (format "Bulk indexing failed while processing batch %d with repsonse %s"
+          batch-index
+          response))
+
+(defn inconsistent-types-msg
+  "Creates an error message indicating that not all the concepts in a batch have
+  the same type."
+  []
+  "The concepts in the batch do not all have the same type.")
+
+(defn inconsistent-index-names-msg
+  "Creates an error message indicating that not all the concepts in a batch belong
+  to the same index."
+  []
+  "The concepts in the batch do not all belong in the same index.")


Case sensitivity matters. Fixed System/gc call. Working on mouse input.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/Yoshiyuka/cthulhu.git/'


fixed nimbus bug where nimbus would fail to check heartbeats for a topology

--- src/clj/backtype/storm/daemon/nimbus.clj
+++ src/clj/backtype/storm/daemon/nimbus.clj
@@ -330,6 +330,9 @@
   (let [reported-time (:time-secs hb)
         {last-nimbus-time :nimbus-time
          last-reported-time :executor-reported-time} curr
+        reported-time (cond reported-time reported-time
+                            last-reported-time last-reported-time
+                            :else 0)
         nimbus-time (if (or (not last-nimbus-time)
                         (not= last-reported-time reported-time))
                       (current-time-secs)
@@ -343,12 +346,11 @@
     (into {}
       (for [executor all-executors :let [curr (cache executor)]]
         [executor
-          (if (contains? executor-beats executor)
-            (update-executor-cache curr (executor-beats executor))
-            curr
-            )]))))
+         (update-executor-cache curr (get executor-beats executor))]
+         ))))

 (defn update-heartbeats! [nimbus storm-id all-executors existing-assignment]
+  (log-debug "Updating heartbeats for " storm-id " " (pr-str all-executors))
   (let [storm-cluster-state (:storm-cluster-state nimbus)
         executor-beats (.executor-beats storm-cluster-state storm-id (:executor->node+port existing-assignment))
         cache (update-heartbeat-cache (@(:heartbeats-cache nimbus) storm-id)
@@ -364,6 +366,11 @@

 (defn- alive-executors
   [nimbus ^TopologyDetails topology-details all-executors existing-assignment]
+  (log-debug "Computing alive executors for " (.getId topology-details) "\n"
+             "Executors: " (pr-str all-executors) "\n"
+             "Assignment: " (pr-str existing-assignment) "\n"
+             "Heartbeat cache: " (pr-str (@(:heartbeats-cache nimbus) (.getId topology-details)))
+             )
   (let [conf (:conf nimbus)
         storm-id (.getId topology-details)
         executor-start-times (:executor->start-time-secs existing-assignment)


add line-items to query

add line-items to query


added test for logistic regression.

added test for logistic regression.

error: pathspec 'test/brevis/test/math/logistic_regression.clj' did not match any file(s) known to git

--- test/brevis/test/math/logistic_regression.clj
+++ test/brevis/test/math/logistic_regression.clj
@@ -0,0 +1,13 @@
+(ns brevis.test.math.logistic-regression
+  (:use [clojure.test]
+        [brevis.math logistic-regression matrix]))
+
+(defn logistic-regression-test
+  []
+  (let [X (seq-to-matrix 10 2 (flatten (repeat 2 (range 1 11))))
+        theta (seq-to-matrix 2 1 '(0.25 0.75))
+        Y (transpose (matrix-mult (transpose theta) (transpose X)))
+        ]
+;    [X theta Y]
+    (logistic-regression X Y 10 theta)
+    ))


simple parsing meta-info.

simple parsing meta-info.

error: pathspec 'src/clj/reader_web_app/fb2parce.clj' did not match any file(s) known to git

--- src/clj/reader_web_app/fb2parce.clj
+++ src/clj/reader_web_app/fb2parce.clj
@@ -0,0 +1,33 @@
+(ns reader-web-app.fb2parce
+  (:require [clojure.xml :as xml])
+  (:gen-class))
+
+(defn get-meta-info
+  [raw-meta-info, k]
+  (println "\n" raw-meta-info)
+  (if (string? raw-meta-info)
+    nil
+    (if (map? raw-meta-info)
+      (if (= (xml/tag raw-meta-info) k)
+        {k (raw-meta-info :content)}
+        (get-meta-info (raw-meta-info :content) k))
+      (if (vector? raw-meta-info)
+        (loop [nodes raw-meta-info
+             meta-info []]
+        (if (empty? nodes)
+          meta-info
+          (let [[cnode & nodess] nodes
+                new-node (get-meta-info cnode k)]
+             (recur nodess (into meta-info new-node)))))))))
+
+(defn parse-book
+  [book-path]
+  (let [raw-book (xml/parse book-path)
+        raw-book-content (xml/content raw-book)
+        raw-meta-info (first raw-book-content)]
+    ; (println raw-meta-info)
+    (map #(get-meta-info raw-meta-info %) [:first-name :last-name])))
+
+(defn -main
+  [some]
+  (print "Karter_Kris_Raspinatel.fb2"))


Add ryanmcg layout.

Add ryanmcg layout.

error: pathspec 'src/incise/layouts/impl/ryanmcg.clj' did not match any file(s) known to git

--- src/incise/layouts/impl/ryanmcg.clj
+++ src/incise/layouts/impl/ryanmcg.clj
@@ -0,0 +1,52 @@
+(ns incise.layouts.impl.ryanmcg
+  (:require (incise.layouts [html :refer [use-layout deflayout defpartial]]
+                            [core :refer [register]])
+            [robert.hooke :refer [add-hook]]
+            [incise.layouts.impl.page :refer [page]]
+            (hiccup [def :refer :all]
+                    [element :refer :all])))
+
+(defmulti contact (fn [x & _] x))
+(defmethod contact :default
+  [end-point handle]
+  (link-to (str "https://" (name end-point) ".com/" handle)
+           (str \@ handle)))
+(defmethod contact :email
+  [_ email]
+  (mail-to email))
+
+(defhtml contact-spec [[end-point handle]]
+  [:div.contact
+   [:span.end-point end-point]
+   (contact end-point handle)])
+
+(defpartial footer
+  "A footer parital with a Creative Commons license attached."
+  [_ {:keys [contacts author]}]
+  [:hr]
+  [:footer
+   [:div.row
+    [:div#cc.col-md-8
+     [:div.row
+      (link-to {:class "col-md-2" :rel "license"}
+               "http://creativecommons.org/licenses/by-sa/3.0/deed.en_US"
+               (image "http://i.creativecommons.org/l/by-sa/3.0/88x31.png"
+                      "Creative Commons License"))
+      [:p.col-md10-
+       "Content on this website is licensed under a "
+       (link-to {:rel "license"}
+                "http://creativecommons.org/licenses/by-sa/3.0/deed.en_US"
+                "Creative Commons Attribution-ShareAlike 3.0 Unported License")
+       " by " author "."]]]
+    [:div#contacts.col-md-4 (map contact-spec contacts)]]
+   [:p
+    "This website is "
+    (link-to "https://github.com/RyanMcG/incise" "incise") "d."]])
+
+(deflayout ryanmcg
+  (repartial incise.layouts.impl.page/javascripts
+             #(cons "http://code.jquery.com/jquery-2.0.3.min.js" %))
+  (repartial incise.layouts.impl.page/footer footer)
+  (use-layout page))
+
+(register [:ryanmcg] ryanmcg)


www/FormatFilter.clj: filter to change MediaType based on format=atom query parameter

fatal: unable to access 'https://github.com/stuartsierra/altlaw-backend.git/': The requested URL returned error: 403


Add snippets for Math - Trigonometry. Issue #87.

error: pathspec 'test/snippets/math/trigonometry.clj' did not match any file(s) known to git

--- test/snippets/math/trigonometry.clj
+++ test/snippets/math/trigonometry.clj
@@ -0,0 +1,57 @@
+(ns snippets.math.trigonometry
+  (:require [quil.snippet :refer [defsnippet]]
+            [quil.core :refer :all]))
+
+(defsnippet acos-s {}
+  (background 255)
+  (fill 0)
+  (text (str "(acos 0) = " (acos 0)) 10 20)
+  (text (str "(acos 1) = " (acos 1)) 10 40))
+
+(defsnippet asin-s {}
+  (background 255)
+  (fill 0)
+  (text (str "(asin 0) = " (asin 0)) 10 20)
+  (text (str "(asin 1) = " (asin 1)) 10 40))
+
+(defsnippet atan-s {}
+  (background 255)
+  (fill 0)
+  (text (str "(atan 0) = " (atan 0)) 10 20)
+  (text (str "(atan 1) = " (atan 1)) 10 40))
+
+(defsnippet atan2-s {}
+  (background 255)
+  (fill 0)
+  (text (str "(atan2 2 1) = " (atan2 2 1)) 10 20)
+  (text (str "(atan2 1 2) = " (atan2 1 2)) 10 40))
+
+(defsnippet cos-s {}
+  (background 255)
+  (fill 0)
+  (text (str "(cos 0) = " (cos 0)) 10 20)
+  (text (str "(cos HALF-PI) = " (cos HALF-PI)) 10 40))
+
+(defsnippet degrees-s {}
+  (background 255)
+  (fill 0)
+  (text (str "(degrees 0) = " (degrees 0)) 10 20)
+  (text (str "(degrees HALF-PI) = " (degrees HALF-PI)) 10 40))
+
+(defsnippet radians-s {}
+  (background 255)
+  (fill 0)
+  (text (str "(radians 0) = " (radians 0)) 10 20)
+  (text (str "(radians 90) = " (radians 90)) 10 40))
+
+(defsnippet sin-s {}
+  (background 255)
+  (fill 0)
+  (text (str "(sin 0) = " (sin 0)) 10 20)
+  (text (str "(sin HALF-PI) = " (sin HALF-PI)) 10 40))
+
+(defsnippet tan-s {}
+  (background 255)
+  (fill 0)
+  (text (str "(tan 0) = " (tan 0)) 10 20)
+  (text (str "(tan QUARTER-PI) = " (tan QUARTER-PI)) 10 40))


code cleanup

code cleanup

removed unnecessary wrapper

--- luminus/hello/src/hello/models/db.clj
+++ luminus/hello/src/hello/models/db.clj
@@ -69,4 +69,4 @@
   "Fetch the full list of Fortunes from the database, sort them by the fortune
    message text, and then return the results."
   (let [fortunes (conj (get-all-fortunes) {:id 0 :message "Additional fortune added at request time."} )]
-    (sort-by #(:message %) fortunes)))+    (sort-by :message fortunes)))


added p20.clj

added p20.clj

fatal: unable to access 'https://github.com/drcabana/euler-fp.git/': The requested URL returned error: 403


More reduction in duplication

More reduction in duplication

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/couragelabs/coachbot.git/'


Add some useful aggregate counts to verify

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/electorate-works.git/'


need verification in route

need verification in route

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/vincentstorme/clojureme.git/'


Gurasoa existitzen bada bakarrik gehitu

Gurasoa existitzen bada bakarrik gehitu

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/lnmnd/magnet.bez.git/'


Version 1.10.2-SNAPSHOT

Version 1.10.2-SNAPSHOT


bump version to 2.8.0

bump version to 2.8.0

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/B2W-BIT/restQL-server.git/'


Address CVE-2015-0886

Address CVE-2015-0886

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/tobias/clojars-web.git/'


Version 0.4.1-SNAPSHOT

Version 0.4.1-SNAPSHOT

fatal: unable to access 'https://github.com/tobiasbayer/lambdacd.git/': The requested URL returned error: 403


remove obsolete reference to handler from repl options

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/tobiasbayer/lambdacd.git/'


[WM] remove joda-time exclusion from datomic

Not sure what's going on here. Leiningen recommends excluding joda-time from Datomic, but Datomic is the only thing pulling it in. So if you exclude it, that leads to the deployment error we were seeing in prod. No idea why it worked anyway on staging (maybe something else was pulling in the right version of joda-time?).

fatal: unable to access 'https://github.com/democracyworks/ballot-notification-works.git/': The requested URL returned error: 403


whoops, didn't meant to commit integrant-related code

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/election-authority-works.git/'


Updated Codox to include sources

Updated Codox to include sources

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/meowcakes/ring.git/'


bump version to 2.8.16

bump version to 2.8.16


Version bump

Version bump

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/xcthulhu/clj-bitauth.git/'


0.1.6

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/michaelsbradleyjr/shen.clj.git/'


Update deps & add exclusions

Update deps & add exclusions

Exclusions cleared out a compilation error I was seeing.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/election-notification-http-api.git/'


Fix indentation in electorate handler test


Achieved spec testing. Sample specs supplied

error: pathspec 'test/funcatron/tron/spec_testing.clj' did not match any file(s) known to git

--- test/funcatron/tron/spec_testing.clj
+++ test/funcatron/tron/spec_testing.clj
@@ -0,0 +1,19 @@
+(ns funcatron.tron.util-test
+  (:require
+    [clojure.test :refer [deftest testing are is run-tests]]
+    [clojure.spec.test :as stest]))
+
+(set! *warn-on-reflection* true)
+
+(defn check-ns [ns]
+  (-> ns stest/enumerate-namespace stest/check stest/summerize-results))
+
+(defmacro check-nses [nses]
+  `(deftest spec-testing
+     ~@ (map (fn [ns]
+               `(is (let [~'result (check-ns ~ns)]
+                      (= (:check-passede ~'result)
+                         (:total ~'result)))))
+             nses)))
+
+(check-nses ['funcatron.tron.core 'funcatron.tron.util])


This now needs to be core/declare as we've stubbed it out here.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/shaunstanislaus/cljs2go.git/'


updated markdown-clj

updated markdown-clj

--- src/leiningen/new/cryogen/project.clj
+++ src/leiningen/new/cryogen/project.clj
@@ -6,7 +6,7 @@
   :dependencies [[org.clojure/clojure "1.6.0"]
                  [hiccup "1.0.5"]
                  [selmer "0.7.3"]
-                 [markdown-clj "0.9.57"
+                 [markdown-clj "0.9.58"
                   :exclusions [com.keminglabs/cljx]]
                  [ring/ring-devel "1.3.1"]
                  [compojure "1.2.1"]


bsearch (clojure)

bsearch (clojure)

error: pathspec 'src/main/clojure/bsearch/bsearch0.clj' did not match any file(s) known to git

--- src/main/clojure/bsearch/bsearch0.clj
+++ src/main/clojure/bsearch/bsearch0.clj
@@ -0,0 +1,46 @@
+(ns bsearch.bsearch0
+  (:use clojure.test))
+
+(defn bsearch
+  ([element vector]
+    (bsearch element vector 0 (count vector)))
+
+  ([element vector from to]
+    (if (or (empty? vector) (>= from to))
+      -1
+      (let [mid-index (quot (+ from to) 2)
+            mid-element (nth vector mid-index)]
+        (cond
+          (= element mid-element) mid-index
+          (< element mid-element) (bsearch element vector from mid-index)
+          (> element mid-element) (bsearch element vector (+ 1 mid-index) to)
+  ))))
+)
+
+(deftest should-find-index-of-element-in-a-vector
+  (is (= (bsearch 0 []) -1))
+
+  (is (= (bsearch 0 [1]) -1))
+  (is (= (bsearch 1 [1]) 0))
+  (is (= (bsearch 2 [1]) -1))
+
+  (is (= (bsearch 0 [1 2]) -1))
+  (is (= (bsearch 1 [1 2]) 0))
+  (is (= (bsearch 2 [1 2]) 1))
+  (is (= (bsearch 3 [1 2]) -1))
+
+  (is (= (bsearch 0 [1 2 3]) -1))
+  (is (= (bsearch 1 [1 2 3]) 0))
+  (is (= (bsearch 2 [1 2 3]) 1))
+  (is (= (bsearch 3 [1 2 3]) 2))
+  (is (= (bsearch 4 [1 2 3]) -1))
+
+  (is (= (bsearch 0 [1 2 3 4]) -1))
+  (is (= (bsearch 1 [1 2 3 4]) 0))
+  (is (= (bsearch 2 [1 2 3 4]) 1))
+  (is (= (bsearch 3 [1 2 3 4]) 2))
+  (is (= (bsearch 4 [1 2 3 4]) 3))
+  (is (= (bsearch 5 [1 2 3 4]) -1))
+)
+
+(run-tests)


finished standard csv output, including filtering, name changing, and column order changing and column collecting

error: pathspec 'src/Miscellaneous/baiduNewsOutput.clj' did not match any file(s) known to git

--- src/Miscellaneous/baiduNewsOutput.clj
+++ src/Miscellaneous/baiduNewsOutput.clj
@@ -0,0 +1,59 @@
+(ns Miscellaneous.baiduNewsOutput
+  (:require [clojure.java.jdbc :as db]
+           [clojure.string :as s]
+           [data-mall.toCSVorJSON :as toCSV]
+           [monger.core :as mg]
+           [monger.collection :as mc]
+           [monger.operators :refer :all])
+  (:import [com.mongodb MongoOptions ServerAddress WriteConcern]
+           org.bson.types.ObjectId))
+
+(def db-spec
+  {:classname "com.mysql.jdbc.Driver"
+   :subprotocol "mysql"
+   :subname "//192.168.3.52:3306/credit_card"
+   :user "root"
+   :password "eura_ds"})
+
+(def input (db/query db-spec ["select * from credit_card_baidunews_0312_date_time_kw_total"]))
+
+(defn text-filter
+  [string]
+  (let [strings (s/split string #"[,\t\r\n　]+")]
+    (apply str(interpose "，" strings))))
+
+(defn tuple-filter
+  [tuples & keywords]
+  (let [h #(select-keys % keywords)
+        f #(assoc %1 %2 (text-filter (%2 %1)))
+        g #(reduce f % (keys %))
+        j #(into %1 %2)]
+    (map j tuples (map g (map h tuples)))))
+
+;(tuple-filter input :title :preview)
+
+
+(defn change-keywords
+  [tuples & {:as match}]
+  (let [f #(keyword (second %))
+        g #(vector (f %2) ((first %2) %1))
+        h #(map (partial g %) match)
+        j #(apply (partial dissoc %) (keys match))
+        k #(into (j %) (h %))
+        ]
+    (map k tuples)))
+
+;(change-keywords [{:a 2 :b 3} {:a 4 :b 5}] :a "d" :b "e")
+
+
+
+;(clojure.set/rename-keys {:a 2 :b 3} {:a "d" :b "e"})
+
+;(change-keywords (tuple-filter input :title :preview) :title "标题" :origin "来源" :keywords "关键词")
+
+;(toCSV/toCSV2 [:标题 :来源 :关键词] "D:/data/filtered-data" (change-keywords (tuple-filter input :title :preview) :title "标题" :origin "来源" :keywords "关键词"))
+
+
+
+
+


Add date test.

Add date test.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/mtravers/incidents.git/'


Add properties contexts

Add properties contexts

error: pathspec 'src/main/clojure/lazytest/context/properties.clj' did not match any file(s) known to git

--- src/main/clojure/lazytest/context/properties.clj
+++ src/main/clojure/lazytest/context/properties.clj
@@ -0,0 +1,31 @@
+(ns lazytest.context.properties
+  "Contexts for manipulating Java system properties."
+  (:use [lazytest.context :only (Context)]))
+
+;; You don't create instances of this; use property-context
+(deftype SystemPropertyContext [property value old-value-atom]
+  Context
+    (setup [this]
+      (swap! old-value-atom
+	     (fn [_]
+	       (let [old-value (System/getProperty property)]
+		 (if (nil? value)
+		   (System/clearProperty property)
+		   (System/setProperty property value))
+		 old-value))))
+    (teardown [this]
+      (swap! old-value-atom
+	     (fn [old-value]
+	       (if (nil? old-value)
+		 (System/clearProperty property)
+		 (System/setProperty property old-value))))))
+
+(defn property-context
+  "Returns a context that sets the Java system property to the given
+  value during testing.  Both name and value must be strings.  value
+  may be nil to clear the property."
+  [property-name new-value]
+  {:pre [(string? property-name)
+	 (seq property-name)  ; may not be empty
+	 (or (nil? new-value) (string? new-value))]}
+  (SystemPropertyContext. property-name new-value (atom nil)))


Stub for new test module: html-renderer-test

error: pathspec 'test/arachnida/html_renderer_test.clj' did not match any file(s) known to git

--- test/arachnida/html_renderer_test.clj
+++ test/arachnida/html_renderer_test.clj
@@ -0,0 +1,17 @@
+;
+;  (C) Copyright 2015  Pavel Tisnovsky
+;
+;  All rights reserved. This program and the accompanying materials
+;  are made available under the terms of the Eclipse Public License v1.0
+;  which accompanies this distribution, and is available at
+;  http://www.eclipse.org/legal/epl-v10.html
+;
+;  Contributors:
+;      Pavel Tisnovsky
+;
+
+(ns arachnida.html-renderer-test
+  (:require [clojure.test :refer :all]
+            [arachnida.html-renderer :refer :all]))
+
+


hot fix for db update result interpretation

--- src-clj/acha/db.clj
+++ src-clj/acha/db.clj
@@ -115,7 +115,7 @@
       order by timestamp asc limit 1" (- (quot (System/currentTimeMillis) 1000) (* 15 60))])))

 (defn- try-to-update [repo]
-  (pos? (update! (db-conn) :repo {:timestamp (quot (System/currentTimeMillis) 1000)}
+  (count (update! (db-conn) :repo {:timestamp (quot (System/currentTimeMillis) 1000)}
     ["id = ? and timestamp = ?" (:id repo) (:timestamp repo)])))

 (defn get-next-repo-to-process []


Adds CORS allow-credentials tests

Adds CORS allow-credentials tests

--- test/yada/cors_test.clj
+++ test/yada/cors_test.clj
@@ -56,3 +56,33 @@
                        (update :headers conj ["origin" "http://acme.ro"])))]
       (is (not (contains? (set (keys (:headers resp))) "access-control-allow-origin")))
       )))
+
+
+(deftest allow-credentials-test
+  (testing "Not setting allow credentials"
+    (let [res (resource {:methods {:get "Hello"}
+                         :access-control {:allow-origin "*"}})
+          h (handler res)
+          resp @(h (-> (mock/request :get "/")
+                       (update :headers conj ["origin" "http://localhost"])))]
+      (is (not (contains? (set (keys (:headers resp))) "access-control-allow-credentials")))))
+
+  (testing "Setting allow credentials to true"
+    (let [res (resource {:methods {:get "Hello"}
+                         :access-control {:allow-origin "*"
+                                          :allow-credentials true}})
+          h (handler res)
+          resp @(h (-> (mock/request :get "/")
+                       (update :headers conj ["origin" "http://localhost"])))]
+      (is (contains? (set (keys (:headers resp))) "access-control-allow-credentials"))
+      (is (= "true" (get-in resp [:headers "access-control-allow-credentials"])))))
+
+  (testing "Setting allow credentials to false"
+    (let [res (resource {:methods {:get "Hello"}
+                         :access-control {:allow-origin "*"
+                                          :allow-credentials false}})
+          h (handler res)
+          resp @(h (-> (mock/request :get "/")
+                       (update :headers conj ["origin" "http://localhost"])))]
+      (is (contains? (set (keys (:headers resp))) "access-control-allow-credentials"))
+      (is (= "false" (get-in resp [:headers "access-control-allow-credentials"]))))))


return empty ok

return empty ok

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/james-mcelwain/vielheit-clj.git/'


remove onboarding from catalogs

remove onboarding from catalogs

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/starcity-properties/odin.git/'


Fix a bunch of reflection warnings.

Fix a bunch of reflection warnings.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/cstorey/nrod.git/'


Safer directory access

Safer directory access

Avoid relative paths that can navigate to areas outside the directory
parent.

--- src/yada/resources/file_resource.clj
+++ src/yada/resources/file_resource.clj
@@ -148,6 +148,19 @@
      (ex-info "Redirect"
               {:status 302 :headers {"Location" (str (:uri req) index-file)}}))))

+(defn safe-relative-path
+  "Given a parent java.nio.file.Path, return a child that is
+  guaranteed not to ascend the parent. This is to ensure access cannot
+  be made to files outside of the parent root."
+  [^java.nio.file.Path parent ^String path]
+  (let [child (.normalize (.resolve parent path))]
+    (when (.startsWith child parent) child)))
+
+(defn safe-relative-file
+  [^java.nio.file.Path parent ^String path]
+  (when-let [path (safe-relative-path parent path)]
+    (.toFile path)))
+
 (s/defn new-directory-resource
   [dir :- File
    ;; A map between file suffices and extra args that will be used
@@ -170,10 +183,12 @@
                          (dir-index dir (-> ctx :response :produces :media-type))))}
     :sub-resource
     (fn [ctx]
-      (let [f (io/file dir (-> ctx :request :path-info))
-            suffix (filename-ext (.getName f))
-            custom-suffix-args (get custom-suffices suffix)]
+      (let [f (safe-relative-file (.toPath dir) (-> ctx :request :path-info))
+            suffix (when f (filename-ext (.getName f)))
+            custom-suffix-args (when suffix (get custom-suffices suffix))]
         (cond
+          (nil? f) (resource nil)
+
           (.isFile f)
           (resource
            {:properties {:exists? (.exists f)


Revert "Changed get-next-patient-id to return the patient id instead of the entire document"

This reverts commit 9721a63091104f2a09f3ef2e6f305ce7663b0640.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/aneeshpu/pms.git/'


add unit test for 'result' type query processor.

error: pathspec 'test/metabase/driver/result_test.clj' did not match any file(s) known to git

--- test/metabase/driver/result_test.clj
+++ test/metabase/driver/result_test.clj
@@ -0,0 +1,62 @@
+(ns metabase.driver.result-test
+  (:require [clojure.data.json :as json]
+            [expectations :refer :all]
+            [metabase.db :refer :all]
+            [metabase.driver.result :as result]
+            (metabase.models [query :refer [Query]]
+                             [query-execution :refer [QueryExecution]])
+            [metabase.test-data :refer [db-id user->id]]
+            [metabase.test.util :refer [match-$ random-name expect-eval-actual-first]]
+            [metabase.util :as util]))
+
+
+; insert a Query with a QueryExecution
+(let [addtl-info (random-name)]
+  (expect-eval-actual-first
+    (match-$ (sel :one QueryExecution :additional_info addtl-info)
+      {:id $
+       :uuid $
+       :status "completed"
+       :row_count 1
+       :data {:rows [[100]]
+              :columns ["count"]
+              :cols [{:base_type "IntegerField"
+                      :special_type "number"
+                      :name "count"
+                      :id nil
+                      :table_id nil
+                      :description nil}]}})
+    (let [{query-id :id} (ins Query
+                           :type "rawsql"
+                           :name (random-name)
+                           :details {:sql "select 100"}
+                           :creator_id (user->id :rasta)
+                           :public_perms 0
+                           :database_id @db-id)]
+      ;; Add a dummy QueryExecution for our Query so that we have something to pull the cached result from
+      (ins QueryExecution
+        :uuid (.toString (java.util.UUID/randomUUID))
+        :executor_id (user->id :rasta)
+        :json_query {}
+        :query_id query-id
+        :version 1
+        :status "completed"
+        :error ""
+        :started_at (util/new-sql-timestamp)
+        :finished_at (util/new-sql-timestamp)
+        :running_time 0
+        :result_rows 1
+        :result_file ""
+        :result_data (json/write-str {:rows [[100]]
+                                      :cols [{:base_type "IntegerField"
+                                              :special_type "number"
+                                              :name "count"
+                                              :id nil
+                                              :table_id nil
+                                              :description nil}]
+                                      :columns ["count"]})
+        :raw_query ""
+        :additional_info addtl-info)
+      (result/process-and-run {:type :result
+                               :database @db-id
+                               :result {:query_id query-id}}))))


Only update when truthy

Only update when truthy

--- src/yada/context.clj
+++ src/yada/context.clj
@@ -44,7 +44,7 @@

 (defn uri-for [ctx handler & [options]]
   (if-let [uri-for (:uri-for ctx)]
-    (let [res (uri-for handler options)]
+    (when-let [res (uri-for handler options)]
       (-> res
           (update :href (fn [href]
                           (if (.startsWith href "/")


Formatting

Formatting

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/delitescere/yada.git/'


Updated version to 0.2.1

Updated version to 0.2.1

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/ChallenHB/samsara.git/'


remove comment

remove comment

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/michaelsbradleyjr/transwarp.git/'


Bring in dissoc-in util

Bring in dissoc-in util

error: pathspec 'src/cljs/dato/lib/utils.cljs' did not match any file(s) known to git

--- src/cljs/dato/lib/utils.cljs
+++ src/cljs/dato/lib/utils.cljs
@@ -0,0 +1,15 @@
+(ns dato.lib.utils)
+
+(defn dissoc-in
+  "Dissociates an entry from a nested associative structure returning a new
+  nested structure. keys is a sequence of keys. Any empty maps that result
+  will not be present in the new structure."
+  [m [k & ks :as keys]]
+  (if ks
+    (if-let [nextmap (get m k)]
+      (let [newmap (dissoc-in nextmap ks)]
+        (if (seq newmap)
+          (assoc m k newmap)
+          (dissoc m k)))
+      m)
+    (dissoc m k)))


Create parse_lisp.clj

Create parse_lisp.clj

error: pathspec 'src/iyye/bios/parse_lisp.clj' did not match any file(s) known to git

--- src/iyye/bios/parse_lisp.clj
+++ src/iyye/bios/parse_lisp.clj
@@ -0,0 +1,35 @@
+; Iyye - AI agent
+; Copyright (C) 2016-2017  Sasha Yumzya
+
+; This program is free software: you can redistribute it and/or modify
+; it under the terms of the GNU Affero General Public License as
+; published by the Free Software Foundation, either version 3 of the
+; License, or (at your option) any later version.
+
+; This program is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+; GNU Affero General Public License for more details.
+
+; You should have received a copy of the GNU Affero General Public License
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+(ns iyye.bios.parse-lisp
+  (:require [clojure.string :as str]))
+
+(defn balanced? [tokens]
+  (let [n (count tokens)]
+    (loop [i 0, current 0]
+      (if (= i n)
+        (= current 0)
+        (if (or (< current 0) (and (= current 0) (not= i 0)))
+          false
+          (cond
+            (= (nth tokens i) "(") (recur (inc i) (inc current))
+            (= (nth tokens i) ")") (recur (inc i) (dec current))
+            :default (recur (inc i) current)))))))
+
+(defn make-syntax-tree [text]
+  )
+
+(defn test [])


Add problem60.clj

Add problem60.clj

error: pathspec 'euler_clojure/src/euler/problem60.clj' did not match any file(s) known to git

--- euler_clojure/src/euler/problem60.clj
+++ euler_clojure/src/euler/problem60.clj
@@ -0,0 +1,48 @@
+(ns euler.problem60
+  "The primes 3, 7, 109, and 673, are quite remarkable. By taking any two primes
+  and concatenating them in any order the result will always be prime. For
+  example, taking 7 and 109, both 7109 and 1097 are prime. The sum of these four
+  primes, 792, represents the lowest sum for a set of four primes with this
+  property.
+
+  Find the lowest sum for a set of five primes for which any two primes
+  concatenate to produce another prime."
+  (:require [euler.toolset :refer [prime? get-primes]]
+            [clojure.string :as str]))
+
+(def concats-to-prime?
+  "Tests whether concatenating ints x and y in either order makes a prime."
+  (memoize
+   (fn [x y]
+     (let [join #(Integer/parseInt (str/join "" [(str %1) (str %2)]))]
+       (and (prime? (join x y)) (prime? (join y x)))))))
+
+(defn all-concat-to-prime?
+  [candidates]
+  (every? #(apply concats-to-prime? %) (for [x candidates
+                                             y candidates
+                                             :when (not= x y)]
+                                         [x y])))
+
+;; Use a depth-first search. Nodes are lists. They represent candidate
+;; solutions.
+(defn goal-state? [node]
+  (= 5 (count node)))
+
+(defn successors [node primes]
+  (for [p primes
+        :when (and (> p (apply max node))
+                   (all-concat-to-prime? (conj node p)))]
+    (conj node p)))
+
+(defn depth-first-search [primes]
+  (loop [frontier (apply list (for [p primes] [p]))]
+    (let [node (peek frontier)]
+      (if (goal-state? node)
+        (reduce + node)
+        (let [children (successors node primes)]
+          (recur (into (pop frontier) (reverse children))))))))
+
+;; It's not clear how many primes to search through.
+;; Experimentation suggests around 9000.
+(defn problem60 [] (depth-first-search (get-primes 1 9000)))


Solve Multiples of 3 and 5 in clojure

Solve Multiples of 3 and 5 in clojure

error: pathspec 'solutions/project-euler/001/001.clj' did not match any file(s) known to git

--- solutions/project-euler/001/001.clj
+++ solutions/project-euler/001/001.clj
@@ -0,0 +1,13 @@
+(ns main)
+
+(defn sum-all-divibles-by
+  [n limit]
+  (let [p (quot limit n)]
+    (quot (* n (* p (+ p 1))) 2)))
+
+(defn main []
+  (- (+ (sum-all-divibles-by 3 999)
+        (sum-all-divibles-by 5 999))
+     (sum-all-divibles-by 15 999)))
+
+(println (main))


bumped up cryogen-markdown

bumped up cryogen-markdown

--- src/leiningen/new/cryogen/project.clj
+++ src/leiningen/new/cryogen/project.clj
@@ -7,7 +7,7 @@
                            [ring/ring-devel "1.6.2"]
                            [compojure "1.6.0"]
                            [ring-server "0.4.0"]
-                           [cryogen-markdown "0.1.6"]
+                           [cryogen-markdown "0.1.7"]
                            [cryogen-core "0.1.57"]]
             :plugins [[lein-ring "0.9.7"]]
             :main cryogen.core


Updated cryogen-core dependency

Updated cryogen-core dependency

--- src/leiningen/new/cryogen/project.clj
+++ src/leiningen/new/cryogen/project.clj
@@ -7,7 +7,7 @@
                            [ring/ring-devel "1.3.2"]
                            [compojure "1.3.1"]
                            [ring-server "0.3.1"]
-                           [cryogen-core "0.1.9"]]
+                           [cryogen-core "0.1.11"]]
             :plugins [[lein-ring "0.8.13"]]
             :main cryogen.core
             :ring {:init cryogen.server/init


Fix sync

Fix sync

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/leif47/immutabledb-experimental.git/'


Orrientzako tokia

Orrientzako tokia

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/lnmnd/magnet.bez.git/'


[TH] use for inner-loop over mapcat and remove delay

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/electorate-works.git/'


Issue #5: handle exceptions when live-coding

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/kkroening/jackal.git/'


[CS NH] Allow PORT command

[CS NH] Allow PORT command

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/s3-ftp.git/'


Saving default book between sessions

Saving default book between sessions

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/hudren/ebook-novel.git/'


Allow last-modified property to return Longs

--- src/yada/schema.clj
+++ src/yada/schema.clj
@@ -25,7 +25,8 @@
   (:import
    [yada.charset CharsetMap]
    [yada.media_type MediaTypeMap]
-   [yada.representation LanguageMap]))
+   [yada.representation LanguageMap]
+   [java.util Date]))

 (s/defschema NamespacedKeyword
   (s/constrained s/Keyword namespace))
@@ -193,7 +194,9 @@

 (def PropertiesMappings {})

-(def PropertiesResultMappings (merge RepresentationSeqMappings))
+(def PropertiesResultMappings {Date #(condp instance? %
+                                       java.lang.Long (Date. %)
+                                       %)})

 (def properties-result-coercer (sc/coercer PropertiesResult PropertiesResultMappings))


Add .

Add .

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/exupero/claspy.git/'


backup

backup

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/clojure-ml/cml.git/'


Implement simple and list aggregations

Implement simple and list aggregations

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/B2W-Digital/pdg-core.git/'


[WM] don't assume forms will always have field attrs

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/election-authority-works.git/'


Add link to intro page

Add link to intro page

--- src/clj/clojuredocs/pages/intro.clj
+++ src/clj/clojuredocs/pages/intro.clj
@@ -111,13 +111,15 @@
       [:ul.getting-started-resources
        [:li [:a {:href "http://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey"} "Are We There Yet? (video)"]]
        [:li [:a {:href "http://www.braveclojure.com"} "Clojure for the Brave and True"]]
+       [:li [:a {:href "http://aphyr.com/posts/301-clojure-from-the-ground-up-welcome"}
+             "Clojure from the Ground Up"]]
        [:li [:a {:href "http://tryclj.com"} "Try Clojure (in your browser)"]]
        [:li [:a {:href "http://clojurescriptkoans.com/"} "ClojureScript Koans"]]
        [:li [:a {:href "http://4clojure.org"} "4Clojure (learn Clojure interactively)"]]]
       [:p "There's no denying that Clojure is just so "
        " *different* "
-       " from what most of us are used to (what is up with all those parentheses?!). "
-       "So it's no surprise that it"
+       " from what most of us are used to (what is up with all those parentheses?!), "
+       "so it's no surprise that it"
        " takes a bit to get your head around it. Stick with it, and you won't be disappointed."]
       [:p "But don't take our word for it, here's what XKCD has to say:"]
       [:p [:img.xkcd {:src "/img/lisp_cycles.png"}]]


add query for services in archived section

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/starcity-properties/odin.git/'


minor formatters improvements

minor formatters improvements


added an xpath information based ranking feature

error: pathspec 'src/crawler/page_info_extractor.clj' did not match any file(s) known to git

--- src/crawler/page_info_extractor.clj
+++ src/crawler/page_info_extractor.clj
@@ -0,0 +1,69 @@
+(ns crawler.page-info-extractor
+  "Extract links based on navigational info statistics"
+  (:require [crawler.dom :as dom]
+            [crawler.utils :as utils]
+            [crawler.rich-extractor :as rich-extractor])
+  (:use [clj-xpath.core :only [$x $x:node $x:node+ $x:text+]]))
+
+(def *leaf-nav-info-fraction* 0.5)
+
+(defn stats
+  "Produce navigational info statistics.
+   If an xpath is not supplied, we produce global nav stats"
+  ([body]
+     (stats body ".//a")) ; this measures out of domain potential as
+                          ; well. so it is not really accurate. The
+                          ; supplied extractors have their own way of
+                          ; computing this global statistic
+
+  ([body an-xpath]
+   (let [processed-document (dom/html->xml-doc body)
+
+         pg-text  (-> ".//html"
+                      ($x:text+ processed-document)
+                      first)
+         nav-text ($x:text+ an-xpath processed-document)
+
+         pg-toks  (utils/tokenize pg-text)
+         nav-toks (->> nav-text
+                       (map utils/tokenize)
+                       (apply concat))
+
+         nav-information-ratio (/ (count nav-toks)
+                                  (count pg-toks))]
+     {:global-text-toks pg-toks
+      :nav-info-ratio nav-information-ratio})))
+
+(defn decision-space
+  [body url-ds blacklist]
+  (let [url (-> url-ds :url)
+
+        in-host-xpaths-hrefs (rich-extractor/state-action body url blacklist)
+        xpaths-tokenized     (rich-extractor/tokenize-actions in-host-xpaths-hrefs)
+
+        xpaths-text-tokens   (into
+                              {} (map
+                                  (fn [[an-xpath ts]]
+                                    [an-xpath
+                                     (reduce
+                                      concat
+                                      (map
+                                       (fn [token-info]
+                                         (-> token-info :text-tokens))
+                                       ts))])
+                                  xpaths-tokenized))
+
+        global-nav-stats     (stats body)
+
+        global-text-tokens   (:global-text-toks global-nav-stats)
+        xpaths-info-stats    (map
+                              (fn [[an-xpath tokens]]
+                                [an-xpath (/ (count tokens)
+                                             (count global-text-tokens))])
+                              xpaths-text-tokens)]
+    {:ranked       (reverse (sort-by second xpaths-info-stats))
+     :nav-fraction (-> global-nav-stats :nav-info-ratio)
+     :global-toks  (-> global-nav-stats :global-text-toks)}))
+
+(defn leaf? [info-for-nav]
+  (> *leaf-nav-info-fraction* info-for-nav))


Added header forwarding for saved queries and restql-control headers

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/B2W-BIT/restQL-server.git/'


include boot deps for uberjar; update boot.properties

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jtbeckha/alda.git/'


Passing kw group test.

Passing kw group test.

error: pathspec 'test/onyx/peer/kw_grouping_test.clj' did not match any file(s) known to git

--- test/onyx/peer/kw_grouping_test.clj
+++ test/onyx/peer/kw_grouping_test.clj
@@ -0,0 +1,181 @@
+(ns onyx.peer.kw-grouping-test
+  (:require [com.stuartsierra.component :as component]
+            [onyx.system :refer [onyx-development-env]]
+            [onyx.peer.task-lifecycle-extensions :as l-ext]
+            [taoensso.timbre :refer [info]]
+            [midje.sweet :refer :all]
+            [onyx.queue.hornetq-utils :as hq-util]
+            [onyx.api]))
+
+(def id (java.util.UUID/randomUUID))
+
+(def config (read-string (slurp (clojure.java.io/resource "test-config.edn"))))
+
+(def env-config
+  {:hornetq/mode :udp
+   :hornetq/server? true
+   :hornetq.server/type :embedded
+   :hornetq.udp/cluster-name (:cluster-name (:hornetq config))
+   :hornetq.udp/group-address (:group-address (:hornetq config))
+   :hornetq.udp/group-port (:group-port (:hornetq config))
+   :hornetq.udp/refresh-timeout (:refresh-timeout (:hornetq config))
+   :hornetq.udp/discovery-timeout (:discovery-timeout (:hornetq config))
+   :hornetq.embedded/config (:configs (:hornetq config))
+   :zookeeper/address (:address (:zookeeper config))
+   :zookeeper/server? true
+   :zookeeper.server/port (:spawn-port (:zookeeper config))
+   :onyx/id id
+   :onyx.coordinator/revoke-delay 5000})
+
+(def peer-config
+  {:hornetq/mode :udp
+   :hornetq.udp/cluster-name (:cluster-name (:hornetq config))
+   :hornetq.udp/group-address (:group-address (:hornetq config))
+   :hornetq.udp/group-port (:group-port (:hornetq config))
+   :hornetq.udp/refresh-timeout (:refresh-timeout (:hornetq config))
+   :hornetq.udp/discovery-timeout (:discovery-timeout (:hornetq config))
+   :zookeeper/address (:address (:zookeeper config))
+   :onyx/id id
+   :onyx.peer/inbox-capacity (:inbox-capacity (:peer config))
+   :onyx.peer/outbox-capacity (:outbox-capacity (:peer config))
+   :onyx.peer/job-scheduler :onyx.job-scheduler/round-robin})
+
+(def dev (onyx-development-env env-config))
+
+(def env (component/start dev))
+
+(def output (atom []))
+
+(def hq-config {"host" (:host (:non-clustered (:hornetq config)))
+                "port" (:port (:non-clustered (:hornetq config)))})
+
+(def in-queue (str (java.util.UUID/randomUUID)))
+
+(def out-queue (str (java.util.UUID/randomUUID)))
+
+(hq-util/create-queue! hq-config in-queue)
+(hq-util/create-queue! hq-config out-queue)
+
+(defmethod l-ext/inject-lifecycle-resources
+  :onyx.peer.kw-grouping-test/sum-balance
+  [_ event]
+  (let [balance (atom {})]
+    {:onyx.core/params [balance]
+     :test/balance balance}))
+
+(defmethod l-ext/close-lifecycle-resources
+  :onyx.peer.kw-grouping-test/sum-balance
+  [_ {:keys [test/balance]}]
+  (swap! output conj @balance)
+  {})
+
+(defn sum-balance [state {:keys [name amount] :as segment}]
+  (swap! state (fn [v] (assoc v name (+ (get v name 0) amount))))
+  [])
+
+(def workflow {:in {:sum-balance :out}})
+
+(def catalog
+  [{:onyx/name :in
+    :onyx/ident :hornetq/read-segments
+    :onyx/type :input
+    :onyx/medium :hornetq
+    :onyx/consumption :concurrent
+    :hornetq/queue-name in-queue
+    :hornetq/host (:host (:non-clustered (:hornetq config)))
+    :hornetq/port (:port (:non-clustered (:hornetq config)))
+    :onyx/batch-size 1000}
+
+   {:onyx/name :sum-balance
+    :onyx/ident :onyx.peer.kw-grouping-test/sum-balance
+    :onyx/fn :onyx.peer.kw-grouping-test/sum-balance
+    :onyx/type :function
+    :onyx/group-by-key :name
+    :onyx/consumption :concurrent
+    :onyx/batch-size 1000}
+
+   {:onyx/name :out
+    :onyx/ident :hornetq/write-segments
+    :onyx/type :output
+    :onyx/medium :hornetq
+    :onyx/consumption :concurrent
+    :hornetq/queue-name out-queue
+    :hornetq/host (:host (:non-clustered (:hornetq config)))
+    :hornetq/port (:port (:non-clustered (:hornetq config)))
+    :onyx/batch-size 1000}])
+
+(def size 3000)
+
+(def data
+  (concat
+   (map (fn [_] {:name "Mike" :amount 10}) (range size))
+   (map (fn [_] {:name "Dorrene" :amount 10}) (range size))
+   (map (fn [_] {:name "Benti" :amount 10}) (range size))
+   (map (fn [_] {:name "John" :amount 10}) (range size))
+   (map (fn [_] {:name "Shannon" :amount 10}) (range size))
+   (map (fn [_] {:name "Kristen" :amount 10}) (range size))
+   (map (fn [_] {:name "Benti" :amount 10}) (range size))
+   (map (fn [_] {:name "Mike" :amount 10}) (range size))
+   (map (fn [_] {:name "Steven" :amount 10}) (range size))
+   (map (fn [_] {:name "Dorrene" :amount 10}) (range size))
+   (map (fn [_] {:name "John" :amount 10}) (range size))
+   (map (fn [_] {:name "Shannon" :amount 10}) (range size))
+   (map (fn [_] {:name "Santana" :amount 10}) (range size))
+   (map (fn [_] {:name "Roselyn" :amount 10}) (range size))
+   (map (fn [_] {:name "Krista" :amount 10}) (range size))
+   (map (fn [_] {:name "Starla" :amount 10}) (range size))
+   (map (fn [_] {:name "Derick" :amount 10}) (range size))
+   (map (fn [_] {:name "Orlando" :amount 10}) (range size))
+   (map (fn [_] {:name "Rupert" :amount 10}) (range size))
+   (map (fn [_] {:name "Kareem" :amount 10}) (range size))
+   (map (fn [_] {:name "Lesli" :amount 10}) (range size))
+   (map (fn [_] {:name "Carol" :amount 10}) (range size))
+   (map (fn [_] {:name "Willie" :amount 10}) (range size))
+   (map (fn [_] {:name "Noriko" :amount 10}) (range size))
+   (map (fn [_] {:name "Corine" :amount 10}) (range size))
+   (map (fn [_] {:name "Leandra" :amount 10}) (range size))
+   (map (fn [_] {:name "Chadwick" :amount 10}) (range size))
+   (map (fn [_] {:name "Teressa" :amount 10}) (range size))
+   (map (fn [_] {:name "Tijuana" :amount 10}) (range size))
+   (map (fn [_] {:name "Verna" :amount 10}) (range size))
+   (map (fn [_] {:name "Alona" :amount 10}) (range size))
+   (map (fn [_] {:name "Wilson" :amount 10}) (range size))
+   (map (fn [_] {:name "Carly" :amount 10}) (range size))
+   (map (fn [_] {:name "Nubia" :amount 10}) (range size))
+   (map (fn [_] {:name "Hollie" :amount 10}) (range size))
+   (map (fn [_] {:name "Allison" :amount 10}) (range size))
+   (map (fn [_] {:name "Edwin" :amount 10}) (range size))
+   (map (fn [_] {:name "Zola" :amount 10}) (range size))
+   (map (fn [_] {:name "Britany" :amount 10}) (range size))
+   (map (fn [_] {:name "Courtney" :amount 10}) (range size))
+   (map (fn [_] {:name "Mathew" :amount 10}) (range size))
+   (map (fn [_] {:name "Luz" :amount 10}) (range size))
+   (map (fn [_] {:name "Tyesha" :amount 10}) (range size))
+   (map (fn [_] {:name "Eusebia" :amount 10}) (range size))
+   (map (fn [_] {:name "Fletcher" :amount 10}) (range size))))
+
+(hq-util/write-and-cap! hq-config in-queue data 100)
+
+(def v-peers (onyx.api/start-peers! 6 peer-config))
+
+(onyx.api/submit-job peer-config
+                     {:catalog catalog :workflow workflow
+                      :task-scheduler :onyx.task-scheduler/round-robin})
+
+(def results (hq-util/consume-queue! hq-config out-queue 1))
+
+(doseq [v-peer v-peers]
+  ((:shutdown-fn v-peer)))
+
+(component/stop env)
+
+(def out-val @output)
+
+;;; Scan the key set, dropping any nils. Count the distinct keys.
+;;; Do the same for the right hand side of the expression, but turn it into a set.
+;;; If there's the same number of elements, then the grouping was mutually exclusive.
+(fact (count (filter identity (mapcat keys out-val))) =>
+      (count (into #{} (filter identity (mapcat keys out-val)))))
+
+(fact results => [:done])
+


Changed date format to sortable one

Changed date format to sortable one

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/stlk/home-automation.git/'


More cleanup: remove state-struct-var-map


vector functions

vector functions

error: pathspec 'src/mark-volkmann-tutorial/vectors.clj' did not match any file(s) known to git

--- src/mark-volkmann-tutorial/vectors.clj
+++ src/mark-volkmann-tutorial/vectors.clj
@@ -0,0 +1,27 @@
+;; Vectors
+;; http://java.ociweb.com/mark/clojure/article.html#Collections
+; vector good for adding at back
+(def stooges (vector "Moe" "Larry" "Curly"))
+(def stooges ["Moe" "Larry" "Curly"])
+
+(get stooges 1 "unknown")
+(get stooges 3 "unknown")
+
+; replace item at 2 & return new vector
+(assoc stooges 2 "Shemp")
+
+; MY
+(subvec stooges 1)
+(subvec stooges 1 2)
+
+; list without last
+(pop stooges)
+; dont change stooges
+stooges
+
+; get last element
+(peek stooges)
+stooges
+
+; "a" added to back
+(conj stooges "a")


fix dox

fix dox

--- src/metabase/db.clj
+++ src/metabase/db.clj
@@ -81,7 +81,7 @@
   If just an entity is passed, `sel` will return `default-fields` for ENTITY.
   Otherwise is a vector is passed `sel` will return the fields specified by FIELD-KEYS.

-  `(sel :many [OrgPerm :admin :id] :user_id 1) -> return admin and id of OrgPerms whose user_id is 1
+  `(sel :many [OrgPerm :admin :id] :user_id 1) -> return admin and id of OrgPerms whose user_id is 1`

   FORMS may be either keyword args, which will be added to a korma `where` clause, or other korma
    clauses such as `order`, which are passed directly.


Putting back an eval

Putting back an eval

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/michaelsbradleyjr/shen.clj.git/'


Add tests for server side views

Add tests for server side views

error: pathspec 'test/subman/t_views.clj' did not match any file(s) known to git

--- test/subman/t_views.clj
+++ test/subman/t_views.clj
@@ -0,0 +1,6 @@
+(ns subman.t-views
+  (:require [midje.sweet :refer [fact truthy]]
+            [subman.views :as views]))
+
+(fact "index page should be ok"
+      (views/index-page) => truthy)


Add profiles.clj to dotfiles

Add profiles.clj to dotfiles

error: pathspec 'profiles.clj' did not match any file(s) known to git

--- profiles.clj
+++ profiles.clj
@@ -0,0 +1,4 @@
+{:user {:plugins [[cider/cider-nrepl "0.9.0-SNAPSHOT"]
+                  [lein-catnip "0.5.1" :exclusions [org.clojure/clojure]]
+                  [catnip "0.5.1" :exclusions [org.clojure/clojure]]]
+        :dependencies [[org.clojure/tools.nrepl "0.2.10"]]}}


Work in progress Asteroids.

Work in progress Asteroids.

error: pathspec 'Clojure/asteroids.clj' did not match any file(s) known to git

--- Clojure/asteroids.clj
+++ Clojure/asteroids.clj
@@ -0,0 +1,47 @@
+; :mode=clojure:
+
+(import
+    '(java.awt Color)
+    '(java.awt Dimension)
+    '(javax.swing.JFrame)
+    '(javax.swing.JComponent)
+    '(javax.swing.JLabel)
+    '(java.awt.event.ActionListener)
+)
+
+(defn create-game []
+    (let [keys-pressed (ref #{})
+        result
+        (doto
+            (proxy [javax.swing.JComponent] []
+                (paint [g]
+                    (do
+                        (.setColor g (if (empty? (deref keys-pressed)) (java.awt.Color/RED) (java.awt.Color/BLUE)))
+                        (let [rect (.getClipBounds g)]
+                            (.fillRect g (.x rect) (.y rect) (.width rect) (.height rect))))))
+            (.setPreferredSize (new java.awt.Dimension 640 480))
+            (.setFocusable true)
+            (.addKeyListener (proxy [java.awt.event.KeyAdapter] []
+                (keyPressed [event] (if (not (.isConsumed event)) (do
+                    (dosync
+                        (alter keys-pressed (fn [x] (conj x (.getKeyCode event)))))
+                    (.consume event))))
+                (keyReleased [event] (if (not (.isConsumed event)) (do
+                    (dosync
+                        (alter keys-pressed (fn [x] (disj x (.getKeyCode event))))))))))
+        )]
+        (do
+            (doto
+                (new javax.swing.Timer (/ 1000 60)
+                    (reify java.awt.event.ActionListener
+                        (actionPerformed [this event] (.repaint result))))
+                (.start))
+            result)))
+
+(let [frame (new javax.swing.JFrame)]
+    (do
+        (.add (.getContentPane frame) (create-game))
+        (.pack frame)
+        (.setResizable frame false)
+        (.show frame)))
+


Stub for format_date_test.clj

Stub for format_date_test.clj

error: pathspec 'test/zg/format_date_test.clj' did not match any file(s) known to git

--- test/zg/format_date_test.clj
+++ test/zg/format_date_test.clj
@@ -0,0 +1,13 @@
+(ns zg.format-date-test
+  (:require [clojure.test :refer :all]
+            [zg.format-date :refer :all]))
+
+;
+; Common functions used by tests.
+;
+
+(defn callable?
+    "Test if given function-name is bound to the real function."
+    [function-name]
+    (clojure.test/function? function-name))
+


Use list* instead of concat

Use list* instead of concat

--- src/control/core.clj
+++ src/control/core.clj
@@ -224,7 +224,7 @@
                              (if (list? item)
                                (let [cmd (first item)]
                                  (if (cmd system-functions)
-                                   (concat (list cmd  'host 'user 'cluster) (rest item))
+                                   (list* cmd  'host 'user 'cluster (rest item))
                                    item))
                                item))
                            body)]


frontend sends synchronously to dispatcher ch

--- src/merlion/core.clj
+++ src/merlion/core.clj
@@ -18,12 +18,9 @@
         (etcd/watch-prefix new-prefix))))
 (defn spy [a] (pprint a) a)

-
 (defn proxy-handler1 [backends-ch req]
-  (println [:req req :ch backends-ch] )
-  (println :L)
   (let [ch (chan)]
-    (async/put! backends-ch [req ch])
+    (async/>!! backends-ch [req ch])
     (s/take! (s/->source ch))))

 (defn proxy-handler [ch req]


add macros (first try)

add macros (first try)

error: pathspec 'worker/src/worker/macros.clj' did not match any file(s) known to git

--- worker/src/worker/macros.clj
+++ worker/src/worker/macros.clj
@@ -0,0 +1,10 @@
+(ns worker.macros
+  (:require [worker.impl.macros :as wm]))
+
+(defmacro do-some [& body]
+  `(let [~'w (js/Worker. (.createObjectURL js/URL worker.worker/worker-blob))]
+    (defn ^:export worker# [] ~@body)
+    (set! (.-onmessage ~'w) (fn [~'e] (js/console.log (worker.worker/*deserialize* (.-data ~'e)))))
+    (let [~'wmeta (meta (var worker#))]
+      (println ~'wmeta)
+      (.postMessage ~'w (cljs.core/clj->js [(:ns ~'wmeta) (:name ~'wmeta)])))))


[#113] Guard example that works

[#113] Guard example that works

error: pathspec 'priv/examples/guard.clj' did not match any file(s) known to git

--- priv/examples/guard.clj
+++ priv/examples/guard.clj
@@ -0,0 +1,8 @@
+(ns examples.guard)
+
+(def f1
+  (fn*
+   ([x] {:when (erlang/is_tuple.e x)}
+    [:tuple x])
+   ([x] {:when (erlang/is_binary.e x)}
+    [:string x])))


Add gem mappings

Add gem mappings

error: pathspec 'src/bejeweled_bot/gem_classifier.clj' did not match any file(s) known to git

--- src/bejeweled_bot/gem_classifier.clj
+++ src/bejeweled_bot/gem_classifier.clj
@@ -0,0 +1,26 @@
+(ns bejeweled-bot.gem-classifier)
+
+(def rgb-to-gem
+  {:sapphire    {:red 230  :green 101 :blue 33}
+   :topaz       {:red 254 :green 245 :blue 35}
+   :ruby        {:red 249 :green 26 :blue 54}
+   :amethyst    {:red 239 :green 15 :blue 239}
+   :smaragdine  {:red 16 :green 164 :blue 33}
+   :opal        {:red 224  :green 224 :blue 224}
+   :diamond     {:red 16 :green 139 :blue 254}})
+
+(defn rgb-to-gems
+  [rgb-array]
+
+  (map
+    (fn [row]
+      (fn [item]
+        ())
+      row)
+    rgb-array))
+
+
+()
+(defn- classify
+  [item]
+  ())


add user badge endorsement feature

add user badge endorsement feature

error: pathspec 'src/clj/salava/badge/endorsement.clj' did not match any file(s) known to git

--- src/clj/salava/badge/endorsement.clj
+++ src/clj/salava/badge/endorsement.clj
@@ -0,0 +1,81 @@
+(ns salava.badge.endorsement
+  (:require [yesql.core :refer [defqueries]]
+            [salava.core.util :refer [get-db]]
+            [slingshot.slingshot :refer :all]
+            [clojure.tools.logging :as log]))
+
+(defqueries "sql/badge/main.sql")
+
+(defn badge-owner? [ctx badge-id user-id]
+  (let [owner (select-badge-owner {:id badge-id} (into {:result-set-fn first :row-fn :user_id} (get-db ctx)))]
+    (= owner user-id)))
+
+(defn endorsement-owner? [ctx endorsement-id user-id]
+  (let [owner (select-endorsement-owner {:id endorsement-id} (into {:result-set-fn first :row-fn :endorser_id} (get-db ctx)))]
+    (= owner user-id)))
+
+(defn request-endorsement [])
+
+(defn endorse! [ctx user-badge-id user-id content]
+  (try+
+    (if (badge-owner? ctx user-badge-id user-id)
+      (throw+ {:status "error" :message "User cannot endorse himself"})
+      (when-let [id (->> (insert-user-badge-endorsement<! {:user_badge_id user-badge-id
+                                                           :endorser_id user-id
+                                                           :content content} (get-db ctx))
+                         :generated_key)]
+        {:id id :status "success"}))
+    (catch Object _
+      (log/error _)
+      {:status "error"})))
+
+(defn update-status! [ctx user-id user-badge-id endorsement-id status]
+  (try+
+    (when (badge-owner? ctx user-badge-id user-id)
+      (update-endorsement-status! {:id endorsement-id :status status} (get-db ctx))
+      {:status "success"})
+    (catch Object _
+      (log/error _)
+      {:status "error"})))
+
+(defn delete! [ctx user-badge-id endorsement-id user-id]
+  (try+
+    (if (or (endorsement-owner? ctx endorsement-id user-id) (badge-owner? ctx user-badge-id user-id ))
+      (do (delete-user-badge-endorsement! {:id endorsement-id} (get-db ctx))
+      {:status "success"})
+      {:status "error"}
+      )
+    (catch Object _
+      (log/error _)
+      {:status "error"})))
+
+#_(defn edit!
+  "Edit endorsement.
+  Does this reset status and promp user to receive again"
+  [ctx endorsement-id user-id])
+
+(defn badge-endorsements [ctx user-badge-id]
+  (get-user-badge-endorsements {:user_badge_id user-badge-id} (get-db ctx)))
+
+
+
+(defn recieved-endorsements [ctx user-id])
+(defn all-given-endorsements [ctx endorser-id])
+
+
+;;Endorse a badge earner
+;Accept or decline endorsement
+;Send information to obf
+;Pick from suggested phrases or write own endorsement
+;Endorsements show in user profile
+;Notifications for new endorsements in stream where user can accept or reject.
+;User cannot endorse themselves
+;Delete endorsement?
+;GDPR
+;badge-pdf
+;see declined-endorsements
+;request-endorsement
+;;edit-endorsement
+;;only person who has given the endorsement can delete it
+;;should the endorsement be editable, if yes does the user have to accept or decline after every edit
+;;update endorsement


Replace regular feed by Feedburner's feed in menu (fix #9)

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/magoyette/marcandregoyette.com.git/'


Add binary file io fns #'slurp-binary and #'spit-binary

error: pathspec 'src/overtone/libs/binary_file_io.clj' did not match any file(s) known to git

--- src/overtone/libs/binary_file_io.clj
+++ src/overtone/libs/binary_file_io.clj
@@ -0,0 +1,25 @@
+(ns overtone.libs.binary-file-io
+  (:import [java.io FileInputStream FileOutputStream File]))
+
+(defn slurp-binary
+  "Read in a file containing binary data into a byte-array."
+  [f-name]
+  (let [f   (File. f-name)
+        fis (FileInputStream. f)
+        len (.length f)
+        ba  (byte-array len)]
+    (loop [offset 0]
+      (when (< offset len)
+        (let [num-read (.read fis ba offset (- len offset))]
+          (when (>= num-read 0)
+            (recur (+ offset num-read))))))
+    (.close fis)
+    ba))
+
+(defn spit-binary
+  "Write a byte-array into a file with path f-name."
+  [f-name bytes]
+  (let [f   (File. f-name)
+        fos (FileOutputStream. f)]
+    (.write fos bytes)
+    (.close fos)))


Start building a main web ns for spinning up an http server and orchestrating all the things that entails.

error: pathspec 'src/doctopus/web.clj' did not match any file(s) known to git

--- src/doctopus/web.clj
+++ src/doctopus/web.clj
@@ -0,0 +1,5 @@
+(ns doctopus.web
+  (:require [ring.middleware.defaults :refer :all]
+            [ring.middleware.reload :as reload]
+            [ring.middleware.resource :refer [wrap-resource]]
+            [ring.middleware.stacktrace :as trace]))


Avoid NPE if href is nil

Avoid NPE if href is nil

--- src/yada/context.clj
+++ src/yada/context.clj
@@ -47,9 +47,10 @@
     (when-let [res (uri-for handler options)]
       (-> res
           (update :href (fn [href]
-                          (if (.startsWith href "/")
-                            (relativize (-> ctx :request :uri) href)
-                            href)))))
+                          (when href
+                            (if (.startsWith href "/")
+                              (relativize (-> ctx :request :uri) href)
+                              href))))))
     (throw (ex-info "Context does not contain a :uri-for entry" ctx))))


Move flatten-sub-expr

Move flatten-sub-expr

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/kkroening/jackal.git/'


[WM] add OPTS command to allowed FTP commands

The PowerShell FTP client code we're using sends "OPTS utf8 on". Does it
seem safe to allow this command?

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/s3-ftp.git/'


Add the complete example for simple object system!

error: pathspec 'src/clojure/clojure_walkthrough/cjia/ch08_object.clj' did not match any file(s) known to git

--- src/clojure/clojure_walkthrough/cjia/ch08_object.clj
+++ src/clojure/clojure_walkthrough/cjia/ch08_object.clj
@@ -0,0 +1,65 @@
+(ns clojure.clojure-walkthrough.cjia.ch08-object)
+
+;; The complete simple object system for Clojure
+
+(declare ^:dynamic this)
+
+(declare find-method)
+
+(defn new-object [klass]
+  (let [state (ref {})]
+    (fn thiz [command & args]
+      (case command
+        :class klass
+        :class-name (klass name)
+        :set! (let [[k v] args]
+                (dosync (alter state assoc k v))
+                nil)
+        :get (let [[key] args]
+               (@state key))
+        (let [method (klass :method command)]
+          (if-not method
+            (throw (RuntimeException.
+                    (str "Unable to respond to " command))))
+          (binding [this thiz]
+            (apply method args)))))))
+
+(defn new-class [class-name parent methods]
+  (fn klass [command & args]
+    (case command
+      :name (name class-name)
+      :parent parent
+      :new (new-object klass)
+      :methods methods
+      :method (let [[method-name] args]
+                (find-method method-name methods)))))
+
+(def OBJECT (new-class :OBJECT nil {}))
+
+(defn find-method [method-name klass]
+  (or ((klass :methods) method-name)
+      (if-not (= #'OBJECT klass)
+        (find-method method-name (klass :parent)))))
+
+(defn method-spec [sexpr]
+  (let [name (keyword (second sexpr))
+        body (next sexpr)]
+    [name (conj body 'fn)]))
+
+(defn method-specs [sexprs]
+  (->> sexprs
+       (filter #(= 'method (first %)))
+       (mapcat method-spec)
+       (apply hash-map)))
+
+(defn parent-class-spec [sexprs]
+  (let [extends-spec (filter #(= 'extends (first %)) sexprs)
+        extends (first extends-spec)]
+    (if (empty? extends)
+      'OBJECT
+      (last extends))))
+
+(defmacro defclass [class-name & specs]
+  (let [parent-class (parent-class-spec specs)
+        fns (or (method-specs specs) {})]
+    `(def ~class-name (new-class '~class-name #'~parent-class ~fns))))


Adding logs

Adding logs

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/iot-paas-home/telegram-iot-gateway.git/'


stack refactoring

stack refactoring

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/tiagoantao/turtle.git/'


Doing packer

Doing packer

fatal: remote error: upload-pack: not our ref f2c57b6bcd0b6737285d5150e7de74dc15e7871d
fatal: the remote end hung up unexpectedly


Add unit tests for litedocx.unit package

error: pathspec 'test/bakyeono/litedocx/unit_test.clj' did not match any file(s) known to git

--- test/bakyeono/litedocx/unit_test.clj
+++ test/bakyeono/litedocx/unit_test.clj
@@ -0,0 +1,15 @@
+(ns bakyeono.litedocx.unit-test
+  (:require [clojure.test :refer :all]
+            [bakyeono.litedocx.unit :refer :all]))
+
+(deftest convert-test
+  (is (== (convert "1m" "m") 1))
+  (is (== (convert "1 cm" "cm") 1))
+  (is (== (convert "1.0mm" "mm") 1))
+  (is (== (convert "1inch" "inch") 1))
+  (is (== (convert "1 in." "inch") 1))
+  (is (== (convert "1 inch" "cm") 2.54))
+  (is (== (convert "72 pt" "inch") 1))
+  (is (== (convert "1 yd" "inch") 1/36)))
+
+


(PDB-3026) Add tests around tar import paths

This commit adds tests to ensure we're detecting the command types and
certnames correctly from the paths included in the tarballs we export

error: pathspec 'test/puppetlabs/puppetdb/test_import.clj' did not match any file(s) known to git

--- test/puppetlabs/puppetdb/test_import.clj
+++ test/puppetlabs/puppetdb/test_import.clj
@@ -0,0 +1,32 @@
+(ns puppetlabs.puppetdb.test-import
+  (:require [clojure.test :refer :all]
+            [puppetlabs.puppetdb.import :refer :all]
+            [puppetlabs.puppetdb.scf.hash :as hash]
+            [clj-time.core :refer [now]]))
+
+(defn cmd-path-with-hash [entity producer-ts-hash certname]
+  (format "puppetdb-bak/%s/%s-%s.json" entity certname producer-ts-hash))
+
+(def producer-ts-hash (hash/generic-identity-hash (now)))
+
+(deftest extract-command-with-hash
+  (doseq [entity ["catalogs" "reports"]]
+    (are [certname] (= (-> entity
+                           (cmd-path-with-hash producer-ts-hash certname)
+                           command-matcher)
+                       [entity certname])
+      "foo.com"
+      "foo"
+      "some-really-long-name-with-dashes"
+      "some-name-with-double-json.json")))
+
+(defn facts-path [certname]
+  (format "puppetdb-bak/facts/%s.json" certname))
+
+(deftest test-extract-facts-certname
+  (are [certname] (= (command-matcher (facts-path certname))
+                     ["facts" certname])
+    "foo.com"
+    "foo"
+    "some-really-long-name-with-dashes"
+    "some-name-with-double-json.json"))


Remove /users

Remove /users

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/physion/ovation-webapi.git/'


Add examples dir

Add examples dir

error: pathspec 'examples/minimum_viable_secretbox.clj' did not match any file(s) known to git

--- examples/minimum_viable_secretbox.clj
+++ examples/minimum_viable_secretbox.clj
@@ -0,0 +1,9 @@
+(ns minimum-viable-secretbox
+  (:require [caesium.crypto.secretbox :as sb]))
+
+(def key (sb/new-key!))
+(def plaintext "Hello caesium!")
+(def nonce (sb/int->nonce 0))
+(def ciphertext (sb/encrypt key nonce (.getBytes plaintext)))
+(def roundtrip (String. (sb/decrypt key nonce ciphertext)))
+(assert (= plaintext roundtrip))


Update file.clj

Update file.clj

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/clojure-ml/cml.git/'


Make the name less judgemental.

Make the name less judgemental.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/mtravers/incidents.git/'


Support reduced? in reduce-async

Support reduced? in reduce-async

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/leif47/immutabledb-experimental.git/'


Ausazko hizkia lortzeko zerrendatu erabili

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/lnmnd/magnet.zer.git/'