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
;; This was generated with chat.deepseeker.com in order to solve the problem that I'm reading excel tables | |
;; in clojure with duckdb jdbc driver and it does not have a way to enumerate excel worksheets | |
;; Plus side of this code is no dependencies | |
(ns util.enum-worksheet | |
(:import | |
(java.util Enumeration) | |
(java.util.zip ZipFile ZipEntry) | |
(java.io InputStream) | |
(javax.xml.parsers DocumentBuilderFactory DocumentBuilder) | |
(org.w3c.dom Document NodeList Node NamedNodeMap))) |
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
#!/usr/bin/env bb | |
; migrate command, invoker of org.apache.ibatis.migration.Migrator | |
; Downloads maven artifact | |
; it adds --path=migrations if not specified as command-line-args | |
; this script is meant to be on root of the project, and when executed | |
; like ./migrate.clj it applies the migrations on the migrations subdirectory | |
; to initialize migrations path use: | |
; ./migrate.clj init | |
; | |
; After initializing the migrations subdirectory configure the credentials |
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
(let [kinds #{:map :tuple :vector} | |
fn-kind {string? :string | |
int? :int | |
boolean? :boolean | |
double? :double} | |
type-kind {(type "") :string} | |
simplest-form (fn [form] | |
(cond | |
(keyword? form) | |
form |
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
{:paths ["cloj/src"] | |
:deps | |
{ | |
superstring/superstring {:mvn/version "3.2.0"} | |
techascent/tech.ml.dataset {:mvn/version "7.020"} | |
;; java dependencies | |
com.github.albfernandez/javadbf {:mvn/version "1.13.1"} ;; https://github.com/albfernandez/javadbf | |
org.apache.parquet/parquet-hadoop {:mvn/version "1.12.0" | |
:exclusions [org.slf4j/slf4j-log4j12]} | |
org.apache.hadoop/hadoop-common {:mvn/version "3.3.0" |
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 helix-ui.registry.default.example.progress-demo | |
(:require ["react" :as React] | |
[helix-ui.registry.default.ui.progress :refer [Progress]] | |
[helix.core :refer [$]] | |
[portfolio.react-18 :as portfolio :refer-macros [defscene]])) | |
(defscene ProgressDemo | |
:id | |
:helix-ui.portfolio.default.progress/demo | |
[] | |
(let [[progress setProgress] (.useState React 13)] |
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
;; This code was adapted from com.teknql/shadow-cljs-tailwind-jit | |
(ns helix-ui.tailwind | |
(:require | |
[clojure.string] | |
[babashka.process :as proc] | |
[clojure.pprint :refer [pprint]] | |
[clojure.spec.alpha :as s] | |
) | |
(:import [java.nio.file Files] | |
[java.nio.file.attribute FileAttribute])) |
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 hooks-test | |
(:require | |
["react" :as React] | |
[portfolio.react-18 :as portfolio :refer-macros [defscene]] | |
)) | |
(defn ComponentExample | |
[props] | |
(let [^js [date _set-date] (React/useState (js/Date.))] | |
(React/createElement "div" nil (str date)))) |
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
{:type "File", | |
:errors [], | |
:program | |
{:type "Program", | |
:sourceType "module", | |
:interpreter nil, | |
:body | |
[{:type "ExportDefaultDeclaration", | |
:exportKind "value", | |
:declaration |
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 js-cljs.astutils-test | |
(:require | |
["./../../src/js_cljs/astutils" :refer [tagFunctionNodesAsReactComponent]] | |
["@babel/traverse$default" :as traverse] | |
[clojure.test :refer [deftest is testing]] | |
[js-cljs.core :refer [babel-parse]] | |
[applied-science.js-interop :as j] | |
)) | |
(deftest react-function-tagging |
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
#!/usr/bin/env bb | |
; migrate command, invoker of org.apache.ibatis.migration.Migrator | |
; Downloads maven artifact | |
; it adds --path=migrations if not specified as command-line-args | |
; this script is meant to be on root of the project, and when executed | |
; like ./migrate.clj it applies the migrations on the migrations subdirectory | |
; to initialize migrations path use: | |
; ./migrate.clj init | |
; | |
; After initializing the migrations subdirectory configure the credentials |
NewerOlder