This file contains hidden or 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
;;added libpython-clj.python.logging require to libpython-clj.jna.base | |
(defmacro def-pylib-fn | |
[fn-name docstring rettype & argpairs] | |
`(defn ~fn-name | |
~docstring | |
~(mapv first argpairs) | |
(log-info (str [:skipping-GIL-check! | |
{:name ~fn-name | |
:thread (current-thread-id) | |
:gil-thread (.get ^AtomicLong gil-thread-id)}])) |
This file contains hidden or 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 cljgol.core | |
(:use [seesaw core color graphics])) | |
(set! *unchecked-math* true) | |
(set! *warn-on-reflection* true) | |
(def wCells 100) | |
(def hCells 100) | |
(def cellSize 5) | |
(def cellColor (color 0 255 0)) |
This file contains hidden or 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
(["opencv-4.0.1-1.4.4-windows-x86_64.jar" 22.809813] | |
["opencv-4.0.1-1.4.4-macosx-x86_64.jar" 20.628443] | |
["opencv-4.0.1-1.4.4-linux-x86_64.jar" 19.319284] | |
["ffmpeg-4.1-1.4.4-windows-x86_64.jar" 18.106366] | |
["ffmpeg-4.1-1.4.4-linux-x86_64.jar" 15.769268] | |
["ffmpeg-4.1-1.4.4-macosx-x86_64.jar" 15.304522] | |
["google-closure-library-0.0-20170809-b9c14c6b.jar" 6.151731] | |
["javafx-graphics-13-win.jar" 5.981489] | |
["clojurescript-1.10.339.jar" 4.548788] | |
["closure-compiler-unshaded-v20180610.jar" 4.519195] |
This file contains hidden or 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 csv->columns | |
[input & {:keys [header-row? parser-fn | |
parser-scan-len] | |
:or {header-row? true | |
parser-scan-len 100}}] | |
(let [uncache! (fn [atm] | |
(let [res @atm | |
_ (reset! atm nil)] | |
res)) | |
rows (raw-row-iterable input) |
This file contains hidden or 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
;;exctracted from original function, refined to | |
;;work with iterables via eduction. | |
(defn derive-parsers | |
[headers parser-fn parser-scan-len data] | |
(let [n-cols (count headers)] | |
(if-not parser-fn | |
;;a bunch of default parsers | |
(repeatedly n-cols default-column-parser) | |
;;only sample what we need, don't retain any seq head. | |
(->> data |
This file contains hidden or 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 tools.analyzer.r | |
(:require [clojure.tools.analyzer.passes | |
[emit-form :as default] | |
[uniquify :refer [uniquify-locals]]] | |
[clojure.tools.analyzer.jvm :as ana.jvm])) | |
;;copied directly.... | |
(defmulti -emit-form (fn [{:keys [op]} _] op)) | |
(defn -emit-form* |
This file contains hidden or 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
{:aliases {:repl {:extra-deps {com.bhauman/rebel-readline {:mvn/version "RELEASE"} | |
io.aviso/pretty {:mvn/version "RELEASE"} | |
mvxcvi/puget {:mvn/version "RELEASE"} | |
org.clojure/clojure {:mvn/version "RELEASE"} | |
com.gfredericks/user.clj {:mvn/version "RELEASE"} | |
clj-commons/pomegranate {:mvn/version "RELEASE"}} | |
:main-opts ["-m" "rebel-readline.main"]} | |
:fancy {:extra-deps {org.clojure/core.async {:mvn/version "RELEASE"} | |
org.clojure/core.logic {:mvn/version "RELEASE"} | |
org.clojure/test.check {:mvn/version "RELEASE"} |
This file contains hidden or 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 dagdemo | |
(:require [spork.cljgraph.core :as g] | |
[clojure.core.async :as async])) | |
;; A E | |
;; / \ | | |
;; B C <- F | |
;; \ / | | |
;; D G |
This file contains hidden or 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 lanternademo.core | |
(:require [lanterna.screen :as screen])) | |
;;provides a way to track resources and kill rendering from the outside. we | |
;;could also use an atom and synchronize on it from the rendering loop. I like | |
;;using future here though, since it keeps our REPL thread free. | |
(def renderer (atom nil)) | |
(defn kill-rendering! [] | |
(when @renderer | |
(future-cancel @renderer))) |
This file contains hidden or 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
;; Copyright (c) Jonas Enlund. All rights reserved. The use and | |
;; distribution terms for this software are covered by the Eclipse | |
;; Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) | |
;; which can be found in the file epl-v10.html at the root of this | |
;; distribution. By using this software in any fashion, you are | |
;; agreeing to be bound by the terms of this license. You must not | |
;; remove this notice, or any other, from this software. | |
;;string pool modification fork by joinr | |
(ns clojure.data.csv.pool |