<commit_before>(ns moon.dom
    (:require [goog.dom :as dom]
              [goog.events :as events]
              [cljs.core.async :refer
               [chan put!]]))

(defn by-id [id]
  (dom/getElement id))

(defn listen [el type]
  (let [out (chan)]
    (events/listen el type (fn [e] (put! out e)))
    out))

(defn set-html! [el content]
  (set! (. el -innerHTML) content))

(defn html [el]
  (. el -innerHTML))

(defn toggle [btn]
  (let [v (keyword (clojure.string/lower-case (html btn)))]
    (set-html! btn (if (= :start v) "Stop" "Start"))
    v))

(defn update-status [id sofar]
  (set-html! (by-id id) (str sofar))
  sofar)<commit_msg>removes unused stuff<commit_after>(ns moon.dom
    (:require [goog.dom :as dom]
              [goog.events :as events]
              [cljs.core.async :refer
               [chan put!]]))

(defn by-id [id]
  (dom/getElement id))

(defn listen [el type]
  (let [out (chan)]
    (events/listen el type (fn [e] (put! out e)))
    out))

(defn set-html! [el content]
  (set! (. el -innerHTML) content))

(defn html [el]
  (. el -innerHTML))

{'fraction_non_alphanumeric': 0.17820867959372114, 'fraction_numerical': 0.0, 'mean_word_length': 2.485530546623794, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '200483', 'n_tokens_mistral': 419, 'n_tokens_neox': 407, 'n_words': 122}