Fork me on GitHub
#releases
<
2024-03-18
>
Carsten Behring14:03:55

metamorph.ml 0.7.6 : Machine learning functions https://clojars.org/scicloj/metamorph.ml ā€¢ fixed scm links and ClojureDoc generation ā€¢ refactored learning curve

šŸ‘ 1
Carsten Behring14:03:39

http://metamorph.ml 0.7.7 : Machine learning functions for tech.ml.dataset https://clojars.org/scicloj/metamorph.ml ā€¢ fixed color assignment for learning curve

šŸ‘ 1
hlship17:03:08

io.github.hlship/trace 1.2 https://github.com/hlship/trace A small library to improve the experience when using output to debug code using the REPL. Changes: ā€¢ Added a #trace/result tagged literal, which can trace a form and the result of evaluating it ā€¢ Added bench-for macro, which generalizes bench for a range of inputs

šŸ‘ 1
hlship17:03:42

(defn handle-request
  [request]
  (if (string/ends-with? #trace/result (:uri request) "/")
    {:status 401
     :body   "Invalid request"})
  (handle-resource-request (:uri request)))

> (handle-request {:request-method :get :uri "/status"})
=> {:status 200 ...}
{:in my.example.ring-handler/handle-request,
:line 11,
:thread "nREPL-session-62724fb3-7086-49bb-9d8f-4b238de8d01e",
:form (:uri request),
:result "/status"}

hlship17:03:10

(let [inputs {:list   (doall (map inc (range 1000)))
                :vector (vec (doall (map inc (range 1000))))}
      pred   (fn [value] #(< % value))
      v1     (fn [pred coll] (first (filter pred coll)))
      v2     (fn [pred coll] (reduce (fn [_ v] (when (pred v)
                                                 (reduced v)))
                                     nil coll))]
  (bench-for [input [:list :vector]
              count [5 50 500]]
             (v1 (pred count) (input inputs))
             (v2 (pred count) (input inputs))))
ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”³ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”³ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”³ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”“
ā”ƒ                       Expression ā”ƒ      Mean ā”ƒ       Var ā”ƒ     Ratio ā”ƒ
ā”£ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā•‹ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā•‹ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā•‹ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”«
ā”ƒ     (v1 (pred 5) (:list inputs)) ā”ƒ 459.03 ns ā”ƒ Ā± 4.47 ns ā”ƒ 1,353.9 % ā”ƒ
ā”ƒ     (v2 (pred 5) (:list inputs)) ā”ƒ  33.90 ns ā”ƒ Ā± 1.27 ns ā”ƒ   100.0 % ā”ƒ (fastest)
ā”ƒ    (v1 (pred 50) (:list inputs)) ā”ƒ  82.29 ns ā”ƒ Ā± 1.67 ns ā”ƒ   242.7 % ā”ƒ
ā”ƒ    (v2 (pred 50) (:list inputs)) ā”ƒ 500.76 ns ā”ƒ Ā± 2.72 ns ā”ƒ 1,477.0 % ā”ƒ
ā”ƒ   (v1 (pred 500) (:list inputs)) ā”ƒ 473.59 ns ā”ƒ Ā± 6.02 ns ā”ƒ 1,396.9 % ā”ƒ
ā”ƒ   (v2 (pred 500) (:list inputs)) ā”ƒ  81.51 ns ā”ƒ Ā± 1.40 ns ā”ƒ   240.4 % ā”ƒ
ā”ƒ   (v1 (pred 5) (:vector inputs)) ā”ƒ 498.76 ns ā”ƒ Ā± 7.44 ns ā”ƒ 1,471.1 % ā”ƒ
ā”ƒ   (v2 (pred 5) (:vector inputs)) ā”ƒ  34.63 ns ā”ƒ Ā± 0.77 ns ā”ƒ   102.1 % ā”ƒ
ā”ƒ  (v1 (pred 50) (:vector inputs)) ā”ƒ  34.43 ns ā”ƒ Ā± 0.45 ns ā”ƒ   101.5 % ā”ƒ
ā”ƒ  (v2 (pred 50) (:vector inputs)) ā”ƒ  81.52 ns ā”ƒ Ā± 1.58 ns ā”ƒ   240.4 % ā”ƒ
ā”ƒ (v1 (pred 500) (:vector inputs)) ā”ƒ 514.36 ns ā”ƒ Ā± 4.27 ns ā”ƒ 1,517.1 % ā”ƒ (slowest)
ā”ƒ (v2 (pred 500) (:vector inputs)) ā”ƒ 512.08 ns ā”ƒ Ā± 6.29 ns ā”ƒ 1,510.4 % ā”ƒ
ā”—ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”»ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”»ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”»ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”›

hlship17:03:00

Transmuting the expressions to substitute in the values provided by the implicit for required some Major Macro Mojo ā„¢ļø.

Carsten Behring21:03:40

http://metamorph.ml 0.7.8 : Machine learning functions for tech.v3.datasets https://clojars.org/scicloj/metamorph.ml ā€¢ fixed default color of error bands for learning curve

šŸ‘ 1