Skip to content

Instantly share code, notes, and snippets.

@igrishaev
Created December 18, 2023 10:10
Show Gist options
  • Save igrishaev/76777352ee09f15ea9bd8b87cdf2e344 to your computer and use it in GitHub Desktop.
Save igrishaev/76777352ee09f15ea9bd8b87cdf2e344 to your computer and use it in GitHub Desktop.
(ns glms.report.indexes
(:import
java.io.Reader
java.io.File
java.io.FileWriter
java.io.BufferedReader)
(:require
[aws.athena :as ath]
[glms.index :as idx]
[clojure.data.csv :as data.csv]
[lambda.util :as util]
[model.limitation :as mmt]))
(defn parse-reader [^Reader reader]
(with-open [in reader
out (-> (File/createTempFile "out_" ".csv")
(FileWriter.))]
(.transferTo in out))
#_
(let [output-stream
(-> (File/createTempFile "out_" ".csv")
(FileWriter.))
lines
(-> reader
(BufferedReader. 0xFFFF)
(line-seq)
(rest))]
(pmap (fn [line]
(-> line
(data.csv/read-csv)
(ffirst)
(util/to-edn)))
lines)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment