Rename URIs

Rename URIs

--- dev/src/yada/dev/security.clj
+++ dev/src/yada/dev/security.clj
@@ -115,7 +115,7 @@
                  [:ul
                   [:li [:a {:href (:href (yada/uri-for ctx ::basic-example))} "Basic"]]
                   [:li [:a {:href (:href (yada/uri-for ctx ::login))} "Session"]]
-                  [:li [:a {:href (:href (yada/uri-for ctx ::bearer-example))} "Bearer (OAuth2)"]]]
+                  [:li [:a {:href (:href (yada/uri-for ctx ::third-party-login-example))} "Third-party login"]]]

                  [:h4 "Login details for all examples"]
                  [:p "Login with username "
@@ -199,7 +199,7 @@
                                            [:p "Try another user? " [:a {:href (:href (yada/uri-for ctx ::logout))} "logout" ]]
                                            ))}}}))})]

-      ["/bearer"
+      ["/oauth2"
        (let [github-client-id "41cd4ede085de5969bd4"
              google-client-id "848581248307-th1bhe45q00alks9ricm8mj4kja4nn7v.apps.googleusercontent.com"
              secret (hash/sha256 "ABCD1234")]
@@ -212,7 +212,7 @@
                    :content
                    (html
                     [:div.container
-                     [:h2 "Bearer (OAuth2) example"]
+                     [:h2 "Third-party login"]
                      [:p
                       [:form
                        {:action (:href (yada/uri-for ctx ::initiate-google))
@@ -223,7 +223,7 @@
                        {:action (:href (yada/uri-for ctx ::initiate-github))
                         :method :post}
                        [:input {:type :submit :value "Login via GitHub"}]]]])}))
-               (assoc :id ::bearer-example))]
+               (assoc :id ::third-party-login-example))]

           ["/initiate-google" (oauth/oauth2-initiate-resource
                                {:id ::initiate-google


WIP: Bullet chart example.

WIP: Bullet chart example.

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

--- vrepl/resources/samples/bullet.clj
+++ vrepl/resources/samples/bullet.clj
@@ -0,0 +1,68 @@
+(ns bullet
+  (:use [c2.core :only [unify style]]
+        [c2.util :only [half]])
+  (:require [c2.scale :as scale]
+            [vomnibus.color-brewer :as color-brewer]))
+
+
+(def css "
+.bullet { font: 10px sans-serif; }
+.bullet .labels { fill: white; text-anchor: end; }
+.bullet .marker { stroke: #000; stroke-width: 2px; }
+.bullet .tick line { stroke: #666; stroke-width: .5px; }
+.bullet .range.s0 { fill: #eee; }
+.bullet .range.s1 { fill: #ddd; }
+.bullet .range.s2 { fill: #ccc; }
+.bullet .measure.s0 { fill: lightsteelblue; }
+.bullet .measure.s1 { fill: steelblue; }
+.bullet .title { font-size: 14px; font-weight: bold; }
+.bullet .subtitle { fill: #999; }
+")
+
+(let [data [{:title "Revenue" :subtitle "US$ in thousands" :ranges [150 225 300] :measures [220 270] :markers [250]}
+            {:title "Profit" :subtitle "%" :ranges [20 25 30] :measures [21 23] :markers [26]}
+            {:title "Order Size" :subtitle "US$ average" :ranges [350 500 600] :measures [100 320] :markers [550]}
+            {:title "New Customers" :subtitle "count" :ranges [1400 2000 2500] :measures [1000 1650] :markers [2100]}
+            {:title "Satisfaction" :subtitle "out of 5" :ranges [3.5 4.25 5] :measures [3.2 4.7] :markers [4.4]}]]
+
+
+  (unify data
+         (fn [{:keys [title subtitle ranges measures markers]}]
+           (let [bar-width 800
+                 range-height 25
+                 measure-height 9
+                 marker-height 15
+                 label-margin 120
+                 s (scale/linear :domain [0 (apply max (flatten [ranges measures markers]))]
+                                 :range [0 bar-width])]
+
+             [:svg.bullet {:xmlns "http://www.w3.org/2000/svg" :width 960 :height 400}
+              [:style {:type "text/css"} (str "<![CDATA[" css "]]>")]
+
+              ;;Text labels
+              [:g.labels {:transform (str "translate(" (- label-margin 5) "," 12  ")")}
+               [:text title]
+               [:text {:dy "1.2em"} subtitle]]
+
+              ;;Rects; move to the right to make room for labels
+              [:g.rects {:transform (str "translate(" label-margin ", 0)")}
+               ;;Range rects
+               (map (fn [[idx r]]
+                      [:rect {:class (str "range s" idx)
+                              :height range-height, :width (s r)}])
+                    (map-indexed vector (sort > ranges)))
+
+               ;;Measure rects
+               (map (fn [[idx m]]
+                      [:rect {:class (str "measure s" idx)
+                              :height measure-height, :width (s m)
+                              :y (half (- range-height measure-height))}])
+                    (map-indexed vector (sort > measures)))
+
+               ;;Markers
+               (map (fn [[idx m]]
+                      [:rect.marker {:height marker-height, :width 2
+                                     :x (s m), :y (half (- range-height marker-height))}])
+                    (map-indexed vector (sort > markers)))]
+
+              ]))))


deploy only the backend

deploy only the backend

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/meandor/aim-pipeline.git/'


Documentation for read-session updated

Documentation for read-session updated

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


Allowed cover field to be unspecified for generated covers (found in book dir)

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


Added common.clj.

Added common.clj.

error: pathspec 'src/clojure/uncomplicate/neanderthal/internal/common.clj' did not match any file(s) known to git

--- src/clojure/uncomplicate/neanderthal/internal/common.clj
+++ src/clojure/uncomplicate/neanderthal/internal/common.clj
@@ -0,0 +1,47 @@
+;;   Copyright (c) Dragan Djuric. 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) or later
+;;   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 uncomplicate.neanderthal.internal.common
+  (:require [clojure.pprint :refer [cl-format]]
+            [uncomplicate.neanderthal.math :refer [ceil floor]])
+  (:import [uncomplicate.neanderthal.internal.api Vector Matrix]))
+
+(def ^:private compile-format #'clojure.pprint/compile-format)
+
+(def format-g (compile-format "~6,2,,1G "))
+(def format-f (compile-format "~6,2F "))
+(def format-a (compile-format "~3@T~A~3@T"))
+
+(defn format-vector [^java.io.Writer w formatter ^Vector x]
+  (let [n-print (min (.dim x) (long *print-length*))
+        start-2 (- (.dim x) (floor (/ n-print 2)))]
+    (dotimes [i (ceil (/ n-print 2))]
+      (cl-format w formatter (.boxedEntry x i)))
+    (when (< n-print (.dim x))
+      (cl-format w format-a "..."))
+    (dotimes [i (floor (/ n-print 2))]
+      (cl-format w formatter (.boxedEntry x (+ start-2 i))))))
+
+(defn format-matrix [^java.io.Writer w formatter ^Matrix a max-value]
+  (let [pl (long *print-length*)
+        m-print (min (.mrows a) pl)
+        n-print (min (.ncols a) pl)
+        m-start-2 (- (.mrows a) (floor (/ m-print 2)))]
+    (dotimes [i (ceil (/ m-print 2))]
+      (.write w "\n")
+      (format-vector w formatter (.row a i)))
+    (when (< m-print (.mrows a))
+      (let [width (* 0.1  n-print (.length ^String (cl-format nil formatter max-value)))]
+        (dotimes [_ 3]
+          (.write w "\n")
+          (dotimes [_ width]
+            (.write w "     .     ")))
+        (.write w "\n")))
+    (dotimes [i (floor (/ m-print 2))]
+      (.write w "\n")
+      (format-vector w formatter (.row a (+ m-start-2 i))))))


Initial sketch of functionality

Initial sketch of functionality

Outlines many of the functions that will be written without any actual code.
However the functions defined should be enough to actually run a potential game.

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/thorsteinson/cljs-snake.git/'


[WM JE] slight refactor to make starting the server more REPL-friendly

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/s3-ftp.git/'


started agent validator

started agent validator

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

--- src/Miscellaneous/validator.clj
+++ src/Miscellaneous/validator.clj
@@ -0,0 +1,64 @@
+(ns Miscellaneous.validator
+  (:require [clojure.java.io :as javaio]
+            [clojure.data.csv :as csv]
+            [incanter.io :as io]
+            [incanter.core :as incanter]))
+
+(def data-file "D:/data/all_160_in_51.P35.csv")
+
+(defn lazy-read-csv
+  [csv-file]
+  (let [in-file (javaio/reader csv-file)
+        csv-seq (csv/read-csv in-file)
+        lazy (fn lazy [wrapped]
+               (lazy-seq
+                (if-let [s (seq wrapped)]
+                  (cons (first s) (lazy (rest s)))
+                  (.close in-file))))]
+    (lazy csv-seq)))
+
+(defn with-header [coll]
+  (let [headers (map keyword (first coll))]
+    (map (partial zipmap headers) (next coll))))
+
+(def int-rows
+  [:GEOID :SUMLEV :STATE :POP100 :HU100 :POP100.2000
+   :HU100.2000 :P035001 :P035001.2000])
+
+(defn int?
+  [x]
+  (or (instance? Integer x) (instance? Long x)))
+
+(defn try-read-string
+  [x]
+  (try (read-string x)
+    (catch Exception e x)))
+
+
+
+
+
+
+
+
+
+
+;;;;;;;;;;;;;;;;;;;tips;;;;;;;;;;;;;;;;
+
+;read-string is strange!
+(read-string "1.1")
+(read-string "(+ 1 1)")
+#_(read-string "1.1.1 (+ 1 1)")
+#_(read-string "")
+(read-string "+ 2 3")
+
+;if don't print in the catch, error will be catched silently!
+(defn n [] (/ 1 0))
+(try (n) (catch Exception e n))
+(try (n) (catch Exception e (println n)))
+
+
+
+
+
+


Writing a single failing test, to remind myself that there are no tests yet

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

--- test/test_huh/test_core.cljs
+++ test/test_huh/test_core.cljs
@@ -0,0 +1,10 @@
+(ns test-huh.test.core
+  (:require-macros [cemerick.cljs.test
+                    :refer (is deftest with-test run-tests testing test-var)])
+  (:require [cemerick.cljs.test :as t]
+            [huh.core :as huh]))
+
+;; To be deleted when there is reasonable test coverage for the
+;; library.
+(deftest test-coverage-is-good-enough
+  (is (= 2 3)))


Fix show-version page

Fix show-version page

This was double wrapping the version page in a response map.

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


Increment version number

Increment version number

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


Clearing up dependencies.

Clearing up dependencies.

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


Version 1.12.3

Version 1.12.3

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


Update library

Update library


update to latest dependency versions

update to latest dependency versions

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


Switched to 0.9.0

Switched to 0.9.0

--- project.clj
+++ project.clj
@@ -6,7 +6,7 @@
   :lein-release {:deploy-via :clojars}
   :license {:name "Eclipse Public License"
             :url "http://www.eclipse.org/legal/epl-v10.html"}
-  :dependencies [[com.facebook/react "0.8.0.1"]
+  :dependencies [[com.facebook/react "0.9.0"]
                  [org.clojure/clojure "1.5.1"]
                  [org.clojure/clojurescript "0.0-2173"]]
   :cljsbuild {:builds []}


bump project version

bump project version

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


release 0.1.0-beta1

release 0.1.0-beta1


Added a destructuring example for clojure to go over some specific details

error: pathspec 'hackerrank/functional_programming/clojure/tutorial/destructuring_tut.clj' did not match any file(s) known to git

--- hackerrank/functional_programming/clojure/tutorial/destructuring_tut.clj
+++ hackerrank/functional_programming/clojure/tutorial/destructuring_tut.clj
@@ -0,0 +1,38 @@
+(def names ["bob" "sally" "joe"])
+
+(println (str "Names: " (clojure.string/join ", " names)))
+
+;; Capture the first element of the vector
+((fn [[first-name]]
+  (println (str "First name in list: " first-name))) names)
+
+;; Capture the second element of the vector
+((fn [[_ second-name]]
+  (println (str "Second name in list: " second-name))) names)
+
+;; Capture the remaning elements of the vector
+((fn [[_ & rest-names]]
+   (println (str "Remaining names in the list: " (clojure.string/join ", " rest-names))))  names)
+
+(defn draw-point [& {x :x y :y}]
+  (println [x y]))
+
+;; Should be the same
+(println "I should be true: " (= (draw-point :y 20 :x 10) (draw-point :x 10 :y 20)))
+
+;; An alternative way to pass a map
+(defn draw-point [& {:keys [x y z]}]
+  (println [x y z]))
+(draw-point :x 30 :y 10 :z 100)
+
+;; default arguments using :or operator
+(defn draw-point [& {:keys [x y z]
+                     :or {x 0
+                          y 1
+                          z 2}}]
+  [x y z])
+(println (draw-point))
+(println "I should be true because [0 1 2] should be the default values when sending no parameters into draw-point : " (= [0 1 2] (draw-point)))
+
+
+


catfacts v1

catfacts v1

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


Removed comment

Removed comment

--- 2-collectors/clojure-collector/src/com/snowplowanalytics/clojure_collector/responses.clj
+++ 2-collectors/clojure-collector/src/com/snowplowanalytics/clojure_collector/responses.clj
@@ -49,6 +49,4 @@
   [id duration domain]
   {:value    (str "sp=" id)
    :expires  (-> (new DateTime) (.plusSeconds duration))
-   :domain   domain})
-
-;; TODO: [1] new Date(new Dat`e().getTime()+cookieDuration).toUTCString()+   :domain   domain})


Fix unit test to compare host collections properly

--- scheduler/test/cook/test/kubernetes/compute_cluster.clj
+++ scheduler/test/cook/test/kubernetes/compute_cluster.clj
@@ -252,7 +252,7 @@
                   first)]
           (is (= api/k8s-hostname-label (.getKey node-selector-requirement)))
           (is (= "NotIn" (.getOperator node-selector-requirement)))
-          (is (= ["test-host-1" "test-host-2"] (.getValues node-selector-requirement))))))
+          (is (= #{"test-host-1" "test-host-2"} (set (.getValues node-selector-requirement)))))))

     (testing "synthetic pods have safe-to-evict annotation"
       (let [job-uuid-1 (str (UUID/randomUUID))


comment out IMutate protocol

comment out IMutate protocol

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


Add user namespace for use by Isla.

Add user namespace for use by Isla.

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

--- src/isla/user.clj
+++ src/isla/user.clj
@@ -0,0 +1,3 @@
+(ns isla.user)
+
+(def types {})


[WM] add pr-str before sending a notifications to the queue

Queue payloads should be EDN strings, not raw data structures.

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


Allow any key in organization links

Allow any key in organization links

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


remove default code

remove default code

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/sbondaryev/cljs-client-server.git/'