I hereby claim:
- I am slipset on github.
- I am slipset (https://keybase.io/slipset) on keybase.
- I have a public key whose fingerprint is EBFB 04B0 F2F4 C211 7168 5EDE 90A9 5705 B80F C796
To claim this, I am signing this object:
{:paths ["resources" "src"] | |
:deps {org.clojure/clojure {:mvn/version "RELEASE"} | |
org.clojure/test.check {:mvn/version "RELEASE"}} | |
:aliases | |
{:test {:extra-paths ["test"] | |
:extra-deps {org.clojure/test.check {:mvn/version "RELEASE"}}} | |
:runner | |
{:extra-deps {com.cognitect/test-runner | |
{:git/url "https://github.com/cognitect-labs/test-runner" | |
:sha "76568540e7f40268ad2b646110f237a60295fa3c"}} |
(def checkpoints (atom (list (now)))) | |
(defn duration [checkpoints] | |
(/ (double (- (first checkpoints) (second checkpoints))) | |
1000000.0)) | |
(defn new-checkpoint! [checkpoint checkpoints] | |
(conj checkpoints checkpoint)) | |
(swap! checkpoints (partial new-checkpoint! (now))) |
;; import Data.Monoid ((<>)) | |
;; prompt :: String -> IO (IO ()) | |
;; prompt attribute = do | |
;; putStrLn ("What is your " ++ attribute ++ "?") | |
;; x <- getLine | |
;; return (putStrLn ("Your " ++ attribute ++ " is: " ++ x)) | |
;; runWizard :: IO (IO a) -> IO a | |
;; runWizard request = do |
(ns foo.core | |
(:require [clojure.java.io :as io]) | |
(:import [java.net URL] | |
[java.io FileInputStream] | |
(javax.xml.bind DatatypeConverter))) | |
(defn- open-input-stream [^URL url] | |
(if-let [user-info (.getUserInfo url)] | |
(let [uc (.openConnection url) |
(json-gen/add-encoder org.joda.time.DateTime | |
(fn [c jsonGenerator] | |
(.writeString jsonGenerator (str c)))) | |
(defn str->date-time [_ value] | |
(try | |
(DateTime. value) | |
(catch Exception e | |
::spec/invalid))) |
(ns csv-parser.core | |
(:require [clojure.string :as str] | |
[clojure.data.csv :as csv] | |
[cheshire.core :as json])) | |
(->> "./foo.csv" | |
slurp | |
csv/read-csv | |
rest | |
(map #(zipmap [:id :first-name :given-name :yob] %)) |
#!/usr/bin/env planck | |
(ns colorblock.core | |
(:require [planck.core :refer [*command-line-args* slurp]] | |
[planck.shell :refer [sh]] | |
[clojure.string :as s])) | |
(def usage-str "USAGE:\ncolorblock example.clj SomeTagName\ncolorblock example.clj SomeTagName [OUTPUT FORMAT]\n") | |
(def pygmentize-opts "style=friendly,fontface=Inconsolata,fontsize=62") |
I hereby claim:
To claim this, I am signing this object:
(ns conways.core | |
(:gen-class)) | |
(def board [5 5]) | |
(def coords (for [x (range (first board)) y (range (second board))] [y x])) | |
(def neighbour-coords [[-1 -1] [0 -1] [1 -1] | |
[-1 0] [1 0] | |
[-1 1] [0 1] [1 1]]) |
(ns zip-fail.core | |
(:require | |
[clojure.xml :as c-xml] | |
[clojure.data.xml :refer [parse parse-str]] | |
[clojure.zip :refer [xml-zip]] | |
[clojure.data.zip.xml | |
:refer [xml-> xml1-> attr text= attr= text]])) | |
(def xml "<foo id = \"qix\">bar</foo>") |