(ns new-website.server
  (:require [clojure.java.io :as io]
            [compojure.core :refer [ANY GET PUT POST DELETE defroutes]]
            [compojure.route :refer [resources]]
            [ring.middleware.defaults :refer [wrap-defaults site-defaults]]
            [ring.middleware.gzip :refer [wrap-gzip]]
            [ring.middleware.logger :refer [wrap-with-logger]]
            [environ.core :refer [env]]
            [ring.adapter.jetty :refer [run-jetty]])
  (:gen-class))

(defroutes routes
  (GET "/anti_forgery.js" [req]
    {:status 200
     :headers {"Content-Type" "application/javascript"}
     :body (str "var csrf = '" *anti-forgery-token* "';")})
  (GET "/" _
    {:status 200
     :headers {"Content-Type" "text/html; charset=utf-8"}
     :body (io/input-stream (io/resource "public/index.html"))})
  (resources "/"))

(def http-handler
  (-> routes
      (wrap-defaults site-defaults)
      wrap-with-logger
      wrap-gzip))

(defn -main [& [port]]
  (let [port (Integer. (or port (env :port) 10555))]
    (run-jetty http-handler {:port port :join? false})))

(ns new-website.server
  (:require [clojure.java.io :as io]
            [compojure.core :refer [ANY GET PUT POST DELETE defroutes routes]]
            [compojure.route :refer [resources]]
            [ring.middleware.defaults :refer [wrap-defaults site-defaults]]
            [ring.middleware.gzip :refer [wrap-gzip]]
            [ring.middleware.logger :refer [wrap-with-logger]]
            [ring.middleware.params :refer [wrap-params]]
            [ring.middleware.format :refer [wrap-restful-format]]
            [ring.middleware.anti-forgery :refer [*anti-forgery-token*]]
            [environ.core :refer [env]]
            [ring.adapter.jetty :refer [run-jetty]]
            [new-website.trello :refer [trello-routes]])
  (:gen-class))

(defroutes core-routes
  (GET "/anti_forgery.js" [req]
    {:status 200
     :headers {"Content-Type" "application/javascript"}
     :body (str "var csrf = '" *anti-forgery-token* "';")})
  (GET "/" _
    {:status 200
     :headers {"Content-Type" "text/html; charset=utf-8"}
     :body (io/input-stream (io/resource "public/index.html"))})
  (resources "/"))

(def http-handler
  (routes
    (-> core-routes
        (wrap-defaults site-defaults)
        wrap-with-logger
        wrap-gzip)
    (-> trello-routes
        (wrap-restful-format :formats [:json :transit-json :edn])
        wrap-with-logger)))

(defn -main [& [port]]
  (let [port (Integer. (or port (env :port) 10555))]
    (run-jetty http-handler {:port port :join? false})))

Add routes for Trello to available ones

Add routes for Trello to available ones


(ns leiningen.pallet-release.github
  "Github interaction"
  (:require
   [com.palletops.leinout.github :as github]
   [leiningen.core.eval :as eval]
   [tentacles.orgs :as orgs]))

(defn auth-builder
  "Ensure the build-automation team is authorised on the repository."
  [url token]
  (let [{:keys [login name] :as repo} (github/url->repo url token)]
    (if-let [builder-id (github/team-id "build-automation" login token)]
      (let [r (github/auth-team-id builder-id repo token)]
        (case  r
          :authorised (println "Authourised")
          :already-authorised (println "Already authorised")
          :authorisation-failed (println "Authorisation failed")))
      (println
       "No team found for" (str login "/build-automation.")
       "Either create the build-automation team, or authorise pbors."))))

(def push-repo-fmt
  "https://pbors:${GH_TOKEN}@github.com/%s/%s.git")

(defn repo-coordinates
  [origin]
  (let [{:keys [login name]} (github/url->repo origin)]
    (format push-repo-fmt login name)))

(ns leiningen.pallet-release.github
  "Github interaction"
  (:require
   [com.palletops.leinout.github :as github]
   [leiningen.core.eval :as eval]
   [tentacles.orgs :as orgs]))

(defn auth-builder
  "Ensure the build-automation team is authorised on the repository."
  [url token]
  (let [{:keys [login name] :as repo} (github/url->repo url)]
    (if-let [builder-id (github/team-id "build-automation" login token)]
      (let [r (github/auth-team-id builder-id repo token)]
        (case  r
          :authorised (println "Authourised")
          :already-authorised (println "Already authorised")
          :authorisation-failed (println "Authorisation failed")))
      (println
       "No team found for" (str login "/build-automation.")
       "Either create the build-automation team, or authorise pbors."))))

(def push-repo-fmt
  "https://pbors:${GH_TOKEN}@github.com/%s/%s.git")

(defn repo-coordinates
  [origin]
  (let [{:keys [login name]} (github/url->repo origin)]
    (format push-repo-fmt login name)))

Fix bug in init from leinout refactoring


(ns tryclojure.models.eval
  (:require [clojail.testers :refer [secure-tester-without-def]]
            [clojail.core :refer [sandbox]]
            [clojure.stacktrace :refer [root-cause]]
            [noir.session :as session])

  (:use [clojure.pprint])
  (:use [isla.parser])
  (:use [isla.interpreter])
  (:require [isla.utils :as utils])
  (:require [isla.library :as library])

  (:import java.io.StringWriter
	   java.util.concurrent.TimeoutException))

(declare run repl)

(def repl-context (ref (library/get-initial-context)))

(defn eval-string [isla-expr]
  ;; (throw (Exception. (str form)))
  (with-open [out (StringWriter.)]
    {:expr isla-expr
     :result [out (run isla-expr)]}))

(defn eval-request [expr]
  (try
    (eval-string expr)
    (catch TimeoutException _
      {:error true :message "Execution Timed Out!"})
    (catch Exception e
      {:error true :message (str (root-cause e))})))

(defn run [code]
  (println (first (:content (first (:content (isla.parser/parse code))))))
  (let [return
        (interpret (first (:content (first (:content (isla.parser/parse code)))))
                   (deref repl-context))]
    (println return)
    (dosync (ref-set repl-context (:ctx return)))
    (:ret return)))

(defn repl []
  (run (utils/take-input))
  (repl))

(ns tryclojure.models.eval
  (:require [clojail.testers :refer [secure-tester-without-def]]
            [clojail.core :refer [sandbox]]
            [clojure.stacktrace :refer [root-cause]]
            [noir.session :as session])

  (:use [clojure.pprint])
  (:use [isla.parser])
  (:use [isla.interpreter])
  (:require [isla.utils :as utils])
  (:require [isla.library :as library])

  (:import java.io.StringWriter
	   java.util.concurrent.TimeoutException))

(declare run repl)

(def repl-env (ref (library/get-initial-env)))

(defn eval-string [isla-expr]
  ;; (throw (Exception. (str form)))
  (with-open [out (StringWriter.)]
    {:expr isla-expr
     :result [out (run isla-expr)]}))

(defn eval-request [expr]
  (try
    (eval-string expr)
    (catch TimeoutException _
      {:error true :message "Execution Timed Out!"})
    (catch Exception e
      {:error true :message (str (root-cause e))})))

(defn run [code]
  (let [return
        (interpret (first (:content (first (:content (isla.parser/parse code)))))
                   (deref repl-env))]
    (println return)
    (dosync (ref-set repl-env return))
    (:ret return)))

(defn repl []
  (run (utils/take-input))
  (repl))

Update tryisla repl to use new env data structure.


(defproject doo "0.1.6-SNAPSHOT"
  :description "doo is a library to run clj.test on different js environments."
  :url "https://github.com/bensu/doo"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}

  :scm {:name "git"
        :url "https://github.com/bensu/doo"}

  :deploy-repositories [["clojars" {:creds :gpg}]]

  :test-paths ["test/clj"]

  :resource-paths ["resources"]

  :dependencies [[org.clojure/clojure "1.7.0"]
                 [org.clojure/clojurescript "0.0-3308" :scope "provided"]
                 [selmer "0.8.9"]
                 [karma-reporter "0.1.0"]]

  :profiles
  {:dev {:source-paths ["src/clj" "test/clj" "../example/src" "../example/test"]
         :dependencies [[org.clojure/core.async "0.1.346.0-17112a-alpha"]]}})

(defproject doo "0.1.6-SNAPSHOT"
  :description "doo is a library to run clj.test on different js environments."
  :url "https://github.com/bensu/doo"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}

  :scm {:name "git"
        :url "https://github.com/bensu/doo"}

  :deploy-repositories [["clojars" {:creds :gpg}]]

  :test-paths ["test/clj"]

  :resource-paths ["resources"]

  :dependencies [[org.clojure/clojure "1.7.0"]
                 [selmer "0.8.9"]
                 [karma-reporter "0.1.0"]]

  :profiles
  {:dev {:source-paths ["src/clj" "test/clj" "../example/src" "../example/test"]
         :dependencies [[org.clojure/core.async "0.1.346.0-17112a-alpha"]]}})

Remove cljs dependency from doo

Remove cljs dependency from doo


(ns luhn
  (:require [clojure.string :as string]))

