<commit_before>(ns bitfondue.models.chunks
  (:require (bitfondue [config :as config]
                       [database :as database])))

(defn insert-chunk!
  "Insert a chunk into the database"
  [chunk]
  (database/insert-chunk<! config/database
                           (:title chunk)
                           (:url chunk)
                           (:description_full chunk)))

(defn get-chunks
  "Retrieve chunks"
  []
  (database/get-chunks config/database))<commit_msg>add the uid column to the insert-chunk! function<commit_after>(ns bitfondue.models.chunks
  (:require (bitfondue [config :as config]
                       [database :as database])))

(defn insert-chunk!
  "Insert a chunk into the database"
  [chunk]
  (database/insert-chunk<! config/database
                           (:title chunk)
                           (:url chunk)
                           (:description_full chunk)
                           (:uid chunk)))

(defn get-chunks
  "Retrieve chunks"
  []
  (database/get-chunks config/database))
{'fraction_non_alphanumeric': 0.10939012584704744, 'fraction_numerical': 0.0, 'mean_word_length': 1.8406593406593406, 'pattern_counts': {'":': 0, '<': 5, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '645189', 'n_tokens_mistral': 297, 'n_tokens_neox': 283, 'n_words': 74}