This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(->> summary | |
(.getKey) | |
(.getObject s3 bucket) | |
(.getObjectContent))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(.withCredentials cred-wrapper) | |
(.build)))) | |
(defn ctx->client ^AmazonS3 [ctx] | |
(let [{:keys [aws]} | |
ctx | |
{:keys [aws-access-key-id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn parse-reader [^Reader reader] | |
(-> reader | |
(BufferedReader. 0xFFFF) | |
(.lines) | |
(.skip 1) | |
(.map (reify Function | |
(apply [_ line] | |
(-> line | |
(data.csv/read-csv) | |
(ffirst) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BOOLEAN (java.lang.Boolean) | |
INT2 (java.lang.Short) | |
INT4 (java.lang.Integer) | |
INT8 (java.lang.Long) | |
FLOAT4 (java.lang.Float) | |
FLOAT8 (java.lang.Double) | |
CHAR (java.lang.String) | |
VARCHAR (java.lang.String) | |
TEXT (java.lang.String) | |
ENUM (java.lang.String) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns pg.client-test | |
(:import | |
com.github.igrishaev.Connection) | |
(:import | |
java.io.ByteArrayInputStream | |
java.io.ByteArrayOutputStream | |
java.time.Instant | |
java.time.LocalDate | |
java.time.LocalDateTime | |
java.time.LocalTime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.igrishaev; | |
import clojure.lang.PersistentVector; | |
import clojure.lang.PersistentVector$TransientVector; | |
public class VectorReducer implements IReducer<PersistentVector$TransientVector, PersistentVector> { | |
PersistentVector$TransientVector initiate() { | |
return PersistentVector.EMPTY().asTransient(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Circle = { | |
PI: 3.1415, | |
init: | |
function (x) { | |
var obj = Object.create(Circle); | |
obj.x = x; | |
return obj; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(as-manager ... | |
) | |
(with-context [foo1 {} | |
bar2 {}] | |
) | |
(do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(letfn [(->iter [coll] | |
(clojure.lang.RT/iter coll)) | |
(has-next? [iter] | |
(.hasNext ^java.util.Iterator iter)) | |
(next! [iter] | |
(.next ^java.util.Iterator iter))] | |
(defn map! | |
([f coll] | |
(mapv f coll)) | |
([f coll & colls] |