Aggregates example

Aggregates example

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

--- tutorial/aggregates.clj
+++ tutorial/aggregates.clj
@@ -0,0 +1,102 @@
+;   Copyright (c) Cognitect, Inc. All rights reserved.
+;   The use and distribution terms for this software are covered by the
+;   Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
+;   which can be found in the file epl-v10.html at the root of this distribution.
+;   By using this software in any fashion, you are agreeing to be bound by
+;   the terms of this license.
+;   You must not remove this notice, or any other, from this software.
+
+(require '[datomic.client.api.alpha :as d]
+         '[datomic.samples.repl :as repl])
+
+(def conn (repl/scratch-db-conn "config.edn"))
+
+(repl/transact-all conn (repl/resource "day-of-datomic-cloud/bigger-than-pluto.edn"))
+(def db (d/db conn))
+
+;; how many objects are there?
+(d/q '[:find (count ?e)
+       :where [?e :object/name ?n]]
+     db)
+
+;; largest radius?
+(d/q '[:find (max ?radius)
+       :where [_ :object/meanRadius ?radius]]
+     db)
+
+;; smallest radius
+(d/q '[:find (min ?radius)
+       :where [_ :object/meanRadius ?radius]]
+     db)
+
+;; average radius
+(d/q '[:find (avg ?radius)
+       :with ?e
+       :where [?e :object/meanRadius ?radius]]
+     db)
+
+;; median radius
+(d/q '[:find (median ?radius)
+       :with ?e
+       :where [?e :object/meanRadius ?radius]]
+     db)
+
+;; stddev
+(d/q '[:find (stddev ?radius)
+       :with ?e
+       :where [?e :object/meanRadius ?radius]]
+     db)
+
+;; random solar system object
+(d/q '[:find (rand ?name)
+       :where [?e :object/name ?name]]
+     db)
+
+;; smallest 3
+(d/q '[:find (min 3 ?radius)
+       :with ?e
+       :where [?e :object/meanRadius ?radius]]
+     db)
+
+;; largest 3
+(d/q '[:find (max 3 ?radius)
+       :with ?e
+       :where [?e :object/meanRadius ?radius]]
+     db)
+
+;; 5 random (duplicates possible)
+(d/q '[:find (rand 5 ?name)
+       :with ?e
+       :where [?e :object/name ?name]]
+     db)
+
+;; choose 5, no duplicates
+(d/q '[:find (sample 5 ?name)
+       :with ?e
+       :where [?e :object/name ?name]]
+     db)
+
+;; what is the average length of a
+;; schema name?
+(d/q '[:find (avg ?length)
+       :with ?e
+       :where
+       [?e :db/ident ?ident]
+       [(name ?ident) ?name]
+       [(count ?name) ?length]]
+     db)
+
+;; how many attributes and value types does this
+;; schema use?
+(d/q '[:find  (count ?a) (count-distinct ?vt)
+       :where
+       [?a :db/ident ?ident]
+       [?a :db/valueType ?vt]]
+     db)
+
+
+
+
+
+
+


Up version to 0.2.0

Up version to 0.2.0

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


bump deps

bump 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/michaelsbradleyjr/ply.git/'


bump deps

bump 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/starcity-properties/odin.git/'


Begin work on next patch iteration.

Begin work on next patch iteration.

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


bump version to 2.9.2

bump version to 2.9.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/B2W-BIT/restQL-server.git/'


bump version to 2.8.20

bump version to 2.8.20

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


bump version to 2.8.19

bump version to 2.8.19


Version 52

Version 52

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject clojars-web "52-SNAPSHOT"
+(defproject clojars-web "52"
   :min-lein-version "2.0.0"
   :dependencies [[org.clojure/clojure "1.8.0"]
                  [org.clojure/tools.cli "0.2.1"]


[WR] exclude joda-time from datomic to remove warnings

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


production server profile using 'lein run'

--- project.clj
+++ project.clj
@@ -9,7 +9,8 @@
                                          [peridot "0.3.1"]
                                         ;[org.clojure/tools.trace "0.7.8"]
                                          ]
-                          :plugins [[lein-midje "3.1.3"]]}}
+                          :plugins [[lein-midje "3.1.3"]]}
+             :production [:user]}

   :plugins [
             [lein-ring "0.9.3"]
@@ -102,4 +103,8 @@
   :env [
         [:base-url "http://localhost:3000"]
         ]
+
+  ;; for running a production server using 'lein run'
+  :aliases {"run" ["with-profile" "production" "ring" "server"]}
+
   )


Version 45

Version 45

