<commit_before>(ns lesezeichen.db
  (:require [datomic.api :as d]
            [clojure.java.io :as io]
            [clj-time.core :as t]
            [aprint.core :refer [aprint]]
            [lesezeichen.io :refer [transact-all]]))


(def db-uri-base "datomic:mem://")


(defn- scratch-conn
  "Create a connection to an anonymous, in-memory database."
  []
  (let [uri (str "datomic:mem://" (d/squuid))]
    (d/delete-database uri)
    (d/create-database uri)
    (d/connect uri)))


(defn db-conn []
  (let [uri (str db-uri-base "/lesezeichen")]<commit_msg>migrate to datomic dev<commit_after>(ns lesezeichen.db
  (:require [datomic.api :as d]
            [clojure.java.io :as io]
            [clj-time.core :as t]
            [aprint.core :refer [aprint]]
            [lesezeichen.io :refer [transact-all]]))


(def db-uri-base "datomic:dev://0.0.0.0:4334")

(defn- scratch-conn
  "Create a connection to an anonymous, in-memory database."
  []
  (let [uri (str "datomic:mem://" (d/squuid))]
    (d/delete-database uri)
    (d/create-database uri)
    (d/connect uri)))


(defn db-conn []
  (let [uri (str db-uri-base "/lesezeichen")]
{'fraction_non_alphanumeric': 0.1742957746478873, 'fraction_numerical': 0.007042253521126761, 'mean_word_length': 2.598101265822785, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '1849676', 'n_tokens_mistral': 439, 'n_tokens_neox': 438, 'n_words': 100}