<commit_before>(ns spectacles.social-light
  (:require [quil.core :as q]
            [quil.middleware :as m])
  (:import [wordcram WordCram]))

(defn setup []
  (q/color-mode :hsb)
  (let [wc (WordCram. (quil.applet/current-applet))]
    (-> wc
        ;;(.fromWebPage "https://twitter.com/WinCityMain")
        ;;(.fromTextString (into-array String ["Life In Lights Winchester"]))
        (.fromTextFile "resources/posts.txt")
        (.withColors (int-array [(q/color 30) (q/color 110) (q/color (q/random 255) 240 200)]))
        (.sizedByWeight 5 120)
        (.withFont"Copse")
        (.angledBetween (float -1.6) (float 1.6))
        (.drawAll))))

(defn update-state [state] {})

(defn draw-state [state] {})

(q/defsketch spectacles
  :title "Social Light"
  :size [1000 600]
  ; 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
  :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]
  ;;  :features [:keep-on-top :present :no-start]
;;  :features [:no-start]
  :bgcolor 0)

<commit_msg>Refinement of colors, timing and sizing<commit_after>(ns spectacles.social-light
  (:require [quil.core :as q]
            [quil.middleware :as m])
  (:import [wordcram WordCram]))

(defn setup []
  (q/color-mode :hsb)
  (q/background 0)
  (q/frame-rate 2)

  (let [wc (WordCram. (quil.applet/current-applet))]
    (-> wc
        ;;(.fromWebPage "https://twitter.com/WinCityMain")
        ;;(.fromTextString (into-array String ["Life In Lights Winchester"]))
        (.fromTextFile "resources/posts.txt")
        (.withColors (int-array [(q/color 220) (q/color 140) (q/color (q/random 255) 240 200)]))
        (.sizedByWeight 5 80)
        (.withFont"Copse")
        (.angledBetween (float -1.6) (float 1.6)))
    {:wordcram wc})
  )

(defn update-state [state] state)

(defn draw-state [state]
  (if (.hasMore (:wordcram state))
    (.drawNext (:wordcram state)))
  state)

(q/defsketch spectacles
  :title "Social Light"
  :size [800 600]
  ; 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
  :features [:keep-on-top]
  :middleware [m/fun-mode]
  :features [:keep-on-top :present :no-start]
  :bgcolor 0)


{'fraction_non_alphanumeric': 0.15409181636726546, 'fraction_numerical': 0.024351297405189622, 'mean_word_length': 3.1081967213114754, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '813001', 'n_tokens_mistral': 957, 'n_tokens_neox': 870, 'n_words': 235}