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
{ | |
"sort" : [ | |
{"processing_end_time" : {"order" :"asc"}} | |
], | |
"query": { | |
"bool" : { | |
"must" :{ | |
"range":{ | |
"processing_end_time": { |
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
{ | |
"sort" : [ | |
{"processing_end_time" : {"order" :"asc"}} | |
], | |
"query": { | |
"bool" : { | |
"must" :{ | |
"range":{ | |
"ingestion_time": { | |
"gte": "now-1d/d" |
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
<script> | |
var uyeler = [{ | |
ad: "baris", | |
soyad: "acar", | |
g: "e" | |
}, { | |
ad: "esen", | |
soyad: "acar", | |
g: "k" | |
}, { |
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
;;Renames file by adding file numbers incrementally | |
;;To run, execute repl output in shell | |
(ns dba.core.utils | |
(:require [clojure.java.io :as io] | |
[clojure.string :as stri])) | |
(defn- pad-left [s p length] | |
(stri/replace (format | |
(str "%" length "s" ) |
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 CAPITALIZE [x] | |
(let [parsed (clojure.string/split x #" ")] | |
(map | |
#(reduce str %) | |
(for [x parsed] (conj | |
(map #(clojure.string/lower-case %) (rest x)) | |
(clojure.string/upper-case (first x))))))) | |
;----------------------------------------------------------- | |
;VERY VERY slow compared to java's shuffle for collections | |
(defn SHUFFLE [coll] |
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 run-rule-one-argument | |
"Assumes rule is defined in string like "zero? b." | |
[rule-string & args] | |
(let [parsed (stri/split rule-string #" ") | |
rulefn (resolve (symbol (first parsed)))] | |
(apply rulefn args))) | |
(run-rule-one-argument "zero?" 7) |
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
;;; load this file from | |
;;; path_to_project.clh>emacs src\emlak\korma.clj | |
;;; This will enable the classpath libraries to be seen | |
;;; I have installed h2 from setup program, I guess this installs the test database | |
;;; Users table with columns "first" and "last" should be prepared beforehand | |
;;; for in memory database the subname should be mem:dbName | |
;;; got the original gist from someone else... | |
(ns deneme.core | |
(:use [korma.db]) |