Skip to content

Instantly share code, notes, and snippets.

Joel Holdbrooks noprompt

Block or report user

Report or block noprompt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
noprompt / deps.edn
Last active May 22, 2019
Implementing L-System examples from the "Algorithmic Beauty of Plants" with Meander
View deps.edn
{:paths ["src"]
:deps {org.clojure/clojure {:mvn/version "1.10.0"}
org.clojure/clojurescript {:mvn/version "1.10.439"}
org.clojure/test.check {:mvn/version "0.10.0-alpha3"} {:mvn/version "0.3.0"}
meander/delta {:mvn/version "0.0.85"}
quil/quil {:mvn/version "3.0.0"}}
:aliases {:test {:extra-paths ["test"]
:extra-deps {org.clojure/test.check {:mvn/version "0.10.0-alpha3"}
com.cognitect/test-runner {:git/url ""
View meander_delta_interpreter.clj
(:require [ :as r.match]
[ :as r.syntax]
[ :as r.util]))
(defn genmut
{:tag :mut
:symbol (gensym "*m__")})
View k-combinations.clj
(defn swap
"Swap the elements at positions `i` and `j` in `v`."
{:private true}
[v i j]
(-> v
(assoc i (nth v j))
(assoc j (nth v i))))
;; SEE:
(defn permutations
View aws-example.clj
(ns scratch
[ :as json]
[clojure.string :as string]
[meander.strategy.alpha :as r]
[meander.match.alpha :as r.match]))
(def service-2-json
(slurp "")))
noprompt / sql_auto_shout.el
Last active Feb 22, 2019
Automatically shout SQL keywords and builtins
View sql_auto_shout.el
(defun ~/end-of-previous-face-change (face-name)
(let ((continue t)
(answer nil))
(while continue
(let ((p (or (previous-single-property-change (point) 'face)
(if (= p 1)
(setq continue nil)
View derive_specs.clj
(require '[spec-provider.provider :as sp])
(defn derive-specs [var & args]
(let [ns-sym (ns-name (:ns (meta var)))
ns-name (name ns-sym)
derived-specs (atom [])
fn-var-info (into [] (keep (fn [[var-sym var]]
(let [x (deref var)]
(when (fn? x)
[var var-sym x]))))
View if_not.clj
(ns if-not.bench
(:require [criterium.core]))
(defmacro if-not*
([test then] `(if ~test nil ~then))
([test then else]
`(if ~test ~else ~then)))
(criterium.core/bench (if-not false 1 2))
;; Evaluation count : 5375474880 in 60 samples of 89591248 calls.
noprompt / example-out.txt
Created Mar 14, 2018
Write all public documentation for the ns named ns-sym to *out*.
View example-out.txt
Synchronous client library for interacting with Datomic.
This namespace is a wrapper for datomic.client.api.async.
Functions in this namespace that communicate with a separate
process take an arg-map with the following optional keys:
:timeout Timeout in msec.
View desktop_ocr.cljs
#! /usr/local/bin/lumo
(ns app.core
"This application watches the a directory <DIR> for screen shots
and applies an OCR to them (`tesseract`). The resulting text file is
saved to a directory called '<DIR>/OCR Screen Shots`.")
(def fs
(js/require "fs"))
noprompt / z.clj
Last active Oct 8, 2018
Z Algorithm
View z.clj
(ns z)
(defn longest-prefix-at
[s i]
(let [max-k (. s length)]
(or (last (for [j (range 1 max-k)
:let [k (+ i j)]
:when (<= k max-k)
:let [s1 (subs s 0 j)
s2 (subs s i k)]
You can’t perform that action at this time.