<commit_before>(ns {{name}}.dev
  (:require [ring.server.standalone :refer [serve]]
            [glimpse.views :as glimpse]
            [{{name}}.routes :refer [{{name}}-routes]]
            [{{name}}.web :refer [application]]))

(defonce server (atom nil))

(defn start-server
  ([] (start-server true))
  ([open-browser?]
   (if-not (nil? @server)
     (println (str "Could not start server; already started.  "
                   "Maybe you want to (restart-server)?"))
     (reset! server (serve application {:join? false
                                        :open-browser? open-browser?
                                        :auto-refresh? true})))
   nil))

(defn stop-server []
  (let [svr @server]
    (when-not (nil? svr)
      (.stop svr)
      (reset! server nil)))
  nil)

(defn restart-server []
  (when-not (nil? @server)
    (stop-server))
  (require '{{name}}.dev :reload-all)
  (start-server))

(defn -main [& [mode]]
  (when-not (nil? mode)
    (glimpse/set-mode! (keyword mode)))
  (start-server))
<commit_msg>don't launch browser on server restart<commit_after>(ns {{name}}.dev
  (:require [ring.server.standalone :refer [serve]]
            [glimpse.views :as glimpse]
            [{{name}}.routes :refer [{{name}}-routes]]
            [{{name}}.web :refer [application]]))

(defonce server (atom nil))

(defn start-server
  ([] (start-server true))
  ([open-browser?]
   (if-not (nil? @server)
     (println (str "Could not start server; already started.  "
                   "Maybe you want to (restart-server)?"))
     (reset! server (serve application {:join? false
                                        :open-browser? open-browser?
                                        :auto-refresh? true})))
   nil))

(defn stop-server []
  (let [svr @server]
    (when-not (nil? svr)
      (.stop svr)
      (reset! server nil)))
  nil)

(defn restart-server []
  (when-not (nil? @server)
    (stop-server))
  (require '{{name}}.dev :reload-all)
  (start-server false))

(defn -main [& [mode]]
  (when-not (nil? mode)
    (glimpse/set-mode! (keyword mode)))
  (start-server))

{'fraction_non_alphanumeric': 0.1729394949976179, 'fraction_numerical': 0.0, 'mean_word_length': 2.235747303543914, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5889941', 'n_tokens_mistral': 685, 'n_tokens_neox': 679, 'n_words': 176}