--- project.clj
+++ project.clj
@@ -1,4 +1,4 @@
-(defproject clojars-web "45-SNAPSHOT"
+(defproject clojars-web "45"
   :min-lein-version "2.0.0"
   :dependencies [[org.clojure/clojure "1.8.0"]
                  [org.clojure/tools.cli "0.2.1"]


Adds project file...

Adds project file...

although this does not produce a decent build yet

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

--- project.clj
+++ project.clj
@@ -0,0 +1,15 @@
+(defproject clack "0.0.1"
+  :dependencies  [[org.clojure/clojure "1.8.0"]
+                  [org.clojure/clojurescript  "1.8.51"]]
+  :plugins  [[lein-cljsbuild "1.1.3"]]
+  :cljsbuild {
+    :builds [{
+        :source-paths ["src"]
+        :compiler {
+          :main 'clack.core
+          :output-to "clack.js"
+          :output-dir "out"
+          ;; :optimizations :whitespace
+          :target :nodejs
+          ;; :pretty-print false
+          }}]})


Prep for release.

Prep for release.

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


json resp

json resp

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


Initial commit of something to create an sqlite DB from a log.

error: pathspec 'src/com/lemondronor/orbital_detector/createdb.clj' did not match any file(s) known to git

--- src/com/lemondronor/orbital_detector/createdb.clj
+++ src/com/lemondronor/orbital_detector/createdb.clj
@@ -0,0 +1,50 @@
+(ns com.lemondronor.orbital-detector.createdb
+  ""
+  (:require [clojure.java.jdbc :as jdbc]
+            [com.lemondronor.orbital-detector.planeplotter :as orbdet]))
+
+(set! *warn-on-reflection* true)
+
+
+(def db-spec
+  {:classname   "org.sqlite.JDBC"
+   :subprotocol "sqlite"
+   :subname     "orbital.db"
+   })
+
+
+(defn create-tables [db]
+  (jdbc/db-do-commands
+   db
+   (jdbc/create-table-ddl
+    :reports
+    [:timestamp :integer]
+    [:icao :text]
+    [:registration :text]
+    [:altitude :integer]
+    [:lat :real]
+    [:lon :real]
+    [:speed :real]
+    [:heading :real])))
+
+
+(defn add-records [log]
+  (jdbc/with-db-transaction [t-con db-spec]
+    (doseq [r log]
+      (jdbc/insert!
+       t-con
+       :reports
+       {:timestamp (long (/ (:timestamp r) 1000))
+        :icao (:icao r)
+        :registration (:registration r)
+        :altitude (:altitude r)
+        :lat (:lat (:position r))
+        :lon (:lon (:position r))
+        :speed (:speed r)
+        :heading (:heading r)}))))
+
+
+
+(defn -main [& args]
+  (create-tables db-spec)
+  (add-records (orbdet/read-log (first args))))


Use mapcat instead of applying concat after mapping

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/dignati/om-charts.git/'


transact `transition updated` event

transact `transition updated` event


Initial commit of rule to assign skis:exactMatch links between identifiers based on owl:equivalentClass linkages

error: pathspec 'resources/rules/pre_identifier_merge/step_b_id_exact_match/equivalent_class/equivalent_class_idmappings.clj' did not match any file(s) known to git

--- resources/rules/pre_identifier_merge/step_b_id_exact_match/equivalent_class/equivalent_class_idmappings.clj
+++ resources/rules/pre_identifier_merge/step_b_id_exact_match/equivalent_class/equivalent_class_idmappings.clj
@@ -0,0 +1,17 @@
+;; ---------------------------------------------------
+;; --------- owl:equivalentClass id mappings ---------
+;; ---------------------------------------------------
+`{:name "equivalent-class-idmappings"
+  :title "create skos/exactMatch links between identifiers that denote named classes that are linked via owl:equivalentClass, e.g. CL_0000000 (cell) & GO_0005623 (cell)"
+  :head ((?/id1 skos/exactMatch ?/id2))
+  :sparql-string "prefix obo: <http://purl.obolibrary.org/obo/>
+                  prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+                  prefix oboInOwl: <http://www.geneontology.org/formats/oboInOwl#>
+                  select ?id1 ?id2 {
+                    ?c1 owl:equivalentClass ?c2 .
+                    ?c1 oboInOwl:hasOBONamespace ?ns1 .
+                    ?c2 oboInOwl:hasOBONamespace ?ns2 .
+                    ?id1 obo:IAO_0000219 ?c1 .
+                    ?id2 obo:IAO_0000219 ?c2 .
+                  }"
+  }


changed e

changed e

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


Restored whitespace

Restored whitespace

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


Top N most retweeted tweets, stub for twitter user graph.

error: pathspec 'samples/twitterbuzz/src/twitterbuzz/stats.cljs' did not match any file(s) known to git

--- samples/twitterbuzz/src/twitterbuzz/stats.cljs
+++ samples/twitterbuzz/src/twitterbuzz/stats.cljs
@@ -0,0 +1,26 @@
+(ns twitterbuzz.graph)
+
+(defn inc-or-1
+  "Returns 1 if x is nil, (inc x) otherwise"
+  [x]
+  (if (nil? x) 1 (inc x)))
+
+(defn update-retweet-count
+  "Updates the total count of retweets by id in m as indicated by the contents of
+  the tweet t"
+  [m t]
+  (let [rt-id (get-in t ["retweeted_status" "id_str"])]
+    (when-not (nil? rt-id) (update-in m [rt-id] inc-or-1))))
+
+(defn top-tweets
+  "Returns the ids of top n most retweeted tweets out of tweet seq ts"
+  [ts n]
+  (let [retweet-counts (reduce update-retweet-count {} ts)
+        tweet-ids (keys retweet-counts)]
+    (take n (sort-by #(get retweet-counts %) tweet-ids))))
+
+(defn graph
+  "Returns a map representing the graph of the tweet seq ts"
+  [ts]
+  {:nodes []
+   :edges []})


Fixing pipeline

Fixing pipeline

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


type cast slot creation params properly

type cast slot creation params properly

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


Move namespace

Move namespace

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

--- src/test/discuss/components/clipboard_test.cljs
+++ src/test/discuss/components/clipboard_test.cljs
@@ -0,0 +1,16 @@
+(ns discuss.components.clipboard-test
+  (:require [cljs.test :refer-macros [deftest is]]
+            [clojure.test.check :as tc]
+            [clojure.test.check.clojure-test :refer-macros [defspec]]
+            [clojure.test.check.generators :as gen]
+            [clojure.test.check.properties :as prop :include-macros true]
+            [discuss.components.clipboard :as clipboard]))
+
+(defspec add-remove-selections
+         ;; "Add some random selections and remove them again."
+         100
+         (prop/for-all [input gen/any-printable]
+                       (let [before (clipboard/get-stored-selections)]
+                         (clipboard/add-item! input)
+                         (clipboard/remove-item! input)
+                         (= before (clipboard/get-stored-selections)))))


add taco js example

add taco js example

error: pathspec 'example/pages/_taco.cljc' did not match any file(s) known to git

--- example/pages/_taco.cljc
+++ example/pages/_taco.cljc
@@ -0,0 +1,26 @@
+(ns pages.taco
+  (:require [pages.util :as u]
+            [mirror.tools :as tools]))
+
+#?(:cljs (enable-console-print!))
+
+(defonce state (tools/state-atom {:x 0 :y 0}))
+
+(defn handle-mouse-move [e]
+  #?(:cljs
+      (do
+        ; (js/console.log (clj->js e))
+        (reset! state
+                {:x (.-screenX e)
+                 :y (.-screenY e)}))))
+
+#?(:cljs
+   (aset js/window "onmousemove" handle-mouse-move))
+
+(defn render []
+  [:div
+    [:h1 "HI MOM"]
+    [:p "x:" (:x @state)]
+    [:p "y:" (:y @state)]])
+
+(tools/inject state #'render)


Fire a custom event for on-cssload as well

--- support/src/figwheel/client/file_reloading.cljs
+++ support/src/figwheel/client/file_reloading.cljs
@@ -26,6 +26,12 @@
 ;; document.body.addEventListener("figwheel.before-js-reload", function (e) { console.log(e.detail);} );
 (defn before-jsload-custom-event [files]
   (utils/dispatch-custom-event "figwheel.before-js-reload" files))
+
+;; you can listen to this event easily like so:
+;; document.body.addEventListener("figwheel.css-reload", function (e) {console.log(e.detail);} );
+(defn on-cssload-custom-event [files]
+  (utils/dispatch-custom-event "figwheel.css-reload" files))
+

 #_(defn all? [pred coll]
   (reduce #(and %1 %2) true (map pred coll)))
@@ -493,7 +499,10 @@
     (add-link-to-doc link (clone-link link (.-href link)))
     #_(add-link-to-doc (create-link file))))

-(defn reload-css-files [{:keys [on-cssload] :as opts} files-msg]
+(defn reload-css-files [{:keys [on-cssload] :as opts} {:keys [files] :as files-msg}]
   (when (utils/html-env?)
-    (doseq [f (distictify :file (:files files-msg))] (reload-css-file f))
-    (js/setTimeout #(on-cssload (:files files-msg)) 100)))
+    (doseq [f (distictify :file files)] (reload-css-file f))
+    (js/setTimeout #(do
+                      (on-cssload-custom-event files)
+                      (on-cssload files))
+                   100)))


kata4: simplify parse-line even further

kata4: simplify parse-line even further

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/schaueho/clojure-codekata.git/'


superfluous import

superfluous import

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


update fields data for shopping cart and active orders

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


Removing hiccup layout.clj

Removing hiccup layout.clj

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


clean up a bit

clean up a bit

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


jobs/uploadpages.clj: added job to add HTML to S3 content

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

--- src/org/altlaw/jobs/uploadpages.clj
+++ src/org/altlaw/jobs/uploadpages.clj
@@ -0,0 +1,38 @@
+(ns org.altlaw.jobs.uploadpages
+  (:require [org.altlaw.util.hadoop :as hadoop]
+            [org.altlaw.util.log :as log]
+            [org.altlaw.util.context :as context]
+            [org.altlaw.db.content :as content])
+  (:import (java.util Arrays)))
+
+(hadoop/setup-mapreduce)
+
+(use 'clojure.contrib.repl-utils)
+
+(defn mapper-configure [this jobconf]
+  (context/use-property-function (fn [name] (.get jobconf name))))
+
+(defn mapper-map [this wkey wvalue output reporter]
+  (log/debug "Mapper got file " wkey)
+  (content/put-page-bytes (str wkey)
+                          (Arrays/copyOf (.get wvalue) (.getSize wvalue))
+                          "text/html"))
+
+(defn tool-run [this args]
+  (let [job (hadoop/default-jobconf this)
+        outpath (Path. (hadoop/job-path :uploadpages))
+        hdfs (FileSystem/get job)]
+    (.setJobName job "uploadpages")
+
+    (FileInputFormat/setInputPaths job (hadoop/job-path :genhtml))
+    (FileOutputFormat/setOutputPath job outpath)
+    (.delete hdfs outpath true)
+
+    (.setMapperClass job (Class/forName
+                          "org.altlaw.jobs.uploadpages_mapper"))
+    (.setNumReduceTasks job 0)
+
+    (.setOutputKeyClass job Text)
+    (.setOutputValueClass job BytesWritable)
+    (JobClient/runJob job))
+  0)


added fatjar support

added fatjar support

error: pathspec 'uberjar/src/dda/pallet/dda_managed_vm/main.clj' did not match any file(s) known to git

--- uberjar/src/dda/pallet/dda_managed_vm/main.clj
+++ uberjar/src/dda/pallet/dda_managed_vm/main.clj
@@ -0,0 +1,87 @@
+; Licensed to the Apache Software Foundation (ASF) under one
+; or more contributor license agreements. See the NOTICE file
+; distributed with this work for additional information
+; regarding copyright ownership. The ASF licenses this file
+; to you under the Apache License, Version 2.0 (the
+; "License"); you may not use this file except in compliance
+; with the License. You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+;[dda.pallet.commons.cli-helper :as cli-helper]
+
+(ns dda.pallet.dda-managed-vm.main
+  (:gen-class)
+  (:require
+    [clojure.string :as str]
+    [clojure.tools.cli :as cli]
+    [dda.pallet.commons.existing :as existing]
+    [dda.pallet.commons.operation :as operation]
+    [dda.pallet.dda-managed-vm.app :as app]))
+
+(defn execute-server-test
+  [domain-config targets]
+  (let [{:keys [existing provisioning-user]} targets]
+    (operation/do-server-test
+     (existing/provider {:dda-managed-vm existing})
+     (app/existing-provisioning-spec
+       domain-config
+       provisioning-user)
+     :summarize-session true)))
+
+(defn execute-install
+  [domain-config targets]
+  (let [{:keys [existing provisioning-user]} targets]
+    (operation/do-apply-install
+     (existing/provider {:dda-managed-vm existing})
+     (app/existing-provisioning-spec
+       domain-config
+       provisioning-user)
+     :summarize-session true)))
+
+(def cli-options
+  [["-h" "--help"]
+   ["-s" "--server-test"]
+   ["-t" "--targets TARGETS.edn" "edn file containing the targets to install on."
+    :default "targets.edn"]])
+
+(defn usage [options-summary]
+  (str/join
+   \newline
+   ["dda-managed-vm installs a variety of standard software and configs on your personal vm"
+    ""
+    "Usage: java -jar dda-managed-vm-[version]-standalone.jar [options] vm-spec-file"
+    ""
+    "Options:"
+    options-summary
+    ""
+    "vm-spec-file"
+    "  - follows the edn format."
+    "  - has to be a valid DdaVmDomainConfig (see: https://github.com/DomainDrivenArchitecture/dda-managed-vm)"
+    ""]))
+
+(defn error-msg [errors]
+  (str "The following errors occurred while parsing your command:\n\n"
+       (str/join \newline errors)))
+
+(defn exit [status msg]
+  (println msg)
+  (System/exit status))
+
+(defn -main [& args]
+  (let [{:keys [options arguments errors summary help]} (cli/parse-opts args cli-options)]
+    (cond
+      help (exit 0 (usage summary))
+      errors (exit 1 (error-msg errors))
+      (not= (count arguments) 1) (exit 1 (usage summary))
+      (:server-test options) (execute-server-test
+                                        (app/load-domain (first arguments))
+                                        (app/load-targets (:targets options)))
+      :default (execute-install
+                 (app/load-domain (first arguments))
+                 (app/load-targets (:targets options))))))


removed comments

removed comments

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


Add feedback file.

Add feedback file.

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

--- src/haystack/feedback.clj
+++ src/haystack/feedback.clj
@@ -0,0 +1,29 @@
+(ns haystack.feedback
+  (:require [clojure.set :as set]
+            [clojure.string :refer [split join]]
+            [clojure.set :refer [rename-keys]]
+
+            [clojurewerkz.elastisch.rest.index :as esi]
+
+            [haystack.repo :as r]
+            ;; [clj-http.client :as client]
+            ;; [bidi.bidi :as bidi]
+            ))
+
+(defn create-index
+  []
+  (try
+    (do (esi/create r/repo "feedback" {})
+        "created")
+    (catch Throwable e
+      (if (re-find #"already.exists" (str e))
+        "already-existed"
+        (do
+          (println "error in index create")
+          (println (re-find #"already.exists" (str e)))
+          (throw e))))))
+
+(defn get-feedback
+  []
+  (esd/search repo "searchecommerce" "feedback" ""))
+


simple upsert denorm

simple upsert denorm

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

--- test/er_cassandra/model/alia/relationship_test.clj
+++ test/er_cassandra/model/alia/relationship_test.clj
@@ -0,0 +1,48 @@
+(ns er-cassandra.model.alia.relationship-test
+  (:require
+   [er-cassandra.model.util.test :as tu :refer [fetch-record insert-record upsert-instance]]
+   [clojure.test :as test :refer [deftest is are testing use-fixtures]]
+   [schema.test :as st]
+   [clj-uuid :as uuid]
+   [er-cassandra.record :as r]
+   [er-cassandra.model.types :as t]
+   [er-cassandra.model.alia.relationship :as rel]))
+
+(use-fixtures :once st/validate-schemas)
+(use-fixtures :each (tu/with-model-session-fixture))
+
+(defn create-simple-relationship
+  []
+  (tu/create-table :simple_relationship_test
+                   "(id timeuuid primary key, nick text)")
+  (tu/create-table :simple_relationship_test_target
+                   "(id timeuuid primary key, parent_id uuid, nick text)")
+  (tu/create-table :simple_relationship_test_target_by_parent_id
+                   "(id timeuuid, parent_id uuid primary key, nick text)")
+  (let [target (t/create-entity
+                {:primary-table {:name :simple_relationship_test_target
+                                 :key [:id]}
+                 :secondary-tables [{:name :simple_relationship_test_target_by_parent_id
+                                     :key [:parent_id]}]})
+        source (t/create-entity
+                {:primary-table {:name :simple_relationship_test
+                                 :key [:id]}
+                 :denorm-targets {:test {:target target
+                                         :denormalize {:nick :nick}
+                                         :cascade :none
+                                         :foreign-key [:parent_id]}}})]
+    [source target]))
+
+(deftest update-relationship-test
+  (let [[s t] (create-simple-relationship)
+        [sid tid] [(uuid/v1) (uuid/v1)]
+        sr {:id sid :nick "foo"}
+        _ (insert-record :simple_relationship_test sr)
+        _ (upsert-instance t {:id tid :parent_id sid :nick "bar"})
+
+        resp @(rel/denormalize tu/*model-session* s sr :upsert)
+        potr (fetch-record :simple_relationship_test_target [:id] [tid])
+        potri (fetch-record :simple_relationship_test_target_by_parent_id [:parent_id] [sid])
+        ]
+    (is (= "foo" (:nick potr)))
+    (is (= "foo" (:nick potri)))))


getting out of the way of clojure.browser.repl

--- support/src/figwheel/client/file_reloading.cljs
+++ support/src/figwheel/client/file_reloading.cljs
@@ -173,38 +173,37 @@
     (doseq [req requires]
       (name-to-parent! req prov))))

+(defn figwheel-require [src reload]
+  (when (= reload "reload-all")
+    (doseq [ns (get-all-dependencies src)] (unprovide! ns)))
+  (when reload (unprovide! src))
+  (.require_figwheel_backup_ js/goog src))
+
 (defn bootstrap-goog-base
   "Reusable browser REPL bootstrapping. Patches the essential functions
   in goog.base to support re-loading of namespaces after page load."
   []
   ;; Monkey-patch goog.provide if running under optimizations :none - David
   (when-not js/COMPILED
-    (set! (.-require__ js/goog) js/goog.require)
+    (set! (.-require_figwheel_backup_ js/goog) js/goog.require)
     ;; suppress useless Google Closure error about duplicate provides
-    (set! (.-isProvided__ js/goog) (.-isProvided_ js/goog))
     (set! (.-isProvided_ js/goog) (fn [name] false))
     ;; provide cljs.user
     (setup-path->name!)
     (setup-ns->dependents!)

-    (set! (.-addDependency__ js/goog) js/goog.addDependency)
+    (set! (.-addDependency_figwheel_backup_ js/goog) js/goog.addDependency)
     (set! (.-addDependency js/goog)
           (fn [& args]
             (apply addDependency args)
-            (apply (.-addDependency__ js/goog) args)))
+            (apply (.-addDependency_figwheel_backup_ js/goog) args)))

     (goog/constructNamespace_ "cljs.user")
     ;; we must reuse Closure library dev time dependency management, under namespace
     ;; reload scenarios we simply delete entries from the correct
     ;; private locations
     (set! (.-CLOSURE_IMPORT_SCRIPT goog/global) queued-file-reload)
-    (set! (.-require js/goog)
-          (fn [src reload]
-            (when (= reload "reload-all")
-              (doseq [ns (get-all-dependencies src)] (unprovide! ns)))
-            (let [reload? (or reload (.-cljsReloadAll__ js/goog))]
-              (when reload? (unprovide! src))
-              (.require__ js/goog src))))))
+    (set! (.-require js/goog) figwheel-require)))

 (defn patch-goog-base []
   (defonce bootstrapped-cljs (do (bootstrap-goog-base) true)))
@@ -278,7 +277,7 @@
              (swap! on-load-callbacks dissoc request-url)
              (apply callback [(merge file-msg (select-keys file-msg' [:loaded-file]))])))
     ;; we are forcing reload here
-    (js/goog.require (name namespace) true)))
+    (figwheel-require (name namespace) true)))

 (defn reload-file? [{:keys [namespace] :as file-msg}]
   (dev-assert (namespace-file-map? file-msg))


mixed a try -> try-cause

mixed a try -> try-cause

--- src/clj/backtype/storm/event.clj
+++ src/clj/backtype/storm/event.clj
@@ -19,7 +19,7 @@
         runner (Thread.
                   (fn []
                     (while @running
-                      (try
+                      (try-cause
                         (let [r (.take queue)]
                           (try-cause
                             (r)


prototype ui for seesaw

prototype ui for seesaw

Signed-off-by: Yen-Chin Lee <082d453d72dce940e12089a4ad48b97cfe1f3ec4@gmail.com>

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

--- src/clj/brains_brain/core.clj
+++ src/clj/brains_brain/core.clj
@@ -0,0 +1,23 @@
+(ns brains-brain.core
+  (:require [seesaw.core :refer :all])
+  (:gen-class))
+
+(native!)
+
+
+(def main-frame
+  (frame :title "Brian's Brain" :on-close :exit))
+
+(def field-x (text "1"))
+(def field-y (text "2"))
+
+(def result-label (label ""))
+
+(config! main-frame :content
+         (border-panel
+          :north (horizontal-panel :items [field-x field-y])
+          :center result-label
+          :border 5))
+
+(defn -main [& args]
+  (-> main-frame pack! show!))


Add more documentation for re-widgets.core namespace

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/manenko/re-widgets.git/'


Initial persistence.

Initial persistence.

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

--- src/onix/persistence.clj
+++ src/onix/persistence.clj
@@ -0,0 +1,45 @@
+(ns onix.persistence
+  (:require [onix.aws-common :as aws]
+            [onix.dynamolib :as dynamo]
+            [environ.core :refer [env]]
+            [clojure.tools.logging :refer [info warn error]])
+  (:import (com.amazonaws AmazonServiceException)
+           (com.amazonaws AmazonClientException)
+           (com.amazonaws.services.dynamodb AmazonDynamoDBClient)))
+
+(def applications-table "onix-applications")
+
+(def dynamo-client
+  "Creates a DynamoDB client from the AWS Java SDK"
+  (delay
+   (do
+     (aws/add-credentials)
+     (doto (AmazonDynamoDBClient. @aws/amazon-client-config)
+       (.setEndpoint (env :dynamo-endpoint))))))
+
+(defn create-application
+  [application]
+  (dynamo/with-client
+    @dynamo-client
+    (dynamo/put-item applications-table application))
+  )
+
+(defn list-applications
+  []
+  (dynamo/with-client
+    @dynamo-client
+    (dynamo/query applications-table {}))
+  )
+
+(defn dynamo-health-check
+  "Checks that we can talk to Dynamo and get a description of one of our tables."
+  []
+  (try
+    (dynamo/with-client
+      @dynamo-client
+      (dynamo/describe-table applications-table))
+    true
+    (catch AmazonServiceException e (warn e "AWS Dynamo service error") nil)
+    (catch AmazonClientException e (warn e "AWS Dynamo client error") nil)))
+
+(create-application {:name "magenta"})


Add find-knn.clj.

Add find-knn.clj.

error: pathspec 'project/analyze-data/src/analyze_data/find_knn.clj' did not match any file(s) known to git

--- project/analyze-data/src/analyze_data/find_knn.clj
+++ project/analyze-data/src/analyze_data/find_knn.clj
@@ -0,0 +1,49 @@
+(ns analyze-data.find-knn
+  (:require [clojure.core.matrix :as m]
+            [clojure.edn :as edn]
+            [clojure.java.io :as io]
+            [analyze-data.knn.core :refer [cosine-similarity knn]]
+            [analyze-data.tf-idf.core :refer [tf-idf-document to-terms]]
+            [analyze-data.gzip :refer [gzip-reader]])
+  (:import java.io.PushbackReader))
+
+(defn read-edn-stream
+  "Return a lazy sequence of items parsed from a stream of edn objects. reader
+  must be a java.io.PushbackReader or some derivee. Since it is lazy, the
+  stream must remain open while new items are being requested."
+  [reader]
+  (lazy-seq
+    (when-let [line (edn/read {:eof nil} reader)]
+      (cons line (read-edn-stream reader)))))
+
+(defn read-tf-idf-data
+  "TODO"
+  [file-path]
+  (with-open [file-reader (-> file-path
+                              gzip-reader
+                              PushbackReader.)]
+    (let [tf-idf-stream (read-edn-stream file-reader)]
+      {:idf (nth tf-idf-stream 0)
+       :all-terms (nth tf-idf-stream 1)
+       :item-names (nth tf-idf-stream 2)
+       :data (m/sparse-matrix (nthrest tf-idf-stream 3))})))
+
+(defn knn-named-result
+  "TODO"
+  [item-names result]
+  (let [index (first result)
+        distance (second result)]
+    [(nth item-names index) distance]))
+
+(defn find-knn
+  "TODO"
+  [tf-idf-data query-document]
+  (let [{:keys [idf all-terms item-names data]} tf-idf-data
+        query-vector (->> query-document
+                          (to-terms)
+                          (tf-idf-document all-terms idf)
+                          (m/sparse-array))
+        nearest-neighbors (knn data
+                               query-vector
+                               :distance-fn cosine-similarity)]
+    (map (partial knn-named-result item-names) nearest-neighbors)))


fix cond indentation

fix cond indentation


Cleanup comment

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


Starting Lovins stemmer

Starting Lovins stemmer

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

--- src/clj_fuzzy/lovins.clj
+++ src/clj_fuzzy/lovins.clj
@@ -0,0 +1,180 @@
+;; -----------------------------------------------------------------------------
+;; clj-fuzzy Lovins Stemming
+;; -----------------------------------------------------------------------------
+;;
+;;   Author: PLIQUE Guillaume (Yomguithereal)
+;;
+;;   Source: http://snowball.tartarus.org/algorithms/lovins/stemmer.html
+;;
+;;   Description: One of the oldest stemming algorithm for the English language
+;;     designed by Julie Beth Lovins in 1968.
+;;
+;;   Note: A vast majority of the algorithm can be improved codewise.
+;;
+(ns clj-fuzzy.lovins
+  (:require [clojure.string])
+  (:use [clj-fuzzy.helpers :only [re-test?
+                                  batch-replace]]))
+
+;; Endings
+(def ^:private endings
+  '(#"alistically$" :B #"arizability$" :A #"izationally$" :B
+
+    #"antialness$" :A  #"arisations$" :A  #"arizations$" :A  #"entialness$" :A
+
+    #"allically$" :C   #"antaneous$" :A   #"antiality$" :A   #"arisation$" :A
+    #"arization$" :A   #"ationally$" :B   #"ativeness$" :A   #"eableness$" :E
+    #"entations$" :A   #"entiality$" :A   #"entialize$" :A   #"entiation$" :A
+    #"ionalness$" :A   #"istically$" :A   #"itousness$" :A   #"izability$" :A
+    #"izational$" :A
+
+    #"ableness$" :A    #"arizable$" :A    #"entation$" :A    #"entially$" :A
+    #"eousness$" :A    #"ibleness$" :A    #"icalness$" :A    #"ionalism$" :A
+    #"ionality$" :A    #"ionalize$" :A    #"iousness$" :A    #"izations$" :A
+    #"lessness$" :A
+
+    #"ability$" :A     #"aically$" :A     #"alistic$" :B     #"alities$" :A
+    #"ariness$" :E     #"aristic$" :A     #"arizing$" :A     #"ateness$" :A
+    #"atingly$" :A     #"ational$" :B     #"atively$" :A     #"ativism$" :A
+    #"elihood$" :E     #"encible$" :A     #"entally$" :A     #"entials$" :A
+    #"entiate$" :A     #"entness$" :A     #"fulness$" :A     #"ibility$" :A
+    #"icalism$" :A     #"icalist$" :A     #"icality$" :A     #"icalize$" :A
+    #"ication$" :G     #"icianry$" :A     #"ination$" :A     #"ingness$" :A
+    #"ionally$" :A     #"isation$" :A     #"ishness$" :A     #"istical$" :A
+    #"iteness$" :A     #"iveness$" :A     #"ivistic$" :A     #"ivities$" :A
+    #"ization$" :F     #"izement$" :A     #"oidally$" :A     #"ousness$" :A
+
+    #"aceous$" :A      #"acious$" :B      #"action$" :G      #"alness$" :A
+    #"ancial$" :A      #"ancies$" :A      #"ancing$" :B      #"ariser$" :A
+    #"arized$" :A      #"arizer$" :A      #"atable$" :A      #"ations$" :B
+    #"atives$" :A      #"eature$" :Z      #"efully$" :A      #"encies$" :A
+    #"encing$" :A      #"ential$" :A      #"enting$" :C      #"entist$" :A
+    #"eously$" :A      #"ialist$" :A      #"iality$" :A      #"ialize$" :A
+    #"ically$" :A      #"icance$" :A      #"icians$" :A      #"icists$" :A
+    #"ifully$" :A      #"ionals$" :A      #"ionate$" :D      #"ioning$" :A
+    #"ionist$" :A      #"iously$" :A      #"istics$" :A      #"izable$" :E
+    #"lessly$" :A      #"nesses$" :A      #"oidism$" :A
+
+    #"acies$" :A       #"acity$" :A       #"aging$" :B       #"aical$" :A
+    #"alist$" :A       #"alism$" :B       #"ality$" :A       #"alize$" :A
+    #"allic$" :BB      #"anced$" :B       #"ances$" :B       #"antic$" :C
+    #"arial$" :A       #"aries$" :A       #"arily$" :A       #"arity$" :B
+    #"arize$" :A       #"aroid$" :A       #"ately$" :A       #"ating$" :I
+    #"ation$" :B       #"ative$" :A       #"ators$" :A       #"atory$" :A
+    #"ature$" :E       #"early$" :Y       #"ehood$" :A       #"eless$" :A
+    #"elity$" :A       #"ement$" :A       #"enced$" :A       #"ences$" :A
+    #"eness$" :E       #"ening$" :E       #"ental$" :A       #"ented$" :C
+    #"ently$" :A       #"fully$" :A       #"ially$" :A       #"icant$" :A
+    #"ician$" :A       #"icide$" :A       #"icism$" :A       #"icist$" :A
+    #"icity$" :A       #"idine$" :I       #"iedly$" :A       #"ihood$" :A
+    #"inate$" :A       #"iness$" :A       #"ingly$" :B       #"inism$" :J
+    #"inity$" :CC      #"ional$" :A       #"ioned$" :A       #"ished$" :A
+    #"istic$" :A       #"ities$" :A       #"itous$" :A       #"ively$" :A
+    #"ivity$" :A       #"izers$" :F       #"izing$" :F       #"oidal$" :A
+    #"oides$" :A       #"otide$" :A       #"ously$" :A
+
+    #"able$" :A        #"ably$" :A        #"ages$" :B        #"ally$" :B
+    #"ance$" :B        #"ancy$" :B        #"ants$" :B        #"aric$" :A
+    #"arly$" :K        #"ated$" :I        #"ates$" :A        #"atic$" :B
+    #"ator$" :A        #"ealy$" :Y        #"edly$" :E        #"eful$" :A
+    #"eity$" :A        #"ence$" :A        #"ency$" :A        #"ened$" :E
+    #"enly$" :E        #"eous$" :A        #"hood$" :A        #"ials$" :A
+    #"ians$" :A        #"ible$" :A        #"ibly$" :A        #"ical$" :A
+    #"ides$" :L        #"iers$" :A        #"iful$" :A        #"ines$" :M
+    #"ings$" :N        #"ions$" :B        #"ious$" :A        #"isms$" :B
+    #"ists$" :A        #"itic$" :H        #"ized$" :F        #"izer$" :F
+    #"less$" :A        #"lily$" :A        #"ness$" :A        #"ogen$" :A
+    #"ward$" :A        #"wise$" :A        #"ying$" :B        #"yish$" :A
+
+    #"acy$" :A         #"age$" :B         #"aic$" :A         #"als$" :BB
+    #"ant$" :B         #"ars$" :O         #"ary$" :F         #"ata$" :A
+    #"ate$" :A         #"eal$" :Y         #"ear$" :Y         #"ely$" :E
+    #"ene$" :E         #"ent$" :C         #"ery$" :E         #"ese$" :A
+    #"ful$" :A         #"ial$" :A         #"ian$" :A         #"ics$" :A
+    #"ide$" :L         #"ied$" :A         #"ier$" :A         #"ies$" :P
+    #"ily$" :A         #"ine$" :M         #"ing$" :N         #"ion$" :Q
+    #"ish$" :C         #"ism$" :B         #"ist$" :A         #"ite$" :AA
+    #"ity$" :A         #"ium$" :A         #"ive$" :A         #"ize$" :F
+    #"oid$" :A         #"one$" :R         #"ous$" :A
+
+    #"ae$" :A          #"al$" :BB          #"ar$" :X          #"as$" :B
+    #"ed$" :E          #"en$" :F          #"es$" :E          #"ia$" :A
+    #"ic$" :A          #"is$" :A          #"ly$" :B          #"on$" :S
+    #"or$" :T          #"um$" :U          #"us$" :V          #"yl$" :R
+    #"s'" :A           $"'s$" :A
+
+    #"a$" :A           #"e$" :A           #"i$" :A           #"o$" :A
+    #"s$" :W           #"y$" :B))
+
+;; Conditions
+(def ^:private conditions
+  {:A (fn [stem] true)
+   :B (fn [stem] (> (count stem) 2))
+   :C (fn [stem] (> (count stem) 3))
+   :D (fn [stem] (> (count stem) 4))
+   :E (fn [stem] (not (re-test? #"e$" stem)))
+   :F (fn [stem] (and (conditions :B stem) (conditions :E stem)))
+   :G (fn [stem] (and (conditions :B stem) (re-test? #"f$" stem)))
+   :H (fn [stem] (re-test? #"(t|ll)$" stem))
+   :G (fn [stem] (not (re-test? #"[oe]$" stem)))
+   :I (fn [stem] (not (re-test? #"[ae]$" stem)))
+   :K (fn [stem] (and (conditions :B stem) (re-test? #"(l|i|(u\we))$")))
+   :L (fn [stem] (not (re-test? #"(u|x|([^o]s)$" stem)))
+   :M (fn [stem] (not (re-test? #"[acem]$" stem)))
+   :N (fn [stem] (if (re-test? #"s\w{2}$") (conditions :C stem) (conditions :B stem)))
+   :O (fn [stem] (re-test? #"[li]$" stem))
+   :P (fn [stem] (not (re-test? #"c$" stem)))
+   :Q (fn [stem] (and (conditions :B stem) (not (re-test? #"[ln]$" stem))))
+   :R (fn [stem] (re-test? #"[nr]$" stem))
+   :S (fn [stem] (re-test? #"(dr|[^t]t)$" stem))
+   :T (fn [stem] (re-test? #"(s|[^o]t)$" stem))
+   :U (fn [stem] (re-test? #"[lmnr]$" stem))
+   :V (fn [stem] (re-test? #"c$" stem))
+   :W (fn [stem] (not (re-test? #"[su]$" stem)))
+   :X (fn [stem] (re-test? #"(l|i|u\we)" stem))
+   :Y (fn [stem] (re-test? #"in$" stem))
+   :Z (fn [stem] (not (re-test? #"f$" stem)))
+   :AA (fn [stem] (re-test? #"([dflt]|ph|th|er|or|es)$" stem))
+   :BB (fn [stem] (and (conditions :B stem) (not (re-test? #"(met|ryst)" stem))))
+   :CC (fn [stem] (re-test? #"l$" stem))})
+
+;; Transformations
+(defn- dedouble
+  "Drop double occurences of certain letters in the given [stem]."
+  [stem]
+  (clojure.string/replace stem #"[bdglmnprst]{2}" "$1"))
+
+(def ^:private transformations
+  '(#"ief$" "iev"
+    #"uct$" "uc"
+    #"umpt$" "um"
+    #"rpt$" "rb"
+    #"urs$" "ur"
+    #"istr$" "ister"
+    #"metr$" "meter"
+    #"olv$" "olut"
+    #"[^aoi]ul$" "l"
+    #"bex$" "bic"
+    #"dex$" "dic"
+    #"pex$" "pic"
+    #"tex$" "tic"
+    #"ax$" "ac"
+    #"ex$" "ec"
+    #"ix$" "ic"
+    #"lux$" "luc"
+    #"uad$" "uas"
+    #"vad$" "vas"
+    #"cid$" "cis"
+    #"lid$" "lis"
+    #"erid$" "eris"
+    #"pand$" "pans"
+    #"[^s]end$" "ens"
+    #"ond$" "ons"
+    #"lud$" "lus"
+    #"rud$" "rus"
+    #"[^pt]her$" "hes"
+    #"mit$" "mis"
+    #"[^m]ent$" "ens"
+    #"ert$" "ers"
+    #"[^n]et$" "es"
+    #"(yt|yz)$" "ys"))


Added missing docstrings.

Added missing docstrings.

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/danielfm/licensator.git/'


Errepikatzen dena dbtik-lortu funtzioan sartu

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


Add more comments to android-java project.clj

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


add a few negative schema tests

add a few negative schema tests

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


Fixed prefixes.

Fixed prefixes.


[EN] Run same test 100 times.

[EN] Run same test 100 times.

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


max 1s in matrix

max 1s in matrix

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

--- src/clj/xl/max_1_line_in_matrix.clj
+++ src/clj/xl/max_1_line_in_matrix.clj
@@ -0,0 +1,90 @@
+(ns xl.max-1-line-in-matrix)
+
+(defn elem [matrix ii jj]
+  (nth (nth matrix ii) jj)
+  )
+
+(defn- out-range [ii jj m n]
+  (not (and (<= 0 ii (dec m)) (<= 0 jj (dec n)))))
+
+(defn- iterate-point [ii jj factor-x factor-y m n]
+  (if (out-range ii jj m n)
+    (case [factor-x factor-y]
+      [0 1] [(inc ii) 0 false]
+      [1 0] [0 (inc jj) false]
+      [1 -1] (let [i+j (+ ii jj)
+                   row0-col (inc i+j)
+                   lastcol-row (- row0-col (dec n))
+                   ]
+               (if (< row0-col n) [0 row0-col false] [lastcol-row (dec n) false])
+               )
+      [1 1] (let [i-j (- ii jj)
+                  row0-col (- (inc i-j))
+                  col0-row (inc i-j)
+                  ]
+              (if (>= row0-col 0) [0 row0-col false] [col0-row 0 false])
+              )
+      )
+    [ii jj true]
+    )
+  )
+
+(defn- next-point [ii jj row-factor col-factor m n delta]
+  (let [new-ii (+ ii (* delta row-factor))
+        new-jj (+ jj (* delta col-factor))
+        [it-ii it-jj in-range] (iterate-point new-ii new-jj row-factor col-factor m n)]
+    (lazy-seq (cons [it-ii it-jj in-range]
+                    (next-point it-ii it-jj row-factor col-factor m n delta))
+              )
+    ))
+
+(defn walk [matrix m n start-i start-j row-factor col-factor]
+  (reduce
+    (fn [{:keys [max-len curr-len]} [ii jj in-range]]
+      (if (out-range ii jj m n)
+        (reduced {:max-len (max max-len curr-len) :curr-len 0})
+        (if in-range
+          (if (zero? (elem matrix ii jj))
+            {:max-len (max max-len curr-len) :curr-len 0}
+            {:max-len max-len :curr-len (inc curr-len)}
+            )
+          {:max-len (max max-len curr-len) :curr-len (if (zero? (elem matrix ii jj)) 0 1)}
+          )
+        )
+      )
+    {:max-len 0 :curr-len 0}
+    (next-point start-i start-j row-factor col-factor m n 1)
+    )
+  )
+
+(defn max-1s [matrix]
+  (let [m (count matrix)
+        n (if (zero? m) 0 (count (nth matrix 0)))
+        walk-results
+          (for [[factor-x factor-y start-x start-y] [[1 0 -1 0] [0 1 0 -1] [1 -1 -1 1] [1 1 -1 (- n 2)]]]
+            (walk matrix m n start-x start-y factor-x factor-y)
+            )
+        ]
+        (apply max (map :max-len walk-results))
+    )
+  )
+
+(defn samples []
+  (doseq [matrix
+          [[]
+           [[]]
+           [[0 0] [0 1]]
+           [[0 1 1] [1 1 0] [1 0 1]]
+           [[1 0 0] [0 0 0] [0 0 1]]
+           [[1 0 1] [0 0 0] [1 0 1]]
+           [[0 0 0] [1 1 0] [0 0 1]]
+           [[1 1 0] [1 1 0] [1 0 1]]
+           [[0 1 1] [1 1 0] [1 0 1]]
+           [[0 1 1] [0 0 0] [1 1 1]]
+           ]
+          ]
+    (println "matrix: " matrix ", max 1s: " (max-1s matrix))
+    )
+  )
+
+(samples)


With jsonp

With jsonp

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


macros

macros

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

--- macros/dsl.clj
+++ macros/dsl.clj
@@ -0,0 +1,28 @@
+(defn xml-helper [form]
+  (if (not (seq? form))
+    (str form)
+    (let [name (first form)
+          children (rest form)]
+      (str "<" name ">"
+           (apply str (map xml-helper children))
+           "</" name ">"))))
+
+(defmacro xml [form]
+  (xml-helper form))
+
+;(println (macroexpand-1 '(xml "<hello>travis</hello>")))
+
+
+(println
+ (xml
+  (:book
+   (:authors
+    (:author "Travis")
+    (:author "sbt")))))
+(println
+ (xml
+  (:user
+   (:firstname "t-rav")
+   (:lastname "martin")
+   (:email "t-rav@ca.abc.com"))))
+


fixed to load assets when server starts

fixed to load assets when server starts

--- src/leiningen/new/cryogen/src/cryogen/server.clj
+++ src/leiningen/new/cryogen/src/cryogen/server.clj
@@ -3,9 +3,11 @@
             [compojure.route :as route]
             [ring.util.response :refer [redirect]]
             [cryogen-core.watcher :refer [start-watcher!]]
+            [cryogen-core.plugins :refer [load-plugins]]
             [cryogen-core.compiler :refer [compile-assets-timed read-config]]))

 (defn init []
+  (load-plugins)
   (compile-assets-timed)
   (let [ignored-files (-> (read-config) :ignored-files)]
     (start-watcher! "resources/templates" ignored-files compile-assets-timed)))


Initial work at campfire adaptor

Initial work at campfire adaptor

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

--- src/riemann/campfire.clj
+++ src/riemann/campfire.clj
@@ -0,0 +1,29 @@
+(ns riemann.campfire
+  "Forwards events to Campfire"
+  (:require [clj-campfire.core :as cf]))
+
+(defn cf-settings
+  "Setup settings for campfire. Required information is your api-token, ssl connection
+  true or false, and your campfire sub-domain."
+  [token ssl sub-domain]
+  {:api-token token, :ssl ssl, :sub-domain sub-domain})
+
+(defn room
+  "Sets up the room to send events too. Pass in the settings created with cf-settings
+  and the room name"
+  [settings room-name]
+  (cf/room-by-name settings room-name))
+
+(defn campfire
+  "Creates an adaptor to forward events to campfire.
+  TODO: write more here once the event formatting is better.
+  TODO: tests
+  TODO: fix event formatting - see pagerduty for ideas?
+  Currently doesn't format events properly, but expired events are ok.
+  Tested with:
+  (streams
+    (by [:host, :service]
+      (let [camp (campfire \"token\", true, \"sub-domain\", \"room\")]
+        camp)))"
+  [token ssl sub-domain room-name]
+  (fn [e] (cf/message (room (cf-settings token ssl sub-domain) room-name) (str e))))


Add tests for optimise.functions

Add tests for optimise.functions

error: pathspec 'cortex/test/cljc/cortex/optimise/functions_test.clj' did not match any file(s) known to git

--- cortex/test/cljc/cortex/optimise/functions_test.clj
+++ cortex/test/cljc/cortex/optimise/functions_test.clj
@@ -0,0 +1,128 @@
+(ns cortex.optimise.functions-test
+  (:refer-clojure :exclude [+ - * /])
+  (:require [clojure.core.matrix :as m]
+            [clojure.core.matrix.operators :refer [+ - * /]]
+            [clojure.test :refer :all]
+            [cortex.nn.protocols :as cp]
+            [cortex.optimise.functions :refer :all]
+            [cortex.util :refer [def-]]))
+
+;;;; Protocol extensions
+
+(def- test-function
+  {:value (fn [params]
+            (m/esum (m/square params)))
+   :gradient (fn [params]
+               (* 2 params))
+   :state {:params [1 2 3]}})
+
+(deftest protocol-extension-test
+  (is (= (cp/calc test-function nil)
+         test-function))
+  (is (= (cp/output test-function)
+         14))
+  (is (= (cp/gradient test-function)
+         [2 4 6])))
+
+(deftest protocol-extension-shorthand-test
+  (is (= (value test-function [2 3 4])
+         29))
+  (is (= (gradient test-function [2 3 4])
+         [4 6 8])))
+
+;;;; Gradient checker
+
+(def- center (m/array :vectorz (repeat 10 17)))
+
+(deftest random-point-test
+  (is (every? #(< (m/distance % center) 0.5)
+              (repeatedly 1000 #(random-point center 0.5))))
+  ;; The 'identity' invocation prevents the thousand-line list generated
+  ;; by 'repeatedly' from being printed by clojure.test when the test fails.
+  (is (identity
+        (some #(>= (m/distance % center) 0.5)
+              (repeatedly 1000 #(random-point center 0.51))))))
+
+(deftest numerical-gradient-test
+  (is (< (m/distance (map #(numerical-gradient test-function [1 2 3] % 1e-6) (range 3))
+                     (gradient test-function [1 2 3]))
+         1e-8)))
+
+(def- test-function-with-incorrect-gradient
+  {:value (fn [params]
+            (m/esum (m/square params)))
+   :gradient (fn [params]
+               (* 2 (m/emap inc params)))})
+
+(deftest check-gradient-test
+  (is (>= (check-gradient test-function 3
+                          :return :average-rating)
+          10))
+  (is (<= (check-gradient test-function-with-incorrect-gradient 3
+                          :return :average-rating)
+          3))
+  (is (= (count (check-gradient test-function 3
+                                :points 200 :return :errors))
+         600))
+  (is (= (count (check-gradient test-function 6
+                                :points 200 :dims 2 :return :errors))
+         400)))
+
+;;;; Sample functions
+
+(deftest sample-function-test
+  (is (>= (check-gradient cross-paraboloid 3
+                          :return :average-rating)
+          10))
+  (is (>= (check-gradient de-jong 3
+                          :dist 5.12
+                          :return :average-rating)
+          10))
+  (is (>= (check-gradient axis-parallel-hyper-ellipsoid 3
+                          :dist 5.12
+                          :return :average-rating)
+          10))
+  (is (>= (check-gradient rotated-hyper-ellipsoid 3
+                          :dist 65.536
+                          :return :average-rating)
+          10))
+  (is (>= (check-gradient moved-axis-parallel-hyper-ellipsoid 3
+                          :dist 5.12
+                          :return :average-rating)
+          10))
+  (is (>= (check-gradient rosenbrocks-valley 3
+                          :dist 2.048
+                          :return :average-rating)
+          8))
+  (is (>= (check-gradient rastrigin 3
+                          :dist 5.12
+                          :return :average-rating)
+          8))
+  (is (>= (check-gradient schwefel 3
+                          :dist 500
+                          :return :average-rating)
+          8))
+  (is (>= (check-gradient griewangk 3
+                          :dist 600
+                          :return :average-rating)
+          8))
+  (is (>= (check-gradient sum-of-different-powers 3
+                          :return :average-rating)
+          8))
+  (is (>= (check-gradient ackleys-path 3
+                          :return :average-rating)
+          8))
+  (is (>= (check-gradient (michalewicz 1) 3
+                          :center (repeat 3 (* 1/2 Math/PI))
+                          :dist (* 1/2 Math/PI)
+                          :return :average-rating)
+          8))
+  (is (>= (check-gradient branins-rcos 2
+                          :center [2.5 7.5]
+                          :dist 7.5
+                          :return :average-rating)
+          8))
+  (is (>= (check-gradient easom 3
+                          :dist 100
+                          :return :average-rating)
+          10)))


Updated parser.clj

Updated parser.clj

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


fix intermittent failures caused by Circle being SUPER SLOW

--- test/metabase/models/field_test.clj
+++ test/metabase/models/field_test.clj
@@ -22,7 +22,7 @@
          (set-field-special-type nil)
          (sel-field-values-count))
      (do (set-field-special-type :category)
-         (Thread/sleep 200)                 ; wait 200ms for the FieldValues object to get asynchronously created
+         (Thread/sleep 250)                 ; wait 250ms for the FieldValues object to get asynchronously created
          (sel-field-values-count))
      (do (del-field-values)                 ; put things back how we found them
          (set-field-special-type nil)


Add stateless token auth backend.

Add stateless token auth backend.

(simplified oauth-like token authentication completely stateless)

error: pathspec 'src/clojure/buddy/auth/backends/stateless_token.clj' did not match any file(s) known to git

--- src/clojure/buddy/auth/backends/stateless_token.clj
+++ src/clojure/buddy/auth/backends/stateless_token.clj
@@ -0,0 +1,42 @@
+(ns buddy.auth.backends.stateless-token
+  (:require [buddy.auth.protocols :as proto]
+            [buddy.crypto.core :refer [base64->str]]
+            [buddy.crypto.keys :refer [make-secret-key]]
+            [buddy.crypto.signing :refer [loads]]
+            [buddy.util :refer [m-maybe]]
+            [clojure.string :refer [split]]
+            [ring.util.response :refer [response? header status]]))
+
+(defn parse-authorization-header
+  "Given a request, try extract and parse
+  authorization header."
+  [request]
+  (m-maybe [headers-map (:headers request)
+            auth-header (get headers-map "authorization")
+            pattern     (re-pattern "^Bearer (.+)$")
+            matches     (re-find pattern auth-header)]
+    (get matches 1)))
+
+(defrecord StatelessTokenAuthBackend [pkey not-authorized-handler maxage]
+  proto/IAuthentication
+  (parse [_ request]
+    (parse-authorization-header request))
+  (authenticate [_ request data]
+    (assoc request :identity (loads data pkey {:maxage maxage})))
+
+  proto/IAuthorization
+  (handle-unauthorized [_ request metadata]
+    (let [rsp (when not-authorized-handler
+                (not-authorized-handler request metadata))
+          rsp (if (response? rsp) rsp
+                (if (nil? rsp) {:body ""} {:body rsp}))]
+      (-> rsp (status 401)))))
+
+(defn stateless-token-backend
+  "Given some options, create a new instance
+  of HttpBasicBackend and return it."
+  [pkey & {:keys [authorization-handler maxage]}]
+  (->StatelessTokenAuthBackend
+    (make-secret-key pkey)
+    authorization-handler
+    maxage))


Add mouse click accumulator quil demo

Add mouse click accumulator quil demo

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

--- dmmproj/src/dmm/examples/click_accumulator.cljs
+++ dmmproj/src/dmm/examples/click_accumulator.cljs
@@ -0,0 +1,171 @@
+(ns dmm.examples.click-accumulator
+  (:require-macros [cljs.core.async.macros :refer [go go-loop]])
+  (:require [quil.core :as q]
+            [quil.middleware :as m]
+            [dmm.core :as dc
+                      :refer [v-accum v-identity
+                              down-movement up-movement
+                              rec-map-sum]]
+            [cljs.core.async :as async]))
+
+(def mouse-pressed-channel (async/chan))
+
+(def click-val (atom {:signal {}}))
+(defn mouse-pressed-monitor- []
+  (go (let [signal ((async/alts! [mouse-pressed-channel] :default {}) 0)]
+        (reset! click-val
+                {:signal
+                 (if (= signal {})
+                   {}
+                   {:x (signal :x) :y (signal :y) :flag 1})}))))
+(defn mouse-pressed-monitor [dummy]
+  (mouse-pressed-monitor-)
+  @click-val)
+ ;; might want to add a transformation of :button field too
+
+(def v-mouse-pressed-monitor (var mouse-pressed-monitor))
+
+(defn dmm-cons [accum-style-input]
+  (let [old-self (accum-style-input :self)]
+    (if (get-in accum-style-input [:signal :flag])
+      {:self {:this (accum-style-input :signal) :rest old-self}}
+      {:self old-self})))
+
+(def v-dmm-cons (var dmm-cons))
+
+;;; the neurons of this type track mouse position
+;;; we treat X and Y mouse coordinates as separate outputs
+(defn mouse-coords [dummy]
+    {:mouse-x (q/mouse-x) :mouse-y (q/mouse-y)}
+  )
+
+(def v-mouse-coords (var mouse-coords))
+
+(defn init-state []
+  (->
+   {}
+
+   ((fn[m]
+      (assoc m
+
+             :init-matrix
+             {v-accum {:self {:accum {v-accum {:self {:single 1}}}}}}
+
+             :mouse-tracking-neuron-hook
+             {v-mouse-coords
+              {:mouse-position {:single {v-mouse-coords {:mouse-y 1}}}}}
+
+             :mouse-pressed-monitor-hook
+             {v-mouse-pressed-monitor {:mouse-pressed-monitor {:single
+              {v-mouse-pressed-monitor {:mouse-pressed-monitor {:single 1}}}}}}
+
+             :dmm-cons-accum-connection
+             {v-dmm-cons {:my-list {:self {v-dmm-cons {:my-list {:self 1}}}}}}
+
+             :dmm-cons-signal-connection
+             {v-dmm-cons {:my-list {:signal
+              {v-mouse-pressed-monitor {:mouse-pressed-monitor {:signal 1}}}}}})))
+
+   ((fn[m]
+      (assoc m :start-matrix
+             (rec-map-sum
+              (m :init-matrix)
+              (m :mouse-tracking-neuron-hook)
+              (m :mouse-pressed-monitor-hook)
+              (m :dmm-cons-accum-connection)
+              (m :dmm-cons-signal-connection)))))
+
+   ((fn[m]
+      (assoc m :init-output
+             (rec-map-sum
+              {v-accum {:self {:single (m :start-matrix)}}}
+              {v-dmm-cons {:my-list {:self {:end-list 1}}}}))))))
+
+(def state (atom (init-state)))
+
+
+
+(defn setup []
+  ;; Set frame rate to 1 frame per second, so that one has time to
+  ;; ponder things.
+  (q/frame-rate 1)
+  ;; setup function returns initial state. It contains
+  ;; the initial output layer of the generalized neural network.
+  {:output-layer (@state :init-output)})
+
+(defn update-state [state]
+  ;; Update sketch state by performing one cycle of the "two-stroke engine"
+  ;; of the generalized neural network.
+  (let [current-input (down-movement (:output-layer state))]
+    {:input-layer current-input
+     :output-layer (up-movement current-input)
+     }))
+
+
+(defn extract-matrix [current-output]
+  (((current-output v-accum) :self) :single))
+
+(defn extract-delta [current-output]
+  ((((extract-matrix current-output) v-accum) :self) :delta))
+
+(defn extract-mouse-position [current-output]
+  (get (current-output v-mouse-coords) :mouse-position "quil quirk"))
+  ;; "quil quirk" - the first iteration "draw-state" happens
+  ;;                without "update-state"
+
+(defn extract-list [current-output]
+   (((current-output v-dmm-cons) :my-list) :self))
+
+(defn extract-mouse-pressed-monitor [current-output]
+  (current-output v-mouse-pressed-monitor))
+
+(defn render-list [recorded-list horizontal-shift]
+  ;;(q/text (str recorded-list) 25 25)
+  (when (not= (recorded-list :end-list) 1)
+    (q/no-fill)
+    (q/rect horizontal-shift (mod (+ 30 (* 50 (q/frame-count))) (q/height)) 20 20)
+    (q/fill 0)
+    (q/ellipse
+     (+ (int (/ (* 20 ((recorded-list :this) :x)) (q/width))) horizontal-shift)
+     (+ (int (/ (* 20 ((recorded-list :this) :y)) (q/height))) (mod (+ 30 (* 50 (q/frame-count))) (q/height)))
+     3 3)
+    (render-list (recorded-list :rest) (+ horizontal-shift 30))
+    ))
+
+
+(defn draw-state [state]
+  ;; Clear the sketch by filling it with grey color.
+  ;;(q/background 127)
+
+  (q/fill 127 50)
+  (q/rect 0 0 (q/width) (q/height))
+
+  (q/fill 0)
+
+  (q/text-size 24)
+
+  (render-list (extract-list (state :output-layer)) 50)
+
+  (let [sub-delta-row (->> state :output-layer extract-mouse-pressed-monitor)]
+    (q/text (str (q/frame-count) " " sub-delta-row)
+            50 (mod (+ 25 (* 50 (q/frame-count))) (q/height)))))
+
+(defn mouse-pressed [state event]
+  #_(async/>!! mouse-pressed-channel event)
+  (go (async/>! mouse-pressed-channel event))
+  state)
+
+(q/defsketch clicker-exp
+  :host "click-accum"
+  :size [500 500]
+  ; setup function called only once, during sketch initialization.
+  :setup setup
+  ; update-state is called on each iteration before draw-state.
+  :update update-state
+  :draw draw-state
+  :mouse-pressed mouse-pressed
+  :features [:keep-on-top]
+  ; This sketch uses functional-mode middleware.
+  ; Check quil wiki for more info about middlewares and particularly
+  ; fun-mode.
+  :middleware [m/fun-mode])


async changes on state

async changes on state

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

--- src/ca_recipe/family_async.clj
+++ src/ca_recipe/family_async.clj
@@ -0,0 +1,12 @@
+(ns ca-recipe.family-async)
+
+(def shopping-list (ref #{})) (def assignments (ref {})) (def shopping-cart (ref #{}))
+(defn init []
+  (store/init {:eggs 2 :bacon 3 :apples 3
+               :candy 5 :soda 2 :milk 1
+               :bread 3 :carrots 1 :potatoes 1
+               :cheese 3})
+  (dosync
+   (ref-set shopping-list #{:milk :butter :bacon :eggs
+                            :carrots :potatoes :cheese :apples}) (ref-set assignments {})
+   (ref-set shopping-cart #{})))


add basic storage utils

add basic storage utils

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

--- src/cljs/swarmpit/storage.cljs
+++ src/cljs/swarmpit/storage.cljs
@@ -0,0 +1,16 @@
+(ns swarmpit.storage)
+
+(defn set-item!
+  "Set `key' in browser's localStorage to `val`."
+  [key val]
+  (.setItem (.-localStorage js/window) key val))
+
+(defn get-item
+  "Returns value of `key' from browser's localStorage."
+  [key]
+  (.getItem (.-localStorage js/window) key))
+
+(defn remove-item!
+  "Remove the browser's localStorage value for the given `key`"
+  [key]
+  (.removeItem (.-localStorage js/window) key))


pass column to open-file-command, better logging for open-file-command debugging

--- sidecar/src/figwheel_sidecar/components/figwheel_server.clj
+++ sidecar/src/figwheel_sidecar/components/figwheel_server.clj
@@ -4,7 +4,9 @@
    [figwheel-sidecar.utils :as utils]
    [figwheel-sidecar.build-utils :as butils]

+   [clojure.string :as string]
    [clojure.java.io :as io]
+   [clojure.java.shell :as shell]
    [clojure.edn :as edn]

    [clojure.core.async :refer [go-loop <!! <! timeout]]
@@ -22,11 +24,18 @@
   (-connection-data [this])
   (-actual [this]))

-(defn get-open-file-command [{:keys [open-file-command]} {:keys [file-name file-line]}]
+
+
+(defn get-open-file-command [open-file-command {:keys [file-name file-line file-column]}]
   (when open-file-command
     (if (= open-file-command "emacsclient")
-      ["emacsclient" "-n" (str "+" file-line) file-name] ;; we are emacs aware
-      [open-file-command file-name file-line])))
+      (cond-> ["emacsclient" "-n"]
+        (not (nil? file-line))
+        (conj  (str "+" file-line
+                    (when (not (nil? file-column))
+                      (str ":" file-column))))
+        true (conj file-name))
+      [open-file-command file-name file-line file-column])))

 (defn read-msg [data]
   (try
@@ -36,19 +45,43 @@
       (println "Figwheel: message from client couldn't be read!")
       {})))

