<commit_before>(ns ^{:doc "Verbose Logic"
      :author "<NAME>"}
  ancient-clj.verbose
  (:require [colorize.core :as colorize :only [yellow green red]]))

;; ## Colorize

(def ^:dynamic *colors* true)

(defmacro ^:private conditional-colors
  [& ids]
  `(do
     ~@(for [id ids]
         `(defn ~(symbol (name id))
            [& msg#]
            (let [msg# (apply str msg#)]
              (if *colors*
                (~id msg#)
                msg#))))))

(conditional-colors colorize/yellow colorize/green colorize/red)

;; ## Verbose

(def ^:dynamic *verbose* nil)

(def ^:dynamic *println* 
  (fn [& msg]
    (binding [*out* *err*]
      (apply println msg))))

(defn verbose
  "Write Log Message."
  [& msg]
  (when *verbose*
    (apply *println* "(verbose)" (apply str msg))))

;; ## String Creation

(defn version-string
  [version]
  (str "\"" (first version) "\""))

(defn artifact-string
  [group-id artifact-id version]
  (let  [f  (if  (= group-id artifact-id)
              artifact-id
              (str group-id "/" artifact-id))]<commit_msg>Adjusted verbose to allow for a custom print condition.<commit_after>(ns ^{:doc "Verbose Logic"
      :author "<NAME>"}
  ancient-clj.verbose
  (:require [colorize.core :as colorize :only [yellow green red]]))

;; ## Colorize

(def ^:dynamic *colors* true)

(defmacro ^:private conditional-colors
  [& ids]
  `(do
     ~@(for [id ids]
         `(defn ~(symbol (name id))
            [& msg#]
            (let [msg# (apply str msg#)]
              (if *colors*
                (~id msg#)
                msg#))))))

(conditional-colors colorize/yellow colorize/green colorize/red)

;; ## Verbose

(def ^:dynamic *verbose* nil)

(def ^:dynamic *println* 
  (fn [& msg]
    (when *verbose*
      (binding [*out* *err*]
        (apply println msg)))))

(defn verbose
  "Write Log Message."
  [& msg]
  (apply *println* "(verbose)" (apply str msg)))

;; ## String Creation

(defn version-string
  [version]
  (str "\"" (first version) "\""))

(defn artifact-string
  [group-id artifact-id version]
  (let  [f  (if  (= group-id artifact-id)
              artifact-id
              (str group-id "/" artifact-id))]
{'fraction_non_alphanumeric': 0.1738929889298893, 'fraction_numerical': 0.0, 'mean_word_length': 2.487138263665595, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1179189', 'n_tokens_mistral': 777, 'n_tokens_neox': 741, 'n_words': 205}