fix indentation error

fix indentation error

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/voter-registration-works.git/'


Add testing server.

Add testing server.

error: pathspec 'src/lib/clj/one/fresh_server.clj' did not match any file(s) known to git

--- src/lib/clj/one/fresh_server.clj
+++ src/lib/clj/one/fresh_server.clj
@@ -0,0 +1,28 @@
+(ns one.fresh-server
+  (:use [ring.adapter.jetty :only (run-jetty)]
+        [ring.middleware.file :only (wrap-file)]
+        [ring.middleware.file-info :only (wrap-file-info)]
+        [ring.middleware.stacktrace :only (wrap-stacktrace)]
+        [ring.util.response :only (file-response)]
+        [compojure.core :only (defroutes ANY)]
+        [one.templates :only (apply-templates)]
+        [one.host-page :only (default-one-routes)])
+  (:require [one.reload :as reload]
+            [one.middleware :as middleware]))
+
+(defroutes app-routes
+  default-one-routes
+  (ANY "*" request (file-response "404.html" {:root "public"})))
+
+(def ^:private app (-> app-routes
+                       (wrap-file "public")
+                       wrap-file-info
+                       apply-templates
+                       middleware/js-encoding
+                       middleware/set-active-menu
+                       wrap-stacktrace))
+
+(defn start-fresh
+  "Start the test server on port 8080."
+  []
+  (run-jetty (var app) {:join? false :port 8080}))


test fix ?

test fix ?

--- src/metabase/driver/postgres.clj
+++ src/metabase/driver/postgres.clj
@@ -100,13 +100,14 @@
   "Parse a legacy `database.details.conn_str` CONNECTION-STRING and return a new-style map."
   [connection-string]
   {:pre [(string? connection-string)]}
