В репозитории содержится программный код, ресурсные файлы, сопутствующая документация и другие файлы, необходимые для разработки/сборки/тестирования приложения.
Основные секции:
# | |
# generic .gitignore | |
# | |
## no hiddens in scm | |
.* | |
## editor backups | |
*~ | |
*.bak |
(def translit-table-ru-en | |
(apply array-map [\a "a" | |
\b "b" | |
\c "c" | |
\d "d" | |
\e "e" | |
\f "f" | |
\g "g" | |
\h "h" | |
\i "i" |
(defn grouped-dec [decimal-number] | |
;; NOTE: handle sign separately | |
(when decimal-number | |
(let [s (str decimal-number) | |
[deci fract] (str/split s #"\.") | |
grouped | |
(->> deci | |
(reverse) | |
(partition 3 3 nil) | |
(map #(apply str %)) |
(let [data {:a :b :c nil :d 1}] | |
(->> data | |
(remove (comp nil? second)) | |
(into {}))) | |
;; {:a :b, :d 1} |
-- postgresql 13 default | |
-- ubuntu, core i5, ssd | |
create table t1 (i bigint, c varchar(20), t text); | |
create table t2 (i bigint, c varchar(20), t text); | |
insert into t1 (i,c,t) | |
select random() * 1000000, '', '12345678912345678912345678900' | |
from generate_series(0,1000000); |
(ns bmk.core | |
(:import | |
[java.time ZonedDateTime] | |
[java.time.format DateTimeFormatter]) | |
(:require | |
[clojure.string :refer [split]] | |
[clojure.java.shell :refer [sh]])) | |
;= |
#!/usr/bin/env bb | |
(require 'babashka.classpath) | |
(babashka.classpath/add-classpath "./tools") | |
(ns bmk.main | |
(:require | |
[bmk.core :refer [print-lines cmd sh-c]])) | |
;= |
(ns build | |
(:import | |
[java.time LocalDateTime] | |
[java.time.format DateTimeFormatter]) | |
(:require | |
[clojure.tools.build.api :as b] | |
)) | |
(def APP_NAME (System/getenv "APP_NAME")) |
;; | |
;; mlib: run proccessing loop in separate thread | |
;; | |
(ns mlib.thread | |
(:require | |
[clojure.core.async :refer [thread <!!]])) | |
; | |
(defn- thread-loop [state' init step cleanup] |