+(defn validate-file-selected-msg [{:keys [file-name file-line file-column] :as msg}]
+  (and file-name (.exists (io/file file-name))
+       (cond-> msg
+         file-line   (assoc :file-line (java.lang.Integer/parseInt file-line))
+         file-column (assoc :file-column (java.lang.Integer/parseInt file-column)))))
+
+(defn exec-open-file-command [{:keys [open-file-command] :as server-state} msg]
+  (when-let [msg (#'validate-file-selected-msg msg)]
+    (let [command (get-open-file-command open-file-command msg)]
+      (try
+        (let [result (apply shell/sh command)]
+          (if (zero? (:exit result))
+            (println "Successful open file command: " (pr-str command))
+            (println "Failed to call open file command: " (pr-str command)))
+          (when-not (string/blank? (:out result))
+            (println "OUT:")
+            (println (:out result)))
+          (when-not (string/blank? (:err result))
+            (println "ERR:")
+            (println (:err result)))
+          (flush))
+        (catch Exception e
+          (println "Figwheel: there was a problem running the open file command - "
+                   command)
+          (println (.getMessage e)))))))
+
 ;; should make this extendable with multi-method
-(defn handle-client-msg [{:keys [browser-callbacks] :as server-state} data]
+(defn handle-client-msg [{:keys [browser-callbacks log-writer] :as server-state} data]
   (when data
     (let [msg (read-msg data)]
-      (if (= "callback" (:figwheel-event msg))
-        (when-let [cb (get @browser-callbacks (:callback-name msg))]
-          (cb (:content msg)))
-        (when-let [command (and (= "file-selected" (:figwheel-event msg))
-                                (get-open-file-command server-state msg))]
-          (try
-            (.exec (Runtime/getRuntime) (into-array String command))
-            (catch Exception e
-              (println "Figwheel: there was a problem running the open file command - " command))))))))
+      (binding [*out* log-writer
+                *err* log-writer]
+        (if (= "callback" (:figwheel-event msg))
+          (when-let [cb (get @browser-callbacks (:callback-name msg))]
+            (cb (:content msg)))
+          (when (= "file-selected" (:figwheel-event msg))
+            (exec-open-file-command server-state msg)))))))

 (defn update-connection-count [connection-count build-id f]
   (swap! connection-count update-in [build-id] (fnil f 0)))
