<commit_before>(ns sormilla.main
  (:require [sormilla.system :refer [task] :as system]
            [sormilla.leap :as leap]
            [sormilla.drone :as drone]
            [sormilla.drone-comm :as comm]
            [sormilla.video :as video]
            [sormilla.swing :as swing]
            [sormilla.gui :as gui]))

(defn -main [& args]
  (println "starting...")
  (task 60 drone/upstream)
  (task 100 drone/telemetry)
  (task 50 leap/leap)
  (video/init-video-streaming!)
  (swing/make-frame gui/render :top true)
  (println "running. press any key to exit...")
  (.read (System/in))
  (println "closing...")
  (system/shutdown!)
  (System/exit 0))

(comment
  (task 60 drone/upstream)
  (task 100 drone/telemetry)
  (task 50 leap/leap)
  (swing/make-frame #'gui/render :safe true :top true)
  (video/init-video-streaming!)

  (system/shutdown!)
  (reset! system/status {:run true})

  (comm/send-commands! [comm/leds-active])
  (comm/send-commands! [comm/video-to-usb-off])
)

"application ready"

(require '[clojure.core.async :refer [>! >!! <! <!! go] :as a])

(def c (a/chan (a/sliding-buffer 1)))
(a/close! c)
(defn f []
  (future
    (go
      (println "f: got" (<! c)))))

(defn b [v]
  (future
    (go
      (>! c v)
      (println "b: sent" v))))

(f)
(b :foozaa)<commit_msg>cleanup<commit_after>(ns sormilla.main
  (:require [sormilla.system :refer [task] :as system]
            [sormilla.leap :as leap]
            [sormilla.drone :as drone]
            [sormilla.drone-comm :as comm]
            [sormilla.video :as video]
            [sormilla.swing :as swing]
            [sormilla.gui :as gui]))

(defn -main [& args]
  (println "starting...")
  (task 60 drone/upstream)
  (task 100 drone/telemetry)
  (task 50 leap/leap)
  (video/init-video-streaming!)
  (swing/make-frame gui/render :top true)
  (println "running. press any key to exit...")
  (.read (System/in))
  (println "closing...")
  (system/shutdown!)
  (System/exit 0))

(comment
  (task 60 drone/upstream)
  (task 100 drone/telemetry)
  (task 50 leap/leap)
  (swing/make-frame #'gui/render :safe true :top true)
  (video/init-video-streaming!)

  (system/shutdown!)
  (reset! system/status {:run true})

  (comm/send-commands! [comm/leds-active])
  (comm/send-commands! [comm/video-to-usb-off])
)

"application ready"
{'fraction_non_alphanumeric': 0.17238384715588362, 'fraction_numerical': 0.013460703430308293, 'mean_word_length': 2.8082644628099174, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '197964', 'n_tokens_mistral': 921, 'n_tokens_neox': 865, 'n_words': 208}