-  (let [details (-<>> connection-string
-                      (s/split <> #" ")            ; split into k=v pairs
-                      (map (fn [pair]               ; convert to {:k v} pairs
-                             (let [[k v] (s/split pair #"=")]
-                               {(keyword k) v})))
-                      (reduce conj {}))]
-    (assoc details :port (Integer/parseInt (:port details)))))
+  (let [{:keys [port] :as details} (-<>> connection-string
+                                         (s/split <> #" ")                       ; split into k=v pairs
+                                         (map (fn [pair]                          ; convert to {:k v} pairs
+                                                (let [[k v] (s/split pair #"=")]
+                                                  {(keyword k) v})))
+                                         (reduce conj {}))]
+    (cond-> details
+      (string? port) (update-in :port (Integer/parseInt port)))))

 (defn- database->connection-details [{:keys [details]}]
   (let [{:keys [host port] :as details} (if (is-legacy-conn-details? details) (parse-legacy-conn-str (:conn_str details))
@@ -116,7 +117,8 @@
                :make-pool? false
                :db-type    :postgres                          ; What purpose is this serving?
                :ssl        (:ssl details)
-               :port       (Integer/parseInt port))
+               :port       (if (string? port) (Integer/parseInt port)
+                               port))
         (rename-keys {:dbname :db}))))


Add ids to anchoring elements so as to enable...

... faster identification and navigation of elements in the browser
while developing.

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/Reefersleep/sleepydo.git/'


Refactor: unwrap reduntantly wrapped functions


Add the history line and test-data driver

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/MitchellJThomas/medir.git/'


test(parsed_query): add test ensuring that cache is used (#77)

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/'


Add test cases for HTTP command endpoint

Signed-off-by: Deepak Giridharagopal <d11186354d1ef01ca06ae37d7e23e827da13e85f@puppetlabs.com>

error: pathspec 'test/com/puppetlabs/cmdb/test/http/command.clj' did not match any file(s) known to git

--- test/com/puppetlabs/cmdb/test/http/command.clj
+++ test/com/puppetlabs/cmdb/test/http/command.clj
@@ -0,0 +1,48 @@
+(ns com.puppetlabs.cmdb.test.http.command
+  (:require [com.puppetlabs.cmdb.scf.storage :as scf-store]
+            [com.puppetlabs.cmdb.http.server :as server]
+            [cheshire.core :as json]
+            [clojure.java.jdbc :as sql])
+  (:use clojure.test
+         ring.mock.request
+         [com.puppetlabs.cmdb.testutils]
+         [com.puppetlabs.cmdb.testutils :only [test-db]]
+         [com.puppetlabs.cmdb.scf.migrate :only [migrate!]]))
+
+(def *app* nil)
+(def *conn* nil)
+
+(use-fixtures :each (fn [f]
+                      (with-test-broker "test" conn
+                        (let [db (test-db)]
+                          (binding [*app* (server/build-app
+                                           {:scf-db db
+                                            :command-mq {:connection-string "vm://test"
+                                                         :endpoint "com.puppetlabs.cmdb.commands"}})
+                                    *conn* conn]
+                            (sql/with-connection db
+                              (migrate!)
+                              (f)))))))
+
+(defn make-request
+  [post-body]
+  (let [request (request :post "/commands")]
+    (-> request
+        (assoc-in [:headers "accept"] "application/json")
+        (body post-body))))
+
+(deftest command-endpoint
+  (testing "Commands submitted via REST"
+
+    (testing "should work when well-formed"
+      (let [req  (make-request {:payload "This is a test"})
+            resp (*app* req)]
+        (is (= (:status resp) 200))
+        (is (= (get-in resp [:headers "Content-Type"]) "application/json"))
+        (is (= (json/parse-string (:body resp)) true))))
+
+    (testing "should return 400 when malformed"
+      (let [req  (make-request {})
+            resp (*app* req)]
+        (is (= (:status resp) 400))
+        (is (= (get-in resp [:headers "Content-Type"]) "application/json"))))))


Working up tx pipeline and batching

Working up tx pipeline and batching


init kinesis (#25)

init kinesis (#25)

* init kinesis

* Fix bad namespace

error: pathspec 'src/crucible/aws/kinesis.clj' did not match any file(s) known to git

--- src/crucible/aws/kinesis.clj
+++ src/crucible/aws/kinesis.clj
@@ -0,0 +1,16 @@
+(ns crucible.aws.kinesis
+  (require [clojure.spec :as s]
+           [crucible.values :as v]
+           [crucible.resources :as r]
+           [crucible.template :as t]))
+
+(s/def ::shard-count (v/spec-or-ref pos-int?))
+
+(s/def ::name (v/spec-or-ref string?))
+
+(s/def ::stream (s/keys :req [::shard-count]
+                        :opt [::name
+                              ::v/tags]))
+
+(def stream (r/resource-factory "AWS::Kinesis::Stream" ::stream))
+


refactor

refactor

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/expez/jada.git/'


Fixed engine to restart thread on Rengine being nil

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/'


server: do not try to set react key on empty elements (#73)

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/piranha/rum.git/'


Era badago abisatu

Era badago abisatu

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/'


Server module (almost empty ATM)

Server module (almost empty ATM)

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

--- src/emender_service/server.clj
+++ src/emender_service/server.clj
@@ -0,0 +1,10 @@
+(ns emender-service.server)
+
+(require '[ring.util.response     :as http-response])
+
+(defn handler
+    "Handler that is called by Ring for all requests received from user(s)."
+    [request]
+    (println "request URI: " (request :uri))
+    )
+


Add common clojure example file #14

Add common clojure example file #14

error: pathspec 'example-dir/clojure.cljc' did not match any file(s) known to git


[CS NH] Zip validations

[CS NH] Zip validations

error: pathspec 'src/vip/data_processor/validation/zip.clj' did not match any file(s) known to git

--- src/vip/data_processor/validation/zip.clj
+++ src/vip/data_processor/validation/zip.clj
@@ -0,0 +1,22 @@
+(ns vip.data-processor.validation.zip
+  (:import [net.lingala.zip4j.core ZipFile]
+           [java.nio.file Files]
+           [java.nio.file.attribute FileAttribute]))
+
+(defn zip-file? [path]
+  (-> path
+      str
+      (.endsWith ".zip")))
+
+(defn unzip-file [path]
+  (let [zip-file (ZipFile. (str path))
+        tmp-dir (Files/createTempDirectory "vip-extracted-feed"
+                                           (into-array FileAttribute []))]
+    (.extractAll zip-file (str tmp-dir))
+    tmp-dir))
+
+(defn unzip [ctx]
+  (let [path (:input ctx)]
+    (if (zip-file? path)
+      (assoc ctx :input (unzip-file path))
+      (assoc ctx :stop (str path " is not a zip file!")))))


Add pipeline test

Add pipeline test

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


sort unit rates by term

sort unit rates by term

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/'


include a Metabase icon when we post messages to a slack channel.

--- src/metabase/integrations/slack.clj
+++ src/metabase/integrations/slack.clj
@@ -75,6 +75,7 @@
     ;; TODO: it would be nice to have an emoji or icon image to use here
    (-> (slack-api-post (slack-token) "chat.postMessage" {:channel     channel
                                                          :username    "MetaBot"
+                                                         :icon_url    "http://static.metabase.com/metabase_slack_avatar.png"
                                                          :text        text
                                                          :attachments attachments})
        (handle-api-response))))


Added showvideo example.

Added showvideo example.

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

--- examples/showvideo.clj
+++ examples/showvideo.clj
@@ -0,0 +1,86 @@
+(ns showvideo
+  (:require [clojure.java.io :as io]
+            [clojure.tools.logging :as log]
+            [com.lemondronor.turboshrimp.h264j :as decode]
+            [com.lemondronor.turboshrimp.pave :as pave]
+            [com.lemonodor.gflags :as gflags]
+            [com.lemonodor.xio :as xio])
+  (:import (java.awt Graphics)
+           (java.net Socket)
+           (javax.swing JFrame JPanel))
+  (:gen-class))
+
+
+(gflags/define-boolean "file"
+  false
+  "Read an input file.")
+
+(gflags/define-float "fps"
+  30.0
+  "Sets the desired frames-per-second when reading an input file.")
+
+(gflags/define-boolean "reduce-latency"
+  true
+  "Turns on latency reduction.")
+
+
+(defn display-frame [decoder ^JPanel view frame]
+  (let [^BufferedImage img (decoder frame)]
+    (when img
+      (.drawImage (.getGraphics view) img 0 0 view))))
+
+
+(def drone-hostname "192.168.1.1")
+(def drone-video-port 5555)
+
+
+(defn drone-video-input-stream [hostname]
+  (println "Connecting to drone at" hostname)
+  (.getInputStream (Socket. hostname drone-video-port)))
+
+
+(defn get-input-stream [args]
+  (println (gflags/flags))
+  (if (gflags/flags :file)
+    (if (seq args)
+      (io/input-stream (first args))
+      System/in)
+    (drone-video-input-stream (if (seq args) (first args) drone-hostname))))
+
+
+(defn -main [& args]
+  (println args)
+  (let [args (gflags/parse-flags (cons nil args))
+        ^JFrame window (JFrame. "Drone video")
+        ^JPanel view (JPanel.)
+        lrq (pave/make-frame-queue
+             :reduce-latency? (gflags/flags :reduce-latency))
+        decoder (decode/decoder)
+        is (get-input-stream args)
+        frame-count (atom 0)
+        frame-delay (if (gflags/flags :file)
+                      (/ 1000.0 (gflags/flags :fps))
+                      nil)]
+    (.setBounds window 0 0 640 360)
+    (.add (.getContentPane window) view)
+    (.setVisible window true)
+    (.start
+     (Thread.
+      (fn []
+        (let [frame (pave/pull-frame lrq 100)]
+          (if frame
+            (do
+              (swap! frame-count inc)
+              (display-frame decoder view frame)
+              (recur))
+            (println "Showed" @frame-count "frames, dropped"
+                     @(:num-dropped-frames lrq) "frames."))))))
+    (loop [frame (pave/read-frame is)]
+      (if frame
+        (do
+          (pave/queue-frame lrq frame)
+          (when frame-delay
+            (Thread/sleep frame-delay))
+          (recur (pave/read-frame is)))
+        (do
+          (Thread/sleep 100000))))))


midje user-etik kendu

midje user-etik kendu

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/'


Got the wrong event type.

Got the wrong event type.

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/'


fix non-functional tests

fix non-functional tests

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/'


Added a fn to ensure we have clean, attachable filenames no matter what the user's name is.

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/vote-by-mail-works.git/'


Added Negative to Zero problem

Added Negative to Zero problem

error: pathspec 'src/clojush/problems/software/negative_to_zero.clj' did not match any file(s) known to git

--- src/clojush/problems/software/negative_to_zero.clj
+++ src/clojush/problems/software/negative_to_zero.clj
@@ -0,0 +1,165 @@
+;; negative_to_zero.clj
+;; Tom Helmuth, thelmuth@cs.umass.edu
+;;
+;; Problem Source: iJava (http://ijava.cs.umass.edu/)
+;;
+;; Given a vector of integers in [-1000,1000] with length <= 50, return the
+;; vector where all negative integers have been replaced by 0.
+;;
+;; input stack has 1 input vector of integers
+
+(ns clojush.problems.software.negative-to-zero
+  (:use clojush.pushgp.pushgp
+        [clojush pushstate interpreter random util globals]
+        clojush.instructions.tag
+        [clojure.math numeric-tower combinatorics]
+        ))
+
+; Atom generators
+(def negative-to-zero-atom-generators
+  (concat (list
+            0
+            []
+            ;;; end constants
+            ;;; end ERCs
+            (tag-instruction-erc [:integer :boolean :vector_integer :exec] 1000)
+            (tagged-instruction-erc 1000)
+            ;;; end tag ERCs
+            'in1
+            ;;; end input instructions
+            )
+          (registered-for-stacks [:integer :boolean :vector_integer :exec])))
+
+
+;; Define test cases
+(defn negative-to-zero-input
+  "Makes a Negative To Zero input vector of length len with probability prob of being negative."
+  [len prob]
+  (vec (repeatedly len
+                   #(if (< (lrand) prob)
+                      (- (inc (lrand-int 1000)))
+                      (lrand-int 1001)))))
+
+;; A list of data domains for the problem. Each domain is a vector containing
+;; a "set" of inputs and two integers representing how many cases from the set
+;; should be used as training and testing cases respectively. Each "set" of
+;; inputs is either a list or a function that, when called, will create a
+;; random element of the set.
+(def negative-to-zero-data-domains
+  [[(list []) 1 0] ;; Empty vector
+   [(concat (list [-10] [-1] [0] [1] [10])
+            (repeatedly 5 #(vector (- (lrand-int 2001) 1000)))) 10 0] ;; Length 1 vectors
+   [(list [0 0]
+          [0 1]
+          [-1 0]
+          [-90 -6]
+          [-16 33]
+          [412 111]) 6 0] ;; Length 2 vectors
+   [(fn [] (negative-to-zero-input (inc (lrand-int 50)) 1.0)) 9 100] ;; Random length, all negative
+   [(fn [] (negative-to-zero-input (inc (lrand-int 50)) 0.0)) 9 100] ;; Random length, all positive
+   [(fn [] (negative-to-zero-input (inc (lrand-int 50)) (lrand))) 165 1800] ;; Random length, random prob of negative
+   ])
+
+;;Can make Negative To Zero test data like this:
+;(test-and-train-data-from-domains negative-to-zero-data-domains)
+
+; Helper function for error function
+(defn negative-to-zero-test-cases
+  "Takes a sequence of inputs and gives IO test cases of the form
+   [input output]."
+  [inputs]
+  (map (fn [in]
+         (vector in
+                 (vec (map #(if (< % 0) 0 %)
+                           in))))
+       inputs))
+
+; Define error function. For now, each run uses different random inputs
+(defn negative-to-zero-error-function
+  "Returns the error function for the negative-to-zero problem. Takes as
+   input Negative To Zero data domains."
+  [data-domains]
+  (let [[train-cases test-cases] (map negative-to-zero-test-cases
+                                      (test-and-train-data-from-domains data-domains))]
+    (when true ;; Change to false to not print test cases
+      (doseq [[i case] (map vector (range) train-cases)]
+        (println (format "Train Case: %3d | Input/Output: %s" i (str case))))
+      (doseq [[i case] (map vector (range) test-cases)]
+        (println (format "Test Case: %3d | Input/Output: %s" i (str case)))))
+    (fn the-actual-negative-to-zero-error-function
+      ([program]
+        (the-actual-negative-to-zero-error-function program :train))
+      ([program data-cases] ;; data-cases should be :train or :test
+        (the-actual-negative-to-zero-error-function program data-cases false))
+      ([program data-cases print-outputs]
+        (let [behavior (atom '())
+              errors (doall
+                       (for [[input1 correct-output] (case data-cases
+                                                                  :train train-cases
+                                                                  :test test-cases
+                                                                  [])]
+                         (let [final-state (run-push program
+                                                     (->> (make-push-state)
+                                                       (push-item input1 :input)))
+                               result (top-item :vector_integer final-state)]
+                           (when print-outputs
+                             (println (format "| Correct output: %s\n| Program output: %s\n" (pr-str correct-output) (pr-str result))))
+                           ; Record the behavior
+                           (when @global-print-behavioral-diversity
+                             (swap! behavior conj result))
+                           ; Error is Levenshtein distance of vectors
+                           (if (vector? result)
+                             (levenshtein-distance correct-output result)
+                             1000000) ; penalty for no return value
+                           )))]
+          (when @global-print-behavioral-diversity
+            (swap! population-behaviors conj @behavior))
+          errors)))))
+
+(defn negative-to-zero-report
+  "Custom generational report."
+  [best population generation error-function report-simplifications]
+  (let [best-program (not-lazy (:program best))
+        best-test-errors (error-function best-program :test)
+        best-total-test-error (apply +' best-test-errors)]
+    (println ";;******************************")
+    (printf ";; -*- Negative To Zero problem report - generation %s\n" generation)(flush)
+    (println "Test total error for best:" best-total-test-error)
+    (println (format "Test mean error for best: %.5f" (double (/ best-total-test-error (count best-test-errors)))))
+    (when (zero? (:total-error best))
+      (doseq [[i error] (map vector
+                             (range)
+                             best-test-errors)]
+        (println (format "Test Case  %3d | Error: %d" i error))))
+    (println ";;------------------------------")
+    (println "Outputs of best individual on training cases:")
+    (error-function best-program :train true)
+    (println ";;******************************")
+    )) ;; To do validation, could have this function return an altered best individual
+       ;; with total-error > 0 if it had error of zero on train but not on validation
+       ;; set. Would need a third category of data cases, or a defined split of training cases.
+
+
+; Define the argmap
+(def argmap
+  {:error-function (negative-to-zero-error-function negative-to-zero-data-domains)
+   :atom-generators negative-to-zero-atom-generators
+   :max-points 500
+   :max-points-in-initial-program 250
+   :evalpush-limit 1500
+   :population-size 1000
+   :max-generations 300
+   :parent-selection :lexicase
+   :genetic-operator-probabilities {:alternation 0.2
+                                    :uniform-mutation 0.2
+                                    :uniform-close-mutation 0.1
+                                    [:alternation :uniform-mutation] 0.5
+                                    }
+   :alternation-rate 0.01
+   :alignment-deviation 10
+   :uniform-mutation-rate 0.01
+   :problem-specific-report negative-to-zero-report
+   :print-behavioral-diversity true
+   :report-simplifications 0
+   :final-report-simplifications 5000
+   })


Issue #5: add test for creating/destroying event-buffer-based modules

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/'


string->n for Shen 3.1 (not yet..) and partial for cn

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/'


less-dumb memoization

less-dumb memoization

--- src/metabase/driver/generic_sql/util.clj
+++ src/metabase/driver/generic_sql/util.clj
@@ -1,7 +1,6 @@
 (ns metabase.driver.generic-sql.util
   "Shared functions for our generic-sql query processor."
-  (:require [clojure.core.memoize :as memo]
-            [clojure.java.jdbc :as jdbc]
+  (:require [clojure.java.jdbc :as jdbc]
             [clojure.tools.logging :as log]
             [colorize.core :as color]
             [korma.core :as korma]
@@ -9,7 +8,6 @@
             [metabase.driver :as driver]
             [metabase.driver.query-processor :as qp]))

-;; Cache the Korma DB connections for a given Database for 60 seconds instead of creating new ones every single time
 (defn- db->connection-spec [{{:keys [short-lived?]} :details, :as database}]
   (let [driver                              (driver/engine->driver (:engine database))
         database->connection-details        (:database->connection-details driver)
@@ -23,14 +21,17 @@
 (def ^{:arglists '([database])}
   db->korma-db
   "Return a Korma database definition for DATABASE.
-   This does a little bit of smart caching (for 60 seconds) to avoid creating new connections when unneeded."
-  (let [-db->korma-db (memo/ttl (fn [database]
-                                  (log/debug (color/red "Creating a new DB connection..."))
-                                  (kdb/create-db (db->connection-spec database)))
-                                :ttl/threshold (* 60 1000))]
-    ;; only :engine and :details are needed for driver/connection so just pass those so memoization works as expected
-    (fn [database]
-      (-db->korma-db (select-keys database [:engine :details])))))
+   Since Korma/C3PO seems to be bad about cleaning up its connection pools, this function is
+   memoized and will return an existing connection pool on subsequent calls."
+  (let [db->korma-db          (fn [database]
+                                (log/debug (color/red "Creating a new DB connection..."))
+                                (kdb/create-db (db->connection-spec database)))
+        memoized-db->korma-db (memoize db->korma-db)]
+    (fn [{{:keys [short-lived?]} :details, :as database}]
+      ;; Use un-memoized version of function for so-called "short-lived" databases (i.e. temporary ones that we won't create a connection pool for)
+      ((if short-lived?
+         db->korma-db
+         memoized-db->korma-db) (select-keys database [:engine :details]))))) ; only :engine and :details are needed for driver/connection so just pass those so memoization works as expected

 (def ^:dynamic ^java.sql.DatabaseMetaData *jdbc-metadata*
   "JDBC metadata object for a database. This is set by `with-jdbc-metadata`."


start new

start new

error: pathspec 'Range-Sum-Query/RSQ.clj' did not match any file(s) known to git


Add STAR capable job flow

Add STAR capable job flow

error: pathspec 'Jobs/rnaseq-star-phase-1-job-template.clj' did not match any file(s) known to git

--- Jobs/rnaseq-star-phase-1-job-template.clj
+++ Jobs/rnaseq-star-phase-1-job-template.clj
@@ -0,0 +1,10 @@
+
+{:nodes
+ {:ph1
+  {:name "rnaseq-star-phase1",
+   :type "tool",
+   :args []}
+  :prn1 {:type "func",
+         :name "prn"}},
+ :edges
+ {:ph1 [:prn1]}}


added begin

added begin

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/parenode/clojure-cup-2015.git/'


Add examples from chapter 5

Add examples from chapter 5

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

--- src/clojure_walkthrough/cjia/ch05_xx.clj
+++ src/clojure_walkthrough/cjia/ch05_xx.clj
@@ -0,0 +1,54 @@
+;; Note: replace ch03-xx the right number
+(ns clojure-walkthrough.cjia.ch05-xx
+  (:require [clojure.data.json :as json]
+            [clojure.xml :as xml-core])
+  (:gen-class))
+
+;; import java
+(import 'java.util.Date 'java.text.SimpleDateFormat)
+
+;; import more than one at a time from the same package
+;; in this case from 'java.util'
+(import '[java.util Date Set]) ;; java.util.Set
+
+;; The recommended way is to to import into a namespace like
+(ns clojure-walkthrough.cjia.ch05-xx
+  (:import (java.util Set Date))
+  (:import (java.text SimpleDateFormat)))
+
+;; Now we can use them
+(def sdf (new SimpleDateFormat "yyyy-MM-dd"))
+
+;; Or alternatively, Clojure allow us to write something like
+(def sdf (SimpleDateFormat. "yyyy-MM-dd"))
+
+(defn date-from-date-string [date-string]
+  (let [sdf (SimpleDateFormat. "yyyy-MM-dd")]
+    (.parse sdf date-string)))
+
+(date-from-date-string "2016-01-30") ;; #inst "2016-01-29T13:00:00.000-00:00"
+
+;; Static Methods
+(Long/parseLong "12321") ;; 12321
+
+;; calling with (Classname/staticMethod args*)
+
+;; Static Fields
+(import '(java.util Calendar)) ;; java.util.Calendar
+
+(Calendar/JANUARY) ;; 0
+
+(Calendar/FEBRUARY) ;; 1
+
+;; 5.1.4 Macros and the dot special form
+
+(. System getenv "PATH")
+(. System (getenv "PATH"))
+
+;; Use of Java instance object
+(import '(java.util Random)) ;; java.util.Random
+
+(def rnd (Random.)) ;; #'clojure-walkthrough.cjia.ch05-xx/rnd
+
+(. rnd (nextInt 10)) ;; 3 ;; result will vary
+(. rnd (nextInt 10)) ;; 6 ;; result will vary


Bideentzat makroak ez erabili

Bideentzat makroak ez 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.bez.git/'


Don't use Uuid for annotation IDs

Don't use Uuid for annotation IDs

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/'


Change the jar index header from 'Leiningen' to 'Leiningen/Boot'

Fixes #575

--- src/clojars/web/jar.clj
+++ src/clojars/web/jar.clj
@@ -113,7 +113,7 @@
          [:li.col-md-4.col-sm-4.col-xs-12.col-lg-4
           downloads-this-version
           " This Version"]]
-        [:h2 "Leiningen"]
+        [:h2 "Leiningen/Boot"]
         [:div#leiningen-coordinates.package-config-example
          {:onClick "selectText('leiningen-coordinates');"}
          [:pre


Trace the hashing since sha-1 isn't know for its speed

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/scheduled-message-works.git/'


Move supported languages to a named set

Move supported languages to a named set

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/voter-registration-works.git/'


A Half-Truth solution & current rankihng

error: pathspec 'src/4clojure/half-truth.clj' did not match any file(s) known to git

--- src/4clojure/half-truth.clj
+++ src/4clojure/half-truth.clj
@@ -0,0 +1,68 @@
+;; A Half-Truth
+;; http://www.4clojure.com/problem/83
+
+;; Write a function which takes a variable number of booleans. Your function should return true if some of the parameters are true, but not all of the parameters are true. Otherwise your function should return false.
+
+(defn __ [& coll]
+;;   (and ; (some true? coll)
+;;        (not-every? true? coll)))
+  (and (not (empty? (filter true? coll)))
+      ; (seq (filter true? coll)) ; this lint is not true! in this case
+      (not-every? true? coll)))
+
+;; try to refact
+(defn x [f]
+  (partial f true?))
+
+;; (not (empty? (filter true? [false true])))
+
+;; not-any?
+;; not-every?
+;; (some true? [false true])
+
+(= false (__ false false))
+
+(= true (__ true false))
+
+(= false (__ true))
+
+(= true (__ false true false))
+
+(= false (__ true true true))
+
+(= true (__ true true true false))
+
+
+
+;; 4Clojure solution
+(fn __ [& coll]
+  (and (not (empty? (filter true? coll)))
+      (not-every? true? coll)))
+
+
+;; other solution
+;; _artem_uv's solution:
+(fn [& s]
+  (if (some #(= true %) (seq s))
+    (if (some #(= false %) (seq s))
+      true
+      false)
+    false))
+
+;; _pcl's solution:
+(fn [& args] (if (every? identity args) false (not (nil? (some identity args)))))
+
+;; aceeca1's solution:
+not=
+;; best ;d
+
+;; adereth's solution:
+(fn [& vs]
+  (true? (and (some not vs)
+         (some identity vs))))
+
+
+;; Your Ranking
+;; Username: ekhart
+;; Rank: 4640 out of 47147
+;; Problems Solved: 60


remember the dosync

remember the dosync

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

--- src/simple/records.clj
+++ src/simple/records.clj
@@ -0,0 +1,33 @@
+(ns simple.records)
+
+; start by creating a record with fields
+(defrecord Recipe
+  [name ;; string
+   author ;; recipe creator
+   description ;; string
+   ingredients ;; list of ingredients
+   steps ;; sequence of string
+   servings ;; number of servings
+   ])
+
+; here we create the dependencies
+(defrecord Person
+  [fname ;; first name
+   lname ;; last name
+])
+
+; create our atom, just like a regular object
+(def toast (atom (->Recipe "Toast"
+(->Person "Nicolas" "Modrzyk")
+  "Crispy bread"
+["Slice of bread"]
+["Toast bread in toaster"] 1)))
+
+; perform atomic operation, no need for dosync
+ (swap! toast assoc-in [:author :fname] "Nico")
+ (swap! toast assoc :description "Updated description")
+ (swap! toast assoc-in [:author :lname] "Chris2")
+ (swap! toast assoc-in [:author :zname] "Mitchell2")
+
+@toast
+


Can expand and contract vectors and maps

error: pathspec 'src/datadrill/core.cljs' did not match any file(s) known to git

--- src/datadrill/core.cljs
+++ src/datadrill/core.cljs
@@ -0,0 +1,81 @@
+(ns datadrill.core
+  (:require [reagent.core :as r]))
+
+(enable-console-print!)
+
+(def store (r/atom {:data {:a "a"
+                         :b [1 2 3 3 {:a "a" :b "b"}]
+                         :c "c"
+                         :d {:x "x" :y "y" :z [1 2 3 4]}}
+                  :expansion #{}}))
+
+(defn emit [event args]
+  (prn "Emit: " event args)
+  (case event
+    :expand (swap! store update :expansion conj args)
+    :contract (swap! store update :expansion disj args)))
+
+(declare DataDrill)
+
+(defn Node [{:keys [data path]}]
+  [:div (if (string? data)
+          (str "'" data "'")
+          data)])
+
+(defn KeyValNode [{[k v] :data path :path expansion :expansion}]
+  [:div {:style {:display "flex"}}
+   [:div {:style {:flex 0 :padding "2px"}}
+    (str k)]
+   [:div {:style {:flex 1 :padding "2px"}}
+    [DataDrill {:data v
+                :path (conj path k)
+                :expansion expansion}]]])
+
+(defn ExpandButton [{:keys [expanded? path]}]
+  (if expanded?
+    [:button {:onClick #(emit :contract path)} "-"]
+    [:button {:onClick #(emit :expand path)} "+"]))
+
+(defn VecNode [{:keys [data path expansion]}]
+  (let [expanded? (get expansion path)]
+    [:div
+     [ExpandButton {:expanded? expanded? :path path}]
+     [:span "["]
+     (when expanded?
+       (map-indexed (fn [i x] ^{:key i} [DataDrill {:data x :path (conj path i) :expansion expansion}]) data))
+     [:span "]"]]))
+
+(defn MapNode [{:keys [data path expansion]}]
+  (prn "Mapnode: " data "path: " path "expan: " expansion)
+  (let [expanded? (get expansion path)]
+    [:div
+     [ExpandButton {:expanded? expanded? :path path}]
+     [:span "{"]
+     (when expanded?
+       (map-indexed (fn [i x] ^{:key i} [KeyValNode {:data x :path path :expansion expansion}]) data))
+
+     [:span "}"]]))
+
+(defn DataDrill [{:keys [data] :as all}]
+  (cond (map? data) [MapNode all]
+        (vector? data) [VecNode all]
+        :else [Node all]))
+
+(defn App []
+  (let [{:keys [data expansion]} @store]
+    [:div
+     (str expansion)
+     [DataDrill {:data data
+                 :path []
+                 :expansion expansion}]]))
+
+(defn mount-root []
+  (r/render
+    [App]
+    (js/document.getElementById "app")))
+
+(defn ^:export main []
+  (mount-root))
+
+(defn on-js-reload []
+  (mount-root))


comment re: plans for eventually using custom type to hold "rf plan" values

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/'


util/simpledb.clj: interface to Amazon SimpleDB with Typica library

error: pathspec 'src/org/altlaw/util/simpledb.clj' did not match any file(s) known to git

--- src/org/altlaw/util/simpledb.clj
+++ src/org/altlaw/util/simpledb.clj
@@ -0,0 +1,69 @@
+(ns org.altlaw.util.simpledb
+  (:import (com.xerox.amazonws.sdb SimpleDB ItemAttribute)
+           (java.util ArrayList)))
+
+(defn- keystr [x]
+  (if (keyword? x) (name x) (str x)))
+
+(defn- make-attr-list [keyvals]
+  (let [attrs (ArrayList.)]
+    (doseq [[k v] keyvals]
+      (if (coll? v)
+        (do (.add attrs (ItemAttribute. (keystr k) (keystr (first v)) true))
+            (doseq [vv (rest v)]
+              (.add attrs (ItemAttribute. (keystr k) (keystr vv) false))))
+        (.add attrs (ItemAttribute. (keystr k) (keystr v) true))))
+    attrs))
+
+(defn- parse-attr-list [attrs]
+  (reduce (fn [m attr]
+            (let [k (.getName attr), v (.getValue attr)]
+              (assoc m k
+                     (let [old-v (m k)]
+                       (if old-v
+                         (if (coll? old-v)
+                           (conj old-v v)
+                           (vector old-v v))
+                         v)))))
+          {} attrs))
+
+(def #^{:doc "Returns the (cached) SimpleDB object."}
+     get-simpledb
+     (memoize (fn []
+                (SimpleDB. (System/getenv "AWS_ACCESS_KEY_ID")
+                           (System/getenv "AWS_SECRET_ACCESS_KEY")))))
+
+(def #^{:doc "Returns the (cached) SimpleDB Domain object for name."}
+     get-domain
+     (memoize (fn [name] (.getDomain (get-simpledb) (keystr name)))))
+
+(defn- get-item
+  "Returns the SimpleDB item object with the given name in the
+  domain."
+  [domain-name item-name]
+  (.getItem (get-domain domain-name) (keystr item-name)))
+
+(defn put-attrs
+  "Stores attributes (a map of key=>item or key=>collection) in the
+  item under the domain."
+  [domain-name item-name keyvals]
+  (let [item (get-item domain-name item-name)]
+    (.putAttributes item (make-attr-list keyvals))))
+
+(defn get-attrs
+  "Returns attributes (a map of key=>item or key=>collection) in the
+  item under the domain."
+  ([item] (parse-attr-list (.getAttributes item)))
+  ([domain-name item-name]
+     (let [item (get-item domain-name item-name)]
+       (parse-attr-list (.getAttributes item)))))
+
+(defn delete-item [domain-name item-name]
+  (.deleteItem (get-domain domain-name) (keystr item-name)))
+
+(defn list-items
+  ([domain-name]
+     (.getItemList (.listItems (get-domain domain-name))))
+  ([domain-name query-string]
+     (.getItemList (.listItems (get-domain domain-name)
+                               query-string))))


chain of opeations without/with macro ->>

error: pathspec 'src/sandbox/chain/operations.clj' did not match any file(s) known to git

--- src/sandbox/chain/operations.clj
+++ src/sandbox/chain/operations.clj
@@ -0,0 +1,29 @@
+(ns sandbox.chain.operations)
+
+(def v1
+  {:title "Pianocat Plays Carnegie Hall"
+   :type :cat
+   :length 300})
+
+(def v2
+  {:title "Paint Drying"
+   :type :home-improvement
+   :length 600})
+
+(def v3
+  {:title "Fuzzy McMittens Live At The Apollo"
+   :type :cat
+   :length 200})
+
+(def videos [v1 v2 v3])
+
+(defn cat-time [videos]
+  (apply +
+         (map :length
+              (filter (fn [video] (= :cat (:type video))) videos))))
+
+(defn more-cat-time [videos]
+  (->> videos
+       (filter (fn [video] (= :cat (:type video))))
+       (map :length)
+       (apply +)))


Added a bare-bones Blobstore service wrapper.

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

--- src/appengine_magic/services/blobstore.clj
+++ src/appengine_magic/services/blobstore.clj
@@ -0,0 +1,47 @@
+(ns appengine-magic.services.blobstore
+  (:import [com.google.appengine.api.blobstore ByteRange BlobKey
+            BlobstoreService BlobstoreServiceFactory]
+           [javax.servlet.http HttpServletRequest HttpServletResponse]))
+
+
+(defonce *blobstore-service* (atom nil))
+
+
+(defn get-blobstore-service []
+  (when (nil? @*blobstore-service*)
+    (reset! *blobstore-service* (BlobstoreServiceFactory/getBlobstoreService)))
+  @*blobstore-service*)
+
+
+(defn upload-url [success-path]
+  (.createUploadUrl (get-blobstore-service) success-path))
+
+
+(defn delete! [& args]
+  ;; TODO: Implement this.
+  )
+
+
+(defn fetch-data [^:BlobKey blob-key, start-index, end-index]
+  (.fetchData (get-blobstore-service) blob-key start-index end-index))
+
+
+(defn byte-range [^:HttpServletRequest request]
+  (.getByteRange (get-blobstore-service) request))
+
+
+(defn uploaded-blobs [^:HttpServletRequest request]
+  (into {} (.getUploadedBlobs (get-blobstore-service) request)))
+
+
+(defn- make-blob-key [x]
+  (if (instance? BlobKey x)
+      x
+      (BlobKey. x)))
+
+
+(defn serve
+  ([blob-key, ^:HttpServletResponse response]
+     (.serve (get-blobstore-service) (make-blob-key blob-key) response))
+  ([blob-key, start, end, ^:HttpServletResponse response]
+     (.serve (get-blobstore-service) (make-blob-key blob-key) (ByteRange. start end) response)))


don't query currency, parse payment type properly

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/'


Fixed modulate.

Fixed modulate.

error: pathspec 'src/overtunes/songs/canone_alla_quarta.clj' did not match any file(s) known to git

--- src/overtunes/songs/canone_alla_quarta.clj
+++ src/overtunes/songs/canone_alla_quarta.clj
@@ -0,0 +1,46 @@
+(ns overtunes.songs.canone-alla-quarta
+  (:use
+    [overtone.live :only [at now]]
+    [overtone.inst.sampled-piano :only [sampled-piano] :rename {sampled-piano piano}]))
+
+(defn sum-n [series n] (reduce + (take n series)))
+(defn scale [intervals]
+  #(if (neg? %)
+     (let [downward-scale (comp - (scale (reverse intervals)))]
+       (-> % - downward-scale))
+     (sum-n (cycle intervals) %)))
+
+(defn translate [f x y] #(-> % (+ x) f (+ y)))
+(def major (scale [2 2 1 2 2 2 1]))
+(defn modulate [scale mode] (translate scale mode (- (scale 0) (scale mode))))
+(def g-major (translate major 0 74))
+(def scales (repeat (modulate g-major 0)))
+;(def scales (repeat g-major))
+
+(defn bpm [per-minute] #(-> % (/ per-minute) (* 60) (* 1000)))
+(defn syncopate [timing durations] #(->> % (sum-n durations) timing))
+(defn run [a b]
+  (if (<= a b)
+    (range a (inc b))
+    (reverse (run b a))))
+
+(def durations (flatten [(repeat 2 1/4) 1/2 (repeat 6 1/4) (repeat 8 1/4) 3/2 (repeat 10 1/4) 1/2 (repeat 2 1/4) 9/4 3/4 (repeat 12 1/4) 1/2 1 1/2 (repeat 12 1/4) 1]))
+(def pitches (flatten [0 (run -1 3) (run 2 0) 4 (run 1 8) (run 7 -1) 0 (run 0 -3) 4 4 (run 2 -3) -1 1 (run 4 6) 1 1 1 2 -1 -2 0 1 -1 -2 (run 5 0)]))
+(def bass (map #(- % 7) (flatten (map #(repeat 3 %) (concat (run 0 -3) (run -5 -3) [-7])))))
+
+(defn melody# [timing notes]
+  (let [note# #(at (timing %1) (piano ((nth scales %1) %2)))]
+    (dorun (map-indexed note# notes))))
+
+(defn play# []
+  (let [timing (-> (bpm 90) (translate 0 (now)))
+        rhythm-from #(syncopate (translate timing % 0) durations)
+        leader pitches
+        follower (->> leader (map -) (map #(- % 4)))]
+    (melody# timing bass)
+    (melody# (rhythm-from 1/2) leader)
+    (melody# (rhythm-from 7/2) follower)
+    (melody# (syncopate (translate timing 23 0) [1 1/4 1/4 1/4 1/4 1]) [-7 -7 -5 -3 -1 0])
+    ))
+
+(play#)


Identity monad

Identity monad


Unused requires

Unused requires

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/'


New module: config_loader.clj

New module: config_loader.clj

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

--- src/emender_jenkins/config_loader.clj
+++ src/emender_jenkins/config_loader.clj
@@ -0,0 +1,24 @@
+(ns emender-jenkins.config-loader)
+
+(require '[clojure-ini.core :as clojure-ini])
+
+(defn properties->map
+    "Convert property entries into map."
+    [properties]
+    (into {}
+        (for [[k v] properties]
+              [(keyword k) (read-string v)])))
+
+(defn load-property-file
+    "Load configuration from the provided property file."
+    [file-name]
+    (with-open [reader (clojure.java.io/reader file-name)]
+        (let [properties (java.util.Properties.)]
+            (.load properties reader)
+            (properties->map properties))))
+
+(defn load-configuration-file
+    "Load configuration from the provided INI file."
+    [file-name]
+    (clojure-ini/read-ini file-name :keywordize? true))
+


RDC - Add some cell tests.

RDC - Add some cell tests.

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

--- test/icfp2015/cell_test.clj
+++ test/icfp2015/cell_test.clj
@@ -0,0 +1,42 @@
+(ns icfp2015.cell-test
+  (:require [clojure.test :refer :all]
+            [icfp2015.cell :refer :all]))
+
+(deftest offset->cube-test
+  (testing "convert origin cell"
+    (let [cell [0 0]
+          actual-cell (offset->cube cell)
+          expected-cell [0 0 0]]
+      (is (= expected-cell actual-cell))))
+
+  (testing "convert [1 1] cell"
+    (let [cell [1 1]
+          actual-cell (offset->cube cell)
+          expected-cell [1 1 -2]]
+      (is (= expected-cell actual-cell))))
+
+  (testing "convert some cell"
+    (let [cell [4 -3]
+          actual-cell (offset->cube cell)
+          expected-cell [-5 4 1]]
+      (is (= expected-cell actual-cell)))))
+
+(deftest cube->offset-test
+  (testing "convert origin cell"
+    (let [cell [0 0 0]
+          actual-cell (cube->offset cell)
+          expected-cell [0 0]]
+      (is (= expected-cell actual-cell))))
+
+  (testing "convert [1 1 -2] cell"
+    (let [cell [1 1 -2]
+          actual-cell (cube->offset cell)
+          expected-cell [1 1]]
+      (is (= expected-cell actual-cell))))
+
+  (testing "convert some cell"
+    (let [cell [-1 5 -2]
+          actual-cell (cube->offset cell)
+          expected-cell [5 1]]
+      (is (= expected-cell actual-cell)))))
+


Adding timeouts on httpkit calls (bugfix)]

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/'


multipart was actually a resumable upload. Fixed that inconsistency.

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/screen6/bigquery-clj.git/'


A note for the future.

A note for the future.

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 bars example.

Add bars example.

error: pathspec 'vrepl/samples/bars.clj' did not match any file(s) known to git

--- vrepl/samples/bars.clj
+++ vrepl/samples/bars.clj
@@ -0,0 +1,17 @@
+(ns bars
+  (:use [c2.core :only [unify style]]
+        [c2.maths :only [extent]])
+  (:require [c2.scale :as scale]))
+
+
+(let [width 500, bar-height 20
+      data {"A" 1, "B" 2, "C" 4, "D" 3}
+      s (scale/linear :domain [0 (apply max (vals data))]
+                      :range [0 width])]
+
+  [:div#bars
+   (unify data (fn [[label val]]
+                 [:div {:style (style {:height bar-height
+                                       :width (s val)
+                                       :background-color "gray"})}
+                  [:span {:style "color: white;"} label]]))])


Reformat: indentation in 'items-container'

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/Reefersleep/sleepydo.git/'


Refactor for even purer components

Refactor for even purer components


remove sync events from the activity feed because it's overly verbose

--- src/metabase/events/activity_feed.clj
+++ src/metabase/events/activity_feed.clj
@@ -19,8 +19,6 @@
     :dashboard-delete
     :dashboard-add-cards
     :dashboard-remove-cards
-    :database-sync-begin
-    :database-sync-end
     :install
     :user-login})

@@ -79,22 +77,23 @@
       :dashboard-add-cards    (record-activity topic object add-remove-card-details)
       :dashboard-remove-cards (record-activity topic object add-remove-card-details))))

-(defn- process-database-activity [topic object]
-  (let [database            (db/sel :one Database :id (events/object->model-id topic object))
-        object              (merge object (select-keys database [:name :description :engine]))
-        database-details-fn (fn [obj] (-> obj
-                                          (assoc :status "started")
-                                          (dissoc :database_id :custom_id)))
-        database-table-fn   (fn [obj] {:database-id (events/object->model-id topic obj)})]
-    ;; NOTE: we are skipping any handling of activity for sample databases
-    (when (= false (:is_sample database))
-      (case topic
-        :database-sync-begin (record-activity :database-sync object database-details-fn database-table-fn)
-        :database-sync-end   (let [{activity-id :id} (db/sel :one Activity :custom_id (:custom_id object))]
-                               (db/upd Activity activity-id
-                                 :details (-> object
-                                              (assoc :status "completed")
-                                              (dissoc :database_id :custom_id))))))))
+;; disabled for now as it's overly verbose in the feed
+;(defn- process-database-activity [topic object]
+;  (let [database            (db/sel :one Database :id (events/object->model-id topic object))
+;        object              (merge object (select-keys database [:name :description :engine]))
+;        database-details-fn (fn [obj] (-> obj
+;                                          (assoc :status "started")
+;                                          (dissoc :database_id :custom_id)))
+;        database-table-fn   (fn [obj] {:database-id (events/object->model-id topic obj)})]
+;    ;; NOTE: we are skipping any handling of activity for sample databases
+;    (when (= false (:is_sample database))
+;      (case topic
+;        :database-sync-begin (record-activity :database-sync object database-details-fn database-table-fn)
+;        :database-sync-end   (let [{activity-id :id} (db/sel :one Activity :custom_id (:custom_id object))]
+;                               (db/upd Activity activity-id
+;                                 :details (-> object
+;                                              (assoc :status "completed")
+;                                              (dissoc :database_id :custom_id))))))))

 (defn- process-user-activity [topic object]
   ;; we only care about login activity when its the users first session (a.k.a. new user!)
@@ -115,7 +114,6 @@
       (case (events/topic->model topic)
         "card"      (process-card-activity topic object)
         "dashboard" (process-dashboard-activity topic object)
-        "database"  (process-database-activity topic object)
         "install"   (when-not (db/sel :one :fields [Activity :id])
                       (db/ins Activity :topic "install" :model "install"))
         "user"      (process-user-activity topic object)))


add go macro refer back to team.cljs

add go macro refer back to team.cljs

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/clojurecup/cc2014-frontend.git/'


CMR-1863 Adding missing file.

CMR-1863 Adding missing file.

error: pathspec 'umm-spec-lib/src/cmr/umm_spec/iso_smap_utils.clj' did not match any file(s) known to git

--- umm-spec-lib/src/cmr/umm_spec/iso_smap_utils.clj
+++ umm-spec-lib/src/cmr/umm_spec/iso_smap_utils.clj
@@ -0,0 +1,56 @@
+(ns cmr.umm-spec.iso-smap-utils
+  "Contains functions for parsing and generating the ISO SMAP descriptiveKeywords. SMAP ISO
+  collection science keywords, platforms and instruments are all represented as descriptiveKeywords.
+  It would be better if the type element within the descriptiveKeywords could identify the type of
+  the keywords. But currently it is always set to 'theme'. We will propose to get this changed,
+  but in the mean time, we will have to parse the keyword string to determine the type of the keyword."
+  (:require [clojure.data.xml :as x]
+            [clojure.string :as s]
+            [cmr.common.xml :as cx]
+            [cmr.umm-spec.models.common :as c]))
+
+(def platform-categories
+  "Category keywords that identifies a descriptive keyword as a platform.
+  We are doing this because GCMD currently is not setting the proper value in the type element
+  of descriptiveKeywords to identify its type. We should use the type element to identify
+  the type of the keyword once GCMD fixes that."
+  #{"Aircraft"
+    "Balloons/Rockets"
+    "Earth Observation Satellites"
+    "In Situ Land-based Platforms"
+    "In Situ Ocean-based Platforms"
+    "Interplanetary Spacecraft"
+    "Maps/Charts/Photographs"
+    "Models/Analyses"
+    "Navigation Platforms"
+    "Solar/Space Observation Satellites"
+    "Space Stations/Manned Spacecraft"})
+
+(def science-keyword-categories
+  #{"EARTH SCIENCE" "EARTH SCIENCE SERVICES"})
+
+(defn parse-keyword-str
+  "Returns a seq of individual components of an ISO SMAP keyword string."
+  [keyword-str]
+  (->> (.split keyword-str ">")
+       (map s/trim)
+       (remove empty?)))
+
+(defn keyword-type
+  "Returns a value indicating the category of the given keyword string."
+  [keyword-str]
+  (let [category (first (parse-keyword-str keyword-str))]
+    (cond
+      (science-keyword-categories category)    :science
+      (re-matches #".* Instruments$" category) :instrument
+      (platform-categories category)           :platform
+      :else                                    :other)))
+
+(defn parse-platform
+  "Returns a UMM PlatformType record from the given keyword string."
+  [keyword-str]
+  (let [[_ _ short-name long-name] (parse-keyword-str keyword-str)]
+    (c/map->PlatformType
+      {:ShortName short-name
+       :LongName long-name
+       :Type "Spacecraft"})))


[#239] Improve emitter coverage

[#239] Improve emitter coverage

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

--- priv/clojure/test_clojure/binary.clj
+++ priv/clojure/test_clojure/binary.clj
@@ -0,0 +1,7 @@
+(ns clojure.test-clojure.binary
+  (:use clojure.test))
+
+(deftest t-bin-reader
+  (is (= "a" #bin["a"]))
+  (is (= "a" #bin[[97]]))
+  (is (thrown? :error #bin[["a"]])))


Fixed buttons at the bottom of Large Screen Thirds.

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/CommonCreative/vbn-website.git/'


Add basic HAProxy config eclj/erb template

error: pathspec 'router/resources/haproxy.conf.clj' did not match any file(s) known to git

--- router/resources/haproxy.conf.clj
+++ router/resources/haproxy.conf.clj
@@ -0,0 +1,22 @@
+global
+    daemon
+    maxconn 256
+
+defaults
+    mode http
+    timeout connect 5000ms
+    timeout client 50000ms
+    timeout server 50000ms
+
+<% (doseq [[name v] services]
+      %>frontend <%= name %>-in
+    bind *:<%= (v :in-port) %>
+    default_backend <%= name %>-backends
+
+backend <%= name %>-backends
+    <% (doseq [[idx out] (map-indexed vector (v :out-port))]
+        %>server <%= (str name idx) %> 127.0.0.1:<%=out%> maxconn 32
+    <%
+       )
+%><%) %>
+


Add initial tests for data extraction functions

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

--- test/env_logger/grabber_test.clj
+++ test/env_logger/grabber_test.clj
@@ -0,0 +1,84 @@
+(ns env-logger.grabber-test
+  (:require [clojure.test :refer :all]
+            [env-logger.grabber :refer :all]))
+
+(deftest test-parse-xml
+  (testing "XML parser tests"
+    (is (= (parse-xml (str "<person><name>John</name>"
+                           "<lastname>Doe</lastname></person>"))
+           {:tag :person, :attrs nil,
+            :content [{:tag :name, :attrs nil, :content ["John"]}
+                      {:tag :lastname, :attrs nil, :content ["Doe"]}]}))
+    (is (thrown? org.xml.sax.SAXParseException
+                 (parse-xml (str "<person><name>John</name>"
+                                 "<lastname>Doe</lastname>"))))))
+
+(deftest test-data-extraction
+  (testing "Data extraction function tests"
+    (is (= (extract-data
+            [{:tag :wfs:member,
+              :attrs nil,
+              :content
+              [{:tag :BsWfs:BsWfsElement,
+                :attrs {:gml:id "BsWfsElement.1.1.1"},
+                :content
+                [{:tag :BsWfs:Location,
+                  :attrs nil,
+                  :content
+                  [{:tag :gml:Point,
+                    :attrs
+                    {:srsName "http://www.opengis.net/def/crs/EPSG/0/4258",
+                     :srsDimension "2",
+                     :gml:id "BsWfsElementP.1.1.1"},
+                    :content
+                    [{:tag :gml:pos,
+                      :attrs nil,
+                      :content ["60.17802 24.78732 "]}]}]}
+                 {:tag :BsWfs:Time, :attrs nil, :content ["2016-08-12T05:20:00Z"]}
+                 {:tag :BsWfs:ParameterName, :attrs nil, :content ["t2m"]}
+                 {:tag :BsWfs:ParameterValue, :attrs nil, :content ["12.0"]}]}]}
+             {:tag :wfs:member,
+              :attrs nil,
+              :content
+              [{:tag :BsWfs:BsWfsElement,
+                :attrs {:gml:id "BsWfsElement.1.1.2"},
+                :content
+                [{:tag :BsWfs:Location,
+                  :attrs nil,
+                  :content
+                  [{:tag :gml:Point,
+                    :attrs
+                    {:srsName "http://www.opengis.net/def/crs/EPSG/0/4258",
+                     :srsDimension "2",
+                     :gml:id "BsWfsElementP.1.1.2"},
+                    :content
+                    [{:tag :gml:pos,
+                      :attrs nil,
+                      :content ["60.17802 24.78732 "]}]}]}
+                 {:tag :BsWfs:Time, :attrs nil, :content ["2016-08-12T05:20:00Z"]}
+                 {:tag :BsWfs:ParameterName, :attrs nil, :content ["n_man"]}
+                 {:tag :BsWfs:ParameterValue, :attrs nil, :content ["0.0"]}]}]}])
+           {:date "2016-08-12T05:20:00Z", :temperature 12.0, :cloudiness 0}))
+    (is (= (extract-data
+            [{:tag :wfs:member,
+              :attrs nil,
+              :content
+              [{:tag :BsWfs:BsWfsElement,
+                :attrs {:gml:id "BsWfsElement.1.1.1"},
+                :content
+                [{:tag :BsWfs:Location,
+                  :attrs nil,
+                  :content
+                  [{:tag :gml:Point,
+                    :attrs
+                    {:srsName "http://www.opengis.net/def/crs/EPSG/0/4258",
+                     :srsDimension "2",
+                     :gml:id "BsWfsElementP.1.1.1"},
+                    :content
+                    [{:tag :gml:pos,
+                      :attrs nil,
+                      :content ["60.17802 24.78732 "]}]}]}
+                 {:tag :BsWfs:Time, :attrs nil, :content ["2016-08-12T05:20:00Z"]}
+                 {:tag :BsWfs:ParameterName, :attrs nil, :content ["t2m"]}
+                 {:tag :BsWfs:ParameterValue, :attrs nil, :content ["12.0"]}]}]}])
+           nil))))


Initial node-related tests

Initial node-related tests

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

--- test/tropefest/test/db_nodes.clj
+++ test/tropefest/test/db_nodes.clj
@@ -0,0 +1,116 @@
+(ns tropefest.test.db-nodes
+  (:require [clojure.test :refer :all]
+            [clojurewerkz.neocons.rest :as nr]
+            [clojurewerkz.neocons.rest.cypher :as cy]
+            [joda-time :as jt]
+            [tropefest.db :refer :all]))
+
+(defn get-test-connection []
+  (nr/connect "http://192.168.59.103:7373/db/data/"))
+
+
+(defn wipe-test-db []
+  (let [conn (get-test-connection)]
+    (cy/tquery conn "MATCH (n)-[r]-() DELETE n,r")          ; Delete notes with relationships
+    (cy/tquery conn "MATCH (n) DELETE n")                   ; Delete singletons
+    ))
+
+
+(deftest test-query-nodes-when-empty
+  (is (= (count (query-nodes-to-crawl (get-test-connection) 100)) 0))
+  (is (= (query-nodes-to-crawl (get-test-connection) 100) '())))
+
+
+(deftest test-create-node
+  (wipe-test-db)
+  (let [node (create-node (get-test-connection) "TestNode" {:id "TestNode/First" :nextupdate 5 :url "http://localhost/"})]
+    (is (not= node nil))
+    (are [path result] (= (get-in node path) result)
+                       [:data :id] "TestNode/First"
+                       [:data :nextupdate] 5
+                       [:data :url] "http://localhost/")))
+
+(deftest test-create-node-assigns-timestamps
+  (wipe-test-db)
+  (let [node (create-node (get-test-connection) "TestNode" {:id "TestNode/First"})]
+    (is (not= node nil))
+    (are [path] (> (get-in node path) 0)
+                [:data :timestamp]
+                [:data :nextupdate])))
+
+(deftest test-query-by-id
+  (wipe-test-db)
+  (let [conn (get-test-connection)]
+    (is (= (query-by-id conn "TestNode/ForQuerying") nil))
+    (create-node conn "TestNode" {:id "TestNode/ForQuerying"})
+    (let [node (query-by-id conn "TestNode/ForQuerying")]
+      (is (not= node nil))
+      (are [path result] (= (get-in node path) result)
+                         [:metadata :labels] ["TestNode"]
+                         [:data :id] "TestNode/ForQuerying"
+                         ))))
+
+
+(deftest test-relate-nodes
+  ; We don' wipe the db to ensure association works even if there were previous nodes
+  (let [conn (get-test-connection)
+        n1 (create-node conn "TestNode" {:id "TestNode/N1"})
+        n2 (create-node conn "TestNode" {:id "TestNode/N2"})
+        rel (relate-nodes conn :LINKSTO n1 n2)]
+    (is (not= rel nil))
+    (are [query result] (= query result)
+                        (:type rel) "LINKSTO"
+                        (:start rel) (:location-uri n1)
+                        (:end rel) (:location-uri n2))
+    ))
+
+(deftest test-merge-node
+  ; No need to wipe the db
+  (let [conn (get-test-connection)
+        node (create-node conn "TestNode" {:id "TestNode/First" :nextupdate 5 :url "http://localhost/"})
+        id (:id node)
+        merged (merge-node conn id {:url "http://localhost/redirected/"})
+        ]
+    (is (= (:id node) (:id merged)))
+    (is (= (get-in merged [:data :url]) "http://localhost/redirected/"))
+    (are [f path] (f (get-in merged path) (get-in node path))
+                  > [:data :timestamp]                      ; merge-node should update the timestamp
+                  = [:data :nextupdate]                     ; merge-node should not touch the nextupdate
+                  not= [:data :url]                         ; we changed the url
+                  )
+    ))
+
+(deftest test-create-or-merge
+  (wipe-test-db)
+  ; First let's test creating from scratch
+  (let [conn (get-test-connection)
+        data-items {:id "TestNode/CoM" :label "TestNode" :url "http://changeme"}
+        node (create-or-merge-node conn data-items)]
+    (is (not= node nil))
+    (is (= (get-in node [:data :id]) "TestNode/CoM"))
+    (is (= (get-in node [:data :url]) "http://changeme"))
+    ; Test that we can call create-or-merge if one exists
+    (let [merged (create-or-merge-node conn (assoc data-items :url "http://newurl"))]
+      (is (= (:id merged) (:id node)))
+      (is (= (get-in merged [:data :url]) "http://newurl"))
+      (is (= (get-in merged [:data :id]) "TestNode/CoM"))
+      )
+    ))
+
+(deftest test-create-or-retrieve
+  (wipe-test-db)
+  ; First let's test creating from scratch
+  (let [conn (get-test-connection)
+        data-items {:id "TestNode/CoM" :label "TestNode" :url "http://original"}
+        node (create-or-retrieve-node conn data-items)]
+    (is (not= node nil))
+    (is (= (get-in node [:data :id]) "TestNode/CoM"))
+    (is (= (get-in node [:data :url]) "http://original"))
+    ; Test that we can if one exists, the new URL is ignored
+    (let [merged (create-or-retrieve-node conn (assoc data-items :url "http://newurl"))]
+      (is (= (:id merged) (:id node)))
+      (is (= (get-in merged [:data :url]) "http://original"))
+      (is (= (get-in merged [:data :id]) "TestNode/CoM"))
+      )
+    ))
+


Codingame helper

Codingame helper

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

--- src/clojureplayground/codingame_helper.clj
+++ src/clojureplayground/codingame_helper.clj
@@ -0,0 +1,51 @@
+(ns clojureplayground.codingame-helper)
+
+(defn thor-move1 [adj opp theta]
+  (if (>= adj 0)
+    (if (>= opp 0)
+      (cond
+        (<= theta (/ Math/PI 8)) {:x 1 :y 0 :dir "E"}
+        (and (> theta (/ Math/PI 8)) (<= theta (* Math/PI 0.375))) {:x 1 :y 1 :dir "SE"}
+        (and (> theta (* Math/PI 0.375)) (<= theta (/ Math/PI 2))) {:x 0 :y 1 :dir "S"})
+      (cond
+        (<= theta (/ Math/PI 8)) {:x 1 :y 0 :dir "E"}
+        (and (> theta (/ Math/PI 8)) (<= theta (* Math/PI 0.375))) {:x 1 :y -1 :dir "NE"}
+        (and (> theta (* Math/PI 0.375)) (<= theta (/ Math/PI 2))) {:x 0 :y -1 :dir "N"}))
+    (if (>= opp 0)
+      (cond
+        (<= theta (/ Math/PI 8)) {:x -1 :y 0 :dir "W"}
+        (and (> theta (/ Math/PI 8)) (<= theta (* Math/PI 0.375))) {:x -1 :y 1 :dir "SW"}
+        (and (> theta (* Math/PI 0.375)) (<= theta (/ Math/PI 2))) {:x 0 :y 1 :dir "S"})
+      (cond
+        (<= theta (/ Math/PI 8)) {:x -1 :y 0 :dir "W"}
+        (and (> theta (/ Math/PI 8)) (<= theta (* Math/PI 0.375))) {:x -1 :y -1 :dir "NW"}
+        (and (> theta (* Math/PI 0.375)) (<= theta (/ Math/PI 2))) {:x 0 :y -1 :dir "N"}))
+    ))
+
+(defn direction [adj opp]
+  (if (neg? adj)
+    (if (neg? opp) 3 2)
+    (if (neg? opp) 1 0)))
+
+(defn co [x y dir] {:x x :y y :dir dir})
+
+(defn allowed-lines [theta]
+  (first
+    (for [t [[#(<= % (/ Math/PI 8)) [(co 1 0 "E") (co 1 0 "E") (co -1 0 "W") (co -1 0 "W")]]
+           [#(and (> % (/ Math/PI 8)) (<= % (* Math/PI 0.375))) [(co 1 1 "SE") (co 1 -1 "NE") (co -1 1 "SW") (co -1 -1 "NW")]]
+           [#(and (> % (* Math/PI 0.375)) (<= % (/ Math/PI 2))) [(co 0 1 "S") (co 0 -1 "N") (co 0 1 "S") (co 0 -1 "N")]]]
+        :when ((first t) theta)] (second t))))
+
+(defn thor-move2 [adj opp theta]
+  ((allowed-lines theta) (direction adj opp)))
+
+
+
+
+
+
+
+
+
+
+


Add tests for models

Add tests for models

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

--- test/subman/t_models.clj
+++ test/subman/t_models.clj
@@ -0,0 +1,61 @@
+(ns subman.t-helpres
+  (:require [midje.sweet :refer [fact facts => provided anything
+                                 with-state-changes before after]]
+            [clojurewerkz.elastisch.rest.document :as esd]
+            [subman.const :as const]
+            [subman.models :as models]))
+
+(let [orig (atom 0)]
+  (with-state-changes [(before :facts (reset! orig @models/total-count))
+                       (after :facts (reset! models/total-count @orig))]
+    (fact "should update total count"
+          (models/update-total-count) => 10
+          (provided
+           (esd/search anything anything
+                       anything anything) => {:hits {:total 10}}))))
+
+(facts "get season-episode parts"
+       (fact "with SnEn notation"
+             (#'models/get-season-episode-parts
+              "test s01e10") => ["s01e10" "01" "10"])
+       (fact "with nxn notation"
+             (#'models/get-season-episode-parts
+              "test 01x10") => ["01x10" "01" "10"])
+       (fact "or nil"
+             (#'models/get-season-episode-parts
+              "test") => nil))
+
+(facts "get season-episode query part"
+       (fact "with season and episode"
+             (#'models/get-season-episode
+              "test s01e01") => [{:term {:season "1"}}
+                                 {:term {:episode "1"}}])
+       (fact "without"
+             (#'models/get-season-episode "test") => []))
+
+(fact "should build search query"
+      (#'models/build-query
+       "Dads.2013.S01E18.HDTV.x264-EXCELLENCE[rartv]"
+       "en") => [:query {:bool {:must {:fuzzy_like_this
+                                       {:like_text "Dads 2013 S01E18 HDTV x264-EXCELLENCE[rartv]"}}
+                                :should [{:term {:season "1"}}
+                                         {:term {:episode "18"}}]}}
+                 :filter {:term {:lang "en"}}
+                 :size const/result-size])
+
+(fact "should return search result"
+      (models/search :query "test"
+                     :offset 10
+                     :lang "en") => ["test"]
+      (provided
+       (esd/search anything anything
+                   :from 10
+                   :query anything
+                   :filter anything
+                   :size const/result-size) => {:hits {:hits [{:_source "test"}]}}))
+
+(fact "should check is subtitle exists in db"
+      (models/in-db {:url "test"}) => true
+      (provided
+       (esd/search anything anything
+                   :filter {:term {:url "test"}}) => {:hits {:total 5}}))


No need to use format.

No need to use format.

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/'


Alboko irudiari lotura gehitu

Alboko irudiari lotura 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/'


Broken. Adding ability to check tiles around entities further than immediately adjacent tiles.

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/'


fix typo

fix typo

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/'


Adding domains to secretary role.

Adding domains to secretary role.

--- spec/freefrog/governance_circles_spec.clj
+++ spec/freefrog/governance_circles_spec.clj
@@ -118,7 +118,7 @@
     (should-throw IllegalArgumentException
       (format "May not add Accountability to '%s'" g/lead-link-name)
       (g/add-role-accountability sample-anchor-with-lead-link-policy
-                         g/lead-link-name "test")))
+                                 g/lead-link-name "test")))

   (describe "adding policies"
     (it "can delegate a predefined domain from Lead Link"
@@ -171,6 +171,16 @@
   ;; Section 2.4.3, Appendix A/Lead Link
   (it "can remove someone from a role"))

+(def sample-domain1 "stuff")
+(def sample-domain2 "bits")
+
+(def sample-anchor-with-secretary-with-domain
+  (g/add-role-domain sample-anchor g/secretary-name sample-domain1))
+
+(def sample-anchor-with-secretary-with-domains
+  (g/add-role-domain sample-anchor-with-secretary-with-domain
+                     g/secretary-name sample-domain2))
+
 ;; Section 2.5
 (describe "Elected Roles"
   ;; Section 2.5.1
@@ -181,8 +191,27 @@
   (it "will only assign someone to an elected role with a term expiration date")

   ;; Section 2.5.3
-  (it "can add domains")
-  (it "can remove domains")
+  (it "can add domain to secretary role"
+    (should= (update-in sample-anchor [:roles] assoc g/secretary-name
+                        (g/map->Role {:name    g/secretary-name
+                                      :domains #{sample-domain1}}))
+      sample-anchor-with-secretary-with-domain))
+
+  (it "can add second domain to secretary role"
+    (should= (update-in sample-anchor-with-secretary-with-domain
+                        [:roles g/secretary-name :domains] conj sample-domain2)
+      sample-anchor-with-secretary-with-domains))
+
+  (it "removes secretary role when last domain is removed"
+    (should= sample-anchor
+      (g/remove-role-domain sample-anchor-with-secretary-with-domain
+                            g/secretary-name sample-domain1)))
+
+  (it "doesn't remove secretary role when second-to-last domain is removed"
+    (should= sample-anchor-with-secretary-with-domain
+      (g/remove-role-domain sample-anchor-with-secretary-with-domains
+                            g/secretary-name sample-domain2)))
+
   (it "can add accountabilities")
   (it "can remove accountabilities")
   (it "can create policies")


Adds a view for custom response code (e.g. 404) pages.

error: pathspec 'src/cadence/views/response_codes.clj' did not match any file(s) known to git

--- src/cadence/views/response_codes.clj
+++ src/cadence/views/response_codes.clj
@@ -0,0 +1,11 @@
+(ns cadence.views.response_codes
+  (:require [cadence.views.common :as common])
+  (:use noir.statuses))
+
+(set-page! 404
+           (common/base-layout
+             [:div.hero-unit
+             [:h1 "Hey! Where are you going?"]
+             [:p (str "Maybe it was just an accident, but we can't find that page"
+                      " you requested.")]
+              [:h2.response-code "404"]]))


increased chain length

increased chain length

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/m1dnight/a-slack-and-irc-bot.git/'


`put!` does just sliver less work than `>!!` does

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/turbovote-http-api.git/'


check in missed plans model

check in missed plans model

error: pathspec 'frontend/models/plan.cljs' did not match any file(s) known to git

--- frontend/models/plan.cljs
+++ frontend/models/plan.cljs
@@ -0,0 +1,16 @@
+(ns frontend.models.plan
+  (:require [goog.string :as gstring]))
+
+(defn max-parallelism
+  "Maximum parallelism that the plan allows (usually 16x)"
+  [plan]
+  (get-in plan [:template_properties :max_parallelism]))
+
+(defn usable-containers
+  "Maximum containers that the plan has available to it"
+  [plan]
+  (max (:containers_override plan) (:containers plan) (get-in plan [:template_properties :free_containers])))
+
+(defn max-selectable-parallelism [plan]
+  (min (max-parallelism plan)
+       (usable-containers plan)))


small loinc fix

small loinc fix

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/fhirbase/fhirterm.git/'


return 500 when POST /api/meta/dataset fails

--- src/metabase/api/meta/dataset.clj
+++ src/metabase/api/meta/dataset.clj
@@ -11,7 +11,9 @@
   "Execute an MQL query and retrieve the results as JSON."
   [:as {{:keys [database] :as body} :body}]
   (read-check Database database)
-  (driver/dataset-query body {:executed_by *current-user-id*}))
+  (let [{:keys [status] :as response} (driver/dataset-query body {:executed_by *current-user-id*})]
+    {:status (if (= status :completed) 200 500)
+     :body response}))

 (defendpoint GET "/csv"
   "Execute an MQL query and download the result data as a CSV file."


sequence basics

sequence basics

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

--- pcl/chap_11/chap_11.clj
+++ pcl/chap_11/chap_11.clj
@@ -0,0 +1,25 @@
+(in-ns 'pcl.chap_11)
+(clojure/refer 'clojure)
+
+(defmacro print-examples [& forms]
+   `(do
+      ~@(map (fn [f]
+	       `(println (format "input=> %s\n%s"
+				 (pr-str '~f)
+				 (pr-str ~f)))) forms)))
+
+(print-examples (count '(1 2 3))
+		(count [1 2 3])
+		(count #{1 2 3})
+		(count #{:name "John"}))
+
+(print-examples (:A #{:A :B :C})
+		(:D #{:A :B :C})
+		(#{:A :B :C} :A)
+		(#{:A :B :C} :D))
+
+(print-examples (:lname {:lname "Doe", :fname "John"})
+		(:mname {:lname "Doe", :fname "John"}))
+
+
+


Add bind$ overload for backward compatibility

--- src/main/clojure/pigpen/raw.clj
+++ src/main/clojure/pigpen/raw.clj
@@ -197,17 +197,18 @@
            :fields (mapv :alias projections))))

 (defn bind$
-  [relation requires func opts]
-  {:pre [func]}
-  (->
-    (command :bind relation (dissoc opts :args :requires :alias :field-type-in :field-type-out))
-    (dissoc :field-type)
-    (assoc :func func
-           :args (vec (get opts :args ['value]))
-           :requires (vec requires)
-           :fields [(get opts :alias 'value)]
-           :field-type-in (get opts :field-type-in :frozen)
-           :field-type-out (get opts :field-type-out :frozen))))
+  ([relation func opts] (bind$ relation [] func opts))
+  ([relation requires func opts]
+    {:pre [func]}
+    (->
+      (command :bind relation (dissoc opts :args :requires :alias :field-type-in :field-type-out))
+      (dissoc :field-type)
+      (assoc :func func
+             :args (vec (get opts :args ['value]))
+             :requires (vec (concat requires (:requires opts)))
+             :fields [(get opts :alias 'value)]
+             :field-type-in (get opts :field-type-in :frozen)
+             :field-type-out (get opts :field-type-out :frozen)))))

 (defn order$
   [relation sort-keys opts]


regularized logistic regression

regularized logistic regression

error: pathspec 'src/mekena/reg-logistic-reg.clj' did not match any file(s) known to git

--- src/mekena/reg-logistic-reg.clj
+++ src/mekena/reg-logistic-reg.clj
@@ -0,0 +1,48 @@
+(ns mekena.reg-logistic-reg
+  (:require [incanter.core :as i]
+            [incanter.io :as io]
+            [incanter.stats :as stats]
+            [incanter.charts :as charts]))
+
+
+;; Regularized logistic regression
+
+;; read data
+(def qa-data (io/read-dataset "./resources/ex2data2.txt"))
+
+(def test1 (i/sel qa-data :cols 0))
+(def test2 (i/sel qa-data :cols 1))
+(def accepted (i/sel qa-data :cols 2))
+
+;; plot the qa data for the exams, use group-by to separate
+;; accepted vs. not accepted
+(i/view (charts/scatter-plot
+          :col0
+          :col1
+          :group-by :col2
+          :data qa-data
+          :x-label "Microchip test 1"
+          :y-label "Microchip test 2"))
+
+(def lambda 1)
+
+(defn map-features
+  "Return vector containing powers that features will be used to generate
+  the regularization parameter. map the features into all polynomial terms
+  of x1 and x2 up to the degree'th power. Assumes only 2 features (for now)"
+  [degree]
+  (for [i (range 1 (inc degree)) j (range (inc i))] [(- i j) j]))
+
+(defn regularize-features [x1 x2 poly-vec]
+  (map (fn [x1i x2i]
+         (reduce (fn [acc [x1-term x2-term]]
+                       (conj acc (i/mult (i/pow x1i x1-term)
+                                             (i/pow x2i x2-term))))
+                     [] poly-vec)) x1 x2))
+
+(defn regularize
+  [xs]
+  (let [x1 (i/sel qa-data :cols 0)
+        x2 (i/sel qa-data :cols 1)
+        polynomial-terms (map-features 6)]
+    (regularize-features x1 x2 polynomial-terms)))


Update environment names

Update environment names

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/'


bump version to 2.8.6

bump version to 2.8.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/B2W-Digital/pdg-core.git/'


[SD] Add Github URL to project.clj

[SD] Add Github URL to project.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/democracyworks/election-notification-works.git/'


[#157229069] Update test

[#157229069] Update test


added

added

error: pathspec 'test/epicea/utils/core_test.clj' did not match any file(s) known to git

--- test/epicea/utils/core_test.clj
+++ test/epicea/utils/core_test.clj
@@ -0,0 +1,31 @@
+(ns epicea.utils.core-test
+  (:require [clojure.test :refer :all]
+            [epicea.utils.core :refer :all]))
+
+(deftest map-with-keys-test
+  (testing "Testing map with keys"
+    (is (map-with-keys? {:rulle 119} #{:rulle}))
+    (is (map-with-keys? {:rulle 119} #{:rulle}))
+    (is (not (map-with-keys? {:rulle 119} #{:rull})))
+    (is (not (map-with-keys? [:rulle] #{:rulle})))))
+
+(deftest matrix-index-test
+  (testing "Matrix index computation"
+    (is (= 0 (compute-matrix-index [3 4] [0 0])))
+    (is (= 1 (compute-matrix-index [3 4] [1 0])))
+    (is (= 3 (compute-matrix-index [3 4] [0 1])))
+    (is (= 4 (compute-matrix-index [3 4] [1 1])))))
+
+(deftest provide-arguments-test
+  (testing "Providing arguments"
+    (let [f (provide-arguments get [[{:a 3 :b 4}] nil])]
+      (is (= 3 (f :a)))
+      (is (= 4 (f :b))))
+    (let [f (provide-arguments get [nil [:a]])]
+      (is (= 9 (f {:a 9})))
+      (is (= 12 (f {:a 12}))))))
+
+(deftest map-hierarchy-test
+  (testing "Flattening..."
+    (is (= (flatten-map-hierarchy {:a {1 :c 2 :d} :b {3 :k}})
+           {[:a 1] :c, [:a 2] :d, [:b 3] :k}))))


Some tests of how we want to do the web framework

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

--- test/eventframework/scratch.clj
+++ test/eventframework/scratch.clj
@@ -0,0 +1,52 @@
+(ns eventframework.scratch
+  (:use
+    clojure.test
+    midje.sweet
+    ring.mock.request
+    [compojure.core :only [defroutes context GET PUT]])
+  (:require
+    [compojure.handler :as handler]
+    [ring.middleware.json :as json-middleware]
+    [ring.util.response :as response]
+    [compojure.route :as route]))
+
+(deftest start
+	(fact "test-test"
+	  (+ 2 2) => 4))
+
+(def test-api
+  (->
+   (handler/api (GET "/foo" [] "foo"))
+    (json-middleware/wrap-json-body)
+    (json-middleware/wrap-json-response)))
+
+(def test-ui
+    (handler/site (GET "/" [] "Hello World")))
+
+(defn filematch [rexp] #(re-find rexp (slurp %)))
+
+(defroutes test-chain
+  (context "/api" [] test-api)
+  test-ui
+  (route/resources "/")
+  (route/not-found (response/resource-response "404.html" {:root "error"})))
+
+(deftest ta
+	(facts "test-app"
+	  (test-chain (request :get "/"))
+	    => (contains {
+	        :status 200
+	        :body #"Hello World"})
+	  (test-chain (request :get "/api/foo"))
+	    => (contains {
+	        :status 200
+	        :body #"foo"})
+	  (test-chain (request :get "/js/app.js"))
+	    => (contains {
+	        :status 200
+	        :body (filematch #"rubbish-here")})
+	  (test-chain (request :get "/does-not-exist"))
+	    => (contains {
+	        :status 404
+	        :body (filematch #"typos")})))
+


Minor tweak.

Minor tweak.

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/'


make `call-clerk` and `not-applicable` mutually exclusive

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/'


Minor cleanup

Minor cleanup


Remove calls from reserve and unreserve

Remove calls from reserve and unreserve

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/scheduled-message-works.git/'


restored simple-form-template, deleted by mistake

still wondering about formative: can't set value of fields, it actually
seems to be a bug.#

--- src/freecoin/views.clj
+++ src/freecoin/views.clj
@@ -42,6 +42,10 @@
   {"application/json" "application/json"
    "application/x-www-form-urlencoded" "text/html"})

+(defn simple-form-template [{:keys [heading form-spec] :as content}]
+  [:div
+   [:h1 heading]
+   (fc/render-form form-spec)])

 (defn confirm-page [confirmation]
   (page/html5


Adds TeamUser.location as optional key

Adds TeamUser.location as optional key


jruby.clj: copied from v5, unchanged

jruby.clj: copied from v5, unchanged

error: pathspec 'src/main/clojure/org/altlaw/util/jruby.clj' did not match any file(s) known to git

--- src/main/clojure/org/altlaw/util/jruby.clj
+++ src/main/clojure/org/altlaw/util/jruby.clj
@@ -0,0 +1,49 @@
+(ns org.altlaw.util.jruby
+  (:require [clojure.contrib.singleton :as sing]
+            [clojure.contrib.java-utils :as j])
+  (:import (javax.script SimpleBindings ScriptContext
+                         ScriptEngine ScriptEngineManager)))
+
+(def #^{:private true} jruby
+     (sing/per-thread-singleton
+      (fn []
+        (.getEngineByName (ScriptEngineManager.) "jruby"))))
+
+(defn- make-bindings [m]
+  (let [bindings (SimpleBindings.)]
+   (doseq [[k v] m]
+     (.put bindings (j/as-str k) v))
+   bindings))
+
+(defn eval-jruby
+  ([script]
+     (.eval (jruby) script))
+  ([script bindings]
+     (.eval (jruby) script (make-bindings bindings))))
+
+
+(derive java.lang.String ::java-object)
+(derive java.lang.Number ::java-object)
+(derive java.lang.Boolean ::java-object)
+
+(defmulti convert-jruby class)
+
+(defmethod convert-jruby org.jruby.RubySymbol [x]
+  (keyword (str x)))
+
+(defmethod convert-jruby org.jruby.RubyObject [x]
+  ;; converting a Date gives "YYYY-MM-DD"
+  (str x))
+
+(defmethod convert-jruby org.jruby.RubyHash [x]
+  (reduce (fn [m [k v]]
+            (assoc m (convert-jruby k)
+                   (convert-jruby v)))
+          {} x))
+
+(defmethod convert-jruby org.jruby.RubyArray [x]
+  (vec (map convert-jruby x)))
+
+(defmethod convert-jruby ::java-object [x] x)
+
+(defmethod convert-jruby nil [x] x)


fixing issue with one dimensional calculation of field

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/yokalona/threen.git/'


minor / formatting

minor / formatting

--- cljs-server/cljsinfo_server/core.cljs
+++ cljs-server/cljsinfo_server/core.cljs
@@ -91,7 +91,7 @@
     (if (and key-from-config
              (= key-from-client key-from-config))
       (do (fetch-and-update-docs!)
-           (.send js-res "refreshing the docs..."))
+          (.send js-res "refreshing the docs..."))
       (.send js-res "wrong key"))))

 ;;------------------------------------------------------------------------------


Add a hack for my -<> macro

Add a hack for my -<> macro

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

--- src/detritus/macros.clj
+++ src/detritus/macros.clj
@@ -0,0 +1,4 @@
+(ns detritus.macros)
+
+(defmacro -<> [val & forms]
+  `(as-> ~val ~'<> ~@forms))


Copy spec-report from master branch

Copy spec-report from master branch

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

--- src/main/clojure/com/stuartsierra/lazytest/report.clj
+++ src/main/clojure/com/stuartsierra/lazytest/report.clj
@@ -0,0 +1,111 @@
+(ns com.stuartsierra.lazytest.report
+  (:use [com.stuartsierra.lazytest.results
+	 :only (success? container? error? pending?)]
+        [com.stuartsierra.lazytest.color :only (colorize)]
+        [clojure.stacktrace :only (print-cause-trace)])
+  (:import (java.io File)))
+
+(defn details
+  "Given a TestResult, returns the map of :name, :ns, :file, :line,
+  :generator, and :form."
+  [r]
+  (meta (:source r)))
+
+(defn print-details
+  "Prints full details of a TestResult, including file and line
+  number, doc string, and stack trace if applicable."
+  [r]
+  (println
+   (cond (pending? r) (colorize "PENDING" :fg-yellow)
+         (success? r) (colorize "SUCCESS" :fg-green)
+         (error? r) (colorize "ERROR" :fg-red)
+         :else (colorize "FAIL" :fg-red)))
+  (let [m (details r)]
+    (when-let [n (:name m)] (println "Name:" n))
+    (when-let [nn (:ns m)] (println "NS:  " (ns-name nn)))
+    (when-let [d (:doc m)] (println "Doc: " d))
+    (when (and (:form m) (not (:name m)))
+      (print "Form: ")
+      (prn (:form m)))
+    (when-let [f (:file m)] (println "File:" f))
+    (when-let [l (:line m)] (println "Line:" l))
+    (when (seq (:locals m))
+      (print "Givens: ")
+      (prn (zipmap (:locals m) (:states r))))
+    (when-let [e (:throwable r)]
+      (println "STACK TRACE")
+      (print-cause-trace e))))
+
+(defn assertion-results
+  "Returns a sequence of all assertion results (not grouped test
+  results) in the tree rooted at r."
+  [r]
+  r)
+
+(defn- inc-keys
+  "Increment the value of each key in map m."
+  [m & keys]
+  (reduce (fn [m k] (assoc m k (inc (get m k 0))))
+          m keys))
+
+(defn summary
+  "Returns a map of :total, :pass, :fail, and :error
+  counts for assertions in the results tree rooted at r."
+  [res]
+  (reduce (fn [m r]
+            (cond (pending? r) (inc-keys m :pending)
+                  (container? r) m
+                  (success? r) (inc-keys m :assertions :pass)
+                  (error? r) (inc-keys m :assertions :error)
+                  :else (inc-keys m :assertions :fail)))
+          {:assertions 0, :pass 0, :fail 0, :error 0, :pending 0}
+          res))
+
+(defn print-summary [r]
+  (let [{:keys [assertions pass fail error pending]} (summary r)]
+    (println (colorize (str "Ran " assertions " assertions.")
+                       (if (zero? assertions) :fg-yellow :reset)))
+    (print (colorize (str fail " failures")
+                     (if (zero? fail) :fg-green :fg-red)))
+    (print ", ")
+    (print (colorize (str error " errors")
+                     (if (zero? error) :fg-green :fg-red)))
+    (print ", ")
+    (print (colorize (str pending " pending")
+                     (if (zero? pending) :fg-green :fg-yellow)))
+    (newline)
+    (flush)))
+
+(defn- spec-report* [r parents]
+  (if (and (container? r) (not (pending? r)))
+    (doseq [c (:children r)]
+      (spec-report* c (conj parents r)))
+    (if (and (success? r) (not (pending? r)))
+      (do (print (colorize "." :fg-green)) (flush))
+      (do (newline)
+          (print-details
+           (assoc r :source
+                  (vary-meta (:source r) assoc :doc
+                             (apply str (interpose " "
+                                                   (filter identity
+                                                           (map #(:doc (details %))
+                                                                (conj parents r))))))))))))
+
+(defn spec-report
+  "Simple report of spec results.  Prints a dot for each passed
+  assertion; prints details for each failure or pending spec.
+  Concatenates :doc strings for nested specs.  Uses ANSI color if
+  com.stuartsierra.lazytest.color/colorize? is true."
+  [results]
+  (newline)
+  (doseq [r results]
+    (spec-report* r []))
+  (newline))
+
+(defn report-and-exit
+  "Calls function f (defaults to spec-report) on test result r and
+  exits.  Exit status is 0 if all specs passed, -1 if some failed."
+  ([r] (report-and-exit spec-report r))
+  ([f r]
+     (f r)
+     (System/exit (if (success? r) 0 -1))))


Update list

Update list

error: pathspec 'HackerRank/Functional/update_list.clj' did not match any file(s) known to git

--- HackerRank/Functional/update_list.clj
+++ HackerRank/Functional/update_list.clj
@@ -0,0 +1,5 @@
+;;  Update the values of a list with their absolute values. The input and output portions will be handled automatically during grading. You only need to write a function with the recommended method signature.
+
+(fn[lst]
+    (map #(max % (- %)) lst))
+


formatting

formatting

--- labs/architecture-examples/om/src/todomvc/app.cljs
+++ labs/architecture-examples/om/src/todomvc/app.cljs
@@ -91,7 +91,7 @@
     dom/IWillMount
     (-will-mount [_ owner]
       (let [[toggle destroy edit save clear cancel :as cs]
-             (take 6 (repeatedly chan))]
+            (take 6 (repeatedly chan))]
         (dom/set-state! owner :chans
           (zipmap [:toggle :destroy :edit :save :clear :cancel] cs))
         (go


Optimization of db-spec

Optimization of db-spec

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/'