@@ -84,7 +117,8 @@
                 #_(println "Figwheel: client disconnected " status)))

     (on-receive wschannel
-                (fn [data] (handle-client-msg server-state data)))
+                (fn [data] (#'handle-client-msg server-state data
+                            )))

     ;; Keep alive!!
     ;;


Refactor get-service-by-name function on mongomanager.clj file in order to return only one microservice given its 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/julianespinel/directory.git/'


[WM] Bump ext. service timeout to 10s

[WM] Bump ext. service timeout to 10s

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


dining with count clojure

dining with count clojure

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

--- Code/DiningPhilosophers/src/main/clojure/diningWithCount.clj
+++ Code/DiningPhilosophers/src/main/clojure/diningWithCount.clj
@@ -0,0 +1,82 @@
+(ns dining
+  (:import (java.util.concurrent TimeUnit)
+           (com.google.common.base Stopwatch))
+  (:gen-class))
+
+(defmacro spy-dosync [& body]
+  `(let [retries# (atom -1)
+         result# (dosync
+                   (swap! retries# inc)
+                   ~@body)]
+     (println "retries count:" @retries#)
+     result#))
+
+(def rounds (ref 200)) ;ref due to being a shared resource
+(def philosophers (doall (map #(agent %) (repeat 5 0)))) ;agents due to being uncoordinated async
+(def forks (doall (map #(ref [% true]) (range (count philosophers))))) ;ref due to being a shared resource
+(def logger (agent 0))
+(def stopwatch (. Stopwatch (createStarted)))
+
+(def fork1 (ref true))
+(def fork2 (ref true))
+(def fork3 (ref true))
+(def fork4 (ref true))
+(def fork5 (ref true))
+
+(defn debug [_ id msg r]
+  (println id \space msg "(" r ")")
+  (flush))
+
+(defn print-stopwatch [_ time]
+  (println time)
+  (shutdown-agents))
+
+
+(defn my-forks [id]
+  (map #(nth (cycle forks) (+ (count forks) %)) [id (dec id)]))
+
+(defn got-forks? [id]
+  (every? #(= true (second (deref %))) (my-forks id)))
+
+(defn handle-forks [id action]
+  (doseq [fork (my-forks id)]
+    (ref-set fork [(first @fork) (condp = action :take false :release true)])))
+
+(defn more-food? []
+  (if (pos? (ensure rounds))
+    true
+    (do
+      (. stopwatch (stop))
+      (send logger print-stopwatch (. stopwatch (elapsed (. TimeUnit MILLISECONDS))))
+      false)))
+
+(defn behave [a id left right]
+  (spy-dosync ; Initiate transaction
+    (when (more-food?) ; Is there more food?
+      ;(if (> 5 (rand-int 10))        ; Do I want to takeFood or think?
+      (when (and @left @right) ; Are both of my forks available?
+        (do
+          (ref-set left false)
+          (ref-set right false)
+          (Thread/sleep 100)
+          ;(handle-forks id :take)
+          (alter rounds dec)
+          (send-off logger debug id "ate      " @rounds)
+          ;(handle-forks id :release)
+          (ref-set left true)
+          (ref-set right true))
+        )))
+  (Thread/sleep 100)
+  (send-off *agent* behave id left right)) ; Repeat above
+
+(defn start []
+  (do
+    (send-off (nth philosophers 0) behave 0 fork1 fork2)
+    (send-off (nth philosophers 1) behave 1 fork2 fork3)
+    (send-off (nth philosophers 2) behave 2 fork3 fork4)
+    (send-off (nth philosophers 3) behave 3 fork4 fork5)
+    (send-off (nth philosophers 4) behave 4 fork5 fork1)))
+
+
+(defn -main [& args]
+  (start))


added toc.clj

added toc.clj

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

--- src/leiningen/new/cryogen/src/cryogen/toc.clj
+++ src/leiningen/new/cryogen/src/cryogen/toc.clj
@@ -0,0 +1,28 @@
+(ns cryogen.toc
+ (:require [crouton.html :as html]
+           [hiccup.core :as hiccup]))
+
+(defn get-headings [content]
+  (reduce
+    (fn [headings {:keys [tag attrs content] :as elm}]
+      (if (some #{tag} [:h1 :h2 :h3])
+        (conj headings elm)
+        (if-let [more-headings (get-headings content)]
+          (into headings more-headings)
+          headings)))
+    [] content))
+
+(defn make-links [headings]
+  (into [:ol.contents]
+        (for [{[{{name :name} :attrs} title] :content} headings]
+          [:li [:a {:href (str "#" name)} title]])))
+
+(defn generate-toc [html]
+  (-> html
+      (.getBytes)
+      (java.io.ByteArrayInputStream.)
+      (html/parse)
+      :content
+      (get-headings)
+      (make-links)
+      (hiccup/html)))


Refactored add-session-to-complaint using thread-last macro

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


liberator helpers from the docs

liberator helpers from the docs

error: pathspec 'src/buyme_aggregation_backend/helpers/liberator.clj' did not match any file(s) known to git

--- src/buyme_aggregation_backend/helpers/liberator.clj
+++ src/buyme_aggregation_backend/helpers/liberator.clj
@@ -0,0 +1,35 @@
+(ns buyme-aggregation-backend.helpers.liberator
+  (:require [clojure.java.io :as io]
+            [clojure.data.json :as json]
+            ))
+
+;; convert the body to a reader. Useful for testing in the repl
+;; where setting the body to a string is much simpler.
+(defn body-as-string [ctx]
+  (if-let [body (get-in ctx [:request :body])]
+    (condp instance? body
+      java.lang.String body
+      (slurp (io/reader body)))))
+
+
+;; For PUT and POST parse the body as json and store in the context
+;; under the given key.
+(defn parse-json [ctx key]
+  (when (#{:put :post} (get-in ctx [:request :request-method]))
+    (try
+      (if-let [body (body-as-string ctx)]
+        (let [data (json/read-str body)]
+          [false {key data}])
+        {:message "No body"})
+      (catch Exception e
+        (.printStackTrace e)
+        {:message (format "IOException: %s" (.getMessage e))}))))
+
+;; For PUT and POST check if the content type is json.
+(defn check-content-type [ctx content-types]
+  (if (#{:put :post} (get-in ctx [:request :request-method]))
+    (or
+      (some #{(get-in ctx [:request :headers "content-type"])}
+            content-types)
+      [false {:message "Unsupported Content-Type"}])
+    true))


[EN] Bump timeout to 1 second.

[EN] Bump timeout to 1 second.


Need proper Go arrays here

Need proper Go arrays here

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


Created alternative version of Dice Game.

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

--- src/clojush/problems/software/benchmarks_v2/dice_game2.clj
+++ src/clojush/problems/software/benchmarks_v2/dice_game2.clj
@@ -0,0 +1,174 @@
+;; dice_game2.clj
+;; Peter Kelly, pxkelly@hamilton.edu
+;;
+
+(ns clojush.problems.software.benchmarks-v2.dice-game2
+  (:use clojush.pushgp.pushgp
+        [clojush pushstate interpreter random util globals]
+        clojush.instructions.tag
+        [clojure.math numeric-tower]
+        ))
+
+; Atom generators
+(def dice-game-atom-generators
+  (make-proportional-atom-generators
+   (concat
+    (registered-for-stacks [:integer :boolean :exec :float])
+    (list (tag-instruction-erc [:integer :boolean :exec :float] 1000) ; tags
+          (tagged-instruction-erc 1000)))
+   (list 'in1 'in2) ; inputs
+   (list 0.0 1.0) ; constants
+   {:proportion-inputs 0.15
+    :proportion-constants 0.05}))
+
+(defn dice-game-input
+  []
+  (let [die1 (inc (rand-int 100))
+        die2 (inc (rand-int 100))]
+    [die1 die2]))
+
+;; A list of data domains for the problem. Each domain is a vector containing
+;; a "set" of inputs and two integers representing how many cases from the set
+;; should be used as training and testing cases respectively. Each "set" of
+;; inputs is either a list or a function that, when called, will create a
+;; random element of the set.
+(def dice-game-data-domains
+  [[(list [1 2]
+          [2 1]
+          [99 100]
+          [100 99]
+          [1 100]
+          [100 1]
+          [3 4]
+          [4 3]
+          [4 6]
+          [6 4]
+          [49 50]
+          [50 49]
+          [1 1]
+          [50 50]
+          [100 100]
+          ) 15 0] ; Small and large cases that have n < m, n = m, and n > m
+   [(fn [] (let [x (inc (rand-int 100))]
+             [x x])) 10 100] ; 10 cases with n = m
+   [(fn [] (dice-game-input)) 175 1900] ; Random cases
+   ])
+
+;;Can make Dice Game test data like this:
+;(test-and-train-data-from-domains dice-game-data-domains)
+
+(defn dice-game-test-cases
+  "Takes a sequence of inputs and gives IO test cases of the form
+   [input output]."
+  [inputs]
+  (map (fn [[n m]]
+         (vector [n m]
+                 ; Mathed this solution
+                 (if (<= n m)
+                   (float (/ (dec n) (* 2 m)))
+                   (float (- 1
+                             (/ (inc m)
+                                (* 2 n)))))))
+       inputs))
+
+(defn make-dice-game-error-function-from-cases
+  [train-cases test-cases]
+  (fn the-actual-dice-game-error-function
+    ([individual]
+      (the-actual-dice-game-error-function individual :train))
+    ([individual data-cases] ;; data-cases should be :train or :test
+     (the-actual-dice-game-error-function individual data-cases false))
+    ([individual data-cases print-outputs]
+      (let [behavior (atom '())
+            errors (doall
+                     (for [[[input1 input2] correct-output] (case data-cases
+                                                     :train train-cases
+                                                     :test test-cases
+                                                     [])]
+                       (let [final-state (run-push (:program individual)
+                                                   (->> (make-push-state)
+                                                        (push-item input2 :input)
+                                                        (push-item input1 :input)))
+                             result (stack-ref :float 0 final-state)]
+                         (when print-outputs
+                           (println (format "Correct output: %.3f | Program output: %.3f" correct-output result)))
+                         ; Record the behavior
+                         (swap! behavior conj result)
+                         ; Error is float error rounded to 3 decimal places
+                         (round-to-n-decimal-places
+                          (if (number? result)
+                            (abs (- result correct-output)) ; distance from correct integer
+                            1000000.0) ; penalty for no return value
+                          3)
+                         )))]
+        (if (= data-cases :train)
+          (assoc individual :behaviors @behavior :errors errors)
+          (assoc individual :test-errors errors))))))
+
+(defn get-dice-game-train-and-test
+  "Returns the train and test cases."
+  [data-domains]
+  (map sort (map dice-game-test-cases
+                 (test-and-train-data-from-domains data-domains))))
+
+; Define train and test cases
+(def dice-game-train-and-test-cases
+  (get-dice-game-train-and-test dice-game-data-domains))
+
+(defn dice-game-initial-report
+  [argmap]
+  (println "Train and test cases:")
+  (doseq [[i case] (map vector (range) (first dice-game-train-and-test-cases))]
+    (println (format "Train Case: %3d | Input/Output: %s" i (str case))))
+  (doseq [[i case] (map vector (range) (second dice-game-train-and-test-cases))]
+    (println (format "Test Case: %3d | Input/Output: %s" i (str case))))
+  (println ";;******************************"))
+
+(defn dice-game-report
+  "Custom generational report."
+  [best population generation error-function report-simplifications]
+  (let [best-test-errors (:test-errors (error-function best :test))
+        best-total-test-error (apply +' best-test-errors)]
+    (println ";;******************************")
+    (printf ";; -*- Dice Game problem report - generation %s\n" generation)(flush)
+    (println "Test total error for best:" best-total-test-error)
+    (println (format "Test mean error for best: %.5f" (double (/ best-total-test-error (count best-test-errors)))))
+    (when (zero? (:total-error best))
+      (doseq [[i error] (map vector
+                             (range)
+                             best-test-errors)]
+        (println (format "Test Case  %3d | Error: %s" i (str error)))))
+    (println ";;------------------------------")
+    (println "Outputs of best individual on training cases:")
+    (error-function best :train true)
+    (println ";;******************************")
+    )) ;; To do validation, could have this function return an altered best individual
+       ;; with total-error > 0 if it had error of zero on train but not on validation
+       ;; set. Would need a third category of data cases, or a defined split of training cases.
+
+
+; Define the argmap
+(def argmap
+  {:error-function (make-dice-game-error-function-from-cases (first dice-game-train-and-test-cases)
+                                                             (second dice-game-train-and-test-cases))
+   :atom-generators dice-game-atom-generators
+   :max-points 2000
+   :max-genome-size-in-initial-program 250
+   :evalpush-limit 2000
+   :population-size 1000
+   :max-generations 300
+   :parent-selection :lexicase
+   :genetic-operator-probabilities {:alternation 0.2
+                                    :uniform-mutation 0.2
+                                    :uniform-close-mutation 0.1
+                                    [:alternation :uniform-mutation] 0.5
+                                    }
+   :alternation-rate 0.01
+   :alignment-deviation 10
+   :uniform-mutation-rate 0.01
+   :problem-specific-report dice-game-report
+   :problem-specific-initial-report dice-game-initial-report
+   :report-simplifications 0
+   :final-report-simplifications 5000
+   :max-error 1000000.0
+   })


fix function-returning-function typo

fix function-returning-function typo

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


[WM EN] improve notification schemas

[WM EN] improve notification schemas

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


Check db instead of fs in redeploy [fixes #773]

This closes a window where a version could have been redeployed
between the time the server instance is replaced and the maven
indexing job runs to re-populate the structure of the on-disk repo.

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


using futures in order to speed batch sends up

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


replace assoc with update.

replace assoc with update.


Zerbitzaria hastean partekatzen hasi

Zerbitzaria hastean partekatzen hasi

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


Did some nonsense

Did some nonsense

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

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

--- src/conexp/nonsense.clj
+++ src/conexp/nonsense.clj
@@ -0,0 +1,71 @@
+;; 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.nonsense
+  (:use conexp.util)
+  (:use [clojure.contrib.math :only (floor)]))
+
+
+;;; Doomsday Algorithm
+
+(defn- doomsday-of-year
+  "Returns the doomsday of the year given."
+  [year]
+  (mod (+ 2 year
+	  (floor (/ year 4))
+	  (- (floor (/ year 100)))
+	  (floor (/ year 400)))
+       7))
+
+(defn- leap-year?
+  "Returns true iff year is a leap year."
+  [year]
+  (or (zero? (mod year 400))
+      (and (zero? (mod year 4))
+	   (not (zero? (mod year 100))))))
+
+(defn- doomsday-in-month
+  "Returns number of day in month doomsday occurs on."
+  [year month]
+  (condp = month
+    1  (if (leap-year? year) 4 3)
+    2  (if (leap-year? year) 29 28)
+    3  0
+    4  4
+    5  9
+    6  6
+    7  11
+    8  8
+    9  5
+    10 10
+    11 7
+    12 12
+    (illegal-argument month " is not a valid month.")))
+
+(defn- number->weekday
+  "Converts number to weekday."
+  [n]
+  ({0 "Sunday",
+    1 "Monday",
+    2 "Tuesday",
+    3 "Wednesday",
+    4 "Thursday",
+    5 "Friday",
+    6 "Saturday"}
+   (mod n 7)))
+
+(defn weekday-of-date
+  "Returns the day of week of the given date, in Gregorian calendar."
+  [year month day]
+  (let [doomsday (doomsday-of-year year),
+	doomsday-in-month (doomsday-in-month year month)]
+    (number->weekday (+ doomsday (- day doomsday-in-month)))))
+
+;;;
+
+nil


add resource type check for create update actions

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


chmod +x add-job

chmod +x add-job

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/jchli/jepsen-aurora.git/'


run scheduler in background

run scheduler in background


only transact `new-license` when it exists

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


remove comment

remove comment

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


Example 2 for tutorial.

Example 2 for tutorial.

error: pathspec 'example-code/ex2.cljs' did not match any file(s) known to git

--- example-code/ex2.cljs
+++ example-code/ex2.cljs
@@ -0,0 +1,25 @@
+(def app-state (atom {:board-name "Yo yo yo, get it done!"
+                      :columns [{:name "To Do"}
+                                {:name "Doing"}
+                                {:name "Done"}]}))
+
+(defn column-component [data owner]
+  (reify
+    om/IRender
+    (render [_]
+      (dom/div #js {:className "column"}
+               (dom/div nil (:name data))
+               (dom/div #js {:className "cards-wrapper"}
+                        (dom/div nil "Cards go here"))))))
+
+(defn app-component [data owner]
+  (reify
+    om/IRender
+    (render [_]
+      (apply dom/div nil
+        (om/build-all column-component (:columns data))))))
+
+(om/root
+  app-component
+  app-states
+  {:target (. js/document (getElementById "app"))})


Create iolist.clj

Create iolist.clj

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

--- src/iyye/bios/iolist.clj
+++ src/iyye/bios/iolist.clj
@@ -0,0 +1,40 @@
+; Iyye - AI agent
+; Copyright (C) 2016-2017  Sasha Yumzya
+
+; This program is free software: you can redistribute it and/or modify
+; it under the terms of the GNU Affero General Public License as
+; published by the Free Software Foundation, either version 3 of the
+; License, or (at your option) any later version.
+
+; This program is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+; GNU Affero General Public License for more details.
+
+; You should have received a copy of the GNU Affero General Public License
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+(ns iyye.bios.iolist
+  (:require [extras.lispychat :as lispychat]
+            [iyye.bios.persistence :as persistence]
+            [clojure.tools.logging :as log]))
+
+(def AvatarsIOList (ref ()))
+
+; Register all IOs here FIXME make dynamic
+(defn init-avatars-list []
+  (dosync
+    (alter AvatarsIOList conj lispychat/lispy-chat-IO)))
+
+(defn init-io []
+  (letfn [(start-all [l]
+            (doall (for [func (map :start-function l) :when func] (func))))]
+    (doall [
+      (init-avatars-list)
+      (start-all @AvatarsIOList)
+      (start-all (:inputs-list @AvatarsIOList))
+      (start-all (:outputs-list @AvatarsIOList))])))
+
+(defn load-io-state []
+
+  )


We are not rendering what we think we are rendering.

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


hide tooltip toggle for now

hide tooltip toggle for now

--- cljs-server/cljsinfo_server/pages/cheatsheet.cljs
+++ cljs-server/cljsinfo_server/pages/cheatsheet.cljs
@@ -893,8 +893,8 @@
     [:img.logo-6ced3 {:src "img/clojure-logo.png" :alt "Clojure Logo"}]
     [:h1.title-7a29c "ClojureScript Cheatsheet"]
     [:input#searchInput.search-70fb8 {:type "text" :placeholder "Search"}]
-    [:label#toggleTooltips.tooltips-label-68aa0
-      [:i.fa.fa-check-square-o] "Show tooltips?"]
+    ; [:label#toggleTooltips.tooltips-label-68aa0
+    ;   [:i.fa.fa-check-square-o] "Show tooltips?"]
     [:div.clr-43e49]])

 ;; TODO: text for footer:


java/install options

java/install options


OK, let's be explicit about the logging!

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


[TH] better

[TH] better

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


Update tests to match generalization of sns handling

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


redefs example

redefs example

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

--- src/simple/redefs.clj
+++ src/simple/redefs.clj
@@ -0,0 +1,15 @@
+(ns maths.simple.redefs)
+
+;
+(ns http)
+(defn post [url]
+  {:body "Hello world"})
+
+(ns app
+  (:require [clojure.test :refer [deftest is run-tests]]))
+
+(deftest is-a-fn
+  (with-redefs-fn {#'http/post (fn [url] {:body "Hello world again"})}
+    #(is (= {:body "Hello world again"} (http/post "http://service.com/greet")))))
+
+(run-tests) ;; test is passing