(defn to-reversed-digits
  "returns a lazy sequence of least to most significant digits of n"
  [n]
  (->> [n 0]
       (iterate (fn [[i _]] [(quot i 10) (mod i 10)]))
       (take-while (complement #{[0 0]}))
       (map second)
       rest))

(defn checksum
  "returns the luhn checksum of n, assuming it has a check digit"
  [n]
  (-> (->> n
           to-reversed-digits
           (map * (cycle [1 2]))
           (map #(if (>= % 10) (- % 9) %))
           (apply +))
      (mod 10)))

(defn string->long
  "Strips any non-digit characters and converts the string into a Long"
  [n]
  (-> n (string/replace #"[^0-9]+" "") Long/parseLong))

(defn valid?
  "whether n has a valid luhn check-digit"
  [n]
  ; Numbers with non digit/whitespace or only 1 digit are invalid
  (if (or (re-find #"[^0-9\s]+" n) (>= 1 (count (string/trim n))))
    false
    (zero? (-> n string->long checksum))))

(defn add-check-digit
  "given a number, adds a luhn check digit at the end"
  [n]
  (let [n-shifted (* 10 n)
        check-digit (- 10 (checksum n-shifted))]
    (+ n-shifted check-digit)))

Remove unused function from luhn exercise


(ns clj-templates.handler
  (:require [compojure.core :refer [GET routes]]
            [compojure.route :refer [resources]]
            [ring.util.response :refer [resource-response]]
            [ring.logger.timbre :refer [wrap-with-logger]]
            [ring.middleware.defaults :refer [site-defaults wrap-defaults]]
            [ring.util.http-response :refer [content-type ok]]
            [integrant.core :as ig]))

(defn home-page []
  (content-type (resource-response "index.html" {:root "public"}) "text/html; charset=utf-8"))

;; TODO: Get from db
(defn templates [db]
  "Templates")

(defn app-routes [db]
  (routes
    (GET "/templates" [] (templates db))
    (GET "/" [] (home-page))
    (resources "/")))

(defmethod ig/init-key :handler/main [_ {:keys [db]}]
  (-> (app-routes db)
      (wrap-defaults site-defaults)
      wrap-with-logger))

(ns clj-templates.handler
  (:require [compojure.core :refer [GET routes]]
            [compojure.route :refer [resources]]
            [ring.util.response :refer [resource-response response]]
            [ring.logger.timbre :refer [wrap-with-logger]]
            [ring.middleware.defaults :refer [site-defaults wrap-defaults]]
            [ring.util.http-response :refer [content-type ok]]
            [clj-templates.db.db :as db]
            [integrant.core :as ig]
            [cognitect.transit :as transit])
  (:import (java.io ByteArrayOutputStream)))

(defn transit-json [v]
  (let [out (ByteArrayOutputStream. 4096)
        _ (-> out
              (transit/writer :json)
              (transit/write v))
        res (.toString out)]
    (.reset out)
    res))

(defn home-page []
  (-> (resource-response "index.html" {:root "public"})
      (content-type "text/html; charset=utf-8")))

(defn templates [db]
  (let [all-templates {:templates (db/all-templates db)}
        transit-templates (transit-json all-templates)]
    (-> (response transit-templates)
        (content-type "application/transit+json"))))

(defn app-routes [db]
  (routes
    (GET "/templates" [] (templates db))
    (GET "/" [] (home-page))
    (resources "/")))

(defmethod ig/init-key :handler/main [_ {:keys [db]}]
  (-> (app-routes db)
      (wrap-defaults site-defaults)
      wrap-with-logger))

Add endpoint that returns all templates as transit


{:user {
        :plugins [[cider/cider-nrepl "0.11.0-SNAPSHOT"]]
        :dependencies [[com.datomic/datomic-free "0.9.5350"]
                       [me.raynes/fs "1.4.6"]]
        }}

{:user {
        :plugins [[cider/cider-nrepl "0.11.0-SNAPSHOT"]
                  [jonase/eastwood "0.2.3"]
                  [lein-kibit "0.1.2"]
                  [lein-typed "0.3.5"]
                  ]
        :dependencies [[org.clojure/clojure "1.8.0"]
                       [com.datomic/datomic-free "0.9.5350"]
                       [me.raynes/fs "1.4.6"]
                       ;; Consider using typed? [org.clojure/core.typed "0.3.22"]
                       ]
        }}

Update lein profile to include flycheck-clojoure deps.


(ns comic-reader.scrape
  (:require [clojure.string :as s]
            [clojure.java.io :as io]
            [clj-http.client :as client]
            [tempfile.core :refer [tempfile with-tempfile]]
            [net.cgrand.enlive-html :as html])
  (:import java.net.URL))

(defn fetch-url [url]
  (with-tempfile [html-file (tempfile (:body (client/get url)))]
   (html/html-resource html-file)))

(defn extract-list [html selector normalize]
  (->> (html/select html selector)
       (map normalize)
       (filter identity)))

(defn fetch-list [{:keys [url selector normalize]}]
  (when (every? (complement nil?) [url selector normalize])
    (extract-list (fetch-url url) selector normalize)))

(defn enlive->hiccup [{:keys [tag attrs content]}]
  (if (nil? content)
    [tag attrs]
    [tag attrs content]))

(defn clean-image-tag [[tag attrs & content]]
  [tag (select-keys attrs [:alt :src])])

(defn extract-image-tag [html selector]
  (some-> html
          (html/select selector)
          seq
          first
          enlive->hiccup
          clean-image-tag))

(defn fetch-image-tag [{:keys [url selector]}]
  (when (every? (complement nil?) [url selector])
    (-> (fetch-url url)
        (extract-image-tag selector))))

(ns comic-reader.scrape
  (:require [clojure.string :as s]
            [clojure.java.io :as io]
            [clj-http.client :as client]
            [tempfile.core :refer [tempfile with-tempfile]]
            [net.cgrand.enlive-html :as html])
  (:import java.net.URL))

(defn fetch-url [url]
  (with-tempfile [html-file (tempfile (:body (client/get url)))]
   (html/html-resource html-file)))

(defn extract-list [html selector normalize]
  (->> (html/select html selector)
       (keep normalize)))

(defn fetch-list [{:keys [url selector normalize]}]
  (when (every? (complement nil?) [url selector normalize])
    (extract-list (fetch-url url) selector normalize)))

(defn enlive->hiccup [{:keys [tag attrs content]}]
  (if (nil? content)
    [tag attrs]
    [tag attrs content]))

(defn clean-image-tag [[tag attrs & content]]
  [tag (select-keys attrs [:alt :src])])

(defn extract-image-tag [html selector]
  (some-> html
          (html/select selector)
          seq
          first
          enlive->hiccup
          clean-image-tag))

(defn fetch-image-tag [{:keys [url selector]}]
  (when (every? (complement nil?) [url selector])
    (-> (fetch-url url)
        (extract-image-tag selector))))

Use keep instead of map+filter-ident

Use keep instead of map+filter-ident


(ns analyze-data.tf-idf.words-test
  (:require [clojure.test :refer [deftest is]]
            [analyze-data.tf-idf.words :as test-ns]))

(deftest to-words-test
  (is (= ["hello" "world"]
         (test-ns/to-words "hello world"))
      "separates two words")
  (is (= ["hello" "world"]
         (test-ns/to-words "Hello world"))
      "lowercases words")
  (is (= ["hello" "world"]
         (test-ns/to-words "Hello world!"))
      "removes punctuation...")
  (is (= ["hello" "world"]
         (test-ns/to-words "Hello, world"))
      "...including commas...")
  (is (= ["he'll" "world"]
         (test-ns/to-words "he'll world"))
      "...but keeps apostrophes"))

(deftest remove-stopwords-test
  (is (= ["hello" "world"]
         (test-ns/remove-stopwords ["the" "hello" "world"]))
      "removes common word \"the\""))

(deftest n-grams-test
  (is (= ["a b" "b c"]
         (test-ns/n-grams 2 ["a" "b" "c"]))
      "creates bigrams"))

(ns analyze-data.tf-idf.words-test
  (:require [clojure.test :refer [deftest is]]
            [analyze-data.tf-idf.words :as test-ns]))

(deftest to-words-test
  (is (= ["hello" "world"]
         (test-ns/to-words "hello world"))
      "separates two words")
  (is (= ["hello" "world"]
         (test-ns/to-words "Hello world"))
      "lowercases words")
  (is (= ["hello" "world"]
         (test-ns/to-words "hello\nworld"))
      "splits words on newline")
  (is (= ["hello" "world"]
         (test-ns/to-words "Hello world!"))
      "removes punctuation...")
  (is (= ["hello" "world"]
         (test-ns/to-words "Hello, world"))
      "...including commas...")
  (is (= ["he'll" "world"]
         (test-ns/to-words "he'll world"))
      "...but keeps apostrophes"))

(deftest remove-stopwords-test
  (is (= ["hello" "world"]
         (test-ns/remove-stopwords ["the" "hello" "world"]))
      "removes common word \"the\""))

(deftest n-grams-test
  (is (= ["a b" "b c"]
         (test-ns/n-grams 2 ["a" "b" "c"]))
      "creates bigrams"))

Add test for splitting words on newlines.


(ns circleci.db.migrations
  (:use [circleci.db :only (with-conn)])
  (:use [circleci.db.migration-lib :only (defmigration run-required-migrations reset-migration-state)])
  (:require [clojure.java.jdbc :as jdbc]))

(def migration-info (circleci.db.migration-lib/migration-info (.getName *ns*)))

(defn init []
  (with-conn
    (run-required-migrations migration-info))
  (println "migrations/init done"))

(reset-migration-state (.getName *ns*))

(defmigration "schema version"
  (println "create-table: schema version")
  (jdbc/create-table :schema_version
                     [:name :varchar "UNIQUE NOT NULL"]
                     [:date_run :timestamp "NOT NULL"]))

(defmigration "add beta notify"
  (println "create-table: beta notify")
  (jdbc/create-table :beta_notify
                     [:email :text "PRIMARY KEY"]
                     [:environment :text]
                     [:features :text]))

(ns circleci.db.migrations
  (:use [circleci.db :only (with-conn)])
  (:use [circleci.db.migration-lib :only (defmigration run-required-migrations reset-migration-state)])
  (:require [clojure.java.jdbc :as jdbc])
  (use (clojure.contrib [string :only (as-str)])))

(def migration-info (circleci.db.migration-lib/migration-info (.getName *ns*)))

(defn init []
  (with-conn
    (run-required-migrations migration-info))
  (println "migrations/init done"))

(reset-migration-state (.getName *ns*))

(defmigration "schema version"
  (println "create-table: schema version")
  (jdbc/create-table :schema_version
                     [:name :varchar "UNIQUE NOT NULL"]
                     [:date_run :timestamp "NOT NULL"]))

(defmigration "add beta notify"
  (println "create-table: beta notify")
  (jdbc/create-table :beta_notify
                     [:email :text "PRIMARY KEY"]
                     [:environment :text]
                     [:features :text]))

(defn alter-table [name & specs]
   (jdbc/do-commands
    (format "ALTER TABLE %s ADD %s"
     (as-str name)
     (apply str
            (map as-str
                 (apply concat
                        (interpose [", "]
                                   (map (partial interpose " ") specs))))))))

(defmigration "add beta checkbox"
  (println "alter-table: beta checkbox")
  (alter-table :beta_notify [:contact :boolean]))

Add alter-table and migrate beta-notify with a checkbox.


(defproject com.stuartsierra/component "0.2.1"
  :description "Managed lifecycle of stateful objects"
  :url "https://github.com/stuartsierra/component"
  :license {:name "The MIT License"
            :url "http://opensource.org/licenses/MIT"}
  :min-lein-version "2.1.3"  ; added :global-vars
  :dependencies [[com.stuartsierra/dependency "0.1.1"]]
  :global-vars {*warn-on-reflection* true}
  :profiles {:dev {:dependencies [[org.clojure/clojure "1.5.1"]
                                  [org.clojure/tools.namespace "0.2.4"]]
                   :source-paths ["dev"]}
             :clj1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}})

(defproject com.stuartsierra/component "0.2.2-SNAPSHOT"
  :description "Managed lifecycle of stateful objects"
  :url "https://github.com/stuartsierra/component"
  :license {:name "The MIT License"
            :url "http://opensource.org/licenses/MIT"}
  :min-lein-version "2.1.3"  ; added :global-vars
  :dependencies [[com.stuartsierra/dependency "0.1.1"]]
  :global-vars {*warn-on-reflection* true}
  :profiles {:dev {:dependencies [[org.clojure/clojure "1.5.1"]
                                  [org.clojure/tools.namespace "0.2.4"]]
                   :source-paths ["dev"]}
             :clj1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}})

Set development version to 0.2.2-SNAPSHOT


(defproject onyx-app/lein-template "0.9.10.0"
  :description "Onyx Leiningen application template"
  :url "https://github.com/onyx-platform/onyx-template"
  :license {:name "MIT License"
            :url "http://choosealicense.com/licenses/mit/#"}
  :repositories {"snapshots" {:url "https://clojars.org/repo"
                              :username :env
                              :password :env
                              :sign-releases false}
                 "releases" {:url "https://clojars.org/repo"
                             :username :env
                             :password :env
                             :sign-releases false}}
  :plugins [[lein-set-version "0.4.1"]]
  :profiles {:dev {:plugins [[lein-set-version "0.4.1"]
                             [lein-update-dependency "0.1.2"]
                             [lein-pprint "1.1.1"]]}}
  :eval-in-leiningen true)

(defproject onyx-app/lein-template "0.9.10.1-SNAPSHOT"
  :description "Onyx Leiningen application template"
  :url "https://github.com/onyx-platform/onyx-template"
  :license {:name "MIT License"
            :url "http://choosealicense.com/licenses/mit/#"}
  :repositories {"snapshots" {:url "https://clojars.org/repo"
                              :username :env
                              :password :env
                              :sign-releases false}
                 "releases" {:url "https://clojars.org/repo"
                             :username :env
                             :password :env
                             :sign-releases false}}
  :plugins [[lein-set-version "0.4.1"]]
  :profiles {:dev {:plugins [[lein-set-version "0.4.1"]
                             [lein-update-dependency "0.1.2"]
                             [lein-pprint "1.1.1"]]}}
  :eval-in-leiningen true)

Prepare for next release cycle.

Prepare for next release cycle.


(defproject strava-activity-graphs "0.1.0-SNAPSHOT"
  :description "Generate statistical charts for Strava activities"
  :url "https://github.com/nicokosi/strava-activity-graphs"
  :license {:name "Creative Commons Attribution 4.0"
            :url  "https://creativecommons.org/licenses/by/4.0/"}
  :dependencies [[org.clojure/clojure "1.10.1"]
                 [incanter/incanter-core "1.5.7"]
                 [incanter/incanter-charts "1.5.7"]
                 [incanter/incanter-io "1.5.7"]
                 [org.clojure/data.json "0.2.6"]
                 [clj-http "3.10.0"]
                 [slingshot "0.12.2"]]
  :main ^:skip-aot strava-activity-graphs.core
  :target-path "target/%s"
  :profiles {:uberjar {:aot :all}})

(defproject strava-activity-graphs "0.1.0-SNAPSHOT"
  :description "Generate statistical charts for Strava activities"
  :url "https://github.com/nicokosi/strava-activity-graphs"
  :license {:name "Creative Commons Attribution 4.0"
            :url  "https://creativecommons.org/licenses/by/4.0/"}
  :dependencies [[org.clojure/clojure "1.10.1"]
                 [incanter/incanter-core "1.5.7"]
                 [incanter/incanter-charts "1.5.7"]
                 [incanter/incanter-io "1.5.7"]
                 [org.clojure/data.json "0.2.6"]
                 [clj-http "3.10.2"]
                 [slingshot "0.12.2"]]
  :main ^:skip-aot strava-activity-graphs.core
  :target-path "target/%s"
  :profiles {:uberjar {:aot :all}})

Update dependency clj-http:clj-http to v3.10.2


(defproject compojure "1.6.0-beta1"
  :description "A concise routing library for Ring"
  :url "https://github.com/weavejester/compojure"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.7.0"]
                 [org.clojure/tools.macro "0.1.5"]
                 [clout "2.1.2"]
                 [medley "0.8.2"]
                 [ring/ring-core "1.6.0-beta4"]
                 [ring/ring-codec "1.0.1"]]
  :plugins [[lein-codox "0.9.5"]]
  :codox
  {:output-path "codox"
   :metadata {:doc/format :markdown}
   :source-uri "http://github.com/weavejester/compojure/blob/{version}/{filepath}#L{line}"}
  :aliases
  {"test-all" ["with-profile" "default:+1.8" "test"]}
  :profiles
  {:dev {:jvm-opts ^:replace []
         :dependencies [[ring/ring-mock "0.3.0"]
                        [criterium "0.4.3"]
                        [javax.servlet/servlet-api "2.5"]]}
   :1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]}})

(defproject compojure "1.6.0-beta1"
  :description "A concise routing library for Ring"
  :url "https://github.com/weavejester/compojure"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.7.0"]
                 [org.clojure/tools.macro "0.1.5"]
                 [clout "2.1.2"]
                 [medley "0.8.2"]
                 [ring/ring-core "1.6.0-beta6"]
                 [ring/ring-codec "1.0.1"]]
  :plugins [[lein-codox "0.9.5"]]
  :codox
  {:output-path "codox"
   :metadata {:doc/format :markdown}
   :source-uri "http://github.com/weavejester/compojure/blob/{version}/{filepath}#L{line}"}
  :aliases
  {"test-all" ["with-profile" "default:+1.8" "test"]}
  :profiles
  {:dev {:jvm-opts ^:replace []
         :dependencies [[ring/ring-mock "0.3.0"]
                        [criterium "0.4.3"]
                        [javax.servlet/servlet-api "2.5"]]}
   :1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]}})

