<commit_before>(ns notehub.storage
  (:use [notehub.settings]
        [clojure.string :only (blank? replace) :rename {replace sreplace}])
  (:require [taoensso.carmine :as car :refer (wcar)]))

(def conn {:pool {} :spec {:uri (get-setting :db-url)}})

(let [md5Instance (java.security.MessageDigest/getInstance "MD5")]
  (defn sign
    "Returns the MD5 hash for the concatenation of all passed parameters"
    [& args]
    (let [input (sreplace (apply str args) #"\r*" "")]
      (do (.reset md5Instance)
          (.update md5Instance (.getBytes input))
          (apply str<commit_msg>minor regexp improvement<commit_after>(ns notehub.storage
  (:use [notehub.settings]
        [clojure.string :only (blank? replace) :rename {replace sreplace}])
  (:require [taoensso.carmine :as car :refer (wcar)]))

(def conn {:pool {} :spec {:uri (get-setting :db-url)}})

(let [md5Instance (java.security.MessageDigest/getInstance "MD5")]
  (defn sign
    "Returns the MD5 hash for the concatenation of all passed parameters"
    [& args]
    (let [input (sreplace (apply str args) #"\r+" "")]
      (do (.reset md5Instance)
          (.update md5Instance (.getBytes input))
          (apply str
{'fraction_non_alphanumeric': 0.150210970464135, 'fraction_numerical': 0.008438818565400843, 'mean_word_length': 3.614785992217899, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4003335', 'n_tokens_mistral': 399, 'n_tokens_neox': 385, 'n_words': 117}