<commit_before>(ns user
  "nRepl development setup alá http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded"
  (:require [clojure.java.io :as io]
            [clojure.string :as str]
            [clojure.pprint :refer (pprint)]
            [clojure.repl :refer :all]
            [clojure.test :as test]
            [clojure.tools.namespace.repl :refer (refresh refresh-all set-refresh-dirs)]
            [ring.middleware.stacktrace :as stacktrace]
            [foosball.system :as system]
            [foosball.models.db :as db]
            [foosball.models.domains.openids :as openid]
            [dev-cljs-repl :as cljs-repl]
            [dev-data :as d]
            [taoensso.timbre :as timbre]
            [taoensso.timbre.appenders (socket :as socket-appender)]
            [com.stuartsierra.component :as component]))

(def system nil)

(defn init
  "Constructs the current development system."
  []
  (alter-var-root #'system (constantly (system/system system/dev-system-components
                                        :handler-wrapper stacktrace/wrap-stacktrace
                                        :cljs-optimized? false
                                        :cljs-repl-script-fn cljs-repl/script-tag-fn))))

(defn socket-logger []
  (timbre/set-config! [:appenders :socket] socket-appender/socket-appender)
  (timbre/set-config! [:shared-appender-config :socket]
                      {:listen-addr :all :port 9000}))

(defn start
  "Starts the current development system."
  []
  (socket-logger)
  (alter-var-root #'system component/start))

(defn stop
  "Shuts down and destroys the current development system."
  []
  (alter-var-root #'system
                  (fn [s] (when s (component/stop s))))
  :ok)

(defn go
  "Initializes the current development system and starts it running."
  []
  (init)
  (start)
  :ok)

(defn reset []
  (stop)
  (set-refresh-dirs "src/" "dev/")
  (refresh :after 'user/go))

(defn delete-database-and-stop! []
  (db/delete! (:db system))
  (stop)
  :ok)

(defn conn []
  (get-in system [:db :connection]))

(defn db []
  (datomic.api/db (conn)))
<commit_msg>change dev repl-port to 12345<commit_after>(ns user
  "nRepl development setup alá http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded"
  (:require [clojure.java.io :as io]
            [clojure.string :as str]
            [clojure.pprint :refer (pprint)]
            [clojure.repl :refer :all]
            [clojure.test :as test]
            [clojure.tools.namespace.repl :refer (refresh refresh-all set-refresh-dirs)]
            [ring.middleware.stacktrace :as stacktrace]
            [foosball.system :as system]
            [foosball.models.db :as db]
            [foosball.models.domains.openids :as openid]
            [dev-cljs-repl :as cljs-repl]
            [dev-data :as d]
            [taoensso.timbre :as timbre]
            [taoensso.timbre.appenders (socket :as socket-appender)]
            [com.stuartsierra.component :as component]))

(def system nil)

(defn init
  "Constructs the current development system."
  []
  (alter-var-root #'system (constantly (system/system system/dev-system-components
                                        :handler-wrapper stacktrace/wrap-stacktrace
                                        :cljs-optimized? false
                                        :repl-port 12345
                                        :cljs-repl-script-fn cljs-repl/script-tag-fn))))

(defn socket-logger []
  (timbre/set-config! [:appenders :socket] socket-appender/socket-appender)
  (timbre/set-config! [:shared-appender-config :socket]
                      {:listen-addr :all :port 9000}))

(defn start
  "Starts the current development system."
  []
  (socket-logger)
  (alter-var-root #'system component/start))

(defn stop
  "Shuts down and destroys the current development system."
  []
  (alter-var-root #'system
                  (fn [s] (when s (component/stop s))))
  :ok)

(defn go
  "Initializes the current development system and starts it running."
  []
  (init)
  (start)
  :ok)

(defn reset []
  (stop)
  (set-refresh-dirs "src/" "dev/")
  (refresh :after 'user/go))

(defn delete-database-and-stop! []
  (db/delete! (:db system))
  (stop)
  :ok)

(defn conn []
  (get-in system [:db :connection]))

(defn db []
  (datomic.api/db (conn)))

{'fraction_non_alphanumeric': 0.13341040462427745, 'fraction_numerical': 0.007861271676300578, 'mean_word_length': 2.1879145173176124, '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': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3160869', 'n_tokens_mistral': 1446, 'n_tokens_neox': 1413, 'n_words': 326}