testing git / feature merge

testing git / feature merge

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

--- src/clj/forma/staging.clj
+++ src/clj/forma/staging.clj
@@ -0,0 +1,83 @@
+(ns forma.staging
+  (:use [clojure.contrib.seq :only (positions)]
+        [clojure.contrib.math :only (round)])
+  (:require [incanter.core :as i]
+            [incanter.charts :as c]))
+
+(defn devel-namespaces []
+  (use '(incanter core charts)))
+
+(def ndvi [7417 7568 7930 8049 8039 8533 8260 8192 7968 7148 7724 8800 8068 7680 7590 7882 8022 8194 8031 8100 7965 8538 7881 8347 8167 5295 8000 7874 8220 8283 8194 7826 8698 7838 8967 8136 7532 7838 8009 8136 8400 8219 8051 8091 7718 8095 8391 7983 8236 8091 7937 7958 8147 8134 7813 8146 7623 8525 8714 8058 6730 8232 7744 8030 8355 8216 7879 8080 8201 7987 8498 7868 7852 7983 8135 8012 8195 8157 7989 8372 8007 8081 7940 7712 7913 8021 8241 8041 7250 7884 8105 8033 8340 8288 7691 7599 8480 8563 8033 7708 7575 7996 7739 8058 7400 6682 7999 7655 7533 7904 8328 8056 7817 7601 7924 7905 7623 7615 7560 7330 7878 8524 8167 7526 7330 7325 7485 8108 7978 7035 7650])
+
+; test data to simulate a randome time-series (will be read in later)
+(def random-ints (repeatedly #(rand-int 100)))
+(def test-ts (take 131 random-ints))
+
+(def kill-vals (replace-val ndvi > 7000 nil))
+
+;; (knocked-off #(< % 0) tvec rvec)
+;; don't need this right now for the filter
+(defn knocked-off
+  "shorten time-series on both ends to ensure that first and last
+  values are good, according to the pred, quality-coll"
+  [pred value-coll quality-coll]
+  (let [bad-count (first (positions pred quality-coll))]
+    (drop bad-count value-coll)))
+
+(def reli (replace-val (replace-val ndvi < 7000 2) > 2 1))
+
+;; WHIZBANG
+;; need to get an associated time-series for rain. the function will
+;; therefore change.
+
+(defn with-rain-cofactor
+  "construct a time-series with a "
+  [x]
+  x)
+
+(defn std-error
+  "get the standard error from a variance matrix"
+  [x]
+  (+ x 2))
+
+(defn ols-coeff
+  "get the trend coefficient from a time-series, given a variance matrix"
+  [ts]
+  (let [ycol (i/trans [ts])
+        X (with-rain-cofactor (count ts))
+        V (variance-matrix X)]))
+
+(defn whiz-ols
+  "extract both the OLS trend coefficient and the t-stat associated
+   with the trend characteristic"
+  [ts V]
+  ((juxt ols-coeff whiz-ols)) ts V)
+
+
+(defn num-years-to-milliseconds [x] (* 365 24 60 60 1000 x))
+(def offset (num-years-to-milliseconds (- 2000 1970)))
+(def dates
+  (map (comp #(+ offset %)
+             num-years-to-milliseconds
+             #(/ % 12))
+       (range (count ndvi))))
+
+
+(def plot1 (c/time-series-plot dates
+                               (hp-filter (fix-time-series #{1} reli ndvi) 2)
+                               :title "NDVI and The H-P Filter"
+                               :x-label "Year"
+                               :y-label "NDVI values"))
+;; (c/add-lines plot1 dates ndvi)
+(c/add-lines plot1 dates (fix-time-series #{1} reli-test ndvi))
+;; (c/add-points plot1 dates kill-vals)
+
+(let [x dates]
+  (c/slider #(i/set-data plot1
+                         [x (hp-filter (fix-time-series #{1}
+                                                        reli
+                                                        ndvi)
+                                       %)])
+            (range 0 11 0.1)
+            "lambda"))
+


correctly set dates to BOD/EOD where appropriate

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


Fix key mis-naming

Fix key mis-naming

--- src/clojars/event.clj
+++ src/clojars/event.clj
@@ -74,7 +74,7 @@
   (sql/with-connection (config :db)
     (sql/with-query-results groups ["SELECT * FROM groups"]
       (doseq [{:keys [name user]} groups]
-        (record :membership {:group name :username user :added-by nil})))
+        (record :membership {:group-id name :username user :added-by nil})))
     (sql/with-query-results users ["SELECT * FROM users"]
       (doseq [{:keys [user password email created ssh_key pgp_key]} users]
         (record :user {:username user :email email


Clojure day 16 solution.

Clojure day 16 solution.

That is really slow at solving part 2.

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

--- clojure/src/advent2016/day16.clj
+++ clojure/src/advent2016/day16.clj
@@ -0,0 +1,52 @@
+(ns advent2016.day16
+  (:require [flatland.useful.seq :refer [lazy-loop]]))
+
+(def example1 "10000")
+(def puzzle "01110110101001000")
+
+(defn flip-bits [bits]
+  (map not bits))
+
+(defn inflate-once [required [n bits]]
+  [(inc (* 2 n))
+   (lazy-cat bits
+             '(false)
+             (flip-bits (reverse bits)))])
+
+(defn inflate [target bits]
+  (loop [[n bits :as input] bits]
+    (let [required (- target n 1)]
+      (if (< n target)
+        (recur (inflate-once target input))
+        [target (take target bits)]))))
+
+
+(defn checksum-once [[_ bits]]
+  (reduce (fn [[n bits] [a b]]
+            [(inc n) (conj bits (= a b))])
+          [0 []]
+          (partition 2 bits)))
+
+(defn checksum [bits]
+  (loop [[n _ :as bits] (checksum-once bits)]
+    (if (even? n)
+      (recur (checksum-once bits))
+      bits)))
+
+(defn ->bits [s]
+  [(count s) (map #(= % \1) s)])
+
+(defn <-bits [[_ bits]]
+  (apply str (map #(if % "1" "0") bits)))
+
+(def solution1 (->> puzzle
+                    ->bits
+                    (inflate 272)
+                    checksum
+                    <-bits))
+
+(def solution2 (->> puzzle
+                    ->bits
+                    (inflate 35651584)
+                    checksum
+                    <-bits))


initial public API

initial public API

error: pathspec 'src/cerber/oauth2/core.clj' did not match any file(s) known to git

--- src/cerber/oauth2/core.clj
+++ src/cerber/oauth2/core.clj
@@ -0,0 +1,40 @@
+(ns cerber.oauth2.core
+  (:require [cerber.stores.client :as client]
+            [cerber.stores.token :as token]))
+
+;; tokens
+
+(defn find-tokens-by-client
+  [client]
+  (when-let [client-id (:id client)]
+    (token/find-by-pattern [client-id "refresh" nil])))
+
+(defn find-tokens-by-user
+  [user]
+  (when-let [login (:login user)]
+    (token/find-by-pattern [nil "refresh" nil login])))
+
+(defn revoke-tokens
+  ([client]
+   (when-let [client-id (:id client)]
+     (token/revoke-by-pattern [client-id nil])))
+  ([client login]
+   (when-let [client-id (:id client)]
+     (token/revoke-by-pattern [client-id nil nil login]))))
+
+;; clients
+
+(defn find-client
+  [client-id]
+  (client/find-client client-id))
+
+(defn create-client
+  [homepage redirects scopes grants authorities]
+  (client/create-client homepage redirects scopes grants authorities))
+
+(defn modify-client
+  [client])
+
+(defn delete-client
+  [client]
+  (client/revoke-client (:id client)))


add missing event file

add missing event file

error: pathspec 'src/clj/hsm/pipe/event.clj' did not match any file(s) known to git

--- src/clj/hsm/pipe/event.clj
+++ src/clj/hsm/pipe/event.clj
@@ -0,0 +1,29 @@
+(ns hsm.pipe.event
+	(:require
+		[clojure.core.async 			:as async	:refer [go chan >!]]
+		[cheshire.core 						:refer :all]))
+
+(def ^:private event-types
+	"A Map containing any extra op that needs to be performed beforehand"
+	{
+		:create-user identity
+		:follow-user identity
+
+		:create-discussion
+		:follow-discussion
+	})
+
+
+(defn create-event
+	[event-type channel user-data]
+	(go
+		(>! channel
+			["test" (generate-string {:type :create-user
+																:data user-data})])))
+
+(def create-user (partial create-event :create-user))
+(def follow-user (partial create-event :follow-user))
+(def unfollow-user (partial create-event :unfollow-user))
+
+(def create-discussion (partial create-event :create-discussion))
+(def follow-discussion (partial create-event :follow-discussion))


Next development iteration

Next development iteration

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject lein-droid/lein-droid "0.2.0"
+(defproject lein-droid/lein-droid "0.2.1-SNAPSHOT"
   :description "Plugin for easy Clojure/Android development and deployment"
   :url "https://github.com/clojure-android/lein-droid"
   :license {:name "Eclipse Public License"


Version 1.6.4-SNAPSHOT

Version 1.6.4-SNAPSHOT


Include awsuberwar

Include awsuberwar

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


Version 1.6.3

Version 1.6.3


heheheh 5

heheheh 5

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/encho/vvento4.git/'


Update lein-fruit and play-clj template

Update lein-fruit and play-clj template

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/bsmr-clojure/Nightcode.git/'


Upgrade tools.logging to latest (1.2.3)

Upgrade tools.logging to latest (1.2.3)

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


Added git-version plugin

Added git-version plugin

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/CraZySacX/nitelens.git/'


Update deps

Update deps

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


raise project version number for bug fixes

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/colophon/clarango.git/'


Bump NSFW to 0.10.2

Bump NSFW to 0.10.2

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/zk/rx.git/'


Create functions for handling indentation.

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

--- src/berry/formatting.clj
+++ src/berry/formatting.clj
@@ -0,0 +1,16 @@
+(ns berry.formatting)
+
+(defn- indent-with
+[character width]
+  (apply str (repeat width character)))
+
+(def tab (partial indent-with "\t"))
+
+(def space (partial indent-with " "))
+
+(defn indent
+[text {apply-indentation :indent-style
+  indent-size :indent-size
+  level :level}]
+(let [width (* indent-size level)]
+    (str (apply-indentation width) text)))


prevent use of nav-items to visit previous steps after submission


Creating pages namespace

Creating pages namespace

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

--- src/cljs/ohds/pages.cljs
+++ src/cljs/ohds/pages.cljs
@@ -0,0 +1,19 @@
+(ns ohds.pages
+  (:require [ohds.components :as c]))
+
+(defn login-page [do-login app-state]
+  (let [username (atom "Username")
+        password (atom "Password")]
+    (swap! app-state assoc :fieldworker-id nil :location-id nil :individual-id nil)
+    (fn []
+      [:div {:class "form-signin"}
+       [:h2 {:class "form-signin-heading"} "Please log in"]
+       [:div
+        [:label {:for "username"} "Username"] [c/atom-input username "username"]]
+       [:div
+        [:label {:for "password"} "Password"] [c/atom-input-password password "password"]]
+       [:div {:class "checkbox"}]
+       [:div
+        [:button {:class "btn btn-lg btn-primary btn-block" :type "submit"
+                  :on-click (fn [] (do-login username password))}
+         "Login"]]])))


prefix: preparing tests for localmoment serialize fix

error: pathspec 'src/test/clojure/pdok/featured/data_fixes_test.clj' did not match any file(s) known to git

--- src/test/clojure/pdok/featured/data_fixes_test.clj
+++ src/test/clojure/pdok/featured/data_fixes_test.clj
@@ -0,0 +1,13 @@
+(ns pdok.featured.data-fixes-test
+  (:require [clojure.test :refer :all]
+            [pdok.featured.data-fixes :refer :all]))
+
+;; Following two tests should have the old code to (transit) deserialize old database localmoment values
+;; to correct original values. Use transit/from-json (maybe with dynamic or extra param,
+;; for different lm deserializer
+;; Use updated featured-shared before fixing this.
+(deftest wrong-start-of-epoch-lm-deserialize
+  "Check that [\"~#lm\",-3600000] deserializes to 1970-01-01T00:00:00.000")
+
+(deftest wrong-summertime-lm-deserialize
+  "Check that [\"~#lm\",1467324000000] deserializes to 2016-07-01T00:00:00.000" )


publish prizes

publish prizes

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


adding a config file, loading the database configuration from the database-url environment variable

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

--- src/bitfondue/config.clj
+++ src/bitfondue/config.clj
@@ -0,0 +1,5 @@
+(ns bitfondue.config
+  (:require [environ.core :as env]))
+
+(def database
+  (env :database-url))


Solve Simple Sum in clojure

Solve Simple Sum in clojure

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

--- solutions/uri/1003/1003.clj
+++ solutions/uri/1003/1003.clj
@@ -0,0 +1,8 @@
+(ns main)
+
+(defn main []
+  (let [a (Integer/parseInt (read-line))
+        b (Integer/parseInt (read-line))]
+    (+ a b)))
+
+(println "SOMA =" (main))


Adding healthcheck on SQLite.

Adding healthcheck on SQLite.

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/acessocard/microscope.git/'


Added sections model

Added sections model

error: pathspec 'src/app/models/sections.clj' did not match any file(s) known to git

--- src/app/models/sections.clj
+++ src/app/models/sections.clj
@@ -0,0 +1,38 @@
+(ns app.models.sections
+  (:require [app.framework.model-spec :refer [generate-spec]]
+            [app.framework.model-includes.content-base-model :refer [content-base-spec]]))
+
+(def model-type :sections)
+
+(def spec (generate-spec
+  (content-base-spec model-type)
+  {
+  :type model-type
+  :schema {
+    :type "object"
+    :properties {
+      :title {:type "string"}
+      :description {:type "string"}
+      :slug {:type "string"}
+      :public {:type "boolean"}
+      :sites {
+        :type "array"
+        :items {
+          :enum ["se" "no" "dk" "fi"]
+        }
+      }
+      :pages_ids {
+        :type "array"
+        :items {
+          :type "integer"
+        }
+      }
+      :legacy {:type "object"}
+    }
+    :additionalProperties false
+    :required [:title :slug]
+  }
+  :relationships {
+    :pages {}
+  }
+}))


[CS] Add tests for chunked-rows

[CS] Add tests for chunked-rows

error: pathspec 'test/vip/data_processor/db/sqlite_test.clj' did not match any file(s) known to git

--- test/vip/data_processor/db/sqlite_test.clj
+++ test/vip/data_processor/db/sqlite_test.clj
@@ -0,0 +1,22 @@
+(ns vip.data-processor.db.sqlite-test
+  (:require [clojure.test :refer :all]
+            [vip.data-processor.db.sqlite :refer :all]))
+
+(deftest chunk-rows-test
+  (let [n 7
+        rows [{:first "George" :last "Washington" :start 1789}
+              {:first "John"   :last "Adams"      :start 1797}
+              {:first "Thomas" :last "Jefferson"  :start 1801}
+              {:first "James"  :last "Madison"    :start 1809}
+              {:first "James"  :last "Monroe"     :start 1817}]
+        chunked (chunk-rows rows n)]
+    (testing "returns a lazy sequence"
+      (is (not (realized? chunked))))
+    (testing "contains every row in the same order"
+      (is (= rows (apply concat chunked))))
+    (testing "no chunk has more than n keys"
+      (doseq [n (range 3 17)]
+        (let [chunked (chunk-rows rows n)
+              key-count (fn [coll] (apply + (map count coll)))
+              no-more-than-n-keys? (fn [coll] (>= n (key-count coll)))]
+          (is (every? no-more-than-n-keys? chunked)))))))


Add recursive json gen

Add recursive json gen

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

--- src/clj/introspect/util.clj
+++ src/clj/introspect/util.clj
@@ -0,0 +1,27 @@
+(ns introspect.util
+  (:require [clojure.walk :as walk]))
+
+(def any-seq? #(or (seq? %)
+                   (vector? %)
+                   (set? %)))
+
+(defn to-json-representation
+  "Recursively transforms all map keys from strings to keywords."
+  {:added "1.1"}
+  [m]
+  (let [to-s (fn to-s [i]
+               (cond
+                (= java.lang.Class (type i)) (.getName i)
+                (string? i)                  (str "\"" i "\"")
+                (any-seq? i)                 (mapv to-s i)
+                (nil? i)                     "nil"
+                :else                        (throw (RuntimeException. (str "Not sure how I would translate "
+                                                                            i
+                                                                            " that to json")))))
+        f (fn [[k v]] [(to-s k) (to-s v)])]
+    ;; only apply to maps
+    (clojure.walk/postwalk (fn [x]
+                             (cond
+                              (map? x) (into {} (map f x))
+                              :else    x))
+                           m)))


More granular font sizes

More granular font sizes

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


use object methods directly to reduce overhead

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


Stubbed out x124.

Stubbed out x124.

error: pathspec 'src/main/cljc/x124_analyze_reversi/mbastian.cljc' did not match any file(s) known to git

--- src/main/cljc/x124_analyze_reversi/mbastian.cljc
+++ src/main/cljc/x124_analyze_reversi/mbastian.cljc
@@ -0,0 +1 @@
+(ns x124-analyze-reversi.mbastian)


also base-test

also base-test

error: pathspec 'test/cljs/base_test.cljs' did not match any file(s) known to git

--- test/cljs/base_test.cljs
+++ test/cljs/base_test.cljs
@@ -0,0 +1,34 @@
+(ns ona.dataview.base-test
+  (:require-macros [cljs.test :refer (is deftest testing)])
+  (:require [cljs.test :as t]
+            [ona.dataview.shared :as shared]
+            [ona.utils.seq :refer [diff]]
+            [ona.helpers.permissions :refer [owner]]))
+
+(defn data-gen [ncol nrow]
+  (let [rf (fn [max] (format "%02d" (inc (rand-int max))))]
+  (for [i (range nrow)]
+    (apply merge {"_id" i
+                  "_rank" (inc i)
+                  "_submission_time" (str "2012-" (rf 12) "-" (rf 30))}
+                 (for [j (range ncol)] {(str "hello" j) (str "goodbye" j)})))))
+(def big-thin-data   (data-gen 1 100))
+
+;; INITIAL STATE TESTS
+(deftest initial-state
+  (let [_ (shared/update-app-data! big-thin-data :rerank? true)
+        map-data-100 (get-in @shared/app-state [:map-page :data])
+        table-data-100 (get-in @shared/app-state [:table-page :data])
+        dget (fn [k d] (map #(get % k) d))]
+    (testing "data is initialized properly"
+      (is (= map-data-100 table-data-100))
+      (is (= (-> map-data-100 first count) (-> big-thin-data first count)))
+      (is (= 100 (count map-data-100))))
+    (testing "data has correct _rank attributes"
+      (is (= (dget "_rank" map-data-100) (map inc (range 100))))
+      (is (= (dget "_rank" table-data-100) (map inc (range 100)))))
+    (testing "data is in sorted order by _submission_time"
+      (let [test-dates (map js/moment ["2012-01-01" "2013-01-01" "2011-01-01"])
+            s100 (map js/moment (dget "_submission_time" map-data-100))]
+        (is (= (sort test-dates) (conj (take 2 test-dates) (last test-dates))))
+        (is (= s100 (sort s100)))))))


Started IO for contexts

Started IO for contexts

By now we can read and write contexts in Burmeister format (but the
implementation is bad).

Signed-off-by: Daniel Borchmann <25857343a15bf1edafebc2912e82ecf775c585c1@mailbox.tu-dresden.de>

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

--- conexp/io.clj
+++ conexp/io.clj
@@ -0,0 +1,79 @@
+(ns conexp.io
+  (:use conexp.fca.contexts
+	conexp.util
+	[clojure.contrib.str-utils :only (str-join)]
+	[clojure.contrib.duck-streams :only (reader)]))
+
+(defn illegal-argument [& strings]
+  (throw (IllegalArgumentException. (apply str strings))))
+
+(defmulti write-context (fn [method ctx] method))
+
+(let [known-context-input-formats (ref {})]
+  (defn add-context-input-format [name predicate]
+    (dosync (alter known-context-input-formats assoc name predicate)))
+
+  (defn find-context-input-format [file]
+    (first (for [[name predicate] @known-context-input-formats :when (predicate file)]
+	     name))))
+
+(defmulti read-context find-context-input-format)
+
+(defmethod write-context :default [method _]
+  (illegal-argument "Method " method " for context output is not known."))
+
+(defmethod read-context :default [file]
+  (illegal-argument "Cannot determind format of context in " file))
+
+
+;;; Formats
+
+
+;; Burmeister Format
+
+(defmethod write-context :burmeister [_ ctx]
+  (with-str-out
+    "B\n"
+    "\n"
+    (count (attributes ctx)) "\n"
+    (count (objects ctx))    "\n"
+    "\n"
+    (map #(str % "\n") (vec (attributes ctx)))
+    (map #(str % "\n") (vec (objects ctx)))
+    (let [inz (incidence ctx)]
+      (str-join "\n"
+		(map (fn [m]
+		       (str-join ""
+				 (map (fn [g]
+					(if (inz [g m]) "X" "."))
+				      (attributes ctx))))
+		     (objects ctx))))))
+
+(add-context-input-format :burmeister
+			  (fn [file]
+			    (let [first-character (first (.readLine (reader file)))]
+			      (= \B first-character))))
+
+(defmethod read-context :burmeister [file] ; this implementation is bad, reads in the whole file
+  (let [input (reader file)
+	input-stream (take-while identity (repeatedly #(.readLine input)))]
+    (do
+      (let [number-of-objects    (Integer/parseInt (nth input-stream 2))
+	    number-of-attributes (Integer/parseInt (nth input-stream 3))
+
+	    seq-of-objects       (map #(nth input-stream %) (range 5 (+ 5 number-of-objects)))
+	    seq-of-attributes    (map #(nth input-stream %) (range (+ 5 number-of-objects)
+								   (+ 5 number-of-attributes number-of-objects)))
+	    incidence-matrix     (map #(nth input-stream %) (range (+ 5 number-of-attributes number-of-objects)
+								   (+ 5 number-of-objects number-of-attributes
+								      number-of-objects)))
+
+	    incidence (set-of [(nth seq-of-objects idx-g) (nth seq-of-attributes idx-m)]
+			      [idx-g (range number-of-objects)
+			       idx-m (range number-of-attributes)
+			       :when (= \X (nth (nth incidence-matrix idx-g) idx-m))])]
+	  (make-context (set seq-of-objects)
+			(set seq-of-attributes)
+			incidence)))))
+
+


Update dependencies

Update dependencies

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


bump clojure dep

bump clojure dep


Update deps

Update deps

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


Keep up with the latest Datomic version

Keep up with the latest Datomic 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/MitchellJThomas/medir.git/'


Kehaar 0.7.0 with bounded thread pools

Kehaar 0.7.0 with bounded thread pools

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


bump to working blueprints

bump to working blueprints

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


bump teller

bump teller


Address CVE-2017-18640

Address CVE-2017-18640

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


Addin joda-time to exclusions

Addin joda-time to exclusions


Version 172-SNAPSHOT

Version 172-SNAPSHOT


Add webapi-clinical environment

Add webapi-clinical environment

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


Begin work on next iteration

Begin work on next iteration

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject com.damballa/abracad "0.4.12"
+(defproject com.damballa/abracad "0.4.13-SNAPSHOT"
   :description "De/serialize Clojure data structures with Avro."
   :url "http://github.com/damballa/abracad"
   :licenses [{:name "Eclipse Public License"


project tidyup

project tidyup

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/dagda1/i-cal.git/'


[EN] Bump to immutant beta 3

[EN] Bump to immutant beta 3

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/sendgrid-monitor.git/'


load_all.clj: added file to load all libs in alphabetical order

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

--- src/org/altlaw/load_all.clj
+++ src/org/altlaw/load_all.clj
@@ -0,0 +1,12 @@
+(ns org.altlaw.load-all
+  (:require
+   org.altlaw.test.run
+
+   org.altlaw.util.context
+   org.altlaw.util.date
+   org.altlaw.util.files
+   org.altlaw.util.hadoop
+   org.altlaw.util.lucene
+   org.altlaw.util.solr
+   org.altlaw.util.zip
+))


Add quilts example.

Add quilts example.

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

--- src/cljs/quil_site/examples/quilts.cljs
+++ src/cljs/quil_site/examples/quilts.cljs
@@ -0,0 +1,234 @@
+(ns quil-site.examples.quilts
+  (:require [quil.core :as q :include-macros true]
+            quil-site.main ;DELETE
+            [quil.middleware :as m]))
+
+;; By Erik Svedäng, Nov 2014
+
+(defn pulse [low high rate]
+  (let [diff (- high low)
+        half (/ diff 2)
+        mid (+ low half)
+        s (/ (q/millis) 1000.0)
+        x (q/sin (* s (/ 1.0 rate)))]
+    (+ mid (* x half))))
+
+(defn rand-between [low high]
+  (let [diff (- high low)]
+    (+ low (rand diff))))
+
+(defn rand-coord [size]
+  [(rand-between (- size) size)
+   (rand-between (- size) size)])
+
+(defn translate-v2 [[x y] [dx dy]]
+  [(+ x dx) (+ y dy)])
+
+(defn render-ship [ship]
+  (q/fill 50 80 50)
+  (q/rect -2 0 5 14)
+  (q/fill 150 180 150)
+  (q/triangle 0 -10 25 0 0  10)
+  (q/fill 30 100 30)
+  (q/ellipse 8 0 8 8))
+
+(defn create-ship []
+  {:pos [-1000 1000]
+   :dir -0.4
+   :dir-change 0.0
+   :speed 0.1
+   :z 1.0
+   :render-fn render-ship})
+
+(defn render-star [star]
+  (let [size (:size star)]
+    (q/fill 255)
+    (q/rect 0 0 size size)))
+
+(defn create-star [pos]
+  {:pos pos
+   :dir (rand q/TWO-PI)
+   :size (+ 1.0 (rand 3.0))
+   :z (rand-between 0.2 0.7)
+   :render-fn render-star})
+
+(defn random-star []
+  (create-star (rand-coord 1000)))
+
+(defn render-smoke [smoke]
+  (let [age (:age smoke)
+        size (max 0.0 (- 10.0 (* 5.0 age)))
+        [r g b] (:col smoke)]
+    (q/fill r g b 200)
+    (q/ellipse 0 0 size size)))
+
+(defn create-smoke [[x y]]
+  {:pos [(+ x (rand-between -3 3))
+         (+ y (rand-between -3 3))]
+   :dir 0.0
+   :age 0.0
+   :z 1.0
+   :col [(rand-between 150 255)
+         (rand-between 100 200)
+         (rand-between 0 100)]
+   :render-fn render-smoke})
+
+(defn render-planet [planet]
+  (let [size (:size planet)
+        [r g b] (:color planet)]
+    (q/fill r g b)
+    (let [rs (:rs planet)
+          step (/ q/TWO-PI (count rs))]
+      (q/begin-shape)
+      (doseq [[angle radius] (map vector
+                                  (range 0 q/TWO-PI step) rs)]
+        (q/vertex (* size radius (q/cos angle))
+                  (* size radius (q/sin angle))))
+      (q/end-shape))))
+
+(defn generate-radiuses []
+  (into [] (take (+ 5 (rand-int 7))
+                 (repeatedly #(rand-between 0.5 1.0)))))
+
+(defn create-planet [pos color]
+  {:pos pos
+   :dir (rand q/TWO-PI)
+   :dir-change (rand-between -0.01 0.01)
+   :size (+ 50.0 (rand 50.0))
+   :drift [(rand-between -0.3 0.3) (rand-between -0.3 0.3)]
+   :color color
+   :z 1.0
+   :rs (generate-radiuses)
+   :render-fn render-planet})
+
+(defn random-planet []
+  (create-planet (rand-coord 1000)
+                 [(rand-between 0 255)
+                  (rand-between 50 150)
+                  (rand-between 50 150)]))
+
+(defn setup []
+  (q/rect-mode :center)
+  (q/frame-rate 30)
+  {:ship (create-ship)
+   :smoke []
+   :stars (take 3000 (repeatedly random-star))
+   :planets (take 50 (repeatedly random-planet))})
+
+(defn move-ship [ship]
+  (let [speed (+ 1.0 (* 7.0 (:speed ship)))
+        dir (:dir ship)
+        dx (* speed (q/cos dir))
+        dy (* speed (q/sin dir))]
+    (update-in ship [:pos] translate-v2 [dx dy])))
+
+(defn auto-rotate [entity]
+  (let [dir-change (:dir-change entity)]
+    (update-in entity [:dir] #(+ % dir-change))))
+
+(defn wiggle-ship [ship]
+  (let [speed (:speed ship)
+        a (+ 0.01 (* 0.03 speed))]
+    (update-in ship [:dir] #(+ % (pulse (- a) a 0.1)))))
+
+(defn drift-planet [planet]
+  (let [[dx dy] (:drift planet)]
+    (update-in planet [:pos] translate-v2 [dx dy])))
+
+(defn emit-smoke [state]
+  (let [speed (-> state :ship :speed)]
+    (if (< (rand) (+ 0.2 speed))
+      (let [ship-pos (-> state :ship :pos)]
+        (update-in state [:smoke] conj (create-smoke ship-pos)))
+      state)))
+
+(defn age-smoke [smoke]
+  (update-in smoke [:age] #(+ % 0.033)))
+
+(defn old? [smoke]
+  (< 3.0 (:age smoke)))
+
+(defn remove-old-smokes [smokes]
+  (remove old? smokes))
+
+(defn update [state]
+  (-> state
+      (update-in [:ship] auto-rotate)
+      (update-in [:ship] wiggle-ship)
+      (update-in [:ship] move-ship)
+      emit-smoke
+      (update-in [:smoke] (fn [smokes] (map age-smoke smokes)))
+      (update-in [:smoke] remove-old-smokes)
+      (update-in [:planets] #(map auto-rotate %))
+      (update-in [:planets] #(map drift-planet %))))
+
+(defn faster [speed]
+  (min 1.0 (+ speed 0.25)))
+
+(defn slower [speed]
+  (max 0.0 (- speed 0.25)))
+
+(defn on-key-down [state]
+  (let [k (q/key-code)]
+    (cond
+     (or (= k 87) (= k 38)) (update-in state [:ship :speed] faster)
+     (or (= k 83) (= k 40)) (update-in state [:ship :speed] slower)
+     (or (= k 65) (= k 37)) (assoc-in state [:ship :dir-change] -0.15)
+     (or (= k 68) (= k 39)) (assoc-in state [:ship :dir-change] 0.15)
+     :else state)))
+
+(defn on-key-up [state]
+  (let [k (q/key-code)]
+    (if (or (= k 37) (= k 39) (= k 65) (= k 68))
+      (assoc-in state [:ship :dir-change] 0)
+      state)))
+
+(defn on-screen? [x y]
+  (let [margin 100]
+    (and (<= (- margin) x (+ margin (q/width)))
+         (<= (- margin) y (+ margin (q/height))))))
+
+(defn draw-entity [entity [cam-x cam-y]]
+  (let [[x y] (:pos entity)
+        dir (:dir entity)
+        z (:z entity)
+        render-fn (:render-fn entity)
+        screen-x (- x (* z cam-x))
+        screen-y (- y (* z cam-y))]
+    (when (on-screen? screen-x screen-y)
+      (q/push-matrix)
+      (q/translate screen-x screen-y)
+      (q/rotate dir)
+      (render-fn entity)
+      (q/pop-matrix))))
+
+(defn draw [state]
+  (q/background (pulse 20 40  15.0)
+                (pulse 40 60 40.0)
+                (pulse 50 70 5.0))
+  (q/no-stroke)
+  (let [ship-pos (-> state :ship :pos)
+        cam-pos (translate-v2 ship-pos [(- (/ (q/width) 2))
+                                        (- (/ (q/height) 2))])]
+    (doseq [star (:stars state)]
+      (draw-entity star cam-pos))
+    (doseq [planet (:planets state)]
+      (draw-entity planet cam-pos))
+    (doseq [smoke (:smoke state)]
+      (draw-entity smoke cam-pos))
+    (draw-entity (:ship state) cam-pos)))
+
+(defn run-sketch [host size] ;DELETE
+(q/sketch
+  :host host
+  :size [size size]
+  :setup setup
+  :update update
+  :key-pressed on-key-down
+  :key-released on-key-up
+  :draw draw
+  :middleware [m/fun-mode])
+) ;DELETE
+
+(quil-site.main/register-example! "quilts" "Erik Svedäng" run-sketch) ;DELETE
+


[TH] I guess we need a configure now

[TH] I guess we need a configure now


schemas

schemas

error: pathspec 'src/cljc/salava/metabadge/schemas.cljc' did not match any file(s) known to git

--- src/cljc/salava/metabadge/schemas.cljc
+++ src/cljc/salava/metabadge/schemas.cljc
@@ -0,0 +1,37 @@
+(ns salava.metabadge.schemas
+  (:require [schema.core :as s :include-macros true ]
+            [salava.badge.schemas :refer [Badge UserBadgeContent]]))
+
+(s/defschema Badge-info {:name s/Str
+                         :description (s/maybe s/Str)
+                         :image (s/maybe s/Str)
+                         :criteria (s/maybe s/Str)})
+
+(s/defschema User_badge {:id s/Int
+                         :issued_on (s/maybe s/Int)
+                         :status (s/maybe (s/enum "pending" "accepted" "declined"))
+                         :deleted s/Int})
+
+(s/defschema Requiredbadges [{:badge-info Badge-info
+                              :user_badge (s/maybe User_badge)
+                              :current (s/maybe s/Bool)
+                              :url (s/maybe s/Str)
+                              :received (s/maybe s/Bool)
+                              :id (s/maybe s/Str)
+                              }])
+
+(s/defschema Metabadgecontent {:required_badges Requiredbadges
+                               :milestone? s/Bool
+                               :badge (merge Badge-info {:received (s/maybe s/Bool)
+                                                         :url (s/maybe s/Str)
+                                                         :id (s/maybe s/Str)})
+                               :name (s/maybe s/Str)
+                               :min_required (s/maybe s/Int)
+                               :id (s/maybe s/Str)})
+
+(s/defschema Metabadge {:metabadge (s/maybe [Metabadgecontent])})
+
+(s/defschema Milestone? (s/maybe {(s/optional-key :required_badge) s/Bool
+                                  (s/optional-key :milestone) s/Bool}))
+
+(s/defschema Allmetabadges (s/maybe (merge Metabadgecontent {:completion_status s/Int})))


SQL based event search merged

SQL based event search merged

--- src/ruuvi_server/database/event_dao.clj
+++ src/ruuvi_server/database/event_dao.clj
@@ -2,7 +2,9 @@
   (:require [ruuvi-server.configuration :as conf]
             [ruuvi-server.util :as util]
             [clojure.string :as string]
-            [ruuvi-server.cache :as cache])
+            [ruuvi-server.cache :as cache]
+            [clojure.java.jdbc :as sql]
+            )
   (:use [korma.db :only (transaction)]
         [korma.core :only (select where insert update values
                                   set-fields with limit order fields)]
@@ -11,6 +13,7 @@
                                                        event-annotation)]
         [clj-time.core :only (date-time now)]
         [clj-time.coerce :only (to-timestamp)]
+        [clojure.string :only (join)]
         [clojure.tools.logging :only (debug info warn error)]
         )
   (:import [org.joda.time DateTime])
@@ -106,6 +109,8 @@
   (first (select event-extension-type
                  (where {:name (str (name type-name))}))))

+(def ^{:private true} cache-event-extra-data (cache/create-cache-region :event-extra-data 10000 (* 24 60 60 1000)))
+
 ;; TODO add caching
 (defn get-extension-type-by-name! [type-name]
   (util/try-times 1
@@ -137,7 +142,103 @@
      }
   )

-(defn search-events
+(defn- max-search-result-size
+  "Maximum number of events to return in event search"
+  [conf criteria]
+  (let [allowed-max-result-count (get-in conf [:client-api :allowed-max-search-results] )
+        max-results (if (:maxResults criteria)
+                      (:maxResults criteria)
+                      (get-in conf [:client-api :default-max-search-results] 100))
+        result-limit (apply min (filter identity [allowed-max-result-count max-results]))
+        ]
+    result-limit))
+
+
+;; {:where "where a = ? and c = ?"  :params [1 "2"]}
+(defn make-sql-crit [criteria]
+  (let [event-start (to-timestamp (:eventTimeStart criteria))
+        event-end (to-timestamp (:eventTimeEnd criteria))
+        store-start (to-timestamp (:storeTimeStart criteria))
+        store-end (to-timestamp (:storeTimeEnd criteria))
+        tracker-ids (filter identity (:trackerIds criteria))
+        session-ids (filter identity (:sessionIds criteria))
+
+        params (filter identity (flatten [event-start event-end store-start
+                                          store-end tracker-ids session-ids]))
+        conds '[]
+        conds (conj conds (when event-start "e.event_time >= ?"))
+        conds (conj conds (when event-end "e.event_time <= ?"))
+        conds (conj conds (when store-start "e.created_on >= ?"))
+        conds (conj conds (when store-end "e.created_on <= ?"))
+        conds (conj conds (when (not (empty? tracker-ids))
+                           (let [tracker-id-binds (join "," (repeat (count tracker-ids) "?"))]
+                             (str "e.tracker_id in (" tracker-id-binds ")"))))
+        conds (conj conds (when (not (empty? session-ids))
+                           (let [session-id-binds (join "," (repeat (count session-ids) "?"))]
+                             (str "e.event_session_id in (" session-id-binds ")"))))
+
+        conds (filter identity conds)
+
+        order-by-crit (:orderBy criteria)
+        order-by (cond
+                  (= order-by-crit :latest-store-time) "order by e.created_on desc"
+                  (= order-by-crit :latest-event-time) "order by e.event_time desc"
+                  :default "order by e.event_time asc")
+        ]
+
+    {:params params
+     :conds (join " and " conds)
+     :order-by order-by}
+    ))
+
+(defn- make-search-results [rows]
+  (map (fn [row]
+         (let [event-data (select-keys row [:id :tracker_id :event_session_id
+                                            :created_on :event_time])
+               loc-data (select-keys row [:latitude :longitude :speed
+                                          :satellite_count :heading :altitude
+                                          :horizontal_accuracy :vertical_accuracy])
+               event-id (:id event-data)
+               extension-values (cache/lookup cache-event-extra-data event-id
+                                              (fn [id] (select event-extension-value
+                                                               (fields :value)
+                                                               (with event-extension-type (fields :name))
+                                                               (where {:event_id id}))))
+
+               ]
+           (merge event-data {:event_locations [loc-data]
+                              :event_extension_values extension-values} )))
+       rows))
+
+
+(defn search-events
+  "Pure JDBC implementation of search"
+  [criteria]
+  (let [result-limit (max-search-result-size (conf/get-config) criteria)
+        conn (get-in (conf/get-config) [:database])
+        opts {:result-type :forward-only
+              :concurrency :read-only
+              :fetch-size (min 1000 result-limit)
+              :max-rows result-limit
+              }
+        conditions (make-sql-crit criteria)
+        ]
+
+    (if (not (empty? (:conds conditions)))
+      (sql/with-connection conn
+        (let [sql (str "select e.*, l.* from events e "
+                       "left outer join event_locations l on (e.id = l.event_id) "
+                       "where " (:conds conditions) " "
+                       (:order-by conditions) " limit " result-limit)
+              params (:params conditions)
+              sql-params (into [] (concat [opts sql] params))
+              ]
+          (apply sql/with-query-results*
+                 [sql-params #(doall (make-search-results %))])
+          ))
+      '())))
+
+(defn search-events-2
   "Search events: criteria is a map that can contain following keys.
 - :storeTimeStart <DateTime>, find events that are created (stored) to database later than given time (inclusive).
 - :storeTimeEnd <DateTime>, find events that are created (stored) to database earlier than given time (inclusive).
@@ -157,8 +258,8 @@
         allowed-max-result-count (get-in (conf/get-config) [:client-api :allowed-max-search-results] )
         max-results (if (:maxResults criteria)
                       (:maxResults criteria)
-                      (get-in (conf/get-config) [:client-api :default-max-search-results]))
-        result-limit (min allowed-max-result-count max-results)
+                      (get-in (conf/get-config) [:client-api :default-max-search-results] 100))
+        result-limit (apply min (filter identity [allowed-max-result-count max-results]))

         tracker-ids-crit (when tracker-ids {:tracker_id ['in tracker-ids]})
         session-ids-crit (when session-ids {:event_session_id ['in session-ids]})
@@ -178,11 +279,11 @@
         ]

     (if (not (empty? conditions))
+
       (let [results (select event
                             (where (apply and conditions))
                             (order (order-by 0) (order-by 1))
                             (limit result-limit)) ]
-
         (map (fn [event]
                (let [event-id (:id event)
                      extra-data (cache/lookup cache-event-extra-data event-id


check for readonly cache at both td and rf levels in the factory chain


Introducing equality for sjcl.bn and sjcl.ecc.point

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


Added interface file for fuzzy fca

Added interface file for fuzzy fca

Signed-off-by: Daniel Borchmann <25857343a15bf1edafebc2912e82ecf775c585c1@mailbox.tu-dresden.de>

error: pathspec 'src/conexp/contrib/fuzzy.clj' did not match any file(s) known to git

--- src/conexp/contrib/fuzzy.clj
+++ src/conexp/contrib/fuzzy.clj
@@ -0,0 +1,27 @@
+;; Copyright (c) Daniel Borchmann. 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 LICENSE 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.
+
+(ns conexp.contrib.fuzzy
+  (:use conexp.main)
+  (:use [clojure.contrib.ns-utils :only (immigrate)])
+  (:require conexp.contrib.fuzzy.sets
+            conexp.contrib.fuzzy.logics
+            conexp.contrib.fuzzy.fca))
+
+(ns-doc "Fuzzy Logics for Formal Concept Analysis")
+
+;;;
+
+(immigrate 'conexp.contrib.fuzzy.sets
+           'conexp.contrib.fuzzy.logics
+           'conexp.contrib.fuzzy.fca)
+
+;;;
+
+nil
+


Add diffs to commit info

Add diffs to commit info

--- src-clj/acha/git_parser.clj
+++ src-clj/acha/git_parser.clj
@@ -29,8 +29,8 @@
       (jgit.p/git-clone url path))))

 (gen-interface
-  :name achivement.git.IDiffStatsProvider
-  :methods [[calculateStats [java.util.List] clojure.lang.APersistentMap]
+  :name achievement.git.IDiffStatsProvider
+  :methods [[calculateDiffs [java.util.List] clojure.lang.APersistentMap]
             [treeIterator [org.eclipse.jgit.revwalk.RevCommit] org.eclipse.jgit.treewalk.AbstractTreeIterator ]])

 (defn- diff-formatter
@@ -38,21 +38,32 @@
   (let [stats (atom {})
         stream (ByteArrayOutputStream.)
         reader (-> repo .getRepository .newObjectReader)
-        formatter (proxy [DiffFormatter achivement.git.IDiffStatsProvider] [stream]
+        diffs (atom [])
+        section (atom [])
+        formatter (proxy [DiffFormatter achievement.git.IDiffStatsProvider] [stream]
                     (writeAddedLine [text line]
-                      (swap! stats update-in [:added] (fnil inc 0)))
+                      (swap! section conj [:add (.getString text line) line])
+                      (swap! stats update-in [:loc :added] (fnil inc 0)))
                     (writeRemovedLine [text line]
-                      (swap! stats update-in [:deleted] (fnil inc 0)))
-                    (treeIterator [commit]
+                      (swap! section conj [:remove (.getString text line) line])
+                      (swap! stats update-in [:loc :deleted] (fnil inc 0)))
+                    (writeHunkHeader [& _]
+                      (swap! diffs conj @section)
+                      (reset! section []))
+                    (treeIterator [commit]
                       (if commit
                         (doto (CanonicalTreeParser.) (.reset reader (.getTree commit)))
                         (EmptyTreeIterator.)))
-                    (calculateStats [diffs]
+                    (calculateDiffs [diff-entities]
+                      (reset! diffs [])
+                      (reset! section [])
+                      (reset! stats nil)
                       (.reset stream)
-                      (reset! stats nil)
-                      (proxy-super format diffs)
+                      (proxy-super format diff-entities)
                       (proxy-super flush)
-                      @stats))]
+                      (when-not (empty? @section)
+                        (swap! diffs conj @section))
+                      (assoc @stats :diffs @diffs)))]
     (doto formatter
       (.setRepository (.getRepository repo))
       (.setDiffComparator RawTextComparator/DEFAULT))))
@@ -97,9 +108,9 @@
             :email (.getEmailAddress ident)
             :time time
             :message message
-            :changed_files (mapv parse-diff-entry diffs)
+            :changed-files (mapv parse-diff-entry diffs)
             :merge (> (.getParentCount rev-commit) 1)}
-           (.calculateStats df diffs))))
+           (.calculateDiffs df diffs))))

 (defn- repo-info [url]
   (let [repo (load-repo url)
@@ -107,5 +118,6 @@
     (map #(commit-info repo % formatter) (jgit.q/rev-list repo))))

 (defn setup []
-  (repo-info "https://github.com/tonsky/datascript.git"))
+ (repo-info "https://github.com/tonsky/datascript.git"))
+;  (spit "test_rails" (prn-str (repo-info "https://github.com/rails/rails.git"))))


Added necessary with-gen to be able to do (-> (stest/enumerate-namespace 'adventofcode1.four2) stest/check) to check all functions

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

--- src/adventofcode1/four2.clj
+++ src/adventofcode1/four2.clj
@@ -0,0 +1,220 @@
+(ns adventofcode1.four2
+  "http://adventofcode.com/2016/day/4"
+  (:require
+   [clojure.spec :as s]
+   [clojure.spec.gen :as gen]
+   [clojure.spec.test :as stest]
+   [com.gfredericks.test.chuck.generators :as gen']
+   [clojure.test.check :as tc]
+   [clojure.test.check.generators :as tcgen]
+   [clojure.test.check.properties :as tcprop]
+
+   [clojure.core.match :refer [match]]
+
+   spyscope.core
+   adventofcode1.spec-test-instrument-debug))
+
+
+
+;; Improve: using ::name both for "aaaaa-bbb-z-y-x-123[abxyz]" and "aaaaa-bbb-z-y-x-"
+(s/def ::full-name (s/with-gen string? #(gen'/string-from-regex #"([a-c]+-){3,}[0-9]+\[[a-z]+\]"))) ; => YES
+(s/def ::name (s/with-gen string? #(gen'/string-from-regex #"([a-c]+-){3,}"))) ; => YES
+
+;; (s/def ::name (s/spec string? :gen #(gen'/string-from-regex #"([a-c]{3}-)*[0-9]+\[[a-z]+\]"))) ; => YES
+;;(s/def ::name (s/with-gen string? #{"aaaaa-bbb-z-y-x-123[abxyz]" "aaaaa-bbb-z-y-x-123[error]"})) :=> no
+;;(s/def ::name (s/with-gen string? (s/spec #{"aaaaa-bbb-z-y-x-123[abxyz]" "aaaaa-bbb-z-y-x-123[error]"}))) ;=> no
+;;(s/def ::name #{"aaaaa-bbb-z-y-x-123[abxyz]" "aaaaa-bbb-z-y-x-123[error]"}) ;=> works
+;; (s/def ::name (s/with-gen string? (fn [] (s/gen #{"aaaaa-bbb-z-y-x-123[abxyz]" "aaaaa-bbb-z-y-x-123[error]"})))) ;=> yes
+;; (s/def ::name (s/with-gen string? #(s/gen #{"aaaaa-bbb-z-y-x-123[abxyz]" "aaaaa-bbb-z-y-x-123[error]"}))) ;=> yes
+
+(s/def ::checksum string?)
+(s/def ::sectorid integer?)
+(s/def ::parsed-room-name (s/keys :req-un [::name ::checksum ::sectorid]))
+
+(s/fdef split-room-name
+        :args (s/cat :name ::full-name)
+        ;; tuple with [name, sectorid, checksum]
+        :ret  (s/coll-of string? :count 3))
+
+(defn split-room-name
+  "Split room name and return tuple with [name, sectorid, checksum] as strings."
+  [name]
+  (rest (re-find (re-matcher #"([-a-z]+)(\d+)\[(.+)\]" name))))
+
+
+(s/fdef parse-room-name
+        :args (s/cat :name ::full-name)
+        :ret  ::parsed-room-name)
+
+(defn parse-room-name
+  "Split and parse room name and return map with :name :sectorid :checksum"
+  [name]
+  (let [split (split-room-name name)
+        _ (assert (= 3 (count split)) "Not a valid room name")
+        [name sectorid checksum] split]
+    {:name name
+     ;; parse number using bigint, could have used read-string instead, but then I need to check that result is a number
+     :sectorid (bigint sectorid)
+     :checksum checksum}))
+
+(defn build-result
+  "Checksum is the five most common letters in the encrypted name, in order, with ties broken by alphabetization."
+  [acc distinct-cnts-desc checksum]
+  (if (empty? distinct-cnts-desc)
+    ;; we cannot guarantee there will not be more than 5 chars, just keep the first ones
+    (take 5 acc)
+    (let [res (filter (fn [[cnt char]] (= cnt (first distinct-cnts-desc))) checksum)]
+      (recur (concat acc res) (rest distinct-cnts-desc) checksum))))
+
+(s/fdef checksum
+        :args (s/cat :name ::name)
+        :ret  ::checksum)
+
+(defn checksum
+  [name]
+  (let [freq (dissoc (frequencies (seq name)) \-)
+        checksum (sort (map (fn [[char cnt]] [cnt char]) freq))
+        ;; [] is just an accumulator to make function tail-recursive
+        ;; (distinct (map first checksum)) is the letters in occurrency order
+        ;; (reverse checksum) is the order we are going to show them if tie
+        res (build-result [] (reverse (distinct (map first checksum))) checksum)]
+    (clojure.string/join (map second res))))
+
+(s/fdef valid-room-name
+        :args (s/cat :name ::full-name)
+        :ret  ::sectorid)
+
+(defn valid-room-name
+  "Check if room name is valid.
+   If valid, return sectorid, else 0"
+  [name]
+  (let [room (parse-room-name name)
+        checksum (checksum (:name room))]
+    (if (= checksum (:checksum room))
+      (:sectorid room)
+      0)))
+
+(s/fdef valid-room-name?
+        :args (s/cat :name ::full-name)
+        :ret  boolean?)
+
+(defn valid-room-name?
+  "Return true if room is valid."
+  [name]
+  (try
+    (> (valid-room-name name) 0)
+    (catch Throwable _ false)))
+
+(s/fdef sum-sectorid-of-valid-room-names
+        :args (s/cat :names (s/coll-of ::full-name))
+        :ret  integer?)
+
+
+(defn sum-sectorid-of-valid-room-names
+  [names]
+  (reduce + (map valid-room-name names)))
+
+(s/fdef rotate-char
+        ;; we need to require a pos? or zero? here since negative values doesn't work
+        :args (s/cat :text char? :n (s/and integer? (s/or :zero zero? :pos pos?)))
+        :ret  char?)
+
+(defn rotate-char
+  "Rotate the lower-case char n positions,"
+  [ch n]
+  (let [res (+ (int ch) n)]
+    (char (if (> res 122) (+ 97 (mod (- res 97) 26)) res))))
+
+(s/fdef rotate-string
+        :args (s/cat :text string? :n (s/and integer? (s/or :zero zero? :pos pos?)))
+        :ret  string?)
+
+(defn rotate-string
+  "Rotate each char in lower-case string n positions."
+  [text n]
+  (clojure.string/join (map #(rotate-char % n) (or (seq text) []))))
+
+(s/fdef find-northpole
+        ;; need a better way to generate valid room names
+        ;; ExceptionInfo Couldn't satisfy such-that predicate after 100 tries.  clojure.core/ex-info (core.clj:4725)
+        ;; :args (s/cat :names (s/coll-of (s/and string? valid-room-name?)))
+        ;; maybe I should look at https://github.com/gfredericks/test.chuck
+        :args (s/cat :names (s/coll-of ::full-name :min-count 1))
+        :ret  (s/or :not-found nil? :found (s/tuple integer? string?)))
+
+
+(defn find-northpole
+  [names]
+  (if (empty? names) nil
+      (let [room (parse-room-name (first names))
+            rotated (rotate-string (:name room) (:sectorid room))]
+        (if (clojure.string/starts-with? rotated "north")
+          [(:sectorid room) rotated]
+          (recur (rest names))))))
+
+#_(stest/check `find-northpole)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+;;; using test.check's gen
+#_(def sort-idempotent-prop-tc
+   (prop/for-all [v (gen/vector tcgen/int)]
+                (= (sort v) (sort (sort v)))))
+
+;; (tc/quick-check 100 sort-idempotent-prop-tc)
+
+;; using specs gen
+#_(def sort-idempotent-prop
+   (prop/for-all [v (gen/vector (gen/int))]
+                (= (sort v) (sort (sort v)))))
+
+;; (tc/quick-check 100 sort-idempotent-prop)
+
+;; using s/gen
+#_(def sort-idempotent-prop-spec
+   (prop/for-all [v (s/gen (s/coll-of int?))]
+                (= (sort v) (sort (sort v)))))
+
+
+;; (tc/quick-check 100 sort-idempotent-prop-spec)
+
+;; instead of using s/coll-of, you can use s/spec
+;; (gen/sample (s/gen (s/cat :foo int? :cols (s/spec (s/+ string?)))))
+
+;; how to get generate :args from a fdef spec
+;; the trick is `split-room-name or #', refering to the ::split-room-name will not work
+
+;; (gen/sample (s/gen (:args (s/get-spec `split-room-name))))
+;; (("") ("") ("dG") ("PF") ("NhM") ("B7H") ("8i") ("") ("w") ("dbFbM"))
+;; adventofcode1.four> (gen/sample (s/gen (:args (s/get-spec #'split-room-name))))
+;; (("") ("") ("Ib") ("4") ("ub") ("g4a") ("2R2i0") ("ZM") ("lCg6Xzm3") ("w"))
+;; adventofcode1.four> (gen/sample (s/gen (:args (s/get-spec #'split-room-name))))
+;; (("") ("") ("2") ("8") ("p") ("xTZ") ("aG7g07") ("QAIw10o") ("f") (""))
+;; adventofcode1.four> (gen/sample (s/gen (:ret (s/get-spec #'split-room-name))))
+;; (["" "" ""] ["G" "1" "0"] ["" "M" "95"] ["mW" "M7T" "3"] ["p60H" "U" ""] ["2" "d1Mk7" "yG"] ["X58p" "N24llA" "W"] ["rS5c8Z" "Ze" "7z43LCy"] ["AFey9sl" "w827" ""] ["IW08KGg" "j" "ic"])
+;; adventofcode1.four> (gen/sample (s/gen (:ret (s/get-spec #'split-room-name))))
+;; (["" "" ""] ["Z" "k" ""] ["" "5O" "45"] ["b4k" "4" "ZL"] ["" "V" ""] ["il" "1M0b" "O074"] ["E" "SzL7" "C321"] ["R5" "" "0928F"] ["f1f4" "36DmP2P" "oh"] ["W6c" "l3GjgsHt" "3P"])
+;; adventofcode1.four> (gen/sample (s/gen (:ret (s/get-spec #'split-room-name))))
+;; (["" "" ""] ["" "" ""] ["1" "" "9H"] ["1" "Gu2" "32"] ["5RO" "a" "p"] ["6lxy" "Z7E" "SO3Mv"] ["42Q" "7CEA0" "i8"] ["YnT6HS" "" ""] ["NfEYQW" "i0hGId" "r8oj"] ["ZHw" "HU0D40An5" "34eLgU"])
+;; adventofcode1.four> (gen/sample (s/gen (s/get-spec ::name)))
+
+;; ("" "" "9Y" "a3a" "j" "H923x" "E" "yxd" "7172c" "lFYt")
+;; adventofcode1.four>
+
+
+;; yes map + apply of gen/sample works fine
+;;
+;; (map #(do (println %)(apply rotate-char %)) (gen/sample (s/gen (:args (s/get-spec #'rotate-char))) 3))
+;; (> 0)
+;; (a 0)
+;; (a 0)
+;; (\> \g \a)
+
+(clojure.spec.test/instrument)
+
+;; how to run all check functions for this namespace
+;;
+;; (-> (stest/enumerate-namespace 'adventofcode1.four2) stest/check)
+;;
+;; checked code of check, and it uses pmap already!


Generate a unique class name.

Generate a unique class name.

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


Autocomplete suggestions

Autocomplete suggestions

--- src/metabase/api/meta/db.clj
+++ src/metabase/api/meta/db.clj
@@ -10,6 +10,7 @@
             (metabase.models common
                              [hydrate :refer [hydrate]]
                              [database :refer [Database]]
+                             [field :refer [Field]]
                              [org :refer [org-can-read org-can-write]]
                              [table :refer [Table]])))

@@ -38,9 +39,29 @@
     (check-403 @can_write))
   (del Database :id id))

+(defendpoint GET "/:id/autocomplete_suggestions" [id prefix]
+  (let-404 [{:keys [can_read]} (sel :one Database :id id)]
+    (check-403 @can_read))
+  (let [prefix-len (count prefix)
+        table-id->name (->> (sel :many [Table :id :name] :db_id id)                                             ; fetch all name + ID of all Tables for this DB
+                            (map (fn [{:keys [id name]}]                                                         ; make a map of Table ID -> Table Name
+                                   {id name}))
+                            (apply merge {}))
+        matching-tables (->> (vals table-id->name)                                                              ; get all Table names that start with PREFIX
+                             (filter (fn [^String table-name]
+                                       (= prefix (.substring table-name 0 prefix-len))))
+                             (map (fn [table-name]                                                               ; return them in the format [table_name "Table"]
+                                    [table-name "Table"])))
+        fields (->> (sel :many [Field :name :base_type :special_type :table_id]                                 ; get all Fields with names that start with PREFIX
+                         :table_id [in (keys table-id->name)]                                                   ; whose Table is in this DB
+                         :name [like (str prefix "%")])
+                    (map (fn [{:keys [name base_type special_type table_id]}]                                    ; return them in the format
+                           [name (str (table-id->name table_id) " " base_type (when special_type                ; [field_name "table_name base_type special_type"]
+                                                                                (str " " special_type)))])))]
+    (concat matching-tables fields)))                                                                           ; return combined seq of Fields + Tables
+
 (defendpoint GET "/:id/tables" [id]
   (sel :many Table :db_id id (order :name)))
-

 (defendpoint POST "/:id/sync" [id]
   (let-404 [db (sel :one Database :id id)]   ; run sync-tables asynchronously.


Added some potentially useful Java interoperability functions

error: pathspec 'lib/compojure/java/java.clj' did not match any file(s) known to git

--- lib/compojure/java/java.clj
+++ lib/compojure/java/java.clj
@@ -0,0 +1,71 @@
+;; compojure.java
+;;
+;; Java compatibility functions for Compojure.
+
+(ns compojure.java
+  (:use (compojure str-utils)))
+
+(defn- method-names
+  "Find the unique method names from a collection of methods."
+  [coll]
+  (set (map (memfn getName) coll)))
+
+(defn methods
+  "Return a set of all method names for the given class."
+  [class]
+  (method-names (.getMethods class)))
+
+(defn declared-methods
+  "Return a set of method names specifically declared by the given class."
+  [class]
+  (method-names (.getDeclaredMethods class)))
+
+(defn getters
+  "Find all the getter method names for a given class."
+  [class]
+  (method-names
+    (filter #(and (.startsWith (.getName %) "get")
+                  (= (count (.getParameterTypes %)) 0))
+             (.getDeclaredMethods class))))
+
+(defn setters
+  "Find all the setter method names for a given class."
+  [class]
+  (method-names
+    (filter #(and (.startsWith (.getName %) "set")
+                  (= (count (.getParameterTypes %)) 1))
+             (.getDeclaredMethods class))))
+
+(defn invoke
+  "Call a method on an object given the method name as a string."
+  [object method & args]
+  (eval `(. ~object (~(symbol method) ~@args))))
+
+(defn- strip-get
+  "Strip the initial 'get' off a getter and lowercase the new first letter."
+  [method]
+  (str (.toLowerCase (.substring method 3 4))
+       (.substring method 4)))
+
+(defn getmap
+  "Turn all the getters of a Java object into a map."
+  [object]
+  (apply hash-map
+    (mapcat (fn [m] [(keyword (strip-get m)) (invoke object m)])
+            (getters (class object)))))
+
+(defn prepend-set
+  "Uppercase first letter and add 'set' to the beginning."
+  [s]
+  (str "set" (.toUpperCase (.substring s 0 1)) (.substring s 1)))
+
+(defn setmap
+  "Apply a setter on a Java object for each key/value pair in a map. If the key
+  has no equivalent setter, it is ignored."
+  [object map]
+  (let [all-setters (setters (class object))]
+    (doseq [key val] map
+      (let [setter (prepend-set (str* key))]
+        (if (contains? all-setters setter)
+          (invoke object setter val))))
+    object))


we have the user/current route as part of the user/routes definitions now.

--- src/metabase/api/routes.clj
+++ src/metabase/api/routes.clj
@@ -14,7 +14,6 @@
   (context "/session" [] session/routes)
   (context "/user" [] user/routes)
   (GET "/card/:id" [id] (card/by-id id))
-  (GET "/user/current" [] user/current)
   (route/not-found (fn [{:keys [request-method uri]}]
                         {:status 404
                          :body (str (.toUpperCase (name request-method)) " " uri " is not yet implemented.")})))


Add direct translation of Dan Stowell's automatic dubstep synth as an example.

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

--- test/example/dubstep.clj
+++ test/example/dubstep.clj
@@ -0,0 +1,67 @@
+(ns example.dubstep
+  (:use [overtone.live]))
+
+;; Dan Stowells' Dubstep Synth:
+;; SClang version:
+;;
+;;s.waitForBoot{Ndef(\a).play;Ndef(\a,
+;;{
+;;var trig, freq, notes, wob, sweep, kickenv, kick, snare, swr, syn, bpm, x;
+;;x = MouseX.kr(1, 4);
+;;
+;;
+;;// START HERE:
+;;
+;;bpm = 120;
+;;
+;;notes = [40, 41, 28, 28, 28, 28, 27, 25, 35, 78];
+;;
+;;trig = Impulse.kr(bpm/120);
+;;freq = Demand.kr(trig, 0, Dxrand(notes, inf)).lag(0.25).midicps;
+;;swr = Demand.kr(trig, 0, Dseq([1, 6, 6, 2, 1, 2, 4, 8, 3, 3], inf));
+;;sweep = LFTri.ar(swr).exprange(40, 3000);
+;;
+;;
+;;// Here we make the wobble bass:
+;;wob = Saw.ar(freq * [0.99, 1.01]).sum;
+;;wob = LPF.ar(wob, sweep);
+;;wob = Normalizer.ar(wob) * 0.8;
+;;wob = wob + BPF.ar(wob, 1500, 2);
+;;wob = wob + GVerb.ar(wob, 9, 0.7, 0.7, mul: 0.2);
+;;
+;;
+;;// Here we add some drums:
+;;kickenv = Decay.ar(T2A.ar(Demand.kr(Impulse.kr(bpm / 30),0,Dseq([1,0,0,0,0,0,1,0, 1,0,0,1,0,0,0,0],inf))),0.7);
+;;kick = SinOsc.ar(40+(kickenv*kickenv*kickenv*200),0,7*kickenv).clip2;
+;;snare = 3*PinkNoise.ar(1!2)*Decay.ar(Impulse.ar(bpm / 240, 0.5),[0.4,2],[1,0.05]).sum;
+;;snare = (snare + BPF.ar(4*snare,2000)).clip2;
+;;
+;;// This line actually outputs the sound:
+;;(wob + kick + snare).clip2;
+;;
+;;})}
+;;
+;; Directly translated to Overtone:
+
+(demo 60
+ (let [bpm 120
+       notes [40 41 28 28 28 27 25 35 78]
+       trig (impulse:kr (/ bpm 120))
+       freq (midicps (lag (demand trig 0 (dxrand notes INF)) 0.25))
+       swr (demand trig 0 (dseq [1 6 6 2 1 2 4 8 3 3] INF))
+       sweep (lin-exp (lf-tri swr) -1 1 40 3000)
+       wob (apply + (saw (* freq [0.99 1.01])))
+       wob (lpf wob sweep)
+       wob (* 0.8 (normalizer wob))
+       wob (+ wob (bpf wob 1500 2))
+       wob (+ wob (* 0.2 (g-verb wob 9 0.7 0.7)))
+
+       kickenv (decay (t2a (demand (impulse:kr (/ bpm 30)) 0 (dseq [1 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0] INF))) 0.7)
+       kick (* (* kickenv 7) (sin-osc (+ 40 (* kickenv kickenv kickenv 200))))
+       kick (clip2 kick 1)
+
+       snare (* 3 (pink-noise [1 1]) (apply + (* (decay (impulse (/ bpm 240) 0.5) [0.4 2]) [1 0.05])))
+       snare (+ snare (bpf (* 4 snare) 2000))
+       snare (clip2 snare 1)]
+
+   (clip2 (+ wob kick snare) 1)))


make gen-inline-binding-form a multimethod to allow arbitrary and dynamic extensibility

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/aamedina/clojure.llvm.git/'


Azalaren formatua aztertu

Azalaren formatua aztertu

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


started mastersign.wordcloud with basic graphical functions based on Java AWT

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

--- src/mastersign/wordcloud.clj
+++ src/mastersign/wordcloud.clj
@@ -0,0 +1,115 @@
+(ns mastersign.wordcloud
+  (:import [java.awt Graphics Graphics2D Color RenderingHints Font])
+  (:import [java.awt.image BufferedImage])
+  (:import [java.awt.font GlyphVector GlyphMetrics])
+  (:import [java.awt.geom Area Rectangle2D Rectangle2D$Float Point2D Point2D$Float])
+  (:import [javax.imageio ImageIO])
+  (:import [java.io File]))
+
+(def text-antialias-mode RenderingHints/VALUE_TEXT_ANTIALIAS_ON)
+(def default-color Color/BLACK)
+(def font-family "Calibri")
+(def font-style Font/BOLD)
+
+(def base-font (Font. font-family font-style (float 100)))
+
+(defn image
+  [w h]
+  (BufferedImage. w h BufferedImage/TYPE_INT_ARGB))
+
+(defn create-image
+  [w h f]
+  (let [img (image w h)
+        g (.createGraphics img)]
+    (f g w h)
+    (.dispose g)
+    img))
+
+(defn save-image
+  [img path]
+  (ImageIO/write img "png" (File. path)))
+
+(defn text-rect
+  ([g font text]
+   (let [gv (.createGlyphVector font (.getFontRenderContext g) text)]
+     (.getVisualBounds gv)))
+  ([g font text x y]
+   (let [r (text-rect g font text)]
+     (Rectangle2D$Float. (+ x (.x r)) (+ y (.y r)) (.width r) (.height r)))))
+
+(defn text-area
+  [g font text x y]
+  (Area. (text-rect g font text x y)))
+
+(defn rect-center
+  [r]
+  (Point2D$Float. (+ (.x r) (/ (.width r) 2.0)) (+ (.y r) (/ (.height r) 2.0))))
+
+(defn center-to-offset
+  [p]
+  (Point2D$Float. (* -1 (.x p)) (* -1 (.y p))))
+
+
+; ########################
+
+
+(defn calc-font-size
+  [[_ v]]
+  (float (+ 14 (* 40 v))))
+
+(defn get-font
+  [x]
+  (.deriveFont base-font (calc-font-size (second x))))
+
+(defn get-rect
+  [g font x]
+  (text-rect g font (first x)))
+
+(defn build-word-info
+  [g x]
+  (let [text (first x)
+        font (get-font x)
+        rect (get-rect g font x)
+        offset (center-to-offset (rect-center rect))
+        rect* (Rectangle2D$Float. (+ (.x rect) (.x offset)) (+ (.y rect) (.y offset)) (.width rect) (.height rect))]
+      {:text text :font font :rect rect :offset offset :rect* rect*}))
+
+; ##########################
+
+(def words
+  ["Alpha" "Beta" "Charlie" "Delta" "Echo" "Foxtrott"
+   "Golf" "Hotel" "India" "Juliette" "Kilo" "Lima"
+   "Mike" "November" "Oscar" "Papa" "Quebec" "Romeo"
+   "Sierra" "Tango" "Uniform" "Victor" "Whiskey" "X-Ray"
+   "Yankee" "Zulu"])
+
+(def stats (vec (map (fn [x] [x (/ (rand-int 101) 100.0)]) words)))
+(def sorted-stats (reverse (sort-by second stats)))
+(println sorted-stats)
+
+(defn test-painter
+  [g w h]
+  (let [font (.deriveFont base-font (float 30.0))
+        text "MjgqAIkqQ$§|"
+        r1 (text-rect g font text 0 30)
+        r2 (text-rect g font text 0 60)
+        a1 (Area. r1)
+        c2 (rect-center r2)]
+    (doto g
+      (.setRenderingHint RenderingHints/KEY_TEXT_ANTIALIASING text-antialias-mode)
+      (.setFont font)
+      (.setColor default-color)
+      (.drawRect 0 0 (- w 1) (- h 1))
+      (.setColor Color/GREEN)
+      (.fill a1)
+      (.setColor default-color)
+      (.draw a1)
+      (.drawString text 0 30)
+      (.drawString text 0 60)
+      (.setColor Color/RED)
+      (.fillRect (- (.x c2) 2) (- (.y c2) 2) 4 4)
+      )))
+
+(let [img (create-image 400 200 test-painter)]
+  (save-image img "D:/Temp/test.png"))
+


add language to schema, user->recipient

add language to schema, user->recipient

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


Add code file of README examples

Add code file of README examples

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

--- src/uruk/examples/readme.clj
+++ src/uruk/examples/readme.clj
@@ -0,0 +1,65 @@
+(ns uruk.examples.readme
+  "Examples from and for the README"
+  (:require [uruk.core :as uruk]))
+
+;; Basic usage
+(with-open [session (uruk/create-session {:uri xdbc-uri :content-base database-name
+                                          :user database-user :password database-pwd})]
+  (uruk/execute-xquery session xquery-string))
+
+;; Concrete example
+(with-open [session (uruk/create-session {:uri "xdbc://localhost:8383/"
+                                          :user "rest-writer" :password "password"})]
+  (uruk/execute-xquery session "\"hello world\""))
+;; => "hello world"
+
+;; DB info
+(def db {:uri "xdbc://localhost:8383/"
+         :user "rest-admin" :password "password"
+         :content-base "TutorialDB"})
+
+(with-open [session (uruk/create-session db)]
+  (uruk/execute-xquery session "\"hello world\"" :types :raw))
+;; => #object[com.marklogic.xcc.impl.CachedResultSequence 0x2c034c22 "CachedResultSequence: size=1, closed=false, cursor=-1"]
+
+;; Inspecting result types with `result-type`
+(with-open [session (uruk/create-session db)]
+  (uruk/result-type (uruk/execute-xquery session "\"hello world\"" :types :raw)))
+;; => "xs:string"
+
+;; Replacing the default type-conversion functions
+(with-open [session (uruk/create-session db)]
+  (uruk/execute-xquery session
+                       "xquery version \"1.0-ml\"; doc('/dir/unwieldy.xml')"
+                       :types {"document-node()" #(custom-function %)}))
+
+;; Working within a transaction
+(with-open [session (uruk/create-session db {:transaction-mode :update})]
+  ;; The first request (query) starts a new, multi-statement transaction:
+  (uruk/execute-xquery session "xdmp:document-insert('/docs/mst1.xml', <data><stuff/></data>)")
+
+  ;; This second request executes in the same transaction as the
+  ;; previous request and sees the results of the previous update:
+  (uruk/execute-xquery session "xdmp:document-insert('/docs/mst2.xml', fn:doc(\"/docs/mst1.xml\"));")
+
+  ;; After commit, updates are visible to other transactions. Commit
+  ;; ends the transaction after current statement completes.
+  (uruk/commit session) ;; <—- Transaction ends; updates are kept
+
+  ;; Rollback discards changes and ends the transaction. The following
+  ;; document deletion query never occurs, since it is rolled back
+  ;; before calling commit:
+  (uruk/execute-xquery session "xdmp:document-delete('/docs/mst1.xml')")
+  (uruk/rollback session) ;; <– Transaction ends; updates are lost
+
+  ;; Closing session without calling commit causes a rollback. The
+  ;; following update is lost, since we don't commit before the end of
+  ;; the (with-open) and its implicit `.close`:
+  (uruk/execute-xquery session "xdmp:document-delete('/docs/mst1.xml')"))
+
+;; Inserting Clojure XML elements
+(with-open [session (uruk/create-session db)]
+  (uruk/insert-element session "/content-factory/newcontent3" (clojure.data.xml/element :foo)))
+
+(with-open [sess (uruk/create-session db)]
+  (uruk/execute-xquery sess "xquery version \"1.0-ml\"; doc(\"/content-factory/newcontent3\")"))


AR outputs relation with inverse

AR outputs relation with inverse

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-v3-migration.git/'


added require that is silent on fail util

--- sidecar/src/figwheel_sidecar/utils.clj
+++ sidecar/src/figwheel_sidecar/utils.clj
@@ -30,6 +30,13 @@
     (catch Exception e
       (println (.getMessage e))
       (.printStackTrace e)
+      false)))
+
+(defn silent-fail-require! [symbol]
+  (try
+    (require symbol)
+    true
+    (catch Exception e
       false)))

 (defn require-resolve-handler [handler]


A Clojure test-case added. Clojure failed with OutOfMemoryError.

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

--- app/test007.clj
+++ app/test007.clj
@@ -0,0 +1,19 @@
+(in-ns 'bts.core)
+
+(use 'clongra.core)
+
+(def M 8)
+(def K 8)
+
+(defn int-adjs
+  [i]
+  (take M (iterate inc (* i 10))))
+
+(defn int-show
+  [i]
+  (str i))
+
+
+(defn test1
+  []
+  (with-out-str (print-tree 1 int-adjs int-show K)) nil)


added normal laplace

added normal laplace

error: pathspec 'src/distributions/normal-laplace.clj' did not match any file(s) known to git

--- src/distributions/normal-laplace.clj
+++ src/distributions/normal-laplace.clj
@@ -0,0 +1,14 @@
+(in-ns 'distributions.core)
+
+(defn normal-laplace
+  "N(x|mu, s2 gamma)Laplace(x| tau/s)"
+  [mu gamma tau s2]
+  (let [s (sqrt s2)
+        mu+ (- mu (* gamma s tau))
+        mu- (+ mu (* gamma s tau))
+        v (* (sqrt gamma) s)
+        v2 (square v)
+        w- (/ (probit (negate (/ mu- v))) (pdf (normal mu- v2) 0))
+        w+ (/ (probit (/ mu+ v)) (pdf (normal mu+ v2) 0))
+        w  (/ w- (+ w- w+))]
+    (mixture [(truncated (normal mu- v2) Double/NEGATIVE_INFINITY 0) (truncated (normal mu+ v2) 0 Double/POSITIVE_INFINITY)] [w (- 1 w)])))


Add test cases for reload bug in riemann.config/index

`WrappedIndex`es are not working across reloads as they do not take into
account the fact that when an index already exists, the index inserted
into `next-core` is thrown away during a core merge.

This has the effect of breaking event expiration.

--- test/riemann/config_test.clj
+++ test/riemann/config_test.clj
@@ -129,15 +129,29 @@

 (deftest index-test
          (let [i (index)]
-           (is (satisfies? Index i))
-           (is (= i (:index @next-core)))
-           (is (nil? (:index @core)))))
+           (testing "ensure the index creation helper creates the index properly"
+             (is (satisfies? Index i))
+             (is (= i (:index @next-core)))
+             (is (nil? (:index @core))))
+           (testing "ensure the index is applied to the core properly during initial load"
+             (apply!)
+             (is (identical? i (:index @core))))
+           (testing "ensure we have the proper reference to the index after a reload"
+             (let [i' (index)]
+               (is (identical? i' (:index @next-core)))
+               (is (not (identical? i' (:index @core))))
+               (apply!)
+               (is (identical? i' (:index @core)))))))

 (deftest update-index-test
          (let [i (index)]
            (apply!)
            (i {:service 1 :state "ok" :time 0})
-           (is (= (seq i) [{:service 1 :state "ok" :time 0}]))))
+           (is (= (seq i) [{:service 1 :state "ok" :time 0}]))
+           (testing "Ensure that accessible index persists reloads"
+             (let [i' (index)]
+               (apply!)
+               (is (= (seq i') [{:service 1 :state "ok" :time 0}]))))))

 (deftest delete-from-index-test
          (let [i (index)


rev comment

rev comment

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


Fix think-o on data-file-writer -> output stream.

--- src/clojure/abracad/avro.clj
+++ src/clojure/abracad/avro.clj
@@ -180,7 +180,7 @@
   ([codec schema sink]
      (let [^DataFileWriter writer (data-file-writer)]
        (when codec (.setCodec writer (codec-for codec)))
-       (if (instance? OutputStream)
+       (if (instance? OutputStream sink)
          (.create writer ^Schema schema ^OutputStream sink)
          (.create writer ^Schema schema (io/file sink)))
        writer)))


[WM DG] make voter-reg-method instructions a map

...of type to text; just like they are for voting-methods.

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


use `zero?`

use `zero?`

--- src/metabase/driver/generic_sql/query_processor.clj
+++ src/metabase/driver/generic_sql/query_processor.clj
@@ -22,15 +22,16 @@
 (defn process
   "Convert QUERY into a korma `select` form."
   [{{:keys [source_table] :as query} :query}]
-  (let [forms (->> (map apply-form query) ; call `apply-form` for each clause and strip out nil results
-                   (filter identity)
-                   (mapcat (fn [form] (if (vector? form) form ; some `apply-form` implementations return a vector of multiple korma forms; if only one was
-                                         [form])))           ; returned wrap it in a vec so `mapcat` can build a flattened sequence of forms
-                   doall)]
-    (when *enable-debug-logging*
-      (log-query query forms))
-    `(let [entity# (table-id->korma-entity ~source_table)]
-       (select entity# ~@forms))))
+  (when-not (zero? source_table)
+    (let [forms (->> (map apply-form query) ; call `apply-form` for each clause and strip out nil results
+                     (filter identity)
+                     (mapcat (fn [form] (if (vector? form) form ; some `apply-form` implementations return a vector of multiple korma forms; if only one was
+                                           [form])))           ; returned wrap it in a vec so `mapcat` can build a flattened sequence of forms
+                     doall)]
+      (when *enable-debug-logging*
+        (log-query query forms))
+      `(let [entity# (table-id->korma-entity ~source_table)]
+         (select entity# ~@forms)))))

 (defn process-and-run
   "Convert QUERY into a korma `select` form, execute it, and annotate the results."


Getting somewhere with uploading (finally!)

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


test for POST /api/query

test for POST /api/query

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

--- test/metabase/api/query_test.clj
+++ test/metabase/api/query_test.clj
@@ -0,0 +1,27 @@
+(ns metabase.api.query-test
+  "Tests for /api/query endpoints."
+  (:require [expectations :refer :all]
+            [korma.core :refer :all]
+            [metabase.db :refer :all]
+            (metabase.models [query :refer [Query]])
+            [metabase.test.util :refer [match-$ random-name expect-eval-actual-first]]
+            [metabase.test-data :refer :all]))
+
+;; ## POST /api/query
+;; Check that we can save a Query
+
+(expect-eval-actual-first
+    (match-$ (sel :one Query (order :id :DESC))
+      {:database_id (:id @test-db)
+       :name $
+       :type "rawsql"
+       :creator_id (user->id :rasta)
+       :updated_at $
+       :details {:timezone nil
+                 :sql "SELECT COUNT(*) FROM VENUES;"}
+       :id $
+       :version $
+       :public_perms 0
+       :created_at $})
+  ((user->client :rasta) :post 200 "query" {:database (:id @test-db)
+                                            :sql "SELECT COUNT(*) FROM VENUES;"}))


Add Piper!

Add Piper!


label roots

label roots

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/AustinC/persistent-internals.git/'


add test functionality.

add test functionality.

error: pathspec 'src/leiningen/ancient/test.clj' did not match any file(s) known to git

--- src/leiningen/ancient/test.clj
+++ src/leiningen/ancient/test.clj
@@ -0,0 +1,30 @@
+(ns leiningen.ancient.test
+  (:require [leiningen.core
+             [main :as main]
+             [project :as prj]]
+            [leiningen.ancient.artifact.files :as f]
+            [leiningen.ancient
+             [verbose :refer :all]]))
+
+(defn- run-test-task!
+  "Run test task. Will throw or return true."
+  [project task]
+  (try
+    (let [[task-name & task-args] task
+          project' (prj/init-project project)]
+      (verbosef "%nrunning test task %s ..." (pr-str task))
+      (binding [main/*exit-process?* false]
+        (main/apply-task task-name project' task-args)
+        true))
+    (catch Throwable t
+      t)))
+
+(defn run-tests!
+  "Run tests contained in the alias 'test-ancient' or 'test', with
+   the standard 'test' task being the default."
+  [project]
+  (let [task (or (get-in project [:aliases "test-ancient"])
+                 (get-in project [:aliases "test"])
+                 "test")
+        task (if (sequential? task) task [task])]
+    (run-test-task! project task)))


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


Refactored clojure mp upload test case

Refactored clojure mp upload test case

--- client_tests/clojure/clj-s3/test/java_s3_tests/test/client.clj
+++ client_tests/clojure/clj-s3/test/java_s3_tests/test/client.clj
@@ -76,6 +76,26 @@
 (defn etag-suffix [etag]
   (subs etag (- (count etag) 2)))

+(defn create-manager [c]
+  (TransferManager. c))
+
+(defn configure-manager [tm]
+  (let [tm-config (.getConfiguration tm)]
+    (.setMultipartUploadThreshold tm-config 19)
+    (.setMinimumUploadPartSize tm-config 10)
+    (.setConfiguration tm tm-config)))
+
+(defn create-and-configure-manager [c]
+  (let [tm (create-manager c)]
+    (configure-manager tm)
+    tm))
+
+(defn upload-file [tm bucket-name object-name file-name]
+  (let [f (clojure.java.io/file file-name)
+        u (.upload tm bucket-name object-name f)]
+    (.waitForCompletion u)
+    (.delete f)))
+
 (fact "bogus creds raises an exception"
       (let [bogus-client
             (s3/client "foo"
@@ -139,24 +159,16 @@
 (let [bucket-name (random-string)
       object-name (random-string)
       value (str "aaaaaaaaaa" "bbbbbbbbbb")
-      upload-file "./clj-mp-test.txt"]
+      file-name "./clj-mp-test.txt"]
   (fact "mulitpart upload works"
         (with-random-client c
           (do
             (s3/create-bucket c bucket-name)
-            (def tm (TransferManager. c))
-            (def tm-config (.getConfiguration tm))
-            (.setMinimumUploadPartSize tm-config 10)
-            (.setMultipartUploadThreshold tm-config 19)
-            (.setConfiguration tm tm-config)
-            (write-file upload-file value)
-            (def f (clojure.java.io/file upload-file))
-            (def u (.upload tm bucket-name object-name f))
-            (.waitForCompletion u)
-            (.delete f)
-            (def fetched-object (s3/get-object
-                                 c bucket-name object-name))
-            [((comp slurp :content) fetched-object)
-             ((comp etag-suffix :etag :metadata) fetched-object)]
-            ))
+            (let [tm (create-and-configure-manager c)]
+              (write-file file-name value)
+              (upload-file tm bucket-name object-name file-name)
+              (let [fetched-object (s3/get-object
+                                      c bucket-name object-name)]
+                  [((comp slurp :content) fetched-object)
+                   ((comp etag-suffix :etag :metadata) fetched-object)]))))
         => [value, "-2"]))


Add Java SDK content-md5 test

Add Java SDK content-md5 test

--- client_tests/clojure/clj-s3/test/java_s3_tests/test/client.clj
+++ client_tests/clojure/clj-s3/test/java_s3_tests/test/client.clj
@@ -172,3 +172,15 @@
                   [((comp slurp :content) fetched-object)
                    ((comp etag-suffix :etag :metadata) fetched-object)]))))
         => [value, "-2"]))
+
+(let [bucket-name (random-string)
+      object-name (random-string)
+      value "this is the real value"
+      wrong-md5 "2945d7de2f70de5b8c0cb3fbcba4fe92"]
+  (fact "Bad content md5 throws an exception"
+        (with-random-client c
+          (do
+            (s3/create-bucket c bucket-name)
+            (s3/put-object c bucket-name object-name value
+                           {:content-md5 wrong-md5})))
+        => (throws AmazonS3Exception)))


Added form-helpers library

Added form-helpers library

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

--- src/hiccup/form_helpers.clj
+++ src/hiccup/form_helpers.clj
@@ -0,0 +1,109 @@
+;; Copyright (c) James Reeves. 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.
+
+(ns hiccup.form-helpers
+  "Functions for generating HTML forms and input fields."
+  (:use hiccup)
+  (:use clojure.contrib.java-utils))
+
+(defn- input-field
+  "Creates a new <input> element."
+  [type name value]
+  [:input {:type type, :name name, :value value, :id name}])
+
+(defn hidden-field
+  "Creates a hidden input field."
+  ([name] (hidden-field name nil))
+  ([name value] (input-field "hidden" name value)))
+
+(defn text-field
+  "Creates a new text input field."
+  ([name] (text-field name nil))
+  ([name value] (input-field "text" name value)))
+
+(defn password-field
+  "Creates a new password field."
+  ([name] (password-field name nil))
+  ([name value] (input-field "password" name value)))
+
+(defn check-box
+  "Creates a check box."
+  ([name] (check-box name nil))
+  ([name checked?] (check-box name checked? "true"))
+  ([name checked? value]
+    [:input {:type "checkbox"
+             :name name
+             :id   name
+             :value value
+             :checked checked?}]))
+
+(defn radio-button
+ "Creates a radio button."
+ ([group] (radio-button group nil))
+ ([group checked?] (radio-button group checked? "true"))
+ ([group checked? value]
+    [:input {:type "radio"
+             :name group
+             :id   (str group "-" value)
+             :value value
+             :checked checked?}]))
+
+(defn select-options
+  "Creates a seq of option tags from a collection."
+  ([coll] (select-options coll nil))
+  ([coll selected]
+    (for [x coll]
+      (if (sequential? x)
+        (let [[text val] x]
+          [:option {:value val :selected (= val selected)} text])
+        [:option {:selected (= x selected)} x]))))
+
+(defn drop-down
+  "Creates a drop-down box using the <select> tag."
+  ([name options] (drop-down name options nil))
+  ([name options selected]
+    [:select {:name name :id name}
+      (select-options options selected)]))
+
+(defn text-area
+  "Creates a text area element."
+  ([name] (text-area name nil))
+  ([name value] [:textarea {:name name, :id name} value]))
+
+(defn file-upload
+  "Creates a file upload input."
+  [name]
+  (input-field "file" name nil))
+
+(defn label
+  "Creates a label for an input field with the supplied name."
+  [name text]
+  [:label {:for name} text])
+
+(defn submit-button
+  "Creates a submit button."
+  [text]
+  [:input {:type "submit" :value text}])
+
+(defn reset-button
+  "Creates a form reset button."
+  [text]
+  [:input {:type "reset" :value text}])
+
+(defn form-to
+  "Create a form that points to a particular method and route.
+  e.g. (form-to [:put \"/post\"]
+         ...)"
+  [[method action] & body]
+  (let [method-str (.toUpperCase (name method))]
+    (-> (if (contains? #{:get :post} method)
+          [:form {:method method-str, :action action}]
+          [:form {:method "POST", :action action}
+            (hidden-field "_method" method-str)])
+        (concat body)
+        (vec))))


get payments from subscription iff there is one

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


Stub for new test module: exporter_test.clj

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

--- test/hurvinek/exporter_test.clj
+++ test/hurvinek/exporter_test.clj
@@ -0,0 +1,29 @@
+;
+;  (C) Copyright 2016  Pavel Tisnovsky
+;
+;  All rights reserved. This program and the accompanying materials
+;  are made available under the terms of the Eclipse Public License v1.0
+;  which accompanies this distribution, and is available at
+;  http://www.eclipse.org/legal/epl-v10.html
+;
+;  Contributors:
+;      Pavel Tisnovsky
+;
+
+(ns hurvinek.exporter-test
+  (:require [clojure.test :refer :all]
+            [hurvinek.exporter :refer :all]))
+
+;
+; Common functions used by tests.
+;
+
+(defn callable?
+    "Test if given function-name is bound to the real function."
+    [function-name]
+    (clojure.test/function? function-name))
+
+;
+; Tests for various function definitions
+;
+


Add users namespace with a couple of users

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

--- src/todo_repl_webapp/users.clj
+++ src/todo_repl_webapp/users.clj
@@ -0,0 +1,9 @@
+(ns todo-repl-webapp.users
+  (cemerick.friend [credentials :as credentials])
+
+(def users {"root" {:username "root"
+                    :password (credentials/hash-bcrypt "admin-pass")
+                    :roles #{::admin}}
+            "foo"  {:username "foo"
+                    :password (credentials/hash-bcrypt "foo-pass")
+                    :roles #{::user}}})


[WM] Fix new-reliquary require

[WM] Fix new-reliquary require

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


update absentee ballot request links

update absentee ballot request links

states updated:
ME:
https://tvote.org/2JEecdU

UT:
https://tvote.org/2GRMH2U

ND:
http://tvote.org/1NDsJ8v

VA:
http://tvote.org/2mC7YCD

DC:
https://tvote.org/2HfoMK1

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


eva.clj - math expression evaulation

eva.clj - math expression evaulation

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

--- code/eva.clj
+++ code/eva.clj
@@ -0,0 +1,33 @@
+; this function will take 2 numbers, and a string
+; representing a basic mathematical operand
+; (i.e. "+", "-", "/" or "*"), and it will return
+; the result of the given expression.
+
+; namespace: evaluate
+(ns eva)
+
+; as in my previous clojure program (anagram.clj),
+; the code below isn't formatted to clojure convention,
+; but is written in a way that allows my annotation.
+
+; params:
+;     'x' and 'y': integers to operate with
+;     'op':        the chosen operand.
+(defn evaluate [x, op, y]
+  ; equality is checked with polish notation
+  ; (e.g. [OPERAND] [VARIABLE] [VARIABLE])
+  (if (= op "+")
+    (+ x y) ; this statement will be evaluated
+            ; and returned.
+  )
+  (if (= op "-")
+    (- x y)
+  )
+  (if (= op "*")
+    (* x y)
+  )
+  (if (= op "/")
+    (/ x y)
+  )
+) ; end (evaluate x op y)
+


define domain data

define domain data

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

--- src/ca_recipe/recipe.clj
+++ src/ca_recipe/recipe.clj
@@ -0,0 +1,14 @@
+(defrecord Recipe
+    [name
+     author
+     description
+     ingredients
+     steps
+     servings
+     ])
+
+(defrecord Person
+    [fname
+     lname])
+
+


adding threadding test

adding threadding test

fatal: unable to access 'https://github.com/plandes/clj-nlp-parse.git/': The requested URL returned error: 403


remove logging

remove logging

--- src/metabase/api/user.clj
+++ src/metabase/api/user.clj
@@ -20,7 +20,6 @@
   (sel :many User :is_active true))

 (defendpoint GET "/current" []
-  (println "CURRENT USER: " @*current-user*)
   (->404 @*current-user*
          (hydrate [:org_perms :organization])))


Add new sketch with the logo

Add new sketch with the logo

fatal: unable to access 'https://github.com/LifeInLights/twyla-opus.git/': The requested URL returned error: 403