zippy focus

zippy focus

git-svn-id: 03a8048b5ee8463be5048a3801110fb50f378627@7601 d0ab736e-dc22-4aeb-8dc9-08def0aa14fd

error: pathspec 'autofocus/ZippyFocus/src/zippy-focus/core.clj' did not match any file(s) known to git

--- autofocus/ZippyFocus/src/zippy-focus/core.clj
+++ autofocus/ZippyFocus/src/zippy-focus/core.clj
@@ -0,0 +1,68 @@
+(ns zippy-focus.core
+  (:import [org.micromanager.api Autofocus]
+           [org.micromanager.utils PropertyItem])
+  (:use [org.micromanager.mm
+            :only (load-mm gui mmc core double-vector)]))
+
+(defn triggerable-focus? []
+  (core isStageSequenceable (core getFocusDevice)))
+
+(defonce search-params (atom nil))
+
+(defn make-sweep-vector [z search-params]
+  (let [half-range (/ (search-params :range) 2)
+        tol (search-params :tolerance)]
+    (vec
+      (range (- z half-range)
+             (+ z half-range tol)
+             tol))))
+
+(defn more-images-expected []
+  (or (pos? (core getRemainingImageCount))
+      (core isSequenceRunning)))
+
+(defn pop-burst-image []
+  (while (and (. mmc isSequenceRunning)
+              (zero? (. mmc getRemainingImageCount)))
+    (Thread/sleep 1))
+  (core popNextImage))
+
+(defn grab-images []
+  (doall
+    (for [_ (range) :while (more-images-expected)]
+      (pop-burst-image))))
+
+(defn score-image [score-type img]
+  (condp = score-type
+    "Sum" (apply + img)
+    0))
+
+(defn acquire-images [z-drive trigger exposure]
+    (core setExposure exposure)
+    (core setPosition z-drive (first trigger))
+    (core loadStageSequence z-drive (double-vector trigger))
+    (core startStageSequence z-drive)
+    (core waitForDevice z-drive)
+    (core startSequenceAcquisition (count trigger) 0 false)
+    (grab-images))
+
+(defn run-autofocus [search-params]
+  (let [z-drive (core getFocusDevice)
+        current-z (core getPosition z-drive)
+        trigger (make-sweep-vector current-z search-params)
+        current-exposure (core getExposure)]
+    (let [images (acquire-images z-drive trigger (:exposure search-params))
+          scores (map #(score-image "Sum" %) images)
+          best-index (apply max-key #(nth scores %) (range (count images)))
+          best-z (nth trigger best-index)]
+      (core setPosition z-drive best-z)
+      (core setExposure current-exposure)
+      best-z)))
+
+(defn run-test []
+  (reset! search-params
+          {:range 10
+           :tolerance 1.00
+           :score-type "Sum"
+           :exposure 10})
+  (run-autofocus @search-params))


saioa-hasi erabili

saioa-hasi erabili

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


Left column positioning lines up with broswer window

--- cljs-cheatsheet/cljs_cheatsheet/tooltips.cljs
+++ cljs-cheatsheet/cljs_cheatsheet/tooltips.cljs
@@ -110,6 +110,7 @@
 ;; and tooltips at the bottom of the page (flip up)
 (defn- position-inline-tooltip! [tt]
   (let [$link-el (:$link-el tt)
+        $innerWidth (.-innerWidth js/window)
         offset (.offset $link-el)
         link-x (aget offset "left")
         link-y (aget offset "top")
@@ -118,12 +119,25 @@
         $tooltip-el ($ (str "#" (:id tt)))
         tooltip-height (.outerHeight $tooltip-el)
         tooltip-width (.outerWidth $tooltip-el)
+        tt-width-half (half tooltip-width)
         tooltip-left (- (+ link-x (half link-width)) (half tooltip-width))
-        tooltip-top (+ link-y link-height 4)]
-    ;; position the el
-    (.css $tooltip-el (js-obj
-      "left" tooltip-left
-      "top" tooltip-top))
+        tooltip-top (+ link-y link-height 4)
+        right-column-align (- $innerWidth (+ tooltip-left tt-width-half))]
+
+    ;; position el to align with edge of browser (plus padding) for
+    ;; responsive sizes
+    (if (<= tooltip-left 200)
+      (.css $tooltip-el (js-obj
+        "left" 10
+        "top" tooltip-top))
+      (.css $tooltip-el (js-obj
+        "left" tooltip-left
+        "top" tooltip-top)))
+
+        ;;on right column, if innerWidth - (tooltip-left + tooltip-width/2) >= (tooltip-width/2) : window.innerWidth - tooltip-left - toolip-width/2 = amt to adjust to the left
+
+    (log link-x)
+    (log tooltip-left)

     ;; save the bounds of the tooltip and link elements
     ;; NOTE: these numbers allow for a smidge of padding on the outside of the


added problems/tozier/winkler01.clj

added problems/tozier/winkler01.clj

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

--- src/clojush/problems/tozier/winkler01.clj
+++ src/clojush/problems/tozier/winkler01.clj
@@ -0,0 +1,54 @@
+;; winkler01.clj
+;; Bill Tozier, bill@vagueinnovation.com
+;;
+;; This is code for running my variant on Winkler's Zeros-and-Ones puzzle:
+;; For any positive integer input, return a strictly positive integer which
+;;   when multiplied by the input produces a result which contains only the
+;;   digits 0 and 1 (in base 10 notation)
+;;
+;; Input and output are given as single integers using the integer stack.
+
+(ns clojush.problems.tozier.winkler01
+  (:use clojush.pushgp.pushgp
+        [clojush pushstate interpreter random]
+        ))
+
+; Create the error function
+(defn count-digits [num] (count (str num)))
+
+(defn proportion-not-01
+    "Returns the proportion of digits in the argument integer which are not 0 or 1"
+    [num]
+      (let [counts (frequencies (re-seq #"\d" (str num)))]
+      (- 1
+         (/ (+ (get counts "0" 0)
+               (get counts "1" 0))
+            (count-digits num)))))
+
+(defn winkler-error-function
+  "Returns the error function for Tozier's 01 problem."
+  [number-test-cases]
+  (fn [program]
+    (doall
+      (for [input (range 1 number-test-cases)]
+        (let [final-state (run-push program
+          (push-item input :input
+            (push-item input :integer
+              (make-push-state))))
+             result-output (top-item :integer final-state)]
+          (if (and (number? result-output) (pos? result-output))
+            (proportion-not-01 (* input result-output))
+            1000))))))
+
+
+; Define the argmap
+(def argmap
+  {:error-function (winkler-error-function 80)
+   :max-points 1000
+   :max-genome-size-in-initial-program 500
+   :evalpush-limit 800
+   :population-size 1000
+   :max-generations 1000
+   :parent-selection :lexicase
+   :final-report-simplifications 1000
+   })


added deployment placement form

added deployment placement form

#21

error: pathspec 'src/cljs/swarmpit/component/service/form_deployment_placement.cljs' did not match any file(s) known to git

--- src/cljs/swarmpit/component/service/form_deployment_placement.cljs
+++ src/cljs/swarmpit/component/service/form_deployment_placement.cljs
@@ -0,0 +1,60 @@
+(ns swarmpit.component.service.form-deployment-placement
+  (:require [material.component :as comp]
+            [swarmpit.component.state :as state]
+            [rum.core :as rum]))
+
+(enable-console-print!)
+
+(def cursor [:page :service :wizard :deployment :placement])
+
+(def headers [{:name  "Rule"
+               :width "500px"}])
+
+(defn- form-placement [value index placement]
+  (comp/autocomplete {:name          "form-placement"
+                      :key           "form-placement"
+                      :hintText      "e.g. node.role == manager"
+                      :anchorOrigin  {:vertical   "top"
+                                      :horizontal "left"}
+                      :targetOrigin  {:vertical   "bottom"
+                                      :horizontal "left"}
+                      :fullWidth     true
+                      :searchText    value
+                      :onUpdateInput (fn [v]
+                                       (state/update-item index :rule v cursor))
+                      :dataSource    placement}))
+
+(defn- render-placement
+  [item index data]
+  (let [{:keys [rule]} item]
+    [(form-placement rule index data)]))
+
+(defn- form-table
+  [placement data]
+  (comp/form-table-headless headers
+                            placement
+                            data
+                            render-placement
+                            (fn [index] (state/remove-item index cursor))))
+
+(defn- add-item
+  []
+  (state/add-item {:rule ""} cursor))
+
+(def render-item-keys
+  [[:rule]])
+
+(defn- render-item
+  [item]
+  (val item))
+
+(rum/defc form < rum/reactive [data]
+  (let [placement (state/react cursor)]
+    [:div
+     (form-table placement data)]))
+
+(rum/defc form-view < rum/static [placement]
+  (comp/form-info-table-headless headers
+                                 placement
+                                 render-item
+                                 render-item-keys))


Liburuen bilduman datu guztiak itzuli

Liburuen bilduman datu guztiak itzuli


minor cleanup :sunglasses:

minor cleanup :sunglasses:

--- src/metabase/driver.clj
+++ src/metabase/driver.clj
@@ -21,14 +21,14 @@

 (def ^:const available-drivers
   "Available DB drivers."
-  {:h2       {:id      "h2"
-              :name    "H2"}
-   :postgres {:id      "postgres"
-              :name    "Postgres"}
-   :mongo    {:id      "mongo"
-              :name    "MongoDB"}
-   :mysql    {:id      "mysql"
-              :name    "MySQL"}})
+  {:h2       {:id   "h2"
+              :name "H2"}
+   :postgres {:id   "postgres"
+              :name "Postgres"}
+   :mongo    {:id   "mongo"
+              :name "MongoDB"}
+   :mysql    {:id   "mysql"
+              :name "MySQL"}})

 (defn class->base-type
   "Return the `Field.base_type` that corresponds to a given class returned by the DB."


add scaffold for service detail view

add scaffold for service detail view

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


Day 17

Day 17

error: pathspec 'src/advent_2017/day_17.cljc' did not match any file(s) known to git

--- src/advent_2017/day_17.cljc
+++ src/advent_2017/day_17.cljc
@@ -0,0 +1,22 @@
+(ns advent-2017.day-17)
+
+(def input 345)
+
+(defn spin [step [current-pos value buffer]]
+  (let [new-pos (inc (mod (+ current-pos step) value))]
+    [new-pos (inc value) (-> (subvec buffer 0 new-pos)
+                           (into [value])
+                           (into (subvec buffer new-pos)))]))
+
+(defn part-1 []
+  (let [[current-pos _ buffer] (nth (iterate (partial spin input) [0 1 [0]]) 2017)]
+    (buffer (inc current-pos))))
+
+(defn spin' [step [current-pos value after-zero]]
+  (let [new-pos (inc (mod (+ current-pos step) value))]
+    [new-pos (inc value) (if (== 1 new-pos)
+                           value
+                           after-zero)]))
+
+(defn part-2 []
+  (last (nth (iterate (partial spin' input) [0 1 nil]) 50000000)))


Include name in schema for search results

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


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/sharkspeed/dororis.git/'


Remove obsolete Java source paths

Remove obsolete Java source paths

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/Yleisradio/rabid.git/'


Upgrade to latest stable aleph

Upgrade to latest stable aleph

--- project.clj
+++ project.clj
@@ -49,7 +49,7 @@

      ;; ext dependencies
      [bidi "2.1.3"]
-     [aleph "0.4.3" :exclusions [io.aleph/dirigiste]]
+     [aleph "0.4.4" :exclusions [io.aleph/dirigiste]]
      [org.clojure/core.async "0.3.442"]
      [cheshire "5.6.3"]
      [json-html "0.4.0" :exclusions [hiccups]]


Add super rudimentary (but still pretty fun) shell fns ls and grep

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

--- src/overtone/repl/shell.clj
+++ src/overtone/repl/shell.clj
@@ -0,0 +1,37 @@
+(ns overtone.repl.shell
+  (:use [overtone.helpers file])
+  (:require [clojure.string :as str]))
+
+(deftype ShellStringList [strlist]
+  clojure.lang.IPersistentCollection
+  (seq [self] (seq strlist))
+  (cons [self o] (ShellStringList. (conj strlist o)))
+  (empty [self] (ShellStringList. []))
+  (equiv
+   [self o]
+   (and (instance? ShellStringList o)
+        (= strlist (.strlist o))))
+  clojure.lang.ISeq
+  (first [self] (first strlist))
+  (next [self] (next strlist))
+  (more [self] (rest strlist))
+  Object
+  (toString [self] (str/join "\n" (.strlist self))))
+
+(defmethod print-method ShellStringList [str-l w]
+  (.write w (str str-l)))
+
+(prefer-method print-method ShellStringList clojure.lang.IPersistentCollection)
+
+(defn ls
+  "Returns a listing of contents for the supplied path."
+  [path]
+  (let [names (ls-names ~(str path))]
+    (ShellStringList. names)))
+
+(defn grep
+  "Returns a listing of contents which match."
+  [stdin match]
+  (let [match (str->regex match)
+        res   (filter #(re-find match %) stdin)]
+    (ShellStringList. res)))


adding reporter as module

adding reporter as module

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

--- trackit-ganglia/project.clj
+++ trackit-ganglia/project.clj
@@ -0,0 +1,13 @@
+(defproject samsara/trackit-ganglia (-> "../trackit.version" slurp .trim)
+
+  :description
+  "TRACKit! A Clojure developer friendly wrapper for Yammer's Metrics library."
+
+  :url "https://github.com/samsara/trackit"
+
+  :license {:name "Apache License 2.0"
+            :url "http://www.apache.org/licenses/LICENSE-2.0"}
+
+  :dependencies [#_[metrics-clojure-ganglia  "2.5.0"] ;; bug #71
+                 [io.dropwizard.metrics/metrics-ganglia "3.1.1"]
+                 [info.ganglia.gmetric4j/gmetric4j "1.0.10"]])


First cut at dispatcher-spec

First cut at dispatcher-spec

error: pathspec 'spec/rook/dispatcher_spec.clj' did not match any file(s) known to git

--- spec/rook/dispatcher_spec.clj
+++ spec/rook/dispatcher_spec.clj
@@ -0,0 +1,89 @@
+(ns rook.dispatcher-spec
+  (:use speclj.core)
+  (:require [io.aviso.rook.dispatcher :as dispatcher]
+            [ring.mock.request :as mock]))
+
+(create-ns 'example.foo)
+
+(binding [*ns* (the-ns 'example.foo)]
+  (eval '(do
+           (clojure.core/refer-clojure)
+           (require '[ring.util.response :as resp])
+           (defn index []
+             (resp/response "Hello!"))
+           (defn show [id]
+             (resp/response (str "Interesting id: " id)))
+           (defn create [x]
+             (resp/response (str "Created " x))))))
+
+(def ^:dynamic *default-pipeline* identity)
+
+(def simple-dispatch-table
+  [[:get  ["foo"]     'example.foo/index  `*default-pipeline*]
+   [:post ["foo"]     'example.foo/create `*default-pipeline*]
+   [:get  ["foo" :id] 'example.foo/show   `*default-pipeline*]])
+
+(describe "io.aviso.rook.dispatcher"
+
+  (describe "unnest-dispatch-table"
+
+    (it "should leave tables with no nesting unchanged"
+
+      (should= simple-dispatch-table
+        (dispatcher/unnest-dispatch-table simple-dispatch-table)))
+
+    (it "should correctly unnest DTs WITHOUT a default pipeline"
+
+      (let [dt [(into [["api"]] simple-dispatch-table)]]
+        (should= [[:get  ["api" "foo"]     'example.foo/index  `*default-pipeline*]
+                  [:post ["api" "foo"]     'example.foo/create `*default-pipeline*]
+                  [:get  ["api" "foo" :id] 'example.foo/show   `*default-pipeline*]]
+          (dispatcher/unnest-dispatch-table dt))))
+
+    (it "should correctly unnest DTs WITH a default pipeline and empty context pathvec"
+
+      (let [dt [(into [[] `*default-pipeline*]
+                  (mapv pop simple-dispatch-table))]]
+        (should= simple-dispatch-table
+          (dispatcher/unnest-dispatch-table dt))))
+
+    (it "should correctly unnest DTs WITH a default pipeline and non-empty context pathvec"
+
+      (let [dt [(into [["api"] `*default-pipeline*]
+                  (mapv pop simple-dispatch-table))]]
+        (should= [[:get  ["api" "foo"]     'example.foo/index  `*default-pipeline*]
+                  [:post ["api" "foo"]     'example.foo/create `*default-pipeline*]
+                  [:get  ["api" "foo" :id] 'example.foo/show   `*default-pipeline*]]
+          (dispatcher/unnest-dispatch-table dt)))))
+
+  (describe "compile-dispatch-table"
+
+    (it "should produce a handler returning valid response maps"
+
+      (let [handler (dispatcher/compile-dispatch-table simple-dispatch-table)
+            index-response (handler (mock/request :get "/foo"))
+            show-response  (handler (mock/request :get "/foo/1"))]
+        (should= {:status 200 :headers {} :body "Hello!"}
+          index-response)
+        (should= {:status 200 :headers {} :body "Interesting id: 1"}
+          show-response)))
+
+    (it "should inject the pipeline"
+
+      (let [handler (dispatcher/compile-dispatch-table simple-dispatch-table)
+            a (atom 0)]
+        (binding [*default-pipeline* (fn [handler]
+                                       (fn [request]
+                                         (swap! a inc)
+                                         (handler request)))]
+          (handler (mock/request :get "/foo"))
+          (should= 1 @a)))))
+
+  (describe "namespace-dispatch-table"
+
+    (it "should return a DT reflecting the state of the namespace"
+
+      (let [dt (set (dispatcher/unnest-dispatch-table
+                      (dispatcher/namespace-dispatch-table
+                        [] 'example.foo `*default-pipeline*)))]
+        (should= (set simple-dispatch-table) dt)))))


added clojure solution

added clojure solution

error: pathspec 'solutions/day02/solution.clj' did not match any file(s) known to git

--- solutions/day02/solution.clj
+++ solutions/day02/solution.clj
@@ -0,0 +1,41 @@
+(def input (->> (slurp "input.txt")
+                (clojure.string/split-lines)
+                (map #(clojure.string/split % #"x"))
+                (map #(map read-string %))))
+
+(defn dims->sides
+  [[l w h]]
+  [[l w] [w h] [h l]])
+
+(defn paper-required
+  [dims]
+  (let [sides (dims->sides dims)
+        side-areas (map #(reduce * %) sides)
+        total-area (reduce + (map #(* 2 %) side-areas))
+        extra (apply min side-areas)]
+    (+ total-area extra)))
+
+(defn volume
+  [dims]
+  (reduce * dims))
+
+(defn shortest-perimeter
+  [dims]
+  (let [sides (dims->sides dims)
+        perimeters (map #(* 2 (reduce + %)) sides)]
+    (apply min perimeters)))
+
+(defn ribbon-required
+  [dims]
+  (+ (volume dims) (shortest-perimeter dims)))
+
+(defn part1
+  [input]
+  (reduce + (map paper-required input)))
+
+(defn part2
+  [input]
+  (reduce + (map ribbon-required input)))
+
+(println "part 1:" (part1 input))
+(println "part 2" (part2 input))


wrong identifier

wrong identifier

--- sidecar/src/figwheel_sidecar/auto_builder.clj
+++ sidecar/src/figwheel_sidecar/auto_builder.clj
@@ -22,7 +22,7 @@
       (util/sh (update-in command [:shell] (fn [old] (concat old [message]))))
       (catch Throwable e
         (println (auto/red "Error running :notify-command:"))
-        (stack/print-cause-trace exception 1)
+        (stack/print-cause-trace e 1)
         #_(clj-stacktrace.repl/pst+ e)))))

 (defn notify-on-complete [{:keys [build-options parsed-notify-command]}]


4clojure:: 2nd attempt to impl the gen-palindromic lazy seq

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

--- src/clojure_learning/tmp4.clj
+++ src/clojure_learning/tmp4.clj
@@ -0,0 +1,58 @@
+(defn palindrome? [x]
+  (loop [init x
+         reversed 0]
+    (if (not= 0 init)
+      (recur (quot init 10) (+ (* reversed 10) (mod init 10)))
+      (= x reversed))))
+
+(palindrome? 2) ;; true
+(palindrome? 101) ;; true
+(palindrome? 13) ;; false
+
+(defn gen-palindromes
+  [start]
+  (letfn [(palindrome? [x]
+            (loop [init x
+                   reversed 0]
+              (if (not= 0 init)
+                (recur (quot init 10) (+ (* reversed 10) (rem init 10)))
+                (= x reversed))))
+          (gen-palins [x]
+            (if (palindrome? x)
+              (cons x (lazy-seq (gen-palins (inc x))))
+              (recur (inc x))))]
+    (gen-palins start)))
+
+(gen-palindromes 1234550000)
+(take 26 (gen-palindromes 0))
+
+(doc frequencies)
+(frequencies [1 2 3 1 5 1 5])
+
+(import java.util.Date)
+(do
+  (println (Date. (System/currentTimeMillis)))
+  (take 20 (gen-palindromes 1234550000))
+  (println (Date. (System/currentTimeMillis))))
+
+(class (gen-palindromes 1234550000)) ;; -> not lazy
+(= (first (gen-palindromes (* 111111111 111111111)))
+   (* 111111111 111111111))
+
+(defn gen-palindromes
+  [start]
+  (letfn [(palindrome? [x]
+            (loop [init x
+                   reversed 0]
+              (if (not= 0 init)
+                (recur (quot init 10) (+ (* reversed 10) (mod init 10)))
+                (= x reversed))))
+          (gen-seq [x]
+            (lazy-seq
+               (cons x (gen-seq (inc x)))))]
+    (filter palindrome? (iterate inc start))))
+
+(filter palindrome? (range))
+(gen-palindromes 1234550000)
+;; 00:08:58
+;; 00:10:58


[WM] Remove debugging output from handle-errors

This should not have stayed in here and is triggering false positives on
our error alerts in Papertrail.

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


fix migrations

fix migrations

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/deril/hacknote.git/'


revert accidental change

revert accidental change

--- src/metabase/middleware/format.clj
+++ src/metabase/middleware/format.clj
@@ -30,8 +30,8 @@
 (defn- remove-fns-and-delays
   "Remove values that are fns or delays from map M."
   [m]
-  (filter-vals #(not (or (fn? %)
-                         (delay? %)))
+  (filter-vals #(not (or (delay? %)
+                         (fn? %)))
                m))

 (defn- clob? [obj]


fix function which runs email reports on task runner.  function needed to accept a single arg for the hour it's executing on.

--- src/metabase/task/email_report.clj
+++ src/metabase/task/email_report.clj
@@ -18,24 +18,29 @@
             [metabase.util :as u]))

-(declare execute-all-reports
+(declare execute-scheduled-reports
          execute-if-scheduled
          execute-and-send
          execute
          report-fail
          report-complete)

-(defn execute-all-reports
+(defn execute-reports-hourly-job
+  "Simple wrapper for `execute-scheduled-reports` function which we can place on a `task/hourly-tasks-hook`"
+  [_]
+  (log/debug "Executing EmailReports hourly job")
+  (execute-scheduled-reports))
+
+;; this adds our email report executions to our hourly task runner
+(task/add-hook! #'task/hourly-tasks-hook execute-reports-hourly-job)
+
+(defn execute-scheduled-reports
   "Execute and Send all `EmailReports` in the system.
    This function checks the schedule on all :active email reports and runs them if appropriate."
   []
-  (log/debug "Executing ALL EmailReports")
+  (log/debug "Executing ALL scheduled EmailReports")
   (->> (sel :many :fields [EmailReport :id :schedule] :mode (mode->id :active))
        (map execute-if-scheduled)))
-
-;; this adds our funtion below onto the hourly task runner
-;; TODO - maybe we should put these in a unified place for all scheduled tasks?
-(task/add-hook! #'task/hourly-tasks-hook execute-all-reports)

 (defn- execute-if-scheduled
   "Test if a given report is scheduled to run at the current time and if so execute it."


use server for todo check/uncheck

use server for todo check/uncheck

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/JetBrains/imperative-nodejs.git/'


functional solution to Hundred Door Puzzle

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/ananthmv/stream.git/'


Add error response logging interceptor

Add error response logging interceptor

Now that we're using bifrost/handler everywhere, async timeout errors
will no longer produce logs. This commit adds a warning log whenever we
return an error response (400s or 500s).

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


CMR-4471 add Service Association migration

error: pathspec 'metadata-db-app/src/migrations/065_add_service_associations_table.clj' did not match any file(s) known to git

--- metadata-db-app/src/migrations/065_add_service_associations_table.clj
+++ metadata-db-app/src/migrations/065_add_service_associations_table.clj
@@ -0,0 +1,60 @@
+(ns migrations.065-add-service-associations-table
+  (:require
+   [config.mdb-migrate-helper :as h]))
+
+(def ^:private service-assocs-column-sql
+  "id NUMBER,
+  concept_id VARCHAR(255) NOT NULL,
+  native_id VARCHAR(1500) NOT NULL,
+  service_concept_id VARCHAR(255) NOT NULL,
+  metadata BLOB NOT NULL,
+  format VARCHAR(255) NOT NULL,
+  revision_id INTEGER DEFAULT 1 NOT NULL,
+  associated_concept_id VARCHAR(255) NOT NULL,
+  associated_revision_id INTEGER NULL,
+  revision_date TIMESTAMP WITH TIME ZONE DEFAULT SYSTIMESTAMP NOT NULL,
+  deleted INTEGER DEFAULT 0 NOT NULL,
+  user_id VARCHAR(30),
+  transaction_id NUMBER DEFAULT 0 NOT NULL")
+
+(def ^:private service-assocs-constraint-sql
+  (str "CONSTRAINT s_assoc_pk PRIMARY KEY (id), "
+        ;; Unique constraint on native id and revision id
+        "CONSTRAINT s_assoc_con_rev UNIQUE (native_id, revision_id)
+         USING INDEX (create unique index s_assoc_ucr_i ON CMR_SERVICE_ASSOCIATIONS (native_id, revision_id)), "
+
+        ;; Unique constraint on concept id and revision id
+        "CONSTRAINT s_assoc_cid_rev UNIQUE (concept_id, revision_id)
+         USING INDEX (create unique index s_assoc_cri ON CMR_SERVICE_ASSOCIATIONS (concept_id, revision_id))"))
+
+(defn- create-service-associations-table
+  []
+  (h/sql (format "CREATE TABLE METADATA_DB.CMR_SERVICE_ASSOCIATIONS (%s, %s)"
+                 service-assocs-column-sql service-assocs-constraint-sql)))
+
+(defn- create-service-associations-indices
+  []
+  (h/sql "CREATE INDEX s_assoc_crdi ON CMR_SERVICE_ASSOCIATIONS (concept_id, revision_id, deleted)")
+  (h/sql "CREATE INDEX s_assoc_acari ON CMR_SERVICE_ASSOCIATIONS (associated_concept_id, associated_revision_id)")
+  (h/sql "CREATE INDEX s_assoc_vnri ON CMR_SERVICE_ASSOCIATIONS (service_name, revision_id)")
+  (h/sql "CREATE INDEX s_assoc_vncid ON CMR_SERVICE_ASSOCIATIONS (service_name, associated_concept_id)")
+  (h/sql "CREATE INDEX s_assoc_vncrid ON CMR_SERVICE_ASSOCIATIONS (service_name, associated_concept_id, associated_revision_id)"))
+
+(defn- create-service-associations-sequence
+  []
+  (h/sql "CREATE SEQUENCE CMR_SERVICE_ASSOCIATIONS_SEQ"))
+
+(defn up
+  "Migrates the database up to version 65."
+  []
+  (println "migrations.065-add-service-associations-table up...")
+  (create-service-associations-table)
+  (create-service-associations-indices)
+  (create-service-associations-sequence))
+
+(defn down
+  "Migrates the database down from version 65."
+  []
+  (println "migrations.065-add-service-associations-table down...")
+  (h/sql "DROP SEQUENCE METADATA_DB.CMR_SERVICE_ASSOCIATIONS_SEQ")
+  (h/sql "DROP TABLE METADATA_DB.CMR_SERVICE_ASSOCIATIONS"))


Zenbakirik ez

Zenbakirik ez

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


Add example Waves.

Add example Waves.

error: pathspec 'src/cljs/quil_site/examples/waves.cljs' did not match any file(s) known to git

--- src/cljs/quil_site/examples/waves.cljs
+++ src/cljs/quil_site/examples/waves.cljs
@@ -0,0 +1,50 @@
+(ns quil-site.examples.emerald
+  (:require [quil.core :as q :include-macros true]
+            quil-site.main ;DELETE
+  ))
+
+(defn setup []
+  (q/frame-rate 30))
+
+(defn t []
+  (* 0.001 (q/millis)))
+
+(defn calc-y [x mid amp]
+  (+ mid (* (q/sin (+ (t) x)) amp)))
+
+(defn wave [step mid-y amp]
+  (let [w (q/width)
+        h (q/height)
+        mult (q/map-range w
+                          700 200
+                          0.01 0.03)]
+    (q/begin-shape)
+    (q/vertex 0 h) ; lower left corner
+    (doseq [x (range (- w) (+ step w) step)]
+      (let [t (* x mult)
+            y (calc-y t mid-y amp)]
+        (q/vertex x y)))
+    (q/vertex w h) ; lower right corner
+    (q/end-shape)))
+
+(defn draw []
+  (q/background 250)
+  (q/stroke 255 250)
+  (q/fill 50 230 (+ (* 20 (q/sin (t))) 230) 40)
+  (let [h (q/height)
+        move-down (/ h 5)
+        amp (/ h 8)]
+    (doseq [y (range move-down (+ amp h) 8)]
+      (let [x-step (- (* y 0.8) move-down)]
+        (wave x-step y amp)))))
+
+(defn run-sketch [host size] ;DELETE
+(q/sketch
+   :host host
+   :size [size size]
+   :setup setup
+   :draw draw)
+) ;DELETE
+
+(quil-site.main/register-example! "waves" "Erik Svedäng" run-sketch :interactive? false) ;DELETE
+


Remove usage of mod

Remove usage of mod

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


WIP notify-team

WIP notify-team

error: pathspec 'src/polismath/meta/notify.clj' did not match any file(s) known to git

--- src/polismath/meta/notify.clj
+++ src/polismath/meta/notify.clj
@@ -0,0 +1,36 @@
+;; Copyright (C) 2012-present, Polis Technology Inc. This program is free software: you can redistribute it and/or  modify it under the terms of the GNU Affero General Public License, version 3, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+(ns polismath.meta.notify
+  (:require [clj-http.client :as client]))
+
+
+;; Keep track of the type of notifications sent, and when they were sent, so you can avoid spamming.
+;; Maps from error code to time last sent in millis.
+(def team-notifications (atom {}))
+
+
+(defn send-team-notification [subject body]
+  (try
+    (let [darwin-config (-> darwin :config)
+          response (client/post (str (:webserver-url darwin-config) "/notifyTeam")
+                       {:form-params {:webserver_username (:webserver-username darwin-config)
+                                      :webserver_pass (:webserver-pass darwin-config)
+                                      :subject subject
+                                      :body body}
+                        :content-type :json
+                        :throw-entire-message? true})]
+      (log/info "notifyTeam response:\n" (with-out-str (clojure.pprint/pprint response))))
+    (catch Exception e
+      (log/error e "failed to notifyTeam:\n"))))
+
+(defn notify-team [error-code subject body]
+  (let [now (quot (System/currentTimeMillis) 1000)
+        min-wait (* 60 60 1000)]
+    (if (or
+          (not (contains? team-notifications error-code))
+          (>= now (+ min-wait (get team-notifications error-code))))
+      (do
+        (send-team-notification subject body)
+        (swap! team-notifications (fn [old] (assoc old error-code now)))))))
+
+:ok


Added comment.s

Added comment.s

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/inchingforward/eon.git/'


progressing on sql query builder

progressing on sql query builder

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/skprasadu/crud-ui-framework.git/'


Fix test

Fix test

--- test/clojars/test/unit/promote.clj
+++ test/clojars/test/unit/promote.clj
@@ -56,5 +56,5 @@
   (db/add-user "test@ex.com" "testuser" "password" "asdf"
                (slurp "test-resources/pubring.gpg"))
   (db/add-member "robert" "testuser")
-  (is (= ["data/test_repo/robert/hooke/1.1.2/hooke-1.1.2.jar is not signed."]
+  (is (= ["Could not verify signature of data/test_repo/robert/hooke/1.1.2/hooke-1.1.2.jar. Ensure your public key is in your profile."]
          (blockers {:group "robert" :name "hooke" :version "1.1.2"}))))


First part of cards tests

First part of cards tests

error: pathspec 'test/skat/cards-test.clj' did not match any file(s) known to git

--- test/skat/cards-test.clj
+++ test/skat/cards-test.clj
@@ -0,0 +1,52 @@
+(ns skat.cards-test
+  (:require [clojure.test :refer :all]
+            [skat.cards :refer :all]))
+
+(def c1 (skat.cards.Card. :kreuz :W))
+(def c2 (skat.cards.Card. :kreuz :K))
+(def c3 (skat.cards.Card. :schell :W))
+(def c4 (skat.cards.Card. :schell :K))
+
+(deftest property-matches?-test
+  (testing "checks Cards's property"
+    (is (property-matches? :color :kreuz c1))
+    (is (property-matches? :figure :W c1))))
+
+(deftest compare-by-color-normal-test
+  (testing "puts :W before other cards"
+    (is (pos? (compare-by-color-normal c1 c2)))
+    (is (pos? (compare-by-color-normal c3 c2)))
+    (is (pos? (compare-by-color-normal c2 c4)))))
+
+(deftest compare-by-color-null-test
+  (testing "compare only by colors"
+    (is (zero? (compare-by-color-null c1 c2)))
+    (is (neg? (compare-by-color-null c3 c2)))
+    (is (pos? (compare-by-color-null c2 c4)))))
+
+(deftest compare-by-figure-normal-test
+  (testing "puts :W before other cards"
+    (is (pos? (compare-by-figure-normal c1 c2)))
+    (is (pos? (compare-by-figure-normal c3 c2)))
+    (is (zero? (compare-by-figure-normal c2 c4)))))
+
+(deftest compare-by-figure-null-test
+  (testing "puts :W before other cards"
+    (is (neg? (compare-by-figure-null c1 c2)))
+    (is (neg? (compare-by-figure-null c3 c2)))
+    (is (zero? (compare-by-figure-null c2 c4)))))
+
+(deftest compare-for-sort-test
+  (testing "composes color and figure comparison"
+    (let [compare-for-sort-normal
+            (compare-for-sort compare-by-color-normal compare-by-figure-normal)
+          compare-for-sort-null
+            (compare-for-sort compare-by-color-null compare-by-figure-null)]
+      (is (pos? (compare-for-sort-normal c1 c2)))
+      (is (pos? (compare-for-sort-normal c3 c2)))
+      (is (neg? (compare-for-sort-normal c2 c3)))
+      (is (neg? (compare-for-sort-null c1 c2)))
+      (is (neg? (compare-for-sort-null c3 c2)))
+      (is (pos? (compare-for-sort-null c2 c3))))))
+
+(compare-by-color-normal-test)


Conditional requests enabled on manual

Conditional requests enabled on manual

--- dev/src/yada/dev/manual.clj
+++ dev/src/yada/dev/manual.clj
@@ -67,6 +67,7 @@
     (let [engine (Asciidoctor$Factory/create)
           _ (register-docinfo-processor! engine)
           ]
+      (assert fl)
       (.convertFile
        engine fl
        (..
@@ -136,6 +137,7 @@
                          (let [imgdir (io/file "doc")
                                fl (io/file imgdir (-> ctx :request :path-info))]
                            {:exists? (.exists fl)
+                            :last-modified (.lastModified fl)
                             ::file fl}))
            :produces (fn [ctx] (ext-mime-type (.getName (-> ctx :properties ::file))))
            :methods
@@ -150,11 +152,17 @@
     [["/manual/index.html"]
      (resource
       {:id ::manual
+       :properties
+       (fn [ctx]
+         (let [fl (io/file "doc" "yada-manual.adoc")]
+           {:exists? true
+            :last-modified (apply max (map #(.lastModified %) (filter #(.isFile %) (file-seq (io/file "doc")))))
+            ::file fl}))
        :methods
        {:get
         {:produces {:media-type "text/html" :charset "UTF-8"}
-         :response (asciidoc->html (io/file "doc" "yada-manual.adoc")
-                                   {:toc true})}}})]
+         :response (fn [ctx]
+                     (asciidoc->html (-> ctx :properties ::file) {:toc true}))}}})]

     [["/index.html"]
      (resource
@@ -162,8 +170,7 @@
        :methods
        {:get
         {:produces {:media-type "text/html" :charset "UTF-8"}
-         :response (asciidoc->html (io/file "doc" "index.adoc")
-                                   {})}}})]
+         :response (asciidoc->html (io/file "doc" "index.adoc") {})}}})]

     ["/adoc/"
      (as-resource


removing second manual trigger in todopipeline that was there only because the build reset itself immediately after it finished so we never saw the last step finish

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


outer join examples

outer join examples

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

--- doc-examples/outer_join.clj
+++ doc-examples/outer_join.clj
@@ -0,0 +1,43 @@
+;   Copyright (c) Cognitect, Inc. All rights reserved.
+;   The use and distribution terms for this software are covered by the
+;   Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
+;   which can be found in the file epl-v10.html at the root of this distribution.
+;   By using this software in any fashion, you are agreeing to be bound by
+;   the terms of this license.
+;   You must not remove this notice, or any other, from this software.
+
+;; sample data at https://github.com/Datomic/mbrainz-importer
+
+(require '[datomic.client.api :as d])
+
+(def client (d/client {:server-type :dev-local :system "examples"}))
+(def conn (d/connect client {:db-name "mbrainz-1968-1973"}))
+(def db (d/db conn))
+
+;; This query will find only artists that have both a name and a start year:
+(d/q '[:find ?name ?year
+       :where
+       [?e :artist/name ?name]
+       [?e :artist/startYear ?year]]
+     db)
+
+;; What if you want all artists, regardless of whether they have a start year?
+;; In SQL you might use an outer join.
+;; In Datomic, you can query for the artists, and pull the details.
+;; This separation allows you to reuse 'find' and 'detail' logic independently.
+(def find-expr '[:find (pull ?e details-expr)
+                 :in $ details-expr
+                 :where [?e :artist/name]])
+(def details-expr [:artist/name :artist/startYear])
+(d/q find-expr db details-expr)
+
+;; Or, if you really like rectangular SQL-ish results, you can use the get-else
+;; query function to handle optional columns, returning a default value when no
+;; value is present:
+(d/q '[:find ?e ?name ?year
+       :where
+       [?e :artist/name ?name]
+       [(get-else $ ?e :artist/startYear "Unknown") ?year]]
+     db)
+
+


Removed reference to Google Docs comment

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


client: KNF

client: KNF

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/pyr/bundes.git/'


Bikeshed cleanup

Bikeshed cleanup

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


[WM] update clojure to 1.7.0 release

[WM] update clojure to 1.7.0 release

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


Call it 0.12.0.

Call it 0.12.0.

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject clojars-web "0.11.3-SNAPSHOT"
+(defproject clojars-web "0.12.0"
   :dependencies [[org.clojure/clojure "1.4.0"]
                  [org.clojure/tools.cli "0.2.1"]
                  [org.apache.maven/maven-model "3.0.4"


Version 90-SNAPSHOT

Version 90-SNAPSHOT

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


bump to 0.1.10-SNAPSHOT

bump to 0.1.10-SNAPSHOT

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


fixing group

fixing group

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/narkisr/cloujsearch.git/'


Exclude org.clojure/clojure from midje.

Exclude org.clojure/clojure from midje.

Also update marginalia to latest versions, no longer transitively fetches old clojure contrib.

--- project.clj
+++ project.clj
@@ -2,7 +2,9 @@
   :description "RuuviTracker server"
   :min-lein-version "2.0.0"
   :plugins [[lein-ring "0.7.3"]
-            [lein-midje "2.0.0-SNAPSHOT"]]
+            [lein-midje "2.0.0-SNAPSHOT"]
+            [lein-marginalia "0.7.1"]
+            ]
   :dependencies [[org.clojure/clojure "1.4.0"]
                  [compojure "1.1.0"]
                  [ring-json-params "0.1.3"]
@@ -32,7 +34,11 @@
          :init ruuvi-server.core/ring-init,
          :destroy ruuvi-server.core/ring-destroy}
   :profiles {:dev
-             {:dependencies [[midje "1.4.0"] [marginalia "0.3.2"]]}}
+             {:dependencies
+              [
+               [midje "1.4.0" :exclusions [org.clojure/clojure]]
+               [marginalia "0.7.1"]
+               ]}}
   :aot [ruuvi-server.standalone.starter]
   :main ruuvi-server.standalone.starter
   )


bump version

bump version

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/Yleisradio/rabid.git/'


Updated project.clj

Updated project.clj

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject clj-http "0.1.3"
+(defproject com.zacharykim/clj-http "0.1.4"
   :description
     "A Clojure HTTP library wrapping the Apache HttpComponents client."
   :dependencies


Version 0.5.3-SNAPSHOT

Version 0.5.3-SNAPSHOT

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject sablono "0.5.2"
+(defproject sablono "0.5.3-SNAPSHOT"
   :description "Lisp style templating for Facebook's React."
   :url "http://github.com/r0man/sablono"
   :author "r0man"


Releasing 0.8.1

Releasing 0.8.1


Fix version range for cljx

Fix version range for cljx

--- project.clj
+++ project.clj
@@ -13,7 +13,7 @@
   :profiles {:dev {:dependencies [[reagent "0.4.2"]
                                   [crate "0.2.5"]
                                   [prismatic/dommy "0.1.2"]]
-                   :plugins [[com.keminglabs/cljx "0.4.0"]
+                   :plugins [[com.keminglabs/cljx "0.4.0" :exclusions [org.clojure/clojure]]
                              [com.cemerick/austin "0.1.4"]
                              [com.cemerick/clojurescript.test "0.3.1"]
                              [lein-cljsbuild "1.0.3"]]


lets not download all the clojures

lets not download all the clojures

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


chore(core): update core version to 3.2.0 (#147)

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


Version 1.3.1-SNAPSHOT

Version 1.3.1-SNAPSHOT

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


Changed postgress driver

Changed postgress 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/amedw/mud-server.git/'


[WM EN] WIP on making imports symmetrical w/ exports

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


remove incanter dependency

remove incanter dependency

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/altamiracorp/honeycomb.git/'


Small tweaks to time

Small tweaks to time

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


added first constraint

added first constraint

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

--- infant/src/infant/constraint/constraint.clj
+++ infant/src/infant/constraint/constraint.clj
@@ -0,0 +1,26 @@
+(ns infant.constraint.constraint
+  (:require [infant.spec.spec :as sp]))
+
+
+(defprotocol Satisfiable
+  (satisfied? []))
+
+(defrecord Constraint
+  [name description properties strict satisfy-fn]
+  Satisfiable
+  (satisfied? []
+    (satisfy-fn)))
+
+(def field-constraints #{
+                         ->Constraint
+                         "aggregate-op-supported-by-type"
+                         "Aggregate function should be supported by data type."
+                         #{::sp/type, ::sp/aggregate}
+                         true
+                         (fn [field]
+                           (if (::sp/aggregate field)
+                             (and (not= (::sp/type field)
+                                        (::sp/ordinal))
+                                  (not= (::sp/type field)
+                                        (::sp/nominal)))
+                             true))})


client: better test data

client: better test data


Solve Average 2 in clojure

Solve Average 2 in clojure

error: pathspec 'solutions/uri/1006/1006.clj' did not match any file(s) known to git

--- solutions/uri/1006/1006.clj
+++ solutions/uri/1006/1006.clj
@@ -0,0 +1,9 @@
+(ns main)
+
+(defn main []
+  (let [a (Double/parseDouble (read-line))
+        b (Double/parseDouble (read-line))
+        c (Double/parseDouble (read-line))]
+    (format "%.1f" (/ (+ (* a 2.0) (* b 3.0) (* c 5.0)) 10.0))))
+
+(println "MEDIA =" (main))


add draft protocol for resources

add draft protocol for resources

error: pathspec 'ssclj/jar/src/com/sixsq/slipstream/ssclj/resources/common/resource_protocols.clj' did not match any file(s) known to git

--- ssclj/jar/src/com/sixsq/slipstream/ssclj/resources/common/resource_protocols.clj
+++ ssclj/jar/src/com/sixsq/slipstream/ssclj/resources/common/resource_protocols.clj
@@ -0,0 +1,180 @@
+(ns com.sixsq.slipstream.ssclj.resources.common.resource-protocols)
+
+;;
+;; Currently the dynamic loading of a resource depends on the existence (or
+;; absence) of particular vars.
+;;
+;; When grouping the functionality into one or more protocols, there will
+;; still need to be a "magic" function or var within the resource's namespace
+;; that acts as a hook to pull the resource into the web application.
+;;
+;; Two alternatives are:
+;;
+;;   * A no-arg function that reifies an instance of the resource or
+;;   * A var (probably using delay) that contains a singleton instance.
+;;
+;; The name of the function/var would have to be defined by convention.
+;;
+
+;;
+;; Common implementations of functions are currently put into a separate
+;; namespace and then referenced explicitly from the resource implementations.
+;; Probably it will make sense to continue doing this when switching to
+;; protocols, but there is also the possibility of extending Object with the
+;; default implementations to avoid having to make explicit references in
+;; every resource definition.
+;;
+
+(defprotocol IResource
+  "Collection of functions to be implemented by a web resource"
+
+  ;;
+  ;; These functions are currently implemented as compile-time constants
+  ;; The code that dynamically loads the resources, checks for the existence
+  ;; of these constants when "linking" the resource into the web application
+  ;; routing.  The constants are also use when generating the resource
+  ;; representations.
+  ;;
+  ;; These resources could be replaced with conventions that generate the
+  ;; necessary values from the last element of the resource's namespace.
+  ;; E.g. from the 'com.sixsq.slipstream.ssclj.resources.connector-template'
+  ;; namespace, the following values could be inferred:
+  ;;
+  ;;  * resource-name = 'ConnectorTemplate'
+  ;;  * collection-name = 'ConnectorTemplateCollection'
+  ;;  * resource-url = 'connector-template'
+  ;;  * resource-tag = 'ConnectorTemplates'
+  ;;  * resource-uri = '<prefix>/ConnectorTemplate'
+  ;;  * collection-uri = '<prefix>/ConnectorTemplateCollection'
+  ;;
+  ;; If convention is used, then special cases may need to be taken care of
+  ;; for irregular plural forms or for cases like the CloudEntryPoint where
+  ;; there is no associated collection.
+  ;;
+  (resource-name [_]
+    "Provides the Pascal-case name of the resource (e.g. ConnectorTemplate).
+     This is used in the XML representation of the resource and in the type
+     URI.")
+  (collection-name [_]
+    "Provides the Pascal-case name of the collection for this resource. This
+     is usually just the resource name of the resource with 'Collection'
+     appended (e.g. ConnectorTemplateCollection). Not all resources have an
+     associated collection (e.g. CloudEntryPoint).")
+  (resource-url [_]
+    "Provides the relative URL for the resource/collection on the server using
+     kebab-case (e.g. 'connector-template' for the 'ConnectorTemplate'
+     resource.")
+  (resource-tag [_]
+    "Provides the name of the key (in Pascal-case) used in the CloudEntryPoint
+     and in the collection representation for this resource. This is the plural
+     form of the resource name (e.g. 'ConnectorTemplates' for the
+     'ConnectorTemplate' resource.")
+  (resource-uri [_]
+    "Provides the unique URI that identifies the type of this resource. This
+     is the resource name with a given URI prefix prepended. For CIMI
+     resources, the URI prefix is that defined in the standard. For
+     non-standard resource, any unique URI prefix can be used. (E.g.
+     'http://slipstream.sixsq.com/schema/1/ConnectorTemplate')")
+  (collection-uri [_]
+    "Provides the unique URI that identifies the type of this resource. This
+     is the collection name with a given URI prefix prepended. For CIMI
+     resources, the URI prefix is that defined in the standard. For
+     non-standard resource, any unique URI prefix can be used. (E.g.
+     'http://slipstream.sixsq.com/schema/1/ConnectorTemplateCollection')")
+
+  ;;
+  ;; This provides the list of (compojure) routes for this resource.  Currently
+  ;; because multimethods that route on the resource-name, resources that follow
+  ;; the pattern 'resource-name/UUID/action', do not define this var.  For a
+  ;; protocol implementation, all resources will have to define their routes
+  ;; explicitly.
+  ;;
+  ;; Routing is currently done with compojure, but alternatives, such as bidi,
+  ;; which uses a data representation for routes, may be better for the case
+  ;; where the routes are returned by a function rather than pulled from a var.
+  ;;
+  (routes [_]
+    "Provides the list of (compojure) routes for this resource.")
+
+  ;;
+  ;; Performs any initialization required by the resource.  For example,
+  ;; ensuring that particular templates exist in the database.
+  ;;
+  (initialize [_]
+    "Performs any initialization required by the resource, such as creating a
+     singleton instance or registering templates for the resource. This should
+     be a no-op, if no initialization is needed.")
+
+  ;;
+  ;; All of the SCRUD-related actions take an argument (usually a ring request)
+  ;; and return a JSON ring response.  When errors occur, exceptions should be raised
+  ;; with a map containing a relevant message, HTTP status code, and the resource
+  ;; that was concerned.
+  ;;
+  (query [_ request]
+    "Uses the information in the given ring request to return a list of
+     resources satisfying the specified criteria. This may be limited with the
+     CIMI range parameters or CIMI filters. Associated with HTTP POST requests.")
+  (add [_ request]
+    "Takes the information in the given ring request and creates a new
+     instance of this resource. If the resource already exists, then this
+     function must raise an exception with a relevant HTTP status code.
+     Associated with HTTP POST requests.")
+  (retrieve-by-id [_ resource-id]
+    "Retrieves a given resource instance associated with the given, unique
+     resource ID. Associated with HTTP GET requests.")
+  (retrieve [_ request]
+    "Retrieves a given resource instance based on the information in the ring
+     request. This is a convenience method that will extract the resource ID
+     from the request and call the retrieve-by-id function. Associated with
+     HTTP GET requests.")
+  (edit [_ request]
+    "Updates a particular resource instance identified through the request
+     with the updated information in the request. If the resource does not
+     exist, then this function must throw an exception. Associated with HTTP
+     PUT requests.")
+  (delete [_ request]
+    "Deletes a particular resource instance identified by the request. If the
+     resource does not exist, then the function must throw an exception as well
+     as when the resource could not be deleted (e.g. because of lack of
+     authorization).")
+
+  ;;
+  ;; CIMI allows resources to have specialized actions in addition to the standard
+  ;; SCRUD actions (e.g. suspending a VM).  This method is the entry point for
+  ;; performing those actions.
+  ;;
+  (do-action [_ request]
+    "Perform a specific action related to the resource. The available actions
+     and the semantics of those actions are defined by the resource itself.")
+
+  ;;
+  ;; Validates the resource against the defined schema.  It may make sense to
+  ;; expose the schema itself to allow for a generalized implementation of this
+  ;; function.
+  ;;
+  (validate [_ resource]
+    "Validates the given resource against the defined schema for the resource.
+     If the resource is not valid, then an exception must be thrown. If the
+     resource is valid, then the function must simply return the resource
+     itself.")
+
+  ;;
+  ;; These utility functions allow the standard SCRUD (and other functions) to
+  ;; be generic. These are not intended to be used by clients of the protocol and
+  ;; perhaps should be split into a separate protocol.
+  ;;
+  (new-identifier [_ json resource-name]
+    "Generates a unique, unused identifier for the given resource. This
+     normally just returns a random UUID with the resource name prepended.
+     However, some resources may follow a different semantic where the
+     identifier will depend on the contents of the resource.")
+  (set-operations [_ resource]
+    "Adds or updates the operations available for the given resource based on
+     the user's authorizations and the type of resource.")
+  (add-acl [_ json request]
+    "Adds the ACL for the resource, potentially based on the user's identity
+     or authorizations.")
+
+  )
+


add new analytics namespace

add new analytics namespace

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

--- src/clj/ceres/analytics.clj
+++ src/clj/ceres/analytics.clj
@@ -0,0 +1,18 @@
+(ns ceres.analytics
+  (:refer-clojure :exclude [find sort])
+  (:require [ceres.collector :refer [db]]
+            [monger.collection :as mc]
+            [clj-time.core :as t]
+            [clj-time.periodic :as p]
+            [monger.operators :refer :all]
+            [monger.query :refer :all]))
+
+
+(def degrees
+  (future
+    (->> (mc/find-maps @db "publications")
+         (pmap
+          (fn [p]
+            [(:_id p)
+             (+ (mc/count @db "reactions" {:publication (:_id p)})
+                (mc/count @db "reactions" {:source (:_id p)}))])))))


rev type signature

rev type signature

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


Add link component

Add link component

error: pathspec 'src/trak/ui/components.cljs' did not match any file(s) known to git

--- src/trak/ui/components.cljs
+++ src/trak/ui/components.cljs
@@ -0,0 +1,91 @@
+(ns trak.ui.components
+  (:require [rum.core :as rum]
+            [trak.routes :as routes]))
+
+
+;; spectre.css panel
+
+(rum/defc panel-header [content]
+  [:div.panel-header content])
+
+(rum/defc panel [content]
+  [:div.panel content])
+
+;;
+;; a routable navigating link
+;;
+
+;(defcard-doc
+;  "##Overview
+;
+;   ### Links
+;
+;   ```
+;   (link props text)
+;   ```
+;
+;   Props are regular props you would pass to `[:a]`.
+;
+;   - if `{:on-click some-fn}` is passed, this `some-fn` will be called.
+;     **Note**: `some-fn` will have to handle the event itself
+;   - if a modifier key is pressed, or a click is anything but left-click,
+;     the link will behave as a regular browser link (Cmd+click will open a new
+;     browser tab etc.)
+;   - if `{:href \"/some/path\"}` *does not* match a path configured in `routes.cljs`,
+;     the link will behave as a regular browser link
+;   - if `{:href \"/some/path\"}` matches a path configured in `routes.cljs`, it will:
+;      - set the path in the browser (`history.pushState`)
+;      - will *not* reload the page
+;      - will dispatch a proper path to *bidi*
+;
+;   #### Caveats
+;
+;   This is wrong:
+;
+;   ```
+;     (link.class1 props text)
+;     [link.class1 props text]
+;     [link props text]
+;   ```
+;
+;   `link` is just a Rum component, so you'll need to:
+;
+;   ```
+;     (link {:class-name \"class1\"} text)
+;     (link {:class-name \"class1\"} text)
+;     (link props text)
+;   ```
+;   "
+;  )
+
+(defn- is-not-left-click [e]
+  (not (= 0 (.-button e))))
+
+(defn- is-modified [e]
+  (or (.-metaKey e) (.-altKey e) (.-ctrlKey e) (.-shiftKey e)))
+
+(defn- create-onclick-handler [props]
+  (partial (fn [e]
+             (cond
+               ; Instead of letting the `<a>` element handle onClick, do it here
+               (not (= nil (:on-click props))) ((:on-click props) e)
+               ; Don't navigate if custom :on-click called e.preventDefault()
+               (= true (.-defaultPrevented e)) nil
+               ; If target prop is set (e.g. to "_blank"), let browser handle link.
+               (not (= nil (:target props))) nil
+               ; The browser will generally only navigate when the user left clicks.
+               ; Right clicks or modified clicks have other behaviors, so leave
+               ; these behaviors to the browser.
+               (or (is-not-left-click e) (is-modified e)) nil
+               ; handle it ourselves
+               :else (routes/navigate (:href props) e)
+               ))))
+
+;
+; Usage example
+;
+;   (link {:href "/a/b/c" :class-name ".btn .btn-primary"} "Click!")
+;
+(rum/defc link [props children]
+  (let [proper-props (merge props {:on-click (create-onclick-handler props)})]
+    [:a proper-props children]))


simple render

simple render

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/pyr/bundes.git/'


hook in cover letter rendering

hook in cover letter rendering

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


4clojure:: insert-in-between if predicate func-tmp6

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

--- src/clojure_learning/tmp6.clj
+++ src/clojure_learning/tmp6.clj
@@ -0,0 +1,90 @@
+(ns tmp6
+  (:use clojure.repl))
+
+;; Insert between two items
+;; Difficulty:	Medium
+;; Topics: seqs core-functions
+;; Write a function that takes a two-argument predicate, a value, and a collection;
+;; and returns a new collection where the value is inserted between every two items that satisfy the predicate.
+;; (= '(1 :less 6 :less 7 4 3) (__ < :less [1 6 7 4 3]))
+;; (= '(2) (__ > :more [2]))
+;; (= [0 1 :x 2 :x 3 :x 4]  (__ #(and (pos? %) (< % %2)) :x (range 5)))
+
+;; 1st version using HOFs:
+(defn into-if-predicate
+  [predicate insertion xs]
+  (if-let [[head & tail] (seq xs)]
+    (reduce
+       (fn [acc x]
+         (if (predicate (last acc) x)
+           (conj acc insertion x)
+           (conj acc x)))
+       [head] tail)
+    []))
+
+(into-if-predicate < :less [1 6 7 4 3]) ;; [1 :less 6 :less 7 4 3] -> OK
+
+;; 2nd version using low-level recursion
+(defn into-if-predicate
+  [predicate insertion xs]
+  (loop [[head secnd & tail] xs
+         acc []]
+    (if (nil? head) acc
+      (if (nil? secnd)
+        (conj acc head)
+        (if (predicate head secnd)
+          (recur (cons secnd tail) (conj acc head insertion))
+          (recur (cons secnd tail) (conj acc head)))))))
+
+(into-if-predicate < :less [1 6 7 4 3]) ;; -> [1 :less 6 :less 7 4 3]
+(into-if-predicate < :more [2]) ;; -> [2]
+(into-if-predicate #(and (pos? %) (< % %2)) :x (range 5)) ;; -> [0 1 : x 2 :x 3 :x 4]
+(into-if-predicate > :more ())
+
+;; absolute test :)
+(take 12 (->> [0 1]
+                 (iterate (fn [[a b]] [b (+ a b)]))
+                 (map first) ; fibonacci numbers
+                 (into-if-predicate (fn [a b] ; both even or both odd
+                       (= (mod a 2) (mod b 2)))
+                     :same)))
+;; FAILS WITH --> ArithmeticException: IntegerOverflow
+
+;; last test fails due to IntegerOverflow exception -> means realized + eager evaluation
+;; for this reason: [reduce] fails because it realizes all the collection while yielding the result
+;; Solution is to build a lazy-seq and to accumulate in that lazy-seq
+;; (that's the reason why: take 12 is placed :)
+
+;; 3rd version! using purely lazy-seq -> that yields a lazy-seq
+(defn into-if-predicate
+  [predicate insertion xs]
+   (lazy-seq
+      (if (nil? (first xs)) []
+        (if (nil? (second xs)) [(first xs)]
+          (if (predicate (first xs) (second xs))
+            (lazy-cat [(first xs) insertion] (into-if-predicate predicate insertion (rest xs)))
+            (cons (first xs) (into-if-predicate predicate insertion (rest xs))))))))
+
+(into-if-predicate < :less [1 6 7 4 3]) ;; -> (1 :less 6 :less 7 4 3)
+(class (into-if-predicate < :less [1 6 7 4 3])) ;; -> clojure.lang.LazySeq -> OK!
+(into-if-predicate < :more [2]) ;; -> (2)
+(into-if-predicate #(and (pos? %) (< % %2)) :x (range 5)) ;; -> (0 1 : x 2 :x 3 :x 4)
+
+;; refactoring the function to use args-destructuring instead, of programmatically handle:
+;; first + second funcs
+(defn into-if-predicate
+  [predicate insertion [head secnd & tail]]
+   (lazy-seq
+      (if (nil? head) []
+        (if (nil? secnd) [head]
+          (if (predicate head secnd)
+            (lazy-cat [head insertion] (into-if-predicate predicate insertion (cons secnd tail)))
+            (cons head (into-if-predicate predicate insertion (cons secnd tail))))))))
+
+(take 12 (->> [0 1]
+                 (iterate (fn [[a b]] [b (+ a b)]))
+                 (map first) ; fibonacci numbers
+                 (into-if-predicate (fn [a b] ; both even or both odd
+                       (= (mod a 2) (mod b 2)))
+                     :same)))
+;; (0 1 :same 1 2 3 :same 5 8 13 :same 21) --> COOL :)


use noirs latest email regex

use noirs latest email regex


Create ioframes.clj

Create ioframes.clj

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

--- src/iyye/bios/ioframes.clj
+++ src/iyye/bios/ioframes.clj
@@ -0,0 +1,40 @@
+; Iyye - AI agent
+; Copyright (C) 2016-2017  Sasha Yumzya
+
+; This program is free software: you can redistribute it and/or modify
+; it under the terms of the GNU Affero General Public License as
+; published by the Free Software Foundation, either version 3 of the
+; License, or (at your option) any later version.
+
+; This program is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+; GNU Affero General Public License for more details.
+
+; You should have received a copy of the GNU Affero General Public License
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+(ns iyye.bios.ioframes
+  (:require
+    [clojure.tools.logging :as log]
+    [iyye.bios.persistence :as persistence]
+    [iyye.bios.resource :as resource]))
+
+(defrecord InputSources [start-function input-listeners-list])
+(defn create-InputSources [start-function input-listeners-list] (InputSources. start-function input-listeners-list))
+(defrecord OutputActuators [start-function outputs-list])
+
+(defrecord IO [name start-function inputs-list outputs-list])
+
+(defn create-IO [name start-fumction inputs-list outputs-list] (IO. name start-fumction inputs-list outputs-list))
+
+(defn process-input [IO input]
+  (log/info (str "in: " (:name IO) input))
+  (dorun (map #(% IO input) (:input-listeners-list (:inputs-list IO))))
+  (persistence/write-io-to-db @resource/num-days IO :input input))
+
+(defn process-output [IO output]
+  (log/info (str "out:" (:name IO) output))
+  (dorun (map #(% IO output) (:outputs-list (:outputs-list IO))))
+  (persistence/write-io-to-db @resource/num-days IO :output output))
+


[DG] Removed unnecessary destructuring

[DG] Removed unnecessary destructuring

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


Revert "added auxiliary dex options"

Revert "added auxiliary dex options"

This reverts commit f7d76087d0d9d084149655eb7c12e9a500b445c9.
I totally forgot there is already `dex-opts` option for this.

--- src/leiningen/droid/build.clj
+++ src/leiningen/droid/build.clj
@@ -30,14 +30,13 @@
   "Run dex on the given target which should be either directory with .class
 files or jar file, e.g. one produced by proguard."
   [{{:keys [sdk-path out-dex-path external-classes-paths
-            force-dex-optimize dex-opts dex-aux-opts]} :android,
+            force-dex-optimize dex-opts]} :android,
             resource-paths :resource-paths,
             :as project}
    target]
   (ensure-paths sdk-path)
   (let [dx-bin (sdk-binary sdk-path :dx)
         options (or dex-opts [])
-        aux-options (or dex-aux-opts [])
         no-optimize (if (and (not force-dex-optimize) (dev-build? project))
                       "--no-optimize" [])
         annotations (str sdk-path "/tools/support/annotations.jar")
@@ -47,7 +46,6 @@
                                         resource-paths)]
     (with-process [proc (map str
                              (flatten [dx-bin options "--dex" no-optimize
-                                       aux-options
                                        "--output" out-dex-path
                                        target annotations deps
                                        external-paths


Lookup partner by domain or alternate hostname

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


[DG] Finished handling for the turbovote signup notificaiton


Add transit test.

Add transit test.

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

--- test/kabel/transit_test.clj
+++ test/kabel/transit_test.clj
@@ -0,0 +1,22 @@
+(ns kabel.transit-test
+  (:require [clojure.test :refer :all]
+            [kabel.client :as cli]
+            [kabel.http-kit :as http-kit]
+            [kabel.peer :as peer]
+            [superv.async :refer [<?? go-try S go-loop-try <? >? put?]]
+            [clojure.core.async :refer [timeout go go-loop <! >! <!! put! chan]]
+            [kabel.middleware.transit :refer [transit]]))
+
+(deftest transit-test
+  (testing "Checking some simple transit encoding in both directions."
+    (let [in (chan)
+          out (chan)
+          [_ _ [tin tout]] (transit [S nil [in out]])]
+      (put? S tout [1 :transit "string"])
+      (is (= (vec (<?? S out))
+             [91 49 44 34 126 58 116 114 97 110 115 105
+              116 34 44 34 115 116 114 105 110 103 34 93]))
+      (put? S in (byte-array [91 49 44 34 126 58 116 114 97 110 115 105
+                              116 34 44 34 115 116 114 105 110 103 34 93]))
+      (is (= (<?? S tin) [1 :transit "string"])))))
+


lib.zerol.engine-test - Fixed duplicated apply-changes test and merge both together

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/artemyarulin/zerol.git/'


Removed unnecessary (str )s

Removed unnecessary (str )s

--- 2-collectors/clojure-collector/src/com/snowplowanalytics/clojure_collector/responses.clj
+++ 2-collectors/clojure-collector/src/com/snowplowanalytics/clojure_collector/responses.clj
@@ -26,13 +26,13 @@
   "Respond with a 404"
   {:status  404
    :headers {"Content-Type" "text/plain"}
-   :body    (str "404 Not found")})
+   :body    "404 Not found"})

 (def send-200
   "Respond with a 200"
   {:status  200
    :headers {"Content-Type" "text/plain"}
-   :body    (str "OK")})
+   :body    "OK"})

 ; [cookie-id cookie-duration cookie-contents]
 (def send-cookie-and-pixel


Add :resizable option.

Add :resizable option.

--- src/quil/applet.clj
+++ src/quil/applet.clj
@@ -40,7 +40,8 @@
   [applet title renderer]
   (let [m              (meta applet)
         keep-on-top?   (true? (:keep-on-top m))
-        frame          (.frame applet)]
+        frame          (.frame applet)
+        resizable?     (:resizable m)]
     (doseq [listener (.getWindowListeners frame)]
       (.removeWindowListener frame listener))
     (doto frame
@@ -56,7 +57,7 @@
       (.setDefaultCloseOperation JFrame/DO_NOTHING_ON_CLOSE))
     (javax.swing.SwingUtilities/invokeLater
      (fn []
-       (.setResizable frame true)
+       (.setResizable frame resizable?)
        (.setAlwaysOnTop frame keep-on-top?)))
     applet))

@@ -254,6 +255,8 @@
    :keep-on-top    - Sets whether sketch window should always be above other windows.
                      Note: some platforms might not support always-on-top windows.

+   :resizable      - Sets whether sketch is resizable by the user.
+
    :setup          - a fn to be called once when setting the sketch up.

    :draw           - a fn to be repeatedly called at most n times per
@@ -307,6 +310,7 @@
         size              (process-size (:size options))
         title             (or (:title options) (str "Quil " (swap! untitled-applet-id* inc)))
         renderer          (or (:renderer options) :java2d)
+        resizable         (not (false? (:resizable options)))
         draw-fn           (or (:draw options) no-fn)
         setup-fn          (or (:setup options) no-fn)
         safe-draw-fn      (fn []
@@ -331,6 +335,7 @@
                                   :draw-fn draw-fn
                                   :renderer renderer
                                   :size size
+                                  :resizable resizable
                                   :target-frame-rate (atom 60)}
                                  listeners)
         prx-obj           (quil.Applet. applet-state)]


ported a compiler module from gauche

ported a compiler module from gauche

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

--- src/kondo_lisp/compiler.clj
+++ src/kondo_lisp/compiler.clj
@@ -0,0 +1,325 @@
+;; -*- indent-tabs-mode: nil; mode: clojure  -*-
+
+(ns kondo-lisp.compiler
+  (:use [clojure core]
+        [clojure.contrib str-utils pprint]
+	[clj-match])
+  (:require [clojure.walk]
+	    [clojure.contrib str-utils2])
+  )
+
+(def *inst-width* 4)
+
+(def *vm-inst-list*
+     '[(VM_DUMMY nil)
+
+       ;; basic stack and register operation
+       (VM_IVAL lispval)
+       (VM_IVAL_PUSH lispval)
+       (VM_VREF_PUSH lispval-symbol)
+       (VM_PUSH nil)
+       (VM_POP nil)
+
+       ;; control flow
+       (VM_JMP integer)
+       (VM_BIF integer)
+       (VM_BIFN integer)
+       (VM_PUSH_FRAME nil)
+       (VM_FUNCALL lispval)
+
+       ;; lisp namespace operation
+       (VM_BIND lispval-symbol)	;; bind stack-top value to symbol(operand)
+       (VM_UNBIND integer) ;; unbind symbol(operand)
+       (VM_VREF lispval-symbol)	  ;; refer value of symbol(operand)
+       (VM_VSET lispval-symbol)	  ;; overwrite symbol(operand) by %val
+
+       ;; basic arithmetic operation
+       (VM_LT nil)
+       (VM_GT nil)
+       (VM_LE nil)
+       (VM_GE nil)
+       (VM_EQ nil)
+       (VM_PLUS nil)
+       (VM_MINUS nil)
+
+       ;; lisp data operation
+       (VM_CONS nil)	      ;; (cons <stack-top> <%val>)
+       (VM_IVAL_CONS lispval) ;; (cons <stack-top> <immval>)
+       ])
+
+(def *vm-builtin-funs*
+     '[(print-char "print_char")
+       (write "write")
+       (+ "plus")
+       (- "minus")
+       (* "times")
+       (/ "divide")
+       (% "remainder")
+       (eq "eq")
+       (equal "equal")
+       (cons "cons")
+       (list "list")
+
+       (debug-mode "debug_mode")
+
+       ;; arduino builtin function wrappers
+       (pin-mode "pin_mode")
+       (delay "delay")
+       (digital-write "digital_write")
+       (digital-read "digital_read")
+       (analog-reference "analog_reference")
+       (analog-read "analog_read")
+       (analog-write "analog_write")
+       ])
+
+(defn #^{:doc "Convert Short to 2 Bytes (big endian)"}
+  short-to-byte [#^Short short]
+  [(byte (bit-and short 0xFF))
+   (byte (bit-and (bit-shift-right short 8) 0xFF))])
+
+(defn index [pred coll]
+  (defn inner-index [idx pred coll]
+    (if (empty? coll)
+      nil
+      (if (pred (first coll))
+	idx
+	(recur (+ idx 1) pred (rest coll)))))
+  (inner-index 0 pred coll))
+
+(defn #^{:doc "Encode a VM instruction to bytes"}
+  encode-inst [inst]
+  (let [inst-name (unqualify-symbol (first inst)),
+	inst-operand (or (second inst) 0),
+	inst-spec (some (fn [inst-spec] (= inst-name (first inst-spec)))
+			*vm-inst-list*)]
+    (when inst-spec
+      (concat (short-to-byte (index (fn [inst-spec] (= inst-name (first inst-spec)))
+				    *vm-inst-list*))
+	      (short-to-byte inst-operand)))))
+
+(defn
+  bytes-to-short [b1 b2]
+  (bit-or b1 (bit-shift-left b2 8)))
+
+(defn
+  decode-inst [bytes]
+  (if (not (= *inst-width* (count bytes)))
+    nil
+    (let [inst-opcode (bytes-to-short (nth bytes 0) (nth bytes 1)),
+	  inst-operand (bytes-to-short (nth bytes 2) (nth bytes 3))]
+      (if (>= inst-opcode (count *vm-inst-list*))
+	nil
+	(let [inst-spec (nth *vm-inst-list* inst-opcode),
+	      inst-name (first inst-spec)]
+	  (if (second inst-spec)
+	    `(~inst-name ~inst-operand)
+	    `(~inst-name)))))))
+
+(defn assemble [insts]
+  (apply concat (map encode-inst insts)))
+
+(defn disassemble [bytecode]
+  (if (not (= 0 (rem (count bytecode) *inst-width*)))
+    nil
+    (map decode-inst (partition *inst-width* bytecode))))
+
+(defn make-nil []
+  0)
+
+(defn make-t []
+  (bit-or (bit-shift-left 1 13) 1))
+
+(defn encode-char [c]
+  (- (int c) (int \!)))
+
+(defn combine-chars [c1 c2]
+  (let [c1 (encode-char c1),
+	c2 (encode-char c2)]
+    (bit-or
+     (bit-shift-left
+      (bit-or (bit-shift-left c1 6) c2) 1)
+     0x4001)))
+
+(defn make-sym [sym]
+  (cond
+   (and (string? sym)
+	(= 2 (count sym)))
+   (let [sym (clojure.contrib.str-utils2/upper-case sym)]
+     (combine-chars (nth sym 0)
+		    (nth sym 1)))
+   ;;
+   (symbol? sym)	(recur (.toString sym))
+   true
+   (throw (Exception. (str "cannot make sym from " sym)))))
+
+(defn make-num [x]
+  (cond
+   (and (integer? x) (>= x 0))	(bit-or (bit-shift-left x 1) 0x8001)
+   ;;
+   (and (integer? x) (< x 0))	(bit-or (bit-shift-left x 1) 0xc001)
+   true		(throw (Exception. (str "cannot make num from " x)))))
+
+(defn decode-num [x]
+  (bit-or
+   (bit-shift-right (bit-and x 0x7ffe) 1)
+   (if (not (= 0 (bit-and x (bit-shift-left 1 14))))
+     (bit-shift-left 7 13)
+     0)))
+
+(defn decode-sym [x]
+  (let [c1 (byte (+ (int \!) (bit-shift-right (bit-and 0x3ffe x) 7)))
+	c2 (byte (+ (int \!) (bit-shift-right (bit-and 0x7e x) 1)))
+	buf (make-array (. Byte TYPE) 2)]
+    (aset buf 0 c1)
+    (aset buf 1 c2)
+    (String. buf, 0, 2)))
+
+(defn lispval-str [val]
+  (cond
+   (= val (make-nil)) "NIL"
+   (= val (make-t)) "T"
+   (= (bit-and 0x8001 val) 0x8001) (format "%d" (decode-num val))
+   (= (bit-and 0xc001 val) 0x4001) (format "'%s" (decode-sym val))))
+
+(defn unqualify-symbol [sym]
+  (let [sym-ns (namespace sym)]
+    (if sym-ns
+      (symbol (subs (str sym) (+ 1 (count sym-ns))))
+      sym)))
+
+(defn pp-program [insts]
+  (dotimes [i (count insts)]
+    (let [inst (nth insts i),
+	  inst-name (unqualify-symbol (first inst))
+	  inst-spec (some (fn [spec] (and (= inst-name (first spec)) spec))
+			  *vm-inst-list*)
+	  inst-operand (second inst)
+	  inst-operand-type (second inst-spec)]
+      (print (format "%d: (%s" i inst-name))
+      (condp = inst-operand-type
+	    nil (println ")")
+	    'lispval-symbol (println (format " '%s)" (decode-sym inst-operand)))
+	    'lispval (println (format " %s)" (lispval-str inst-operand)))
+	    inst-operand-type (println (format " %d)" inst-operand))
+	    )
+      )))
+
+(declare compile-pass1)
+
+(defn compile-quote [exp]
+  (cond
+   (or (and (coll? exp)
+	    (empty? exp))
+       (= 'nil exp))
+   `((VM_IVAL ~(make-nil)))
+   ;;
+   (or (= 't exp) (= 'T exp))		`((VM_IVAL ~(make-t)))
+   (symbol? exp)			`((VM_IVAL ~(make-sym exp)))
+   (number? exp)			`((VM_IVAL ~(make-num exp)))
+   (coll? exp)				`(~@(compile-quote (first exp))
+					  (VM_PUSH)
+					  ~@(compile-quote (rest exp))
+					  (VM_CONS))
+   ))
+
+(defn compile-let [bindings body]
+  `(~@(apply concat
+       (map (fn [binding]
+	      `(~@(compile-pass1 (second binding))
+		(VM_BIND ~(make-sym (first binding)))))
+	    bindings))
+    ~@(apply concat
+	     (map compile-pass1 body))
+    (VM_UNBIND ~(count bindings))))
+
+(defn builtin-fun-id [fname]
+  (index (fn [pair] (= (first pair) fname))
+	 *vm-builtin-funs*))
+
+(defn compile-funcall [fname args]
+  `((VM_PUSH_FRAME)
+    ~@(apply concat
+       (map (fn [arg] (concat (compile-pass1 arg)
+			      `((VM_PUSH))))
+	    (reverse args)))
+    (VM_FUNCALL ~(if (some (fn [fun-spec] (= (first fun-spec) fname))
+			   *vm-builtin-funs*)
+		   (make-num (builtin-fun-id fname))
+		   (make-sym fname)))))
+
+(defn compile-pass1 [exp]
+  (cond
+   (or (nil? exp)
+       (and (coll? exp) (empty? exp)))
+   `((VM_IVAL ~(make-nil)))
+   ;;
+   (or (= 't exp) (= 't exp))
+   `((VM_IVAL ~(make-t)))
+   ;;
+   (symbol? exp)
+   `((VM_VREF ~(make-sym exp)))
+   ;;
+   (number? exp)
+   `((VM_IVAL ~(make-num exp)))
+   ;;
+   (coll? exp)
+   (match exp
+	  ('quote x)	(compile-quote x)
+	  ;;
+	  ('progn & body)	(if (empty? body)
+			    `((VM_IVAL ~(make-nil)))
+			    (apply concat (map compile-pass1 body)))
+	  ;;
+	  ('let bindings & body)	(compile-let bindings body)
+	  ;;
+	  ('setq sym val)	`(~@(compile-pass1 val)
+				  (VM_VSET ~(make-sym sym)))
+	  ;;
+	  ('if pred then-body else-body)
+	  (let [end-label (gensym),
+		else-label (gensym)]
+	    `(~@(compile-pass1 pred)
+	       (VM_BIFN ~else-label)
+	       ~@(compile-pass1 then-body)
+	       (VM_JMP ~end-label)
+	       ~else-label
+	       ~@(compile-pass1 else-body)
+	       ~end-label))
+	  ;;
+	  ('while pred & body)	(let [retry-label (gensym),
+				      end-label (gensym)]
+				  `(~retry-label
+				    ~@(compile-pass1 pred)
+				    (VM_BIFN ~end-label)
+				    ~@(apply concat (map compile-pass1 body))
+				    (VM_JMP ~retry-label)
+				    ~end-label))
+	  ;;
+	  ('dotimes (var num) & body)
+	  (let [end-label (gensym),
+		retry-label (gensym)]
+	    `((VM_IVAL ~(make-num 0))
+	      (VM_BIND ~(make-sym var))
+	      ~retry-label
+	      ~@(apply concat (map compile-pass1 body))
+	      (VM_VREF ~(make-sym var))
+	      (VM_PUSH)
+	      (VM_IVAL ~(make-num 1))
+	      (VM_PLUS)
+	      (VM_VSET ~(make-sym var))
+	      (VM_VREF ~(make-sym var))
+	      (VM_PUSH)
+	      (VM_IVAL ~(make-num num))
+	      (VM_LE)
+	      (VM_BIF ~end-label)
+	      (VM_JMP ~retry-label)
+	      ~end-label
+	      (VM_UNBIND 1)))
+	  ;;
+	  _	(compile-funcall (first exp) (rest exp)))
+   ;;
+   true
+   (throw (Exception. (str "Compile error: " exp)))
+   ))
+
+


Solve Time Conversion in clojure

Solve Time Conversion in clojure

error: pathspec 'solutions/uri/1019/1019.clj' did not match any file(s) known to git

--- solutions/uri/1019/1019.clj
+++ solutions/uri/1019/1019.clj
@@ -0,0 +1,17 @@
+(ns main)
+
+(def seconds-per-hour (* 60 60))
+(def seconds-per-minutes 60)
+
+(defn main []
+  (loop [line (read-line)]
+    (when line
+      (let [value (Integer/parseInt line)
+            hours (quot value seconds-per-hour)
+            value (mod value seconds-per-hour)
+            minutes (quot value seconds-per-minutes)
+            seconds (mod value seconds-per-minutes)]
+        (printf "%d:%d:%d%n" hours minutes seconds))
+      (recur (read-line)))))
+
+(main)


[EN] Don't change all fonts, just for text boxes.

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


[EN] Add same-day-voter-reg flag to context.

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


defines a Pail Serializer protocol

defines a Pail Serializer protocol

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

--- src/clj_pail/serializer.clj
+++ src/clj_pail/serializer.clj
@@ -0,0 +1,10 @@
+(ns clj-pail.serializer)
+
+(defprotocol Serializer
+  "A protocol for serializing objects."
+
+  (serialize [this object]
+    "Serializes an object to a byte array.")
+
+  (deserialize [this buffer]
+    "Deserializes a byte array into an object."))


Don't return a nil response for maven-metadata.xml sums [#515]

This causes 400's to be returned for those files.

--- src/clojars/routes/repo.clj
+++ src/clojars/routes/repo.clj
@@ -150,7 +150,7 @@

 (defn validate-checksums [artifacts]
   (doseq [f artifacts]
-    ;; verify that at least one type checksum file exists
+    ;; verify that at least one type of checksum file exists
     (when (not (or (.exists (fu/sum-file f :md5))
                  (.exists (fu/sum-file f :sha1))))
       (throw-invalid (str "no checksum provided for " (.getName f) {:file f})))
@@ -271,7 +271,7 @@
                 group (string/join "/" (butlast group-parts))
                 artifact (last group-parts)]
             (handle-versioned-upload db body session group artifact version file))
-          (when (re-find #"maven-metadata\.xml$" file)
+          (if (re-find #"maven-metadata\.xml$" file)
             ;; ignore metadata sums, since we'll recreate those when
             ;; the deploy is finalizied
             (let [groupname (string/replace group "/" ".")]
@@ -282,7 +282,10 @@
                 (fn [account upload-dir]
                   (let [file (io/file upload-dir group artifact file)]
                     (try-save-to-file file body)
-                    (finalize-deploy db search account (config :repo) upload-dir))))))))
+                    (finalize-deploy db search account (config :repo) upload-dir)))))
+            {:status 201
+             :headers {}
+             :body nil})))
    (PUT ["/:group/:artifact/:version/:filename"
          :group #"[^\.]+" :artifact #"[^/]+" :version #"[^/]+"
          :filename #"[^/]+(\.pom|\.jar|\.sha1|\.md5|\.asc)$"]


Adding some fn comments

Adding some fn comments

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


Prepare options view

Prepare options view

error: pathspec 'src/discuss/components/options.cljs' did not match any file(s) known to git

--- src/discuss/components/options.cljs
+++ src/discuss/components/options.cljs
@@ -0,0 +1,21 @@
+(ns discuss.components.options
+  (:require [om.core :as om :include-macros true]
+            [om.dom :as dom :include-macros true]
+            [discuss.translations :refer [translate]]
+            [discuss.utils.common :as lib]
+            [discuss.utils.views :as vlib]))
+
+(defn entry
+  "Entrypoint to show options. Should be something like a onclick handler."
+  []
+  (dom/div #js {:className "text-muted"}
+           (vlib/fa-icon "fa-cog" #(lib/change-view! :options))))
+
+(defn view
+  "Main view for options."
+  [data owner]
+  (reify
+    om/IRender
+    (render [_]
+      (dom/div nil
+               (vlib/view-header (translate :common :options))))))


Repl example

Repl example

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

--- examples/repl.clj
+++ examples/repl.clj
@@ -0,0 +1,32 @@
+#!/usr/bin/env inlein
+
+;; Your own, self-customised repl with all the tools you'd like to use!
+;;
+;; Note: Some signals may be broken with the JVM client, as it cannot pass
+;; signals to the child process easily. This can be fixed with a native client
+;; but for now, there aren't any.
+
+'{:dependencies [[org.clojure/clojure "1.8.0"]
+                 [reply "0.3.7"]
+                 [net.cgrand/parsley "0.9.3"] ;; to fix reply warning
+                 [org.clojure/math.numeric-tower "0.0.4"]
+                 [org.clojure/math.combinatorics "0.1.1"]
+                 [spyscope "0.1.5"]
+                 [org.clojure/tools.trace "0.7.9"]]
+  :jvm-opts ["-XX:+TieredCompilation" "-XX:TieredStopAtLevel=1" "-Dfile.encoding=UTF-8"]}
+
+(require '[clojure.math.numeric-tower :refer :all]
+         '[clojure.math.combinatorics :refer :all]
+         '[clojure.pprint :refer [pprint]]
+         '[clojure.tools.trace :as trace]
+         'spyscope.core)
+;; For pythonistas, we alias ** to expt
+(def ** expt)
+
+;; Common lispers prefer trace and untrace on functions
+(defmacro trace [& body]
+  `(trace/trace-vars ~@body))
+(defmacro untrace [& body]
+  `(trace/untrace-vars ~@body))
+
+(reply.ReplyMain/main (into-array String ["--standalone"]))


clojure solution 3

clojure solution 3

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

--- clojure/3.clj
+++ clojure/3.clj
@@ -0,0 +1,7 @@
+(defn smallest-prime-factor [n]
+  (first (filter #(= 0 (mod n %)) (range 2 (+ n 1)))))
+(defn largest-prime-factor [n]
+  (let [m (smallest-prime-factor n)]
+  (if (= m n) m
+      (largest-prime-factor (/ n m)))))
+(println (largest-prime-factor 600851475143))


signup route

signup route

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


created file for ch 11

created file for ch 11

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


Update clj-stacktrace dependency to 0.2.8

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


typo fix

typo fix

--- src-clj/acha/achievement.clj
+++ src-clj/acha/achievement.clj
@@ -2,7 +2,7 @@
   (:use clojure.data)
   (:require
     [acha.util :as util]
-    [acha.achievement-static])
+    [acha.achievement-static]
     [clojure.string :as str])
   (:import
     [java.util Calendar]))


bump version on track

bump version on track

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/wilkerlucio/youtube-looper.git/'


test/www/search.clj: added from v4

test/www/search.clj: added from v4

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

--- src/org/altlaw/test/www/search.clj
+++ src/org/altlaw/test/www/search.clj
@@ -0,0 +1,72 @@
+(ns org.altlaw.test.www.search
+  (:require org.altlaw.www.application
+            [org.altlaw.util.context :as context]
+            [org.altlaw.util.http-client :as client]
+            [org.altlaw.util.restlet :as component]
+            [clojure.contrib.duck-streams :as duck])
+  (:use clojure.contrib.test-is)
+  (:import (org.restlet.data MediaType)
+           (org.apache.solr.common SolrInputDocument)))
+
+(def *test-documents*
+     [{:docid 101
+       :doctype "case"
+       :name "The Title of Case 101"
+       :court "http://id.altlaw.org/courts/us/fed/supreme"
+       :date "2001-01-01"
+       :text "The quick brown fox jumped over the lazy dog."
+       :citations ["101 U.S. 101"]}
+      {:docid 102
+       :doctype "case"
+       :name "The Title of Case 102"
+       :court "http://id.altlaw.org/courts/us/fed/app/2"
+       :date "2002-02-02"
+       :text "The quick brown fox jumped over the lazy dog and chased his tail."
+       :citations ["102 F.3d 102"]}
+      {:docid 103
+       :doctype "case"
+       :name "The Title of Case 103"
+       :court "http://id.altlaw.org/courts/us/fed/app/3"
+       :date "2003-03-03"
+       :text "Pack my box with five dozen liquor jugs."
+       :citations ["103 F.3d 103"]}])
+
+(defn add-solr-test-docs [solr-server]
+  (doseq [doc *test-documents*]
+    (let [solrdoc (SolrInputDocument.)]
+      (doseq [[k v] doc]
+        (.addField solrdoc (name k) v))
+      (.add solr-server solrdoc)))
+  (.commit solr-server))
+
+(defn server-fixture [f]
+  (let [app (new org.altlaw.www.application)]
+    (component/with-server
+     13665 app
+     (binding [client/*client-base-uri* "http://localhost:13665"]
+       (let [solr (.. app getContext getAttributes (get "org.altlaw.solr.server"))]
+         (when-not (or solr (instance? solr org.apache.solr.client.solrj.SolrServer))
+           (throw (Exception. "www application does not have a Solr server")))
+         (add-solr-test-docs solr)
+         (f))))))
+
+(use-fixtures :once server-fixture)
+
+(deftest can-get-simple-search-page
+  (let [response (client/http-get "/v1/search")]
+    (is (.isSuccess (.getStatus response)))))
+
+(deftest can-get-boolean-search-page
+  (let [response (client/http-get "/v1/search/boolean")]
+    (is (.isSuccess (.getStatus response)))))
+
+(deftest can-get-advanced-search-page
+  (let [response (client/http-get "/v1/search/advanced")]
+    (is (.isSuccess (.getStatus response)))))
+
+(deftest can-do-simple-search
+  (let [response (client/http-get "/v1/search?q=dog&command=search+cases")]
+    (is (.isSuccess (.getStatus response)))
+    (let [content (.getText (.getEntity response))]
+      (is (.contains content "The Title of Case 101"))
+      (is (.contains content "The Title of Case 102")))))