super simple minimal-change calculation

super simple minimal-change calculation

error: pathspec 'src/er_cassandra/model/alia/minimal_change.clj' did not match any file(s) known to git

--- src/er_cassandra/model/alia/minimal_change.clj
+++ src/er_cassandra/model/alia/minimal_change.clj
@@ -0,0 +1,42 @@
+(ns er-cassandra.model.alia.minimal-change
+  (:require
+   [clojure.set :as set]
+   [prpr.promise :as pr]
+   [er-cassandra.model.types :as t]
+   [er-cassandra.model.alia.lookup :as lookup]
+   [taoensso.timbre :refer [info warn]])
+  (:import
+   [er_cassandra.model.types Entity]))
+
+(defn change-cols
+  "returns non-key columns which have changes between
+   old-record and record"
+  [key-col-set
+   old-record
+   record]
+  (let [record-col-set (->> record keys set)
+        other-col-set (set/difference
+                       record-col-set
+                       key-col-set)]
+
+    (->> other-col-set
+         (filter
+          #(not= (get old-record %) (get record %))))))
+
+(defn minimal-change-for-table
+  "return a minimal change record for a table
+   - if there are changes it contains the key cols and changed cols
+   - if there are no changes and there was an old record it is nil
+   - if there are no changes and there was no old record it contains
+     just the key cols"
+  [{t-k :key
+    :as table}
+   old-record
+   record]
+  (let [key-col-set (->> t-k flatten set)
+        ch-cols (change-cols key-col-set old-record record)]
+
+    (if (and (not-empty old-record)
+             (empty? ch-cols))
+      nil
+      (select-keys record (concat key-col-set ch-cols)))))


Attempt at density plotting

Attempt at density plotting

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

--- dev/density_plotting.clj
+++ dev/density_plotting.clj
@@ -0,0 +1,54 @@
+(ns density-plotting
+  "# Density plotting test
+
+  This doesn't currently work yet, but its an attempt at visualizing a point clouds as a contour map of its density distribution.
+  The example I'm working from for vega is: https://vega.github.io/vega/examples/contour-plot/.
+  Unfortunately, this is vega, not vega-lite, and the vizard lib at the moment only plots vega-lite.
+  I've added a couple of issues for this (see https://github.com/yieldbot/vizard/issues/12 and #13).
+  It seems like it should be possible to add this, and maybe if we end up caring enough I can do so.
+  For now, not super vital."
+  (:require
+    [vizard.core :as viz]))
+
+
+(defonce start-viz
+  (viz/start-plot-server!))
+
+
+(def data-values
+  [{:x 3.4 :y 5.3}
+   {:x 2.2 :y 9.3}
+   {:x 4.4 :y 5.1}
+   {:x 1.7 :y 5.9}
+   {:x 2.4 :y 6.2}
+   {:x 7.4 :y 7.4}
+   {:x 2.8 :y 10.3}
+   {:x 3.9 :y 8.3}])
+
+(def plot-spec-2
+  {:width 1000
+   :height 800
+   :data {:values data-values}
+   :layer [{:mark {:type "point" :filled true}
+            :encoding {:x {:field "x"}
+                       :y {:field "y"}
+                       :size {:value 500}}}]})
+
+(def plot-spec
+  {:width 500
+   :height 400
+   :data [{:name "main"
+           :values data-values}]
+          ;{:name "contours"
+          ; :source "main"
+          ; :transform [{:type "contour"}]}]
+   :marks [{:name "dots"
+            :type "symbol"
+            :from {:data "main"}
+            :encode {:x {:field "x"}
+                     :y {:field "y"}}}]})
+
+
+;(viz/to-json plot-spec-2)
+(viz/p! plot-spec-2)
+


[WM] fix polling place voter-info call

[WM] fix polling place voter-info call

We stopped passing in the API key at some point, which just won't work.

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


Documentation

Documentation

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 some test cases to the project.

Added some test cases to the project.

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

--- test/clucy/test/core.clj
+++ test/clucy/test/core.clj
@@ -0,0 +1,42 @@
+(ns clucy.test.core
+  (:use clucy.core
+        clojure.test))
+
+(def people [{:name "Miles" :age 36}
+             {:name "Emily" :age 0.3}
+             {:name "Joanna" :age 34}
+             {:name "Melinda" :age 34}
+             {:name "Mary" :age 48}
+             {:name "Mary Lou" :age 39}])
+
+(deftest core
+
+  (testing "memory-index fn"
+    (let [index (memory-index)]
+      (is (not (nil? index)))))
+
+  (testing "disk-index fn"
+    (let [index (disk-index "/tmp/test-index")]
+      (is (not (nil? index)))))
+
+  (testing "add fn"
+    (let [index (memory-index)]
+      (doseq [person people] (add index person))
+      (is (== 1 (count (search index "name:miles" 10))))))
+
+  (testing "delete fn"
+    (let [index (memory-index)]
+      (doseq [person people] (add index person))
+      (delete index (first people))
+      (is (== 0 (count (search index "name:miles" 10))))))
+
+  (testing "search fn"
+    (let [index (memory-index)]
+      (doseq [person people] (add index person))
+      (is (== 1 (count (search index "name:miles" 10))))))
+
+  (testing "search-and-delete fn"
+    (let [index (memory-index)]
+      (doseq [person people] (add index person))
+      (search-and-delete index "name:mary")
+      (is (== 0 (count (search index "name:mary" 10)))))))


align price column header to right

align price column header to right

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


Om components for organization settings

Om components for organization settings

fatal: unable to access 'https://github.com/prathamesh-sonpatki/frontend.git/': The requested URL returned error: 403


Aukeratutako epub ez bada edukia ez aldatu

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


needed to add commands ns

needed to add commands ns

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

--- src/bitsplit_cli/commands.clj
+++ src/bitsplit_cli/commands.clj
@@ -0,0 +1,38 @@
+(ns bitsplit-cli.commands
+    (:use clojure.string
+          bitsplit.client.protocol
+          bitsplit.storage.protocol))
+
+(defn split-cmd [command]
+    (-> command
+        trim
+        (split #" +")))
+
+(def ^:private commands (atom { }))
+
+(swap! commands assoc
+    "list"
+        (fn [{:keys [client storage]} which]
+            (println
+                (case which
+                    "addresses"
+                        (addresses client)
+                    "splits"
+                        (all storage))))
+    "split"
+        (fn [{:keys [client storage]}
+             from to percentage]
+            (println from to percentage)))
+
+(def prstr (comp println str))
+
+(defn execute [{:keys [command] :as system}]
+    (let [[cmd & args] (split-cmd command)
+          method (@commands cmd)]
+        (if method
+            (try
+                (apply method system args)
+            (catch clojure.lang.ArityException e
+                (prstr "Incorrect number of arguments ("
+                        (count args) ") for \"" cmd "\"")))
+            (prstr "No such command: \"" cmd \"))))


add nREPL.

add nREPL.

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/knishimu/blinkcljs.git/'


[upcoming] add reg-deadline-passed

[upcoming] add reg-deadline-passed


Remove Google doc comments from output

Remove Google doc comments from output

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