<commit_before>(ns naughtmq.core
  (:require [taoensso.timbre :as log]
            [clojure.java.io :as io]))

(defn os-specific-path
  "Finds the OS specific path for the given library name."
  [s]
  (let [os-arch (. (System/getProperty "os.arch") toLowerCase)
        os-name (. (System/getProperty "os.name") toLowerCase)]
    (cond (and (.startsWith os-name "win") (= "x86" os-arch))
          (str "win-x86/" s ".dll")

          (and (.startsWith os-name "max")) ; assume all macs are 64bits
          (str "macosx/" s ".dylib")

          (and (.startsWith os-name "linux") (= "i386" os-arch))
          (str "linux-x86/" s ".so")

          (and (.startsWith os-name "linux") (= "amd64" os-arch))
          (str "linux-x86_64/" s ".so")

          :else (throw (UnsupportedOperationException.
                         (str "Unsupported platform: " os-name ", " os-arch
                              " for library " s))))))

(defn copy-stream
  "Copies in to out."
  [^java.io.InputStream in ^java.io.OutputStream out]
  (with-local-vars [buf (byte-array (* 16 1024))]
    (loop []
      (let [cnt (.read in buf)]
        (when (>= cnt -1)
          (.write out buf 0 cnt)
          (recur))))))<commit_msg>Correct typo<commit_after>(ns naughtmq.core
  (:require [taoensso.timbre :as log]
            [clojure.java.io :as io]))

(defn os-specific-path
  "Finds the OS specific path for the given library name."
  [s]
  (let [os-arch (. (System/getProperty "os.arch") toLowerCase)
        os-name (. (System/getProperty "os.name") toLowerCase)]
    (cond (and (.startsWith os-name "win") (= "x86" os-arch))
          (str "win-x86/" s ".dll")

          (and (.startsWith os-name "mac")) ; assume all macs are 64bits
          (str "macosx/" s ".dylib")

          (and (.startsWith os-name "linux") (= "i386" os-arch))
          (str "linux-x86/" s ".so")

          (and (.startsWith os-name "linux") (= "amd64" os-arch))
          (str "linux-x86_64/" s ".so")

          :else (throw (UnsupportedOperationException.
                         (str "Unsupported platform: " os-name ", " os-arch
                              " for library " s))))))

(defn copy-stream
  "Copies in to out."
  [^java.io.InputStream in ^java.io.OutputStream out]
  (with-local-vars [buf (byte-array (* 16 1024))]
    (loop []
      (let [cnt (.read in buf)]
        (when (>= cnt -1)
          (.write out buf 0 cnt)
          (recur))))))
{'fraction_non_alphanumeric': 0.16975690152451586, 'fraction_numerical': 0.020601565718994644, 'mean_word_length': 2.0426065162907268, 'pattern_counts': {'":': 0, '<': 3, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1319365', 'n_tokens_mistral': 868, 'n_tokens_neox': 816, 'n_words': 232}