Update Ring dependency to 1.6.0-beta6

Update Ring dependency to 1.6.0-beta6


(ns todo-repl-webapp.handler
  (:gen-class :main true)
  (:use compojure.core)
  (:require [compojure.handler :as handler]
            [compojure.route :as route]
            [ring.adapter.jetty :as jetty]
            [todo-repl.core :as todo]
            [todo-repl-webapp.views :as views]))

(def *tasks-ref* (ref []))
(defn tasks [] (deref *tasks-ref*))
(defn add-new-task [x]
  (dosync (alter *tasks-ref* #(cons
                                (todo/new-task-better x)
                                %1))))

(defroutes app-routes
  (GET "/" [] (do (println "get /")
                  (views/home)))
  (POST "/eval" [evalInput]
    (do
      (println "/eval " evalInput)
      (if (nil? evalInput)
        (views/eval "nil")
          (binding [*ns* (find-ns 'todo-repl-webapp.handler)]
            (let [result (load-string evalInput)]
              (println "evals to: " result)
              (views/eval (str result)))))))
  (route/resources "/")
  (route/not-found "Not Found"))

(def app
  (handler/site app-routes))

(defn -main [port]
  (jetty/run-jetty
    (handler/site app-routes)
    {:port (Integer. port) :join? false}))

(ns todo-repl-webapp.handler
  (:gen-class :main true)
  (:use compojure.core)
  (:require [compojure.handler :as handler]
            [compojure.route :as route]
            [ring.adapter.jetty :as jetty]
            [todo-repl.core :as todo]
            [todo-repl-webapp.views :as views]))

(def *tasks-ref* (ref []))
(defn tasks [] (deref *tasks-ref*))
(defn add-new-task [x]
  (dosync (alter *tasks-ref* #(cons
                                (todo/new-task-better x)
                                %1))))

;; Initialize some tasks
(add-new-task {:name "Go get some milk"
               :context "shopping"
               :due "tomorrow"})
(add-new-task {:name "Go get new shoes"
               :context "shopping"
               :due "friday"})
(add-new-task {:name "Clean the kitchen sink"
               :context "cleaning"})

(defroutes app-routes
  (GET "/" [] (do (println "get /")
                  (views/home)))
  (POST "/eval" [evalInput]
    (do
      (println "/eval " evalInput)
      (if (nil? evalInput)
        (views/display "nil")
          (binding [*ns* (find-ns 'todo-repl-webapp.handler)]
            (let [result (load-string evalInput)]
              (println "evals to: " result)
              (views/display result))))))
  (route/resources "/")
  (route/not-found "Not Found"))

(def app
  (handler/site app-routes))

(defn -main [port]
  (jetty/run-jetty
    (handler/site app-routes)
    {:port (Integer. port) :join? false}))

Add a few tasks to initialize tasks

Add a few tasks to initialize tasks


(ns leiningen.pact-verify
  (:require [au.com.dius.pact.provider.lein.verify-provider :as verify]
            [clojure.string :as str])
  (:import (au.com.dius.pact.provider.lein LeinVerifierProxy)))

(defn- split-string [arg]
  (if (.contains arg "=")
    (let [key-val (str/split arg #"=")]
      [(read-string (first key-val)) (second key-val)])
    [(read-string arg) arg]))

(defn- parse-args [args]
  (if (not-empty args)
    (apply assoc {} (mapcat #(split-string %) args))
    {}))

(defn pact-verify
      "Verifies pact files against a provider"
      [project & args]
      (if (contains? project :pact)
        (let [verifier (LeinVerifierProxy. project (parse-args args))]
          (verify/verify verifier (-> project :pact)))
        (throw (ex-info "No pact definition was found in the project"))))

(ns leiningen.pact-verify
  (:require [au.com.dius.pact.provider.lein.verify-provider :as verify]
            [clojure.string :as str])
  (:import (au.com.dius.pact.provider.lein LeinVerifierProxy)))

(defn- split-string [arg]
  (if (.contains arg "=")
    (let [key-val (str/split arg #"=")]
      [(read-string (first key-val)) (second key-val)])
    [(read-string arg) arg]))

(defn- parse-args [args]
  (if (not-empty args)
    (apply assoc {} (mapcat #(split-string %) args))
    {}))

(defn pact-verify
      "Verifies pact files against a provider"
      [project & args]
      (if (contains? project :pact)
        (let [verifier (LeinVerifierProxy. project (parse-args args))]
          (verify/verify verifier (-> project :pact)))
        (throw (ex-info "No pact definition was found in the project" {}))))

Fix Wrong number of args passed to: ex-info

clojure.lang.ArityException  Wrong number of args (1) passed to: clojure.core/ex-info


{:user {
        :dependencies [[pjstadig/humane-test-output "0.6.0"]
                       [slamhound "1.5.5"]]
        :injections [(require 'pjstadig.humane-test-output)
                     (pjstadig.humane-test-output/activate!)]

        :plugins [
                  [lein-kibit "0.1.2"]
                  [lein-try "0.4.3"]
                  [cider/cider-nrepl "0.8.2"]
                  [lein-ancient "0.6.7"]
                  [lein-pprint "1.1.1"]]}}

{:user {
        :dependencies [[pjstadig/humane-test-output "0.6.0"]
                       [slamhound "1.5.5"]]
        :injections [(require 'pjstadig.humane-test-output)
                     (pjstadig.humane-test-output/activate!)]
        :jvm-opts ["-Xmx512m" "-server"]

        :plugins [
                  [lein-kibit "0.1.2"]
                  [lein-try "0.4.3"]
                  [cider/cider-nrepl "0.8.2"]
                  [lein-ancient "0.6.7"]
                  [lein-pprint "1.1.1"]]}}

Set defaut jvm opts for lein. Limit memory usage


(ns comic-reader.scrape
  (:require [clojure.string :refer [trim]]
            [net.cgrand.enlive-html :as html]))

(def sites
  {"Manga Fox" {:url "http://mangafox.me/manga/"
                :selector [:div.manga_list :ul :li :a]
                :normalize (fn [{name :content
                                 {url :href} :attrs}]
                             {:name name
                              :url url})}
   "Manga Reader" {:url "http://www.mangareader.net/alphabetical"
                   :selector [:div.series_alpha :ul :li :a]
                   :normalize (fn [{name :content
                                    {url :href} :attrs}]
                                {:name (trim name)
                                 :url url})}})

(defn fetch-url [url]
  (html/html-resource (java.net.URL. url)))

(defn fetch-site-list [{:keys [url selector normalize]}])

(ns comic-reader.scrape
  (:require [clojure.string :refer [trim]]
            [net.cgrand.enlive-html :as html])
  (:import java.net.URL))

(def sites
  {"Manga Fox" {:url "http://mangafox.me/manga/"
                :selector [:div.manga_list :ul :li :a]
                :normalize (fn [{name :content
                                 {url :href} :attrs}]
                             {:name name
                              :url url})}
   "Manga Reader" {:url "http://www.mangareader.net/alphabetical"
                   :selector [:div.series_alpha :ul :li :a]
                   :normalize (fn [{name :content
                                    {url :href} :attrs}]
                                {:name (trim name)
                                 :url url})}})

(defn fetch-url [url]
  (html/html-resource (java.net.URL. url)))

(defn fetch-site-list [{:keys [url selector normalize]}]
  (map normalize (html/select (fetch-url url) selector)))

Write a function to process the site data


;; Copyright 2013 Andrey Antukh <niwi@niwi.be>
;;
;; Licensed under the Apache License, Version 2.0 (the "License")
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;;     http://www.apache.org/licenses/LICENSE-2.0
;;
;; Unless required by applicable law or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.

(ns buddy.core.keys
  (:require [buddy.core.codecs :refer [str->bytes bytes->hex]]))

(defprotocol SecretKey
  (key->bytes [key] "Normalize key to byte array")
  (key->str [key] "Normalize key String"))

(extend-protocol SecretKey
  (Class/forName "[B")
  (key->bytes [it] it)
  (key->str [it] (bytes->hex it))

  String
  (key->bytes [key] (str->bytes key))
  (key->str [key] key))

;; Copyright 2013 Andrey Antukh <niwi@niwi.be>
;;
;; Licensed under the Apache License, Version 2.0 (the "License")
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;;     http://www.apache.org/licenses/LICENSE-2.0
;;
;; Unless required by applicable law or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.

(ns buddy.core.keys
  (:require [buddy.core.codecs :refer [str->bytes bytes->hex]]))

(defprotocol ISecretKey
  (key->bytes [key] "Normalize key to byte array")
  (key->str [key] "Normalize key String"))

(extend-protocol ISecretKey
  (Class/forName "[B")
  (key->bytes [it] it)
  (key->str [it] (bytes->hex it))

  String
  (key->bytes [key] (str->bytes key))
  (key->str [key] key))

Rename SecretKey protocol to ISecretKey

Rename SecretKey protocol to ISecretKey


(ns leipzig-live.core
    (:require [reagent.core :as reagent :refer [atom]]
              [reagent.session :as session]
              [secretary.core :as secretary :include-macros true]
              [accountant.core :as accountant]))

;; -------------------------
;; Views

(defn home-page []
  [:div [:h1 "Welcome to Leipzig Live!"]])

(defn current-page []
  [:div [(session/get :current-page)]])

;; -------------------------
;; Routes

(secretary/defroute "/" []
  (session/put! :current-page #'home-page))

;; -------------------------
;; Initialize app

(defn mount-root []
  (reagent/render [current-page] (.getElementById js/document "app")))

(defn init! []
  (accountant/configure-navigation!)
  (accountant/dispatch-current!)
  (mount-root))

(ns leipzig-live.core
    (:require [reagent.core :as reagent :refer [atom]]
              [reagent.session :as session]
              [secretary.core :as secretary :include-macros true]
              [accountant.core :as accountant]))

;; -------------------------
;; Model
(defonce music  (atom ""))

;; -------------------------
;; Views

(defn home-page []
  [:div [:h1 "Welcome to Leipzig Live!"]
   [:div [:input {:type "text"
                  :value (-> music deref print-str)
                  :on-change #(reset! music (-> % .-target .-value))}]]
   [:div @music ]])

(defn current-page []
  [:div [(session/get :current-page)]])

;; -------------------------
;; Routes

(secretary/defroute "/" []
  (session/put! :current-page #'home-page))

;; -------------------------
;; Initialize app

(defn mount-root []
  (reagent/render [current-page] (.getElementById js/document "app")))

(defn init! []
  (accountant/configure-navigation!)
  (accountant/dispatch-current!)
  (mount-root))

Store the contents of the scratchpad in an atom.


(ns ring.middleware.multipart-params.test.temp-file
  (:use clojure.test
        [ring.util.io :only (string-input-stream)]
        ring.middleware.multipart-params.temp-file))

(deftest test-temp-file-store
  (let [store  (temp-file-store)
        result (store
                {:filename "foo.txt"
                 :content-type "text/plain"
                 :stream (string-input-stream "foo")})]
    (is (= (:filename result) "foo.txt"))
    (is (= (:content-type result) "text/plain"))
    (is (= (:size result) 3))
    (is (instance? java.io.File (:tempfile result)))
    (is (.exists (:tempfile result)))
    (is (= (slurp (:tempfile result)) "foo"))))

(deftest test-temp-file-expiry
  (let [store  (temp-file-store {:expires-in 2})
        result (store
                {:filename "foo.txt"
                 :content-type "text/plain"
                 :stream (string-input-stream "foo")})]
    (is (.exists (:tempfile result)))
    (Thread/sleep 2500)
    (is (not (.exists (:tempfile result))))))

(defn all-threads []
  (.keySet (Thread/getAllStackTraces)))

(deftest test-temp-file-threads
  (let [store (temp-file-store)]
    (dotimes [_ 200]
      (store {:filename "foo.txt"
              :content-type "text/plain"
              :stream (string-input-stream "foo")}))
    (is (< (count (all-threads))
           100))))

Test to check for excessive temp-file-store threads


(ns dna)

(defn- strand-convert [ch]
    (if (= \T ch) \U ch)
)

(defn to-rna [dna]
    (apply str (map strand-convert dna))
)

(ns dna)

(def Thymine \T)
(def Uracil  \U)

(defn- strand-convert [ch]
    (if (= Thymine ch)
        Uracil
        ch)
)

(defn to-rna [dna]
    (apply str (map strand-convert dna))
)

Use symbols for Thymine and Uracil

Use symbols for Thymine and Uracil


(ns comic-reader.ui.component-css
  (:refer-clojure :exclude [merge])
  (:require [garden.core :as g]
            [re-frame.core :as re-frame]))

(defn get* [db]
  (:component-css db))

(defn merge* [db id garden-css]
  (assoc-in db [:component-css id] garden-css))

(defn setup! []
  (re-frame/reg-sub
   :component-css
   (fn [app-db _]
     (get* app-db)))

  (re-frame/reg-event-db
   :add-to-component-css
   (fn [db [_ id garden-css]]
     (merge* db id garden-css))))

(defn merge [id garden-css]
  (re-frame/dispatch [:add-to-component-css id garden-css]))

(defn component-garden-css []
  (when-let [css @(re-frame/subscribe [:component-css])]
    (vals css)))

(defn component-css []
  [:style (g/css (component-garden-css))])

(ns comic-reader.ui.component-css
  (:refer-clojure :exclude [merge])
  (:require [garden.core :as g]
            [re-frame.core :as re-frame]))

(defn get* [db]
  (:component-css db))

(defn merge* [db id garden-css]
  (assoc-in db [:component-css id] garden-css))

(defn setup! []
  (re-frame/reg-sub
   :component-css
   (fn [app-db _]
     (get* app-db)))

  (re-frame/reg-event-db
   :add-to-component-css
   (fn [db [_ id garden-css]]
     (merge* db id garden-css))))

(defn merge [id garden-css]
  (re-frame/dispatch [:add-to-component-css id garden-css]))

(defn component-garden-css []
  (when-let [css @(re-frame/subscribe [:component-css])]
    (vals css)))

(defn component-css []
  [:style {:dangerouslySetInnerHTML
           {:__html
            (g/css (component-garden-css))}}])

Use dangerouslySetINnerHTML for component-css rendering


(ns braid.ui.styles.imports
  (:require [garden.stylesheet :refer [at-import]]))

(def imports
  [(at-import      "https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css")
  (at-import "https://fonts.googleapis.com/css?family=Open+Sans:400,300,400italic,700")])

Fix small gap in line 5

Fix small gap in line 5


(ns ninjudd.eventual.client
  (:require [cljs.core.async :as async]
            [cljs.reader :refer [read-string]]))

(defn make-event [f event]
  (-> (f (.-data event))
      (vary-meta merge {:event-id (.-lastEventId event)
                        :event-type (keyword (.-type event))})))

(defn event-source [f url & [event-types]]
  (let [event-types (or event-types [:message])
        source (new js/EventSource url)
        channel (async/chan)]
    (doseq [event-type event-types]
      (.addEventListener source (name event-type)
                         (fn [event]
                           (async/put! channel (make-event f event)))))
    (set! (.-onerror source)
          (fn [error]
            (.close source)
            (async/close! channel)))
    {:event-source source
     :channel channel}))

(defn edn-event-source [url & [event-types]]
  (event-source read-string url event-types))

(defn json-event-source [url & [event-types]]
  (event-source #(.parse js/JSON %) url event-types))

(defn close-event-source! [{:keys [channel event-source]}]
  (when event-source
    (.close event-source))
  (async/close! channel))

(ns ninjudd.eventual.client
  (:require [cljs.core.async :as async]
            [cljs.reader :refer [read-string]]))

(defn make-event [f event]
  (-> (f (.-data event))
      (vary-meta merge {:event-id (.-lastEventId event)
                        :event-type (keyword (.-type event))})))

(defn event-source [f url & [event-types channel]]
  (let [event-types (or event-types [:message])
        source (new js/EventSource url)
        channel (or channel (async/chan))]
    (doseq [event-type event-types]
      (.addEventListener source (name event-type)
                         (fn [event]
                           (async/put! channel (make-event f event)))))
    (set! (.-onerror source)
          (fn [error]
            (.close source)
            (async/close! channel)))
    {:event-source source
     :channel channel}))

(defn edn-event-source [url & [event-types channel]]
  (event-source read-string url event-types channel))

(defn json-event-source [url & [event-types channel]]
  (event-source #(.parse js/JSON %) url event-types channel))

(defn close-event-source! [{:keys [channel event-source]}]
  (when event-source
    (.close event-source))
  (async/close! channel))

Add optional "channel" argument to event-source


(ns less4clj.util)

;;
;; Debugging
;; from boot.util
;;

(def ^:dynamic *verbosity* 1)

(defn- print*
  [verbosity args]
  (when (>= *verbosity* verbosity)
    (binding [*out* *err*]
      (apply printf args) (flush))))

(defn dbug [& more] (print* 2 more))
(defn info [& more] (print* 1 more))
(defn warn [& more] (print* 1 more))
(defn fail [& more] (print* 1 more))

(ns less4clj.util)

;;
;; Debugging
;; from boot.util
;;

(def ^:dynamic *verbosity* 1)

(defn- print*
  [verbosity args]
  (when (>= *verbosity* verbosity)
    (binding [*out* *err*]
      (print (if (seq (rest args))
               (apply format args)
               (first args)))
      (flush))))

(defn dbug [& more] (print* 2 more))
(defn info [& more] (print* 1 more))
(defn warn [& more] (print* 1 more))
(defn fail [& more] (print* 1 more))

Fix logging when message has % but doesn't use format args


(ns doctopus.storage-test
  (:require [doctopus.storage :refer :all]
            [clojure.test :refer :all]))

(deftest storage
  (testing "Can we swap backends?"
    (is (= default-backend (get-key-from-backend backend :name))
        "Are we using the default backend?")
    (is (set-backend! backend :temp-fs)
        "Can we set the backend to a differen't implementation?")
    (is (set-backend! backend default-backend)
        "And can we set it back to the default"))
  )

(ns doctopus.storage-test
  (:require [doctopus.storage :refer :all]
            [clojure.test :refer :all]))

(deftest storage
  (testing "Can we swap backends?"
    (is (= default-backend (get-key-from-backend backend :name))
        "Are we using the default backend?")
    (is (set-backend! backend :temp-fs)
        "Can we set the backend to a differen't implementation?")
    (is (set-backend! backend default-backend)
        "And can we set it back to the default")
    (is (thrown? java.lang.RuntimeException (set-backend! backend :HOODYBOO))
        "Explode on an unsupported backend.")))

Check that setting nonsense backends explodes


(ns tests-cats
  #+cljs
  (:require-macros [cemerick.cljs.test
                    :refer (is deftest with-test run-tests testing test-var)])
  #+cljs
  (:require [cemerick.cljs.test :as ts]
            [cats.core :as m]
            [cats.types :as t])
  #+clj
  (:require [clojure.test :refer :all]
            [cats.core :as m]
            [cats.types :as t]))

(deftest test-maybe
  (testing "Test predicates"
    (let [m1 (t/just 1)]
      (is (t/maybe? m1))
      (is (t/just? m1))))

  #+clj
  (testing "Test fmap"
    (let [m1 (t/just 1)
          m2 (t/nothing)]
      (is (= (m/fmap inc m1) (t/just 2)))
      (is (= (m/fmap inc m2) (t/nothing))))))

(ns tests-cats
  #+cljs
  (:require-macros [cemerick.cljs.test
                    :refer (is deftest with-test run-tests testing test-var)])
  #+cljs
  (:require [cemerick.cljs.test :as ts]
            [cats.core :as m]
            [cats.types :as t])
  #+clj
  (:require [clojure.test :refer :all]
            [cats.core :as m]
            [cats.types :as t]))

(deftest test-maybe
  (testing "Test predicates"
    (let [m1 (t/just 1)]
      (is (t/maybe? m1))
      (is (t/just? m1))))

  #+clj
  (testing "Test fmap"
    (let [m1 (t/just 1)
          m2 (t/nothing)]
      (is (= (m/fmap inc m1) (t/just 2)))
      (is (= (m/fmap inc m2) (t/nothing)))))

  #+clj
  (testing "sequence-m"
    (is (= (m/sequence-m [(t/just 2) (t/just 3)])
           (t/just [2 3])))
    (is (= (m/sequence-m [(t/just 2) (t/nothing)])
           (t/nothing)))))

Test sequence-m for the Maybe monad

Test sequence-m for the Maybe monad


(ns cljs-nlp.tokenize.simple
  (:use [clojure.string :only [split]]))

(defn space-tokenizer [str]
  (split str #"[ ]"))

(defn tab-tokenizer [str]
  (split str #"\t"))

(defn whitespace-tokenizer [str]
  (split str #"\s+"))

(defn blankline-tokenizer [str]
  (split str #"\s*\n\s*\n\s*"))

(defn char-tokenizer [str]
  (vec (seq str)))

(defn line-tokenizer [str]
  (split str #"\n"))

(ns cljs-nlp.tokenize.simple
  (:use [clojure.string :only [split]]))

(defn space-tokenizer [s]
  (split s #"[ ]"))

(defn tab-tokenizer [s]
  (split s #"\t"))

(defn whitespace-tokenizer [s]
  (split s #"\s+"))

(defn blankline-tokenizer [s]
  (split s #"\s*\n\s*\n\s*"))

(defn char-tokenizer [s]
  (vec (seq s)))

(defn line-tokenizer [s]
  (split s #"\n"))

Change string variable name to not conflict with core function.


;; The Climate Corporation licenses this file to you under under the Apache
;; License, Version 2.0 (the "License"); you may not use this file except in
;; compliance with the License.  You may obtain a copy of the License at
;;
;;   http://www.apache.org/licenses/LICENSE-2.0
;;
;; See the NOTICE file distributed with this work for additional information
;; regarding copyright ownership.  Unless required by applicable law or agreed
;; to in writing, software distributed under the License is distributed on an
;; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
;; or implied.  See the License for the specific language governing permissions
;; and limitations under the License.

(defproject com.climate/claypoole
  "1.1.1"
  :description "Claypoole: Threadpool tools for Clojure."
  :url "http://github.com/TheClimateCorporation/claypoole/"
  :license {:name "Apache License Version 2.0"
            :url "http://www.apache.org/licenses/LICENSE-2.0"
            :distribution :repo}
  :min-lein-version "2.0.0"
  :source-paths ["src/clj"]
  :java-source-paths ["src/java"]
  :pedantic? :warn
  :profiles {:dev {:dependencies [[org.clojure/clojure "1.8.0"]]}}
  :plugins [[jonase/eastwood "0.2.3"]
            [lein-ancient "0.6.8"]])

;; The Climate Corporation licenses this file to you under under the Apache
;; License, Version 2.0 (the "License"); you may not use this file except in
;; compliance with the License.  You may obtain a copy of the License at
;;
;;   http://www.apache.org/licenses/LICENSE-2.0
;;
;; See the NOTICE file distributed with this work for additional information
;; regarding copyright ownership.  Unless required by applicable law or agreed
;; to in writing, software distributed under the License is distributed on an
;; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
;; or implied.  See the License for the specific language governing permissions
;; and limitations under the License.

(defproject com.climate/claypoole
  "1.1.1-SNAPSHOT"
  :description "Claypoole: Threadpool tools for Clojure."
  :url "http://github.com/TheClimateCorporation/claypoole/"
  :license {:name "Apache License Version 2.0"
            :url "http://www.apache.org/licenses/LICENSE-2.0"
            :distribution :repo}
  :min-lein-version "2.0.0"
  :source-paths ["src/clj"]
  :java-source-paths ["src/java"]
  :pedantic? :warn
  :profiles {:dev {:dependencies [[org.clojure/clojure "1.8.0"]]}}
  :plugins [[jonase/eastwood "0.2.3"]
            [lein-ancient "0.6.8"]])

Change version back to snapshot

Change version back to snapshot


(ns lens.middleware.wan-exception
  (:require [clj-stacktrace.repl :refer [pst-on]]))

(defn wrap-exception
  "Calls the handler in a try catch block returning a WAN error response."
  [handler]
  (fn [request]
    (try
      (handler request)
      (catch Throwable e
        (pst-on *err* false e)
        {:status 500
         :body {:error (.getMessage e)}}))))

(ns lens.middleware.wan-exception
  (:require [clj-stacktrace.repl :refer [pst-on]]))

(defn wrap-exception
  "Calls the handler in a try catch block returning a WAN error response."
  [handler]
  (fn [request]
    (try
      (handler request)
      (catch Throwable e
        (pst-on *err* false e)
        {:status 500
         :body
         {:links {:up {:href "/"}}
          :error (.getMessage e)}}))))

Add Up Link to Error Representation

Add Up Link to Error Representation


(ns afterglow.effects.color-test
  (:require [clojure.test :refer :all]
            [afterglow.effects.color :refer :all]
            [afterglow.channels :as channels]
            [com.evocomputing.colors :as colors]
            [afterglow.fixtures.chauvet :as chauvet]
            [taoensso.timbre :as timbre :refer [error warn info debug spy]]))

(deftest test-extract-rgb
  (testing "Finding RGB color channels")
  (is (= [2 3 4] (map :offset (#'afterglow.effects.color/extract-rgb [(chauvet/slimpar-hex3-irc)])))))

(ns afterglow.effects.color-test
  (:require [clojure.test :refer :all]
            [afterglow.effects.color :refer :all]
            [afterglow.channels :as channels]
            [com.evocomputing.colors :as colors]
            [afterglow.fixtures.chauvet :as chauvet]
            [taoensso.timbre :as timbre :refer [error warn info debug spy]]))

(deftest test-extract-rgb
  (testing "Finding RGB color channels")
  (is (= [:12-channel-mix-uv] (map :mode (#'afterglow.effects.color/find-rgb-heads [(chauvet/slimpar-hex3-irc)])))))

Update test. Still have far too few...

Update test. Still have far too few...


(ns proto.main
  (:require [clojure.contrib.io :as io])
  (:require [clj-yaml.core :as yaml])
  )

(defn init [& argv]
  (-> argv
      first
      io/reader
      slurp
      yaml/parse-string
      println))

(defn -main [& argv]
  (init *command-line-args*))

(ns proto.main
  (:require [clojure.contrib.io :as io])
  (:require [clojure.contrib.generic.functor :as functor])
  (:require [clj-yaml.core :as yaml]))

(declare autotools-handler)

(def handlers '(autotools-handler))

(defn run-handlers
  "Run all the handlers on a definition"
  [config]
  (map #(% config) handlers))

(defn process-handlers
  "For each project definition, run all the handlers on it"
  [configurations]
  (functor/fmap run-handlers configurations))

(defn autotools-handler
  [{type :type
    subdir :subdir
    configurations :configurations
    autoconf-version :autoconf-version}]
  (when (= type "autotools") "print autotools"))

(defn init [& argv]
  (-> argv
      first
      io/reader
      slurp
      yaml/parse-string
      process-handlers))

(defn -main [& argv]
  (init *command-line-args*))

Add simple pattern matching. Matchure and more complex matching weren't cutting it.


(ns cadence.migrations
  "Define some migrations yo."
  (:require [cadence.model.migration :refer [defmigration]]
            (monger [collection :as mc]
                    [operators :refer :all]))
  (:import (org.bson.types ObjectId)))

(defn- str-id
  "Helper function for generating an id when adding migrations."
  [] (str (ObjectId.)))

;; ## Define some migrations.

(defmigration "Add roles to users"
  "5108749844ae8febda9c2ed4"
  (do (mc/update "users" {} {$set {:roles [:user]}} :multi true)
      (mc/update "users" {:username "RyanMcG"} {$push {:roles :admin}}))
  (mc/update "users" {} {$unset {:roles ""}} :multi true))

(defmigration "Change my name (just for demo)"
  "51571b7244aedb2065e2a3d7"
  (mc/update "users" {:username "RyanMcG"} {$set {:name "Ryan Vincent McGowan"}})
  (mc/update "users" {:username "RyanMcG"} {$set {:name "Ryan McGowan"}}))

Add another migration for demo purposes.


(ns chatapp.view
  (:require [re-frame.core :as re-frame]))

(defn message [message]
  [:li {:class "list-group-item"}
   (:message message)])

(defn message-list []
  (let [messages (re-frame/subscribe [:messages])]
    (fn []
      [:div {:class "row"}
       [:div {:class "col-lg-6"}
        [:ul {:class "list-group"}
         (for [m @messages]
           (message m))]]])))

(defn message-input []
  (let [input (re-frame/subscribe [:message-input])]
    [:div {:class "row"}
     [:div {:class "col-lg-6"}
      [:div {:class "input-group"}
       [:input {:type        "text"
                :value       (:text @input)
                :placeholder "Enter text to reverse!"
                :class       "form-control"
                :on-change   #(re-frame/dispatch [:message-input-text (-> % .-target .-value)])}]
       [:span {:class "input-group-btn"}
        [:button {:type     "button"
                  :class    "btn btn-default"
                  :on-click #(re-frame/dispatch [:send-message])}
         "Send"]]
       ]]]))

(defn chat-ui []
  [:div {:class "container-fluid"}
   [:h1 "ChatApp"]
   [message-list]
   [message-input]])

(ns chatapp.view
  (:require [re-frame.core :as re-frame]))

(defn message [message]
  [:li {:class "list-group-item"}
   (:message message)])

(defn message-list []
  (let [messages (re-frame/subscribe [:messages])]
    (fn []
      [:div {:class "row"}
       [:div {:class "col-md-6"}
        [:ul {:class "list-group"}
         (for [m @messages]
           (message m))]]])))

(defn message-input []
  (let [input (re-frame/subscribe [:message-input])]
    (fn []
      [:input {:type        "text"
               :value       (:text @input)
               :placeholder "Enter text to reverse!"
               :class       "form-control"
               :auto-focus  true
               :on-key-press #(when (= 13 (.-charCode %))
                                (re-frame/dispatch [:send-message]))
               :on-change   #(re-frame/dispatch [:message-input-text (-> % .-target .-value)])}])))

(defn message-composer []
  [:div {:class "row"}
   [:div {:class "col-md-6"}
    [:div {:class "input-group"}
     [message-input]
     [:span {:class "input-group-btn"}
      [:button {:type     "button"
                :class    "btn btn-default"
                :on-click #(re-frame/dispatch [:send-message])}
       "Send"]]]]])

(defn chat-ui []
  [:div {:class "container-fluid"}
   [:div {:class "row"}
    [:div {:class "col-md-6"}
     [:h1 "ChatApp"]]]
   [message-list]
   [message-composer]])

Send message when enter is pressed

Send message when enter is pressed


;; The Climate Corporation licenses this file to you under under the Apache
;; License, Version 2.0 (the "License"); you may not use this file except in
;; compliance with the License.  You may obtain a copy of the License at
;;
;;   http://www.apache.org/licenses/LICENSE-2.0
;;
;; See the NOTICE file distributed with this work for additional information
;; regarding copyright ownership.  Unless required by applicable law or agreed
;; to in writing, software distributed under the License is distributed on an
;; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
;; or implied.  See the License for the specific language governing permissions
;; and limitations under the License.

(defproject com.climate/claypoole
  "1.0.0-SNAPSHOT"
  :description "Claypoole: Threadpool tools for Clojure."
  :url "http://github.com/TheClimateCorporation/claypoole/"
  :license {:name "Apache License Version 2.0"
            :url http://www.apache.org/licenses/LICENSE-2.0
            :distribution :repo}
  :min-lein-version "2.0.0"
  :source-paths ["src/clj"]
  :java-source-paths ["src/java"]
  :pedantic? :warn
  :dependencies [[org.clojure/clojure "1.6.0"]]
  :plugins [[jonase/eastwood "0.2.1"]])

;; The Climate Corporation licenses this file to you under under the Apache
;; License, Version 2.0 (the "License"); you may not use this file except in
;; compliance with the License.  You may obtain a copy of the License at
;;
;;   http://www.apache.org/licenses/LICENSE-2.0
;;
;; See the NOTICE file distributed with this work for additional information
;; regarding copyright ownership.  Unless required by applicable law or agreed
;; to in writing, software distributed under the License is distributed on an
;; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
;; or implied.  See the License for the specific language governing permissions
;; and limitations under the License.

(defproject com.climate/claypoole
  "1.0.0-SNAPSHOT"
  :description "Claypoole: Threadpool tools for Clojure."
  :url "http://github.com/TheClimateCorporation/claypoole/"
  :license {:name "Apache License Version 2.0"
            :url http://www.apache.org/licenses/LICENSE-2.0
            :distribution :repo}
  :min-lein-version "2.0.0"
  :source-paths ["src/clj"]
  :java-source-paths ["src/java"]
  :pedantic? :warn
  :profiles {:dev {:dependencies [[org.clojure/clojure "1.7.0"]]}}
  :plugins [[jonase/eastwood "0.2.1"]])

Move Clojure to dev dependency

Move Clojure to dev dependency


(defproject buddy/buddy-sign "1.0.0"
  :description "High level message signing for Clojure"
  :url "https://github.com/funcool/buddy-sign"
  :license {:name "Apache 2.0"
            :url "http://www.apache.org/licenses/LICENSE-2.0"}
  :dependencies [[org.clojure/clojure "1.8.0" :scope "provided"]
                 [com.taoensso/nippy "2.11.1" :scope "provided"]
                 [buddy/buddy-core "0.12.1"]
                 [cheshire "5.6.1"]]
  :source-paths ["src"]
  :javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
  :test-paths ["test"])

(defproject buddy/buddy-sign "1.0.0"
  :description "High level message signing for Clojure"
  :url "https://github.com/funcool/buddy-sign"
  :license {:name "Apache 2.0"
            :url "http://www.apache.org/licenses/LICENSE-2.0"}
  :dependencies [[org.clojure/clojure "1.8.0" :scope "provided"]
                 [com.taoensso/nippy "2.11.1" :scope "provided"]
                 [org.clojure/test.check "0.9.0" :scope "test"]
                 [buddy/buddy-core "0.13.0"]
                 [cheshire "5.6.1"]]
  :source-paths ["src"]
  :javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
  :test-paths ["test"])

Add test.check dependency and upgrade buddy-core dependency.


(defproject rpi-challenger "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "https://github.com/solita"
  :license {:name "MIT License"
            :url "http://opensource.org/licenses/MIT"}

  :dependencies [[org.clojure/clojure "1.4.0"]
                 [org.clojure/tools.cli "0.2.2"]
                 [http.async.client "0.5.0-SNAPSHOT"]
                 [ring/ring-core "1.1.6"]
                 [ring/ring-devel "1.1.6"]
                 [ring/ring-jetty-adapter "1.1.6"]
                 [compojure "1.1.3"]
                 [enlive "1.0.0"]]

  :main rpi-challenger.main)

(defproject rpi-challenger "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "https://github.com/solita"
  :license {:name "MIT License"
            :url "http://opensource.org/licenses/MIT"}

  :dependencies [[org.clojure/clojure "1.4.0"]
                 [org.clojure/tools.cli "0.2.2"]
                 [http.async.client "0.5.0-SNAPSHOT"]
                 [ch.qos.logback/logback-classic "1.0.7"]
                 [ring/ring-core "1.1.6"]
                 [ring/ring-devel "1.1.6"]
                 [ring/ring-jetty-adapter "1.1.6"]
                 [compojure "1.1.3"]
                 [enlive "1.0.0"]]

  :main rpi-challenger.main)

Use Logback, avoid warning about missing logger implementation


(defproject bukkure "0.4.2-SNAPSHOT"
  :description "Bringing Clojure to the Bukkit API"
  :url "http://github.com/SevereOverfl0w/Bukkure"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :java-source-paths ["javasrc"]
  :javac-options ["-d" "classes/" "-source" "1.7" "-target" "1.7"]
  :resource-paths ["resources/*"]
  :repositories [["spigot-repo" "https://hub.spigotmc.org/nexus/content/groups/public/"]]
  :plugins [[codox "0.8.13"]]
  :codox {:defaults {:doc/format :markdown}}
  :dependencies [[org.clojure/clojure "1.7.0"]
                 [org.bukkit/bukkit "1.8.7-R0.1-SNAPSHOT"]
                 [org.reflections/reflections "0.9.8"]
                 [org.clojure/tools.nrepl "0.2.3"]
                 [cheshire "5.2.0"]])

(defproject bukkure "0.4.2-SNAPSHOT"
  :description "Bringing Clojure to the Bukkit API"
  :url "http://github.com/SevereOverfl0w/Bukkure"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :java-source-paths ["javasrc"]
  :javac-options ["-d" "classes/" "-source" "1.7" "-target" "1.7"]
  :resource-paths ["resources/*"]
  :repositories [["spigot-repo" "https://hub.spigotmc.org/nexus/content/groups/public/"]]
  :plugins [[codox "0.8.13"]]
  :codox {:defaults {:doc/format :markdown}}
  :dependencies [[org.clojure/clojure "1.7.0"]
                 [org.reflections/reflections "0.9.8"]
                 [org.clojure/tools.nrepl "0.2.3"]
                 [cheshire "5.2.0"]]
  :profiles {:provided
              {:dependencies [[org.bukkit/bukkit "1.8.7-R0.1-SNAPSHOT"]]}})

Make bukkit a provided dependency.

Make bukkit a provided dependency.


(defproject onyx-app/lein-template "0.10.0.0-rc2"
  :description "Onyx Leiningen application template"
  :url "https://github.com/onyx-platform/onyx-template"
  :license {:name "MIT License"
            :url "http://choosealicense.com/licenses/mit/#"}
  :repositories {"snapshots" {:url "https://clojars.org/repo"
                              :username :env
                              :password :env
                              :sign-releases false}
                 "releases" {:url "https://clojars.org/repo"
                             :username :env
                             :password :env
                             :sign-releases false}}
  :plugins [[lein-set-version "0.4.1"]]
  :profiles {:dev {:plugins [[lein-set-version "0.4.1"]
                             [lein-update-dependency "0.1.2"]
                             [lein-pprint "1.1.1"]]}}
  :eval-in-leiningen true)

(defproject onyx-app/lein-template "0.10.0.0-SNAPSHOT"
  :description "Onyx Leiningen application template"
  :url "https://github.com/onyx-platform/onyx-template"
  :license {:name "MIT License"
            :url "http://choosealicense.com/licenses/mit/#"}
  :repositories {"snapshots" {:url "https://clojars.org/repo"
                              :username :env
                              :password :env
                              :sign-releases false}
                 "releases" {:url "https://clojars.org/repo"
                             :username :env
                             :password :env
                             :sign-releases false}}
  :plugins [[lein-set-version "0.4.1"]]
  :profiles {:dev {:plugins [[lein-set-version "0.4.1"]
                             [lein-update-dependency "0.1.2"]
                             [lein-pprint "1.1.1"]]}}
  :eval-in-leiningen true)

Prepare for next release cycle.

Prepare for next release cycle.


(ns user
  "Namespace to support hacking at the REPL."
  (:require [clojure.java.javadoc :refer [javadoc]]
            [clojure.pprint :refer [pp pprint]]
            [clojure.repl :refer :all]
            [clojure.string :as str]
            [clojure.tools.namespace.move :refer :all]
            [clojure.tools.namespace.repl :refer :all]
            [midje.repl :refer :all]))

;;;; ___________________________________________________________________________
;;;; ---- u-classpath ----

(defn u-classpath []
  (str/split (System/getProperty "java.class.path")
             #":"))

;;;; ___________________________________________________________________________
;;;; ---- u-move-ns-dev-src-test ----

(defn u-move-ns-dev-src-test [old-sym new-sym source-path]
  (move-ns old-sym new-sym source-path ["dev" "src" "test"]))

;;;; ___________________________________________________________________________
;;;; App-specific additional utilities for the REPL or command line

(do (autotest :stop)
    (autotest :filter (complement :slow)))

(ns user
  "Namespace to support hacking at the REPL."
  (:require [clojure.java.javadoc :refer [javadoc]]
            [clojure.pprint :refer [pp pprint]]
            [clojure.repl :refer :all]
            [clojure.string :as str]
            [clojure.tools.namespace.move :refer :all]
            [clojure.tools.namespace.repl :refer :all]
            [midje.repl :refer :all]))

;;;; ___________________________________________________________________________
;;;; ---- u-classpath ----

(defn u-classpath []
  (str/split (System/getProperty "java.class.path")
             #":"))

;;;; ___________________________________________________________________________
;;;; ---- u-move-ns-dev-src-test ----

(defn u-move-ns-dev-src-test [old-sym new-sym source-path]
  (move-ns old-sym new-sym source-path ["dev" "src" "test"]))

;;;; ___________________________________________________________________________
;;;; App-specific additional utilities for the REPL or command line

(comment

  (do (autotest :stop)
      (autotest :filter (complement :slow)))

  )

Comment out stuff in dev.clj

Comment out stuff in dev.clj


(ns {{name}}-devcards.core
    (:require
     [devcards.core :as dc :include-macros true]
     [{{name}}.core :as {{name}}]
     #_[om.core :as om :include-macros true]
     #_[sablono.core :as sab :include-macros true])
    (:require-macros
     [devcards.core :refer [defcard is are= are-not=]]))

(enable-console-print!)

(devcards.core/start-devcard-ui!)
(devcards.core/start-figwheel-reloader!)

;; remember to run lein figwheel and then browse to
;; http://localhost:3449/devcards/index.html

(defcard devcard-intro
  (dc/markdown-card
   "# Devcards for {{ name }}

    I can be found in `devcards_src/{{sanitized}}_devcards/core.cljs`.

    If you add cards to this file, they will appear here on this page.

    You can add devcards to any file as long as you require
    `devcards.core` like so:

    ```
    (:require [devcards.core :as dc :include-macros true])
    ```

    As you add cards to other namspaces, those namspaces will
    be listed on the Devcards **home** page.

    Here are some Devcard examples"))

(ns {{name}}-devcards.core
    (:require
     [devcards.core :as dc :include-macros true]
     [{{name}}.core :as {{name}}]
     #_[om.core :as om :include-macros true]
     #_[sablono.core :as sab :include-macros true])
    (:require-macros
     [devcards.core :refer [defcard is are= are-not=]]))

(enable-console-print!)

(devcards.core/start-devcard-ui!)
(devcards.core/start-figwheel-reloader!)

;; remember to run lein figwheel and then browse to
;; http://localhost:3449/devcards/index.html

(defcard devcard-intro
  (dc/markdown-card
   "# Devcards for {{ name }}

    I can be found in `devcards_src/{{sanitized}}_devcards/core.cljs`.

    If you add cards to this file, they will appear here on this page.
    As you add cards to other namespaces, those namespaces will
    be listed on the Devcards **home** page, provided you require
    those files in `devcards_src/{{sanitized}}_devcards/core.cljs`.

    You can add devcards to any file as long as you require
    `devcards.core` like so:

    ```
    (:require [devcards.core :as dc :include-macros true])
    ```

    Here are some Devcard examples"))

Document the process of adding namespaces to devcards home.

Clarified that devcards_src/core.cljs needs to be edited in order for
new namespaces to appear.


(ns app.app
  (:require [cljsjs.material]
            [reagent.core :as reagent]))

(defn fixed-header-and-drawer-component [content]
  [:div.mdl-layout.mdl-js-layout.mdl-layout--fixed-drawer.mdl-layout--fixed-header
   [:header.mdl-layout__header
    [:div.mdl-layout__header-row
     [:div.mdl-layout-spacer]]]
   [:div.mdl-layout__drawer
    [:span.mdl-layout-title "Resume"]
    [:nav.mdl-navigation
     [:a.mdl-navigation__link {:href "#"} "About"]]]
   [:main.mdl-layout__content
    [:div.page-content
     content]]])

(defn some-component []
  [:div
   [fixed-header-and-drawer-component
    [:h3 "This is your app"]]])

(defn init []
  (reagent/render-component [some-component]
                            (.getElementById js/document "container")))

(ns app.app
  (:require [cljsjs.material]
            [reagent.core :as reagent]
            [app.components :as comps]
            [app.res :refer [resume]]))

(defn fixed-header-and-drawer-component [content]
  [:div.mdl-layout.mdl-js-layout.mdl-layout--fixed-drawer.mdl-layout--fixed-header
   [:header.mdl-layout__header
    [:div.mdl-layout__header-row
     [:div.mdl-layout-spacer]]]
   [:div.mdl-layout__drawer
    [:span.mdl-layout-title "Resume"]
    [:nav.mdl-navigation
     [:a.mdl-navigation__link {:href "#contact"} "Contact"]
     [:a.mdl-navigation__link {:href "#about"} "About"]
     [:a.mdl-navigation__link {:href "#projects"} "Projects"]]]
   [:main.mdl-layout__content
    [:div.page-content
     content]]])

(defn main-component []
  [:div
   [fixed-header-and-drawer-component
    [:div
     [comps/contact-component (:name (:contact resume))
      (:email (:contact resume))
      (:phone (:contact resume))]
     [comps/about-component
      [:p (:profile resume)]]
     [comps/projects-component
      (:projects resume)]]]])

(defn init []
  (reagent/render-component [main-component]
                            (.getElementById js/document "container")))

Add projects section to sidebar

Add projects section to sidebar


(ns advent2016.day3
  (:require [clojure.java.io :as io]
            [clojure.string :as s]))

(defn read-sides [line]
  (map #(Integer/parseInt %) (remove s/blank? (s/split line #" "))))

(defn valid-triangle? [[a b c]]
  (and (> (+ a b) c)
       (> (+ a c) b)
       (> (+ b c) a)))

(def solution (->> "../day3.data"
                 io/reader
                 line-seq
                 (map read-sides)
                 (filter valid-triangle?)
                 count))

(ns advent2016.day3
  (:require [clojure.java.io :as io]
            [clojure.string :as s]))

(def puzzle (line-seq (io/reader "../day3.data")))

(defn read-sides [line]
  (map #(Integer/parseInt %) (remove s/blank? (s/split line #" "))))

(defn valid-triangle? [[a b c]]
  (and (> (+ a b) c)
       (> (+ a c) b)
       (> (+ b c) a)))

(def solution1 (->> puzzle
                    (map read-sides)
                    (filter valid-triangle?)
                    count))

(def solution2 (->> puzzle
                    (map read-sides)
                    (apply mapcat vector)
                    (partition 3)
                    (filter valid-triangle?)
                    count))

Implement part 2 of the Clojure day 3 solution.


(defproject simple "lein-git-inject/version"

  :dependencies [[org.clojure/clojure       "1.10.1"]
                 [org.clojure/clojurescript "1.10.520"
                  :exclusions [com.google.javascript/closure-compiler-unshaded
                               org.clojure/google-closure-library]]
                 [thheller/shadow-cljs      "2.8.69"]
                 [reagent                   "0.9.0-rc2"]
                 [re-frame                  "0.11.0-rc2"]]

  :plugins      [[day8/lein-git-inject "0.0.2"]
                 [lein-shadow          "0.1.6"]]

  :middleware   [leiningen.git-inject/middleware]

  :clean-targets ^{:protect false} [:target-path
                                    "shadow-cljs.edn"
                                    "package.json"
                                    "package-lock.json"
                                    "resources/public/js"]

  :shadow-cljs {:nrepl  {:port 8777}

                :builds {:client {:target     :browser
                                  :output-dir "resources/public/js"
                                  :modules    {:client {:init-fn simple.core/run}}
                                  :devtools   {:http-root "resources/public"
                                               :http-port 8280}}}}

  :aliases {"dev-auto" ["shadow" "watch" "client"]})

(defproject simple "lein-git-inject/version"

  :dependencies [[org.clojure/clojure       "1.10.1"]
                 [org.clojure/clojurescript "1.10.520"
                  :exclusions [com.google.javascript/closure-compiler-unshaded
                               org.clojure/google-closure-library
                               org.clojure/google-closure-library-third-party]]
                 [thheller/shadow-cljs      "2.8.69"]
                 [reagent                   "0.9.0-rc2"]
                 [re-frame                  "0.11.0-rc2"]]

  :plugins      [[day8/lein-git-inject "0.0.2"]
                 [lein-shadow          "0.1.6"]]

  :middleware   [leiningen.git-inject/middleware]

  :clean-targets ^{:protect false} [:target-path
                                    "shadow-cljs.edn"
                                    "package.json"
                                    "package-lock.json"
                                    "resources/public/js"]

  :shadow-cljs {:nrepl  {:port 8777}

                :builds {:client {:target     :browser
                                  :output-dir "resources/public/js"
                                  :modules    {:client {:init-fn simple.core/run}}
                                  :devtools   {:http-root "resources/public"
                                               :http-port 8280}}}}

  :aliases {"dev-auto" ["shadow" "watch" "client"]})

Add simple example org.clojure/google-closure-library-third-party exclusion


(ns nth-prime)

(defn sqrt
  "Wrapper around java's sqrt method."
  [number]
  (int (Math/ceil (Math/sqrt number))))

(defn divides?
  "Helper function to decide if a number is evenly divided by divisor."
  [number divisor]
  (zero? (mod number divisor)))

(defn- prime-by-trial-division?
  "Simple trial division prime check."
  [number]
  (empty? (for [n (range 3 (inc (sqrt number)) 2) :when (divides? number n)] n)))

(defn prime? [number]
  (cond
    (= 2 number) true
    (even? number) false
    :else (prime-by-trial-division? number)))

(defn next-prime [start]
  (loop [n (inc start)]
    (if (prime? n)
      n
      (recur (inc n)))))

(def primes (iterate next-prime 1))

(defn nth-prime [index]
  (when (not (pos? index))
    (throw (IllegalArgumentException. "nth-prime expects a positive integer for an argument")))
  (nth primes index))

(ns nth-prime)

(defn sqrt
  "Wrapper around java's sqrt method."
  [number]
  (int (Math/ceil (Math/sqrt number))))

(defn divides?
  "Helper function to decide if a number is evenly divided by divisor."
  [number divisor]
  (zero? (mod number divisor)))

(defn- prime-by-trial-division?
  "Simple trial division prime check."
  [number]
  (empty? (for [n (range 3 (inc (sqrt number)) 2) :when (divides? number n)] n)))

(defn prime? [number]
  (or (= 2 number)
      (and (odd? number) (prime-by-trial-division? number))))

(defn next-prime [start]
  (loop [n (inc start)]
    (if (prime? n)
      n
      (recur (inc n)))))

(def primes (iterate next-prime 1))

(defn nth-prime [index]
  (when-not (pos? index)
    (throw (IllegalArgumentException. "nth-prime expects a positive integer for an argument")))
  (nth primes index))

Update nth-prime in response to PR feedback

Replace `(when (not` with `when-not`, update `cond` to instead use `or`.


(ns desdemona.lifecycles.logging
  (:require [taoensso.timbre :refer [info]]))

  (let [task-name (:onyx/name (:onyx.core/task-map event))]
    (doseq [m (map :message (mapcat :leaves (:tree (:onyx.core/results event))))]
(defn log-batch
  [event lifecycle]
      (info task-name "logging segment:" m)))
  {})

(def log-calls
  {:lifecycle/after-batch log-batch})

(defn add-logging
  "Adds logging output to a task's output-batch."
  [job task]
  (if-let [entry (first (filter #(= (:onyx/name %) task) (:catalog job)))]
    (update-in
     job
     [:lifecycles]
     conj
     {:lifecycle/task task
      :lifecycle/calls ::log-calls})))

(ns desdemona.lifecycles.logging
  (:require [taoensso.timbre :refer [info]]))

(defn log-batch
  [event lifecycle]
  (let [task-name (-> event
                      :onyx.core/task-map
                      :onyx/name)]
    (doseq [m (->> event
                   :onyx.core/results
                   :tree
                   (mapcat :leaves)
                   (map :message))]
      (info task-name "logging segment:" m)))
  {})

(def log-calls
  {:lifecycle/after-batch log-batch})

(defn add-logging
  "Adds logging output to a task's output-batch."
  [job task]
  (if-let [entry (first (filter #(= (:onyx/name %) task) (:catalog job)))]
    (update-in
     job
     [:lifecycles]
     conj
     {:lifecycle/task task
      :lifecycle/calls ::log-calls})))

Use ->(>) for the impl

Use ->(>) for the impl


(ns comic-reader.history
  (:require [re-frame.core :as rf]
            [secretary.core :refer [dispatch!]]
            [goog.events :as events]
            [goog.history.EventType :as EventType])
  (:import goog.history.Html5History))

(defonce goog-history (atom nil))

(defn hook-browser-navigation! []
  (when (nil? @goog-history)
    (let [hist (Html5History. false
                         "/blank"
                         (.getElementById js/document
                                          "history_state"))]
      (reset! goog-history hist)
      (events/listen hist
          EventType/NAVIGATE
        (fn [event]
          (dispatch! (.-token event))))
      (doto hist
        (.setEnabled true)))))

(defn set-token [token]
  (.setToken @goog-history (str token)))

(ns comic-reader.history
  (:require [re-frame.core :as rf]
            [secretary.core :refer [dispatch!]]
            [goog.events :as events]
            [goog.history.EventType :as EventType])
  (:import goog.history.Html5History))

(defonce goog-history (atom nil))

(defn hook-browser-navigation! []
  (when (nil? @goog-history)
    (let [hist (Html5History. false
                         "/blank"
                         (.getElementById js/document
                                          "history_state"))]
      (reset! goog-history hist)
      (events/listen hist
          EventType/NAVIGATE
        (fn [event]
          (dispatch! (.-token event))))
      (doto hist
        (.setEnabled true)))))

(defn get-token []
  (when-let [h @goog-history]
    (.getToken h)))

(defn set-token [token]
  (when-let [h @goog-history]
    (.setToken h (str token))))

Add get-token and protect both token manipulators


(set-env!
  :resource-paths #{"resources"}
  :dependencies '[[org.clojure/clojure "1.8.0"]
                  [afrey/boot-asset-fingerprint "1.3.1"]
                  [tailrecursion/boot-jetty "0.1.3" :scope "test"]])

(require
  '[afrey.boot-asset-fingerprint :refer [asset-fingerprint]]
  '[tailrecursion.boot-jetty :as jetty])

(deftask dev []
  (comp
    (watch)
    (asset-fingerprint :extensions [".css" ".html"])
    (jetty/serve :port 5000)
    (target)))

(set-env!
  :resource-paths #{"resources"}
  :dependencies '[[org.clojure/clojure "1.8.0"]
                  [afrey/boot-asset-fingerprint "1.3.1"]
                  [tailrecursion/boot-jetty "0.1.3" :scope "test"]])

(require
  '[afrey.boot-asset-fingerprint :refer [asset-fingerprint]]
  '[tailrecursion.boot-jetty :as jetty])

(deftask dev
  [s skip bool]
  (comp
    (watch)
    (asset-fingerprint :extensions [".css" ".html"] :skip skip)
    (jetty/serve :port 5000)
    (target)))

Add skip option to example dev

Add skip option to example dev

for testing


(ns onyx.types)

(defrecord Leaf [message id acker-id completion-id ack-val hash-group route])

(defrecord Route [flow exclusions post-transformation action])

(defrecord Ack [id completion-id ack-val timestamp])

(defrecord Results [tree acks segments])

(defrecord Result [root leaves])

(defrecord Link [link timestamp])

(ns onyx.types)

(defrecord Leaf [message id acker-id completion-id ack-val hash-group route])

(defn input [id message]
  (->Leaf message id nil nil nil nil nil))

(defrecord Route [flow exclusions post-transformation action])

(defrecord Ack [id completion-id ack-val timestamp])

(defrecord Results [tree acks segments])

(defrecord Result [root leaves])

(defrecord Link [link timestamp])

Add input builder fn for use by plugins

Add input builder fn for use by plugins


(ns lazytest.find
  (:use lazytest.suite))

(defn- find-tests-for-var [this-var]
  (if-let [f (:find-tests (meta this-var))]
    (do (assert (fn? f)) (f))
    (when (bound? this-var)
      (let [value (var-get this-var)]
	(when (suite? value)
	  value)))))

(defn- test-seq-for-ns [this-ns]
  (vary-meta (remove nil? (map find-tests-for-var (vals (ns-interns this-ns))))
	     assoc :name (ns-name this-ns)))

(defn- find-tests-in-namespace [this-ns]
  (when-not (= (the-ns 'clojure.core) this-ns)
    (if-let [f (:find-tests (meta this-ns))]
      (do (assert (fn? f)) (f))
      (when-let [s (test-seq-for-ns this-ns)]
	(suite (fn [] (test-seq s)))))))

(defn find-tests [x]
  "Returns a seq of runnable tests. Processes the :focus metadata flag.
 Recurses on all Vars in a namespace, unless that namespace
 has :find-tests metadata."
  (cond (symbol? x)
	  (find-tests (the-ns x))
	(instance? clojure.lang.Namespace x)
	  (find-tests-in-namespace x)
	(var? x)
	  (find-tests-for-var x)
        :else nil))

(ns lazytest.find
  (:use lazytest.suite))

(defn- find-tests-for-var [this-var]
  (if-let [f (:find-tests (meta this-var))]
    (do (assert (fn? f)) (f))
    (when (bound? this-var)
      (let [value (var-get this-var)]
	(when (suite? value)
	  value)))))

(defn- test-seq-for-ns [this-ns]
  (let [s (remove nil? (map find-tests-for-var (vals (ns-interns this-ns))))]
    (when (seq s)
      (vary-meta s assoc :name (ns-name this-ns)))))

(defn- find-tests-in-namespace [this-ns]
  (when-not (= (the-ns 'clojure.core) this-ns)
    (if-let [f (:find-tests (meta this-ns))]
      (do (assert (fn? f)) (f))
      (when-let [s (test-seq-for-ns this-ns)]
	(suite (fn [] (test-seq s)))))))

(defn find-tests [x]
  "Returns a seq of runnable tests. Processes the :focus metadata flag.
 Recurses on all Vars in a namespace, unless that namespace
 has :find-tests metadata."
  (cond (symbol? x)
	  (find-tests (the-ns x))
	(instance? clojure.lang.Namespace x)
	  (find-tests-in-namespace x)
	(var? x)
	  (find-tests-for-var x)
        :else nil))

Return nil instead of empty sequence from test-seq-for-ns


(ns cmr.graph.rest.response
  (:require
   [cheshire.core :as json]
   [ring.util.http-response :as response]
   [taoensso.timbre :as log]))

(defn ok
  [_request & args]
  (response/ok args))

(defn json
  [_request data]
  (-> data
      json/generate-string
      response/ok
      (response/content-type "application/json")))

(defn text
  [_request data]
  (-> data
      response/ok
      (response/content-type "text/plain")))

(defn not-found
  [_request]
  (response/content-type
   (response/not-found "Not Found")
   "plain/text"))

(defn cors
  [request response]
  (case (:request-method request)
    :options (-> response
                 (response/content-type "text/plain; charset=utf-8")
                 (response/header "Access-Control-Allow-Origin" "*")
                 (response/header "Access-Control-Allow-Methods" "POST, PUT, GET, DELETE, OPTIONS")
                 (response/header "Access-Control-Allow-Headers" "Content-Type")
                 (response/header "Access-Control-Max-Age" "2592000"))
    :get (response/header response "Access-Control-Allow-Origin" "*")
    response))

(ns cmr.graph.rest.response
  (:require
   [cheshire.core :as json]
   [ring.util.http-response :as response]
   [taoensso.timbre :as log]))

(defn ok
  [_request & args]
  (response/ok args))

(defn json
  [_request data]
  (-> data
      json/generate-string
      response/ok
      (response/content-type "application/json")))

(defn text
  [_request data]
  (-> data
      response/ok
      (response/content-type "text/plain")))

(defn not-found
  [_request]
  (response/content-type
   (response/not-found "Not Found")
   "plain/text"))

(defn cors
  [request response]
  (case (:request-method request)
    :options (-> response
                 (response/content-type "text/plain; charset=utf-8")
                 (response/header "Access-Control-Allow-Origin" "*")
                 (response/header "Access-Control-Allow-Methods" "POST, PUT, GET, DELETE, OPTIONS")
                 (response/header "Access-Control-Allow-Headers" "Content-Type")
                 (response/header "Access-Control-Max-Age" "2592000"))
    :get (response/header response "Access-Control-Allow-Origin" "*")
    :post (response/header response "Access-Control-Allow-Origin" "*")
    response))

Set CORS header on POSTs

Set CORS header on POSTs


(ns circle.Init ;; capitalized for JRuby
  ;; (:require circle.swank)
  (:require circle.db)
  (:require circle.web)
  (:require circle.repl)
  (:require circle.logging)
  ;; (:require circle.backend.nodes
  ;;           circle.backend.project.rails
  ;;           circle.backend.project.circle)
  (:gen-class :name circle.Init :main true)
  )

(def init*
  (delay
   (try
     (circle.logging/init)
     ;; workaround for Heroku not liking us starting up swank
     (when (System/getenv "SWANK")
       (require 'circle.swank)
       (.invoke (ns-resolve 'circle.swank 'init)))
     (circle.db/init)
     (circle.web/init)
     (circle.repl/init)
     (println (java.util.Date.))
     true
     (catch Exception e
       (println "caught exception on startup:")
       (.printStackTrace e)
       (println "exiting")
       (System/exit 1)))))

(defn init
  "Start everything up. idempotent."
  []
  @init*)

(defn -main []
  (init))

(ns circle.Init ;; capitalized for JRuby
  ;; (:require circle.swank)
  (:require circle.db)
  (:require circle.web)
  (:require circle.repl)
  (:require circle.logging)
  ;; (:require circle.backend.nodes
  ;;           circle.backend.project.rails
  ;;           circle.backend.project.circle)
  (:gen-class :name circle.Init)
  )

(def init*
  (delay
   (try
     (circle.logging/init)
     ;; workaround for Heroku not liking us starting up swank
     (when (System/getenv "SWANK")
       (require 'circle.swank)
       (.invoke (ns-resolve 'circle.swank 'init)))
     (circle.db/init)
     (circle.web/init)
     (circle.repl/init)
     (println (java.util.Date.))
     true
     (catch Exception e
       (println "caught exception on startup:")
       (.printStackTrace e)
       (println "exiting")
       (System/exit 1)))))

(defn init
  "Start everything up. idempotent."
  []
  @init*)

(defn -main []
  (init))

Make uberjar work at the command line with the name circle.Init.


(defproject guangyin/guangyin "0.1.1-SNAPSHOT"
  :description "Clojure date and time library wrapping java.time"
  :url "https://github.com/juhovh/guangyin"
  :license {:name "MIT License"
            :url "http://opensource.org/licenses/MIT"
            :distribution :repo}
  :dependencies [[org.clojure/clojure "1.6.0"]]
  :min-lein-version "2.0.0"
  :source-paths ["src/clj"]
  :java-source-paths ["src/java"]
  :profiles {:dev {:plugins [[codox "0.8.11"]
                             [lein-cloverage "1.0.2"]]
                   :codox {:include [guangyin.core guangyin.format]}}})

(defproject guangyin/guangyin "0.1.1-SNAPSHOT"
  :description "Clojure date and time library wrapping java.time"
  :url "https://github.com/juhovh/guangyin"
  :license {:name "MIT License"
            :url "http://opensource.org/licenses/MIT"
            :distribution :repo}
  :dependencies [[org.clojure/clojure "1.6.0"]]
  :min-lein-version "2.0.0"
  :source-paths ["src/clj"]
  :java-source-paths ["src/java"]
  :javac-options ["-target" "1.8" "-source" "1.8"]
  :profiles {:dev {:plugins [[codox "0.8.11"]
                             [lein-cloverage "1.0.2"]]
                   :codox {:include [guangyin.core guangyin.format]}}})

Update source and target javac properties to 1.8.


(defproject breeze-quiescent "0.1.1-SNAPSHOT"
  :description "A minimal, functional ClojureScript wrapper for ReactJS"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [org.clojure/clojurescript "0.0-2173" :scope "provided"]
                 [com.facebook/react "0.9.0"]]
  :source-paths ["src"]

  ;; development concerns
  :profiles {:dev {:source-paths ["src" "examples/src"]
                   :resource-paths ["examples/resources"]
                   :plugins [[lein-cljsbuild "1.0.1"]]
                   :cljsbuild
                   {:builds
                    [{:source-paths ["src" "examples/src"]
                      :compiler
                      {:output-to "examples/resources/public/main.js"
                       :output-dir "examples/resources/public/build"
                       :optimizations :whitespace
                       :preamble ["react/react.min.js"]
                       :externs ["react/externs/react.js"]
                       :pretty-print true
                       :source-map
                       "examples/resources/public/main.js.map"
                       :closure-warnings {:non-standard-jsdoc :off}}}]}}})

(defproject breeze-quiescent "0.1.1-SNAPSHOT"
  :description "A minimal, functional ClojureScript wrapper for ReactJS"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [org.clojure/clojurescript "0.0-2173" :scope "provided"]
                 [com.facebook/react "0.9.0.1"]]
  :source-paths ["src"]

  ;; development concerns
  :profiles {:dev {:source-paths ["src" "examples/src"]
                   :resource-paths ["examples/resources"]
                   :plugins [[lein-cljsbuild "1.0.1"]]
                   :cljsbuild
                   {:builds
                    [{:source-paths ["src" "examples/src"]
                      :compiler
                      {:output-to "examples/resources/public/main.js"
                       :output-dir "examples/resources/public/build"
                       :optimizations :whitespace
                       :preamble ["react/react.min.js"]
                       :externs ["react/externs/react.js"]
                       :pretty-print true
                       :source-map
                       "examples/resources/public/main.js.map"
                       :closure-warnings {:non-standard-jsdoc :off}}}]}}})

Increase react version to 0.9.0.1 to fix missing article and aside externs.


(defproject statuses "1.0.0-SNAPSHOT"
  :description "Statuses app for innoQ"
  :url "https://github.com/innoq/statuses"
  :license {:name "Apache License, Version 2.0"
            :url "http://www.apache.org/licenses/LICENSE-2.0"
            :distribution :repo
            :comments "A business-friendly OSS license"}
  :dependencies [[org.clojure/clojure "1.6.0"]
                 [ring "1.3.2"]
                 [compojure "1.3.1"]
                 [clj-time "0.8.0"]
                 [org.clojure/data.json "0.2.5"]]
  :pedantic? :abort
  :plugins [[jonase/eastwood "0.2.0"]]
  :profiles {:dev {:dependencies [[ring-mock "0.1.5"]]}
             :uberjar {:aot [statuses.server]}}
  :main statuses.server
  :aliases {"lint" "eastwood"}
  :eastwood {:exclude-linters [:constant-test]})

(defproject statuses "1.0.0-SNAPSHOT"
  :description "Statuses app for innoQ"
  :url "https://github.com/innoq/statuses"
  :license {:name "Apache License, Version 2.0"
            :url "http://www.apache.org/licenses/LICENSE-2.0"
            :distribution :repo
            :comments "A business-friendly OSS license"}
  :dependencies [[org.clojure/clojure "1.6.0"]
                 [ring "1.3.2"]
                 [compojure "1.3.1"]
                 [clj-time "0.9.0"]
                 [org.clojure/data.json "0.2.5"]]
  :pedantic? :abort
  :plugins [[jonase/eastwood "0.2.0"]]
  :profiles {:dev {:dependencies [[ring-mock "0.1.5"]]}
             :uberjar {:aot [statuses.server]}}
  :main statuses.server
  :aliases {"lint" "eastwood"}
  :eastwood {:exclude-linters [:constant-test]})

Update clj-time from 0.8.0 to 0.9.0.

Update clj-time from 0.8.0 to 0.9.0.

Keep up to date with all dependencies.


(defproject cljs-workspace "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}

  :plugins [[lein-cljsbuild "1.0.4-SNAPSHOT"]]

  :source-paths ["src/clj", "src/cljs"]

  :dependencies [[org.clojure/clojure "1.6.0"]
                 [org.clojure/clojurescript "0.0-2760"]
                 [http-kit "2.1.16"]
                 [compojure "1.1.5"]
                 [ring "1.3.1"]
				         [fogus/ring-edn "0.2.0"]
                 [om "0.8.0-rc1"]
                 [org.clojure/core.async "0.1.303.0-886421-alpha"]
                 [cljs-tooling "0.1.3"]]

  :cljsbuild {:builds [{:id "om-test"
                        :source-paths ["src/cljs"]
                        :compiler {
                                   :main main.core
                                   :output-to "resources/public/js/om-test.js"
                                   :output-dir "resources/public/js/"
                                   :optimizations :none
                                   :source-map "resources/public/js/om-test.js.map"}}]})

(defproject cljs-workspace "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}

  :plugins [[lein-cljsbuild "1.0.4-SNAPSHOT"]]

  :source-paths ["src/clj", "src/cljs"]

  :dependencies [[org.clojure/clojure "1.6.0"]
                 [org.clojure/clojurescript "0.0-2760"]
                 [org.rksm/cloxp-com "0.1.3"]
                 [http-kit "2.1.19"]
                 [compojure/compojure "1.3.2"]
                 [ring "1.3.1"]
				         [fogus/ring-edn "0.2.0"]
                 [om "0.8.0-rc1"]
                 [org.clojure/core.async "0.1.303.0-886421-alpha"]
                 [cljs-tooling "0.1.3"]]

  :cljsbuild {:builds [{:id "om-test"
                        :source-paths ["src/cljs"]
                        :compiler {
                                   :main main.core
                                   :output-to "resources/public/js/om-test.js"
                                   :output-dir "resources/public/js/"
                                   :optimizations :none
                                   :source-map "resources/public/js/om-test.js.map"}}]})

Update deps for cloxp cljs integration

Update deps for cloxp cljs integration