Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Add method for running server. | (ns quil-site.core
(:require [compojure.core :refer [defroutes GET]]
[compojure.handler :refer [site]]
[compojure.route :refer [files]]
[ring.middleware.json :as json]
[ring.adapter.jetty :refer [run-jetty]]
[ring.middleware.stacktrace :as stacktrace]
... | (ns quil-site.core
(:require [compojure.core :refer [defroutes GET]]
[compojure.handler :refer [site]]
[compojure.route :refer [files]]
[ring.middleware.json :as json]
[ring.adapter.jetty :refer [run-jetty]]
[ring.middleware.stacktrace :as stacktrace]
... |
Make leaving the search page clear the search bar | (ns braid.search.ui.search-bar
(:require
[reagent.core :as r]
[re-frame.core :refer [subscribe dispatch]]
[braid.core.client.routes :as routes]
[braid.lib.color :as color]))
(defn search-bar-view
[]
(r/with-let [search-query (r/atom @(subscribe [:braid.search/query]))]
[:div.search-bar
[:inp... | (ns braid.search.ui.search-bar
(:require
[reagent.core :as r]
[re-frame.core :refer [subscribe dispatch]]
[braid.core.client.routes :as routes]
[braid.lib.color :as color]))
(defn search-bar-view
[]
(r/with-let [search-query (r/atom @(subscribe [:braid.search/query]))
prev-page (r/atom... |
Add name of fn which was automatically tested | (ns discuss.test.lib
(:require [cljs.pprint :as pprint]
[cljs.test :refer-macros [is]]))
(defn- summarize-results' [spec-check]
(doall (map #(-> % :clojure.test.check/ret pprint/pprint) spec-check)))
(defn check' [spec-check]
(summarize-results' spec-check)
(is (nil? (-> spec-check first :failure)... | (ns discuss.test.lib
(:require [cljs.pprint :as pprint]
[cljs.test :refer-macros [is]]))
(defn- summarize-results' [spec-check]
(doall (map #(-> %
(select-keys [:clojure.test.check/ret :sym])
vals
pprint/pprint) spec-check)))
(defn check' [spec-... |
Fix accidental rename of environment variable | (ns rill.event-store.psql-test
(:require [rill.event-store.psql :refer [psql-event-store]]
[rill.event-store.psql.tools :as tools]
[rill.event-store.generic-test-base :refer [test-store]]
[clojure.test :refer :all]))
(def config {:user (System/getenv "RILL_POSTGRES_USER")
... | (ns rill.event-store.psql-test
(:require [rill.event-store.psql :refer [psql-event-store]]
[rill.event-store.psql.tools :as tools]
[rill.event-store.generic-test-base :refer [test-store]]
[clojure.test :refer :all]))
(def config {:user (System/getenv "RILL_POSTGRES_USER")
... |
Add first test for fake transactor creation process. | (ns continuo.postgresql-spec
(:require [clojure.test :as t]
[continuo.postgresql.schema :as schema]))
(t/deftest schema-internal-tests
(let [schema [[:db/add :user/username {:type :continuo/string}]
[:db/add :user/fullname {:type :continuo/string}]
[:db/drop :user/name]]... | (ns continuo.postgresql-spec
(:require [clojure.test :as t]
[suricatta.core :as sc]
[continuo.core :as co]
[continuo.impl :as impl]
[continuo.executor :as exec]
[continuo.postgresql.connection :as conn]
[continuo.postgresql.schema :as schema])
... |
Test subselects with named parameters. | (ns fhofherr.clj-db-util.jdbc-template-test
(:require [clojure.test :refer :all]
[fhofherr.clj-db-util.support.test-db :as test-db]
[fhofherr.clj-db-util.jdbc-template :as t]
[fhofherr.clj-db-util.dialect :refer [h2]]))
(deftest named-parameters
(let [stmt "SELECT 1 AS result F... | (ns fhofherr.clj-db-util.jdbc-template-test
(:require [clojure.test :refer :all]
[fhofherr.clj-db-util.support.test-db :as test-db]
[fhofherr.clj-db-util.jdbc-template :as t]
[fhofherr.clj-db-util.dialect :refer [h2]]))
(deftest named-parameters
(testing "simple statements"
... |
Update tests to reflect master problem spec | (ns pangram-test
(:require [clojure.test :refer [is deftest]]
[pangram :refer [pangram?]]))
(deftest empty-sentence
(is (false? (pangram? ""))))
(deftest lowercase-pangram
(is (pangram? "the quick brown fox jumps over the lazy dog")))
(deftest missing-character-x
(is
(false?
(pangram? "a q... | (ns pangram-test
(:require [clojure.test :refer [is deftest]]
[pangram :refer [pangram?]]))
(deftest empty-sentence
(is (false? (pangram? ""))))
(deftest lowercase-pangram
(is (pangram? "the quick brown fox jumps over the lazy dog")))
(deftest missing-character-x
(is
(false?
(pangram? "a q... |
Add quote marks to log message. | (ns dragon.generator
(:require [dragon.config :as config]
[dragon.web :as web]
[stasis.core :as stasis]
[taoensso.timbre :as log]))
(defn run
[routes out-dir]
(log/infof "Generating static content to %s ..." out-dir)
(stasis/export-pages routes out-dir)
(log/info "Static g... | (ns dragon.generator
(:require [dragon.config :as config]
[dragon.web :as web]
[stasis.core :as stasis]
[taoensso.timbre :as log]))
(defn run
[routes out-dir]
(log/infof "Generating static content to '%s' ..." out-dir)
(stasis/export-pages routes out-dir)
(log/info "Static... |
Move playlist in state atom | (ns airhead-cljs.core
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [reagent.core :as r]
[ajax.core :refer [GET POST]]))
(def state (r/atom {:server "http://localhost:8080"}))
(defn change-server! [event]
(swap! state
assoc :server
(-> event .-target .-value)))
... | (ns airhead-cljs.core
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [reagent.core :as r]
[ajax.core :refer [GET POST]]))
(def state (r/atom {:server "http://localhost:8080"
:playlist []}))
(defn update-state! [k value]
(swap! state assoc k value))
;; ---------... |
Use a more visually pleasing starting melody. | (ns leipzig-live.core
(:require
[leipzig-live.processing] ; Import action defs.
[leipzig-live.eval :as eval]
[leipzig-live.views :as view]
[leipzig-live.framework :as framework]
[reagent.core :as reagent]))
(def initial-text
"(->> (phrase [1 1 1 1] [0 1 2 0])
(where :time (bpm 90))
... | (ns leipzig-live.core
(:require
[leipzig-live.processing] ; Import action defs.
[leipzig-live.eval :as eval]
[leipzig-live.views :as view]
[leipzig-live.framework :as framework]
[reagent.core :as reagent]))
(def initial-text
"(->> (phrase [1 1/2 1/2 1 1 2 2] [0 1 0 2 -3 -10 -10])
(where :t... |
Add pomegranate to global dependencies | {:user {:dependencies [[org.clojure/tools.namespace "0.3.0-alpha4"]
[eftest "0.5.2"]]
:repl-options {:color false}
:plugins [[lein-cljfmt "0.4.1" :exclusions [org.clojure/clojure]]
[lein-cloverage "1.0.6" :exclusions [org.clojure/clojure]]
[lein... | {:user {:dependencies [[org.clojure/tools.namespace "0.3.0-alpha4"]
[com.cemerick/pomegranate "1.0.0"]
[eftest "0.5.2"]]
:repl-options {:color false}
:plugins [[lein-cljfmt "0.4.1" :exclusions [org.clojure/clojure]]
[lein-cloverage "1.0.6" ... |
Load repl namespace when running on 1.3 | ;-
; Copyright 2011 (c) Meikel Brandmeyer.
; All rights reserved.
;
; Permission is hereby granted, free of charge, to any person obtaining a copy
; of this software and associated documentation files (the "Software"), to deal
; in the Software without restriction, including without limitation the rights
; to use, copy... | ;-
; Copyright 2011 (c) Meikel Brandmeyer.
; All rights reserved.
;
; Permission is hereby granted, free of charge, to any person obtaining a copy
; of this software and associated documentation files (the "Software"), to deal
; in the Software without restriction, including without limitation the rights
; to use, copy... |
Change map-hash from macro to fn | (ns clojure.lang.apersistent-map
(:refer-clojure :only [bit-and defmacro defn let loop +])
(:require [clojure.lang.counted :refer [count]]
[clojure.lang.hash :refer [hash]]
[clojure.lang.lookup :refer [contains? get]]
[clojure.lang.map-entry :refer [key val]]
... | (ns clojure.lang.apersistent-map
(:refer-clojure :only [bit-and defmacro defn let loop +])
(:require [clojure.lang.counted :refer [count]]
[clojure.lang.hash :refer [hash]]
[clojure.lang.lookup :refer [contains? get]]
[clojure.lang.map-entry :refer [key val]]
... |
Clean up with comments, semantic fix | ; https://projecteuler.net/problem=3
(ns euler.003
(:require [clojure.math.numeric-tower :as math]))
(defmulti prime?
"Returns true if a number is divisible by only 1 and itself, false otherwise."
(fn [n] (cond
(> 2 n) :not
(= 2 n) :is)))
(defmethod prime? :not [_] false)
(defmethod pr... | ; https://projecteuler.net/problem=3
(ns euler.003
(:require [clojure.math.numeric-tower :as math]))
(defmulti prime?
"Returns true if a number is divisible by only 1 and itself, false otherwise."
(fn [n] (cond
(> 2 n) :not
(= 2 n) :is)))
(defmethod prime? :not [_] false)
(defmethod pr... |
Add route for getting card info | (ns decktouch.handler
(:require [decktouch.dev :refer [browser-repl start-figwheel]]
[compojure.core :refer [GET defroutes]]
[compojure.route :refer [not-found resources]]
[ring.middleware.defaults :refer [site-defaults wrap-defaults]]
[selmer.parser :refer [render-file... | (ns decktouch.handler
(:require [decktouch.dev :refer [browser-repl start-figwheel]]
[compojure.core :refer [GET POST defroutes]]
[compojure.route :refer [not-found resources]]
[ring.middleware.defaults :refer [site-defaults wrap-defaults]]
[ring.middleware.params :refe... |
Revert "Adding failing test to test ci." | (ns cmr.common.test.util
(:require [clojure.test :refer :all]
[cmr.common.util :as util]))
(deftest test-sequence->fn
(testing "vector of values"
(let [f (util/sequence->fn [1 2 3])]
(is (= 1 (f)))
(is (= 2 (f)))
(is (= 3 (f)))
(is (= nil (f)))
(is (= nil (f)))))
(te... | (ns cmr.common.test.util
(:require [clojure.test :refer :all]
[cmr.common.util :as util]))
(deftest test-sequence->fn
(testing "vector of values"
(let [f (util/sequence->fn [1 2 3])]
(is (= 1 (f)))
(is (= 2 (f)))
(is (= 3 (f)))
(is (= nil (f)))
(is (= nil (f)))))
(te... |
Add test that prints example.com site to PDF | (ns clj-chrome-devtools.automation-test
(:require [clj-chrome-devtools.automation :as a]
[clj-chrome-devtools.automation.fixture :refer [create-chrome-fixture]]
[clojure.spec.test.alpha :as stest]
[clojure.test :as t :refer [deftest is testing]]))
(stest/instrument)
(defonce chro... | (ns clj-chrome-devtools.automation-test
(:require [clj-chrome-devtools.automation :as a]
[clj-chrome-devtools.automation.fixture :refer [create-chrome-fixture]]
[clojure.spec.test.alpha :as stest]
[clojure.test :as t :refer [deftest is testing]]
[clojure.string :as str]... |
Add a test cleanup util | (ns doctopus.test-utilities
(:require [clojure.test :refer :all]
[doctopus.test-utilities :refer :all])
(:import [org.joda.time DateTime]
[org.joda.time.format DateTimeFormat]))
(def iso-formatter (DateTimeFormat/forPattern "yyyy-MM-dd"))
(defn make-today
[]
(let [today (DateTime.)]
... | (ns doctopus.test-utilities
(:require [clojure.test :refer :all]
[doctopus.storage :refer [remove-from-storage backend]]
[doctopus.test-utilities :refer :all])
(:import [org.joda.time DateTime]
[org.joda.time.format DateTimeFormat]))
(def iso-formatter (DateTimeFormat/forPattern ... |
Improve algorithm, it was swapping too many times | (defn swap [a i j]
(assoc a j (a i) i (a j)))
(defn generatePermutations [v n]
(if (zero? n)
(println (apply str v))
(loop [i 0 a v]
(if (<= i n)
(do
(generatePermutations a (dec n))
(recur (inc i) (swap a (if (even? n) i 0) n)))))))
(if (not= (count *command-line-args*)... | (defn swap [a i j]
(assoc a j (a i) i (a j)))
(defn generatePermutations [v n]
(if (zero? n)
(println (apply str v))
(loop [i 0 a v]
(if (< i n)
(do
(generatePermutations a (dec n))
(recur (inc i) (swap a (if (even? n) i 0) n)))
(generatePermutations a (dec n)))))... |
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.9.7.0-alpha7"
: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"
... | (defproject onyx-app/lein-template "0.9.7.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"
... |
Remove attachment header from invoice response | (ns time-tracker.invoices.handlers
(:require [ring.util.response :as res]
[time-tracker.users.db :as users-db]
[time-tracker.projects.db :as projects-db]
[time-tracker.timers.db :as timers-db]
[time-tracker.invoices.core :as invoices-core]
[time-tracker.util... | (ns time-tracker.invoices.handlers
(:require [ring.util.response :as res]
[time-tracker.users.db :as users-db]
[time-tracker.projects.db :as projects-db]
[time-tracker.timers.db :as timers-db]
[time-tracker.invoices.core :as invoices-core]
[time-tracker.util... |
Add missing parameter to default impl of services. | ;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) 2016 Andrey Antukh <niwi@niwi.nz>
(ns uxbox.services.core
(:require [clojure.walk :as walk]
... | ;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) 2016 Andrey Antukh <niwi@niwi.nz>
(ns uxbox.services.core
(:require [clojure.walk :as walk]
... |
Move the scrabble exercise under a namespace. | (ns scrabble.test (:require [clojure.test :refer :all]))
(load-file "scrabble.clj")
(deftest lower-case-letter
(is (= 1 (score-letter "a"))))
(deftest upper-case-letter
(is (= 1 (score-letter "A"))))
(deftest two-letter-word
(is (= 2 (score-word "at"))))
(deftest bigger-word-1
(is (= 6 (score-word "street"))))... | (ns scrabble.test (:require [clojure.test :refer :all]))
(load-file "scrabble.clj")
(deftest lower-case-letter
(is (= 1 (scrabble/score-letter "a"))))
(deftest upper-case-letter
(is (= 1 (scrabble/score-letter "A"))))
(deftest two-letter-word
(is (= 2 (scrabble/score-word "at"))))
(deftest bigger-word-1
(is (=... |
Upgrade `cider-nrepl` to just-released "0.8.0" | {:user {:plugins [[lein-try "0.4.1"]
[lein-pprint "1.1.1"]
[cider/cider-nrepl "0.7.0"]]}}
| {:user {:plugins [[lein-try "0.4.1"]
[lein-pprint "1.1.1"]
[cider/cider-nrepl "0.8.0"]]}}
|
Add recursive test for the visitor | (ns spec-tools.visitor-test
(:require [clojure.test :refer [deftest is]]
[clojure.spec :as s]
[spec-tools.visitor :refer [visit]]
[clojure.set :as set]))
(s/def ::str string?)
(s/def ::int integer?)
(s/def ::map (s/keys :req [::str] :opt [::int]))
(defn collect [dispatch spec chi... | (ns spec-tools.visitor-test
(:require [clojure.test :refer [deftest is]]
[clojure.spec :as s]
[spec-tools.visitor :refer [visit]]))
(s/def ::str string?)
(s/def ::int integer?)
(s/def ::map (s/keys :req [::str] :opt [::int]))
(defn collect [dispatch spec children] `[~dispatch ~@children])
(... |
Add back heroku profile with mirrors. | {:user {:mirrors {#"central|clojars"
"http://s3pository.herokuapp.com/clojure"}}
:production {:mirrors {#"central|clojars"
"http://s3pository.herokuapp.com/clojure"}}} | {:user {:mirrors {#"central|clojars"
"http://s3pository.herokuapp.com/clojure"}}
:production {:mirrors {#"central|clojars"
"http://s3pository.herokuapp.com/clojure"}}
:heroku {:mirrors {#"central|clojars"
"http://s3pository.herokuapp.com/clojure"}}} |
Fix tests on Travis CI. | {:shared {:clean-targets ["out" :target-path]
:test-paths ["test/cljs"]
:resources-paths ["dev-resources"]
:dependencies [[com.cemerick/double-check "0.5.7-SNAPSHOT"]]
:plugins [[com.cemerick/clojurescript.test "0.3.1-SNAPSHOT"]]
:cljsbuild
{:builds
... | {:shared {:clean-targets ["out" :target-path]
:test-paths ["test/cljs"]
:resources-paths ["dev-resources"]
:dependencies [[com.cemerick/double-check "0.5.7-SNAPSHOT"]]
:plugins [[com.cemerick/clojurescript.test "0.3.1-SNAPSHOT"]]
:cljsbuild
{:builds
... |
Prepare for next release cycle. | (defproject org.onyxplatform/onyx-datomic "0.10.0.0-beta2"
:description "Onyx plugin for Datomic"
:url "https://github.com/onyx-platform/onyx-datomic"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:repositories {"snapshots" {:url "https://clojars.org/repo... | (defproject org.onyxplatform/onyx-datomic "0.10.0.0-SNAPSHOT"
:description "Onyx plugin for Datomic"
:url "https://github.com/onyx-platform/onyx-datomic"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:repositories {"snapshots" {:url "https://clojars.org/r... |
Solve part two of day 1 puzzle | (ns solver.core
(:gen-class))
(defn determine-floor [xs]
(let [to-direction (fn [index direction] {:index index :direction direction})
determine-floor (fn [floor data] (+ floor (case (data :direction)
"(" +1
")" -1))... | (ns solver.core
(:gen-class))
(defn- to-direction [index direction] { :index index :direction direction })
(defn determine-floor [xs]
(let [
determine-floor (fn [floor data] (+ floor (case (data :direction)
"(" +1
"... |
Make the actual interface of Beckon. | (ns beckon
(:import [com.hypirion.beckon SignalAtoms]
[sun.misc Signal]))
(defn signal-atom [signal-name]
(SignalAtoms/getSignalAtom signal-name))
(defn raise! [signal-name]
(Signal/raise (Signal. signal-name)))
(defn true!
"Takes a function of no arguments, and returns a function taking no argume... | (ns beckon
(:import (com.hypirion.beckon SignalAtoms SignalRegisterer)))
(defn signal-atom [signal-name]
(SignalAtoms/getSignalAtom signal-name))
(defn raise! [signal-name]
(SignalRegisterer/raiseSignal signal-name))
(defn re-init! [signal-name]
(SignalRegisterer/resetDefaultHandler signal-name))
(defn re-i... |
Use a symbol instead of a string to specify export name in example. | (ns hello.core
(:require [hello.foo.bar :as bar]))
(defn ^{:export "greet"} greet [n]
(str "Hello " n))
(defn ^:export sum [xs]
(bar/sum xs))
| (ns hello.core
(:require [hello.foo.bar :as bar]))
(defn ^{:export greet} greet [n]
(str "Hello " n))
(defn ^:export sum [xs]
(bar/sum xs))
|
Remove backported repl trampoline bugfix. Add :offline to production profile. | {:user {:mirrors {"central" "http://s3pository.herokuapp.com/maven-central"
;; TODO: re-enable once clojars releases repo is up
;; "clojars" "http://s3pository.herokuapp.com/clojars"
}
:aliases {"repl" "standalone-repl"}
:plugins [[lein-standalone-re... | {:user {:mirrors {"central" "http://s3pository.herokuapp.com/maven-central"
;; TODO: re-enable once clojars releases repo is up
;; "clojars" "http://s3pository.herokuapp.com/clojars"
}
:aliases {"repl" ["trampoline" "repl"]}}
:production {:mirrors {"central... |
Make the ratpack promise type play on the futura IPromise protocol. | (ns catacumba.impl.helpers
(:import ratpack.func.Action
ratpack.func.Function
ratpack.handling.Context
io.netty.buffer.Unpooled))
(defn action
"Coerce a plain clojure function into
ratpacks's Action interface."
[callable]
(reify Action
(^void execute [_ x]
(callable... | (ns catacumba.impl.helpers
(:refer-clojure :exclusions [promise])
(:require [futura.promise :as p])
(:import ratpack.func.Action
ratpack.func.Function
ratpack.exec.Promise
ratpack.handling.Context
io.netty.buffer.Unpooled))
(defn action
"Coerce a plain clojure functi... |
Use the actual correct link to lgpl 2.1 | (defproject tokyocabinet "1.24.4"
:url "https://github.com/flatland/tokyocabinet"
:license {:name "GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1"
:url "http://www.gnu.org/licenses/lgpl.html"}
:min-lein-version "2.0.0"
:description "native tokyo cabinet libraries"
:dependencies [[fs "1.1.2"]
... | (defproject tokyocabinet "1.24.4"
:url "https://github.com/flatland/tokyocabinet"
:license {:name "GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1"
:url "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"}
:min-lein-version "2.0.0"
:description "native tokyo cabinet libraries"
:dependencies [... |
Fix for lein clean not cleaning compiled js files | (defproject kamituel/systems-toolbox-chrome "0.1.0-SNAPSHOT"
:description "Chrome DevTools support for systems-toolbox library"
:url ""
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[matthiasn/... | (defproject kamituel/systems-toolbox-chrome "0.1.0-SNAPSHOT"
:description "Chrome DevTools support for systems-toolbox library"
:url ""
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[matthiasn/... |
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.9.14.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"
... | (defproject onyx-app/lein-template "0.9.14.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"
... |
Add some data-mocking test utils | (ns doctopus.test-utilities
(:require [clojure.test :refer :all]
[doctopus.storage :refer [remove-from-storage backend]]
[doctopus.test-utilities :refer :all])
(:import [org.joda.time DateTime]
[org.joda.time.format DateTimeFormat]))
(def iso-formatter (DateTimeFormat/forPattern ... | (ns doctopus.test-utilities
(:require [clojure.string :as str]
[clojure.test :refer :all]
[doctopus.storage :refer [remove-from-storage backend]]
[doctopus.test-utilities :refer :all])
(:import [org.joda.time DateTime]
[org.joda.time.format DateTimeFormat]))
(def iso-... |
Update cljs compiler version to 1.8.40 | (defproject funcool/beicon "1.1.1"
:description "Reactive Streams for ClojureScript (built on top of RxJS 5.x)"
:url "https://github.com/funcool/beicon"
:license {:name "Public Domain" :url "http://unlicense.org/"}
:dependencies [[org.clojure/clojure "1.8.0" :scope "provided"]
[org.clojure/cloj... | (defproject funcool/beicon "1.1.1"
:description "Reactive Streams for ClojureScript (built on top of RxJS 5.x)"
:url "https://github.com/funcool/beicon"
:license {:name "Public Domain" :url "http://unlicense.org/"}
:dependencies [[org.clojure/clojure "1.8.0" :scope "provided"]
[org.clojure/cloj... |
Remove 1.2.1 stuff because we don't support it anymore. | (defproject org.flatland/useful "0.9.3-SNAPSHOT"
:description "A collection of generally-useful Clojure utility functions"
:license {:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:distribution :repo}
:url "https://github.com/flatland/useful"
:dep... | (defproject org.flatland/useful "0.9.3-SNAPSHOT"
:description "A collection of generally-useful Clojure utility functions"
:license {:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:distribution :repo}
:url "https://github.com/flatland/useful"
:dep... |
Use the sonatype repo, now that the patches are in | (defproject reply "0.0.2-SNAPSHOT"
:description "REPL-y: A fitter, happier, more productive REPL for Clojure."
:dependencies [[org.clojure/clojure "1.3.0"]
[org.clojars.trptcolin/jline "2.6-SNAPSHOT"]
[clojure-complete "0.1.4"]]
:dev-dependencies [[midje "1.3-alpha4"]
... | (defproject reply "0.0.2-SNAPSHOT"
:description "REPL-y: A fitter, happier, more productive REPL for Clojure."
:dependencies [[org.clojure/clojure "1.3.0"]
[net.sf.jline/jline "2.6-SNAPSHOT"]
[clojure-complete "0.1.4"]]
:dev-dependencies [[midje "1.3-alpha4"]
... |
Prepare for next release cycle. | (defproject org.onyxplatform/onyx-metrics "0.8.2.0"
:description "Instrument Onyx workflows"
:url "https://github.com/MichaelDrogalis/onyx"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
... | (defproject org.onyxplatform/onyx-metrics "0.8.2.1-SNAPSHOT"
:description "Instrument Onyx workflows"
:url "https://github.com/MichaelDrogalis/onyx"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
... |
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.10.0.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"
... | (defproject onyx-app/lein-template "0.10.0.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"
... |
Disable var and ns clash warning. | (require '[figwheel-sidecar.repl :as r]
'[figwheel-sidecar.repl-api :as ra]
'[cljs.tagged-literals])
(alter-var-root #'cljs.tagged-literals/*cljs-data-readers*
assoc 'ux/tr (fn [v] `(uxbox.locales/tr ~v)))
(ra/start-figwheel!
{:figwheel-options {:css-dirs ["resources/public/css"]}
... | (require '[figwheel-sidecar.repl :as r]
'[figwheel-sidecar.repl-api :as ra]
'[cljs.tagged-literals])
(alter-var-root #'cljs.tagged-literals/*cljs-data-readers*
assoc 'ux/tr (fn [v] `(uxbox.locales/tr ~v)))
(ra/start-figwheel!
{:figwheel-options {:css-dirs ["resources/public/css"]}
... |
Fix test; dropped status in command response prematurely | (ns rill.web
(:require [clojure.tools.logging :as log]
[rill.handler :as rill-handler]
[rill.message :as message]))
(defn command-result-to-ring-response [command [status events new-version]]
(case status
:rejected
{:status 422 :body {:status :command-rejected}} ; HTTP 422 Unprocess... | (ns rill.web
(:require [clojure.tools.logging :as log]
[rill.handler :as rill-handler]
[rill.message :as message]))
(defn command-result-to-ring-response [command [status events new-version]]
(case status
:rejected
{:status 422 :body {:status :command-rejected}} ; HTTP 422 Unprocess... |
Allow bulk add / remove of classes | (ns gitique.util
(:require [clojure.string :as string]))
(enable-console-print!)
(extend-type js/NodeList ISeqable (-seq [array] (array-seq array 0)))
(extend-type js/DOMTokenList ISeqable (-seq [array] (array-seq array 0)))
(defn log [s] (println s) s)
(defn qs
"Wrapper for `querySelector`"
([selector]
(q... | (ns gitique.util
(:require [clojure.string :as string]))
(enable-console-print!)
(extend-type js/NodeList ISeqable (-seq [array] (array-seq array 0)))
(extend-type js/DOMTokenList ISeqable (-seq [array] (array-seq array 0)))
(defn log [s] (println s) s)
(defn qs
"Wrapper for `querySelector`"
([selector]
(q... |
Add WebFX as the main class for the jar manifest | (def project 'radicalzephyr/webfx)
(def version "0.1.0-SNAPSHOT")
(set-env! :resource-paths #{"src"}
:dependencies [])
(task-options!
pom {:project project
:version version
:description "A configurable shim for running a web application in a local JavaFX Webkit web view."
:url ... | (def project 'radicalzephyr/webfx)
(def version "0.1.0-SNAPSHOT")
(set-env! :resource-paths #{"src"}
:dependencies [])
(task-options!
pom {:project project
:version version
:description "A configurable shim for running a web application in a local JavaFX Webkit web view."
:url ... |
Use up-to-date leaplib with Linux files | (defproject sormilla "0.3.1"
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/core.async "0.1.242.0-44b1e3-alpha"]
[rogerallen/leaplib "2.0.2"]
[rogerallen/leaplib-natives "2.0.2"]
[h264-decoder/h264-decoder "1.0"]
[amalloy/... | (defproject sormilla "0.3.1"
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/core.async "0.1.242.0-44b1e3-alpha"]
[metosin/leaplib "2.3.1"]
[metosin/leaplib-natives "2.3.1"]
[h264-decoder/h264-decoder "1.0"]
[amalloy/ring-b... |
Add dependencies on org.clojure/tools.logging Move ring-mock dependency to :dev profile (e.g., for testing) | (defproject io.aviso/rook "0.1.2"
:description "Ruby on Rails-style resource mapping for Clojure/Compojure web apps"
:url "https://github.com/AvisoNovate/rook"
:license {:name "Apache Sofware Licencse 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
;; Normally we don't AOT compile; only... | (defproject io.aviso/rook "0.1.2"
:description "Ruby on Rails-style resource mapping for Clojure/Compojure web apps"
:url "https://github.com/AvisoNovate/rook"
:license {:name "Apache Sofware Licencse 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
;; Normally we don't AOT compile; onl... |
Switch to lein2 profiles for testing multiple dep sets and add an alias for testing all of them. | (defproject useful "0.8.3-alpha4"
:description "A collection of generally-useful Clojure utility functions"
:license {:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:distribution :repo}
:url "https://github.com/flatland/useful"
:dependencies [[org... | (defproject useful "0.8.3-alpha4"
:description "A collection of generally-useful Clojure utility functions"
:license {:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:distribution :repo}
:url "https://github.com/flatland/useful"
:dependencies [[org... |
Update dependency org.onyxplatform/onyx to version 0.7.3-20150827_202930-g49ef67c. | (defproject org.onyxplatform/onyx-kafka "0.7.3-SNAPSHOT"
:description "Onyx plugin for Kafka"
:url "https://github.com/MichaelDrogalis/onyx-kafka"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
... | (defproject org.onyxplatform/onyx-kafka "0.7.3-SNAPSHOT"
:description "Onyx plugin for Kafka"
:url "https://github.com/MichaelDrogalis/onyx-kafka"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
... |
Add Jetty server to dependencies. (For learning experience.) | (defproject frontrow "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"}
:dependencies [[org.clojure/clojure "1.5.1"]
[compojure "1.1.6"]
... | (defproject frontrow "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:main frontrow.handler
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[compojure "... |
Prepare for next release cycle. | (defproject org.onyxplatform/onyx-datomic "0.8.0.0"
:description "Onyx plugin for Datomic"
:url "https://github.com/MichaelDrogalis/onyx-datomic"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:repositories {"snapshots" {:url "https://clojars.org/repo"
... | (defproject org.onyxplatform/onyx-datomic "0.8.0.1-SNAPSHOT"
:description "Onyx plugin for Datomic"
:url "https://github.com/MichaelDrogalis/onyx-datomic"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:repositories {"snapshots" {:url "https://clojars.org/... |
Use sut idiom in base test too | (ns comic-reader.ui.base-test
(:require [devcards.core :refer-macros [defcard-rg]]
[comic-reader.ui.base :as ui-base]))
(defcard-rg loading
"## Loading
This is the loading svg used everywhere on the site."
[:div {:style {"width" "4em"}}
[ui-base/loading]])
(defcard-rg four-oh-four
[ui-base/f... | (ns comic-reader.ui.base-test
(:require [devcards.core :refer-macros [defcard-rg]]
[comic-reader.ui.base :as sut]))
(defcard-rg loading
"## Loading
This is the loading svg used everywhere on the site."
[:div {:style {"width" "4em"}}
[sut/loading]])
(defcard-rg four-oh-four
[sut/four-oh-four]... |
Add missing require expression for defregistry | (ns workflo.macros.permission
(:require-macros [workflo.macros.permission :refer [defpermission]]))
;;;; Permission registry
(defregistry permission)
| (ns workflo.macros.permission
(:require-macros [workflo.macros.permission :refer [defpermission]])
(:require [workflo.macros.registry :refer [defregistry]]))
;;;; Permission registry
(defregistry permission)
|
Update jooq version to 3.7.2 | (defproject funcool/suricatta "0.6.1"
:description "High level sql toolkit for clojure (backed by jooq library)"
:url "https://github.com/funcool/suricatta"
:license {:name "BSD (2-Clause)"
:url "http://opensource.org/licenses/BSD-2-Clause"}
:dependencies [[org.clojure/clojure "1.8.0-RC1" :scope "pr... | (defproject funcool/suricatta "0.6.1"
:description "High level sql toolkit for clojure (backed by jooq library)"
:url "https://github.com/funcool/suricatta"
:license {:name "BSD (2-Clause)"
:url "http://opensource.org/licenses/BSD-2-Clause"}
:dependencies [[org.clojure/clojure "1.7.0" :scope "provid... |
Modify user model to construct user tickets explicitly at creation time | (ns checkin-halake.models.users
(:require [monger.core :as mg]
[monger.collection :as mc]
[environ.core :refer [env]])
(:use [crypto.password.bcrypt :only [encrypt check]]
checkin-halake.models.core))
(defn- fix-user [doc]
(dissoc doc :password))
(defn register-user [email passwo... | (ns checkin-halake.models.users
(:require [monger.core :as mg]
[monger.collection :as mc]
[environ.core :refer [env]]
[checkin-halake.models.ticket :as ticket])
(:use [crypto.password.bcrypt :only [encrypt check]]
checkin-halake.models.core))
(defn- fix-user [doc]
(dis... |
Add missing Tufte stub function. | ;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
(ns datomish.tufte-stub)
;;; The real version of Tufte pulls in cljs.test, which pulls in
;;; pprint, which breaks t... | ;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
(ns datomish.tufte-stub)
;;; The real version of Tufte pulls in cljs.test, which pulls in
;;; pprint, which breaks t... |
Load main ui using url | (ns atom.core)
(def app (js/require "app"))
(def browser-window (js/require "browser-window"))
(def crash-reporter (js/require "crash-reporter"))
(def main-window (atom nil))
(defn init-browser []
(reset! main-window (browser-window.
(clj->js {:width 800
... | (ns atom.core)
(def app (js/require "app"))
(def browser-window (js/require "browser-window"))
(def crash-reporter (js/require "crash-reporter"))
(def main-window (atom nil))
(defn init-browser []
(reset! main-window (browser-window.
(clj->js {:width 800
... |
Make it Possible to Start REPL without .env File | (ns system
(:require [clojure.string :as str]
[org.httpkit.server :refer [run-server]]
[lens.app :refer [app]]
[lens.util :refer [parse-int]]))
(defn env []
(->> (str/split-lines (slurp ".env"))
(reduce (fn [ret line]
(let [vs (str/split line #"=")]
... | (ns system
(:require [clojure.string :as str]
[org.httpkit.server :refer [run-server]]
[lens.app :refer [app]]
[lens.util :refer [parse-int]]
[datomic.api :as d]
[lens.schema :as schema])
(:import [java.io File]))
(defn env []
(if (.canRead (File. ".env... |
Return test expectation to previous value | (ns org.spootnik.cyanite.carbon-test
(:require [org.spootnik.cyanite.carbon :refer :all]
[org.spootnik.cyanite.config :refer [assoc-rollup-to]]
[clojure.test :refer :all]))
(deftest formatter-test
(testing "empty-transform"
(is (= '() (formatter [] "foo nan 501"))))
(t... | (ns org.spootnik.cyanite.carbon-test
(:require [org.spootnik.cyanite.carbon :refer :all]
[org.spootnik.cyanite.config :refer [assoc-rollup-to]]
[clojure.test :refer :all]))
(deftest formatter-test
(testing "empty-transform"
(is (= nil (formatter [] "foo nan 501"))))
(t... |
Update total coins on triggered events | (ns rill.web
(:require [clojure.tools.logging :as log]
[rill.handler :as rill-handler]
[rill.message :as message]))
(defn command-result-to-ring-response [command [status events new-version]]
(case status
:rejected
{:status 422 :body {:status :command-rejected}} ; HTTP 422 Unprocess... | (ns rill.web
(:require [clojure.tools.logging :as log]
[rill.handler :as rill-handler]
[rill.message :as message]))
(defn command-result-to-ring-response [command [status events new-version triggered]]
(case status
:rejected
{:status 422 :body {:status :command-rejected}} ; HTTP 422... |
Add stop to frontend dev tools | (ns comic-reader.frontend-dev
(:require [clojure.java.browse :refer [browse-url]]
[clojure.repl :refer :all]
[comic-reader.system :refer [go]]
[figwheel-sidecar.repl-api :refer :all]))
(defn- cwd []
(.getCanonicalPath (java.io.File. ".")))
(def figwheel-config
{:figwheel-opti... | (ns comic-reader.frontend-dev
(:require [clojure.java.browse :refer [browse-url]]
[clojure.repl :refer :all]
[comic-reader.system :refer [go stop]]
[figwheel-sidecar.repl-api :refer :all]))
(defn- cwd []
(.getCanonicalPath (java.io.File. ".")))
(def figwheel-config
{:figwheel... |
Add `dbg` macro, like `trace`, but better | ;; Copyright (c) 2011-2016 Juan Pedro Bolivar Puente <raskolnikov@gnu.org>
;;
;; This file is part of Sinusoid.es.
;;
;; Sinusoid.es is free software: you can redistribute it and/or modify
;; it under the terms of the GNU Affero General Public License as
;; published by the Free Software Foundation, either version 3 of... | ;; Copyright (c) 2011-2016 Juan Pedro Bolivar Puente <raskolnikov@gnu.org>
;;
;; This file is part of Sinusoid.es.
;;
;; Sinusoid.es is free software: you can redistribute it and/or modify
;; it under the terms of the GNU Affero General Public License as
;; published by the Free Software Foundation, either version 3 of... |
Update to latest nREPL snapshot | {:user #=(merge
{:plugins [[lein-try "0.4.1"]
[lein-pprint "1.1.1"]
[cider/cider-nrepl "0.8.0"]]}
#=(eval (try (read-string (slurp (str (System/getProperty "user.home")
"/.config/datomic.clj")))
... | {:user #=(merge
{:plugins [[lein-try "0.4.1"]
[lein-pprint "1.1.1"]
[cider/cider-nrepl "0.9.0-SNAPSHOT"]]}
#=(eval (try (read-string (slurp (str (System/getProperty "user.home")
"/.config/datomic.clj")))
... |
Refactor so that tests actually fail if jboss fails to start | (ns fntest.core
(:require [fntest.jboss :as jboss]))
(defn with-jboss [f]
"A test fixture for starting/stopping JBoss"
(try
(println "Starting JBoss")
(jboss/start)
(if (jboss/wait-for-ready? 20)
(f)
(println "JBoss failed to start"))
(finally
(println "Stopping JBoss")
(jbo... | (ns fntest.core
(:require [fntest.jboss :as jboss]))
(defn with-jboss [f]
"A test fixture for starting/stopping JBoss"
(try
(println "Starting JBoss")
(jboss/start)
(f)
(finally
(println "Stopping JBoss")
(jboss/stop))))
(defn with-deployment [name descriptor]
"Returns a test fixture... |
Add Parse->string function to layout. | (ns incise.layouts.core
(:refer-clojure :exclude [get]))
(def layouts (atom {}))
(defn exists?
"Check for the existance of a layout with the given name."
[layout-with-name]
(contains? @layouts (name layout-with-name)))
(defn get [layout-name]
(@layouts (name layout-name)))
(defn register
"Register a lay... | (ns incise.layouts.core
(:require [incise.parsers.core]
[incise.config :as conf])
(:refer-clojure :exclude [get]))
(def layouts (atom {}))
(defn exists?
"Check for the existance of a layout with the given name."
[layout-with-name]
(contains? @layouts (name layout-with-name)))
(defn get [layout-... |
Add type hints (why not?) | (ns boilerpipe-clj.core
(:require [boilerpipe-clj.extractors :as ext])
(:require [boilerpipe-clj.util :as util]))
(defn get-text
"Takes HTML as String and returns extracted content.
Will use default Boilerpipe Extractor impl if not passed an extractor
instance as second argument."
[source & [extractor]]
... | (ns boilerpipe-clj.core
(:require [boilerpipe-clj.extractors :as ext])
(:require [boilerpipe-clj.util :as util]))
(defn get-text
"Takes HTML as String and returns extracted content.
Will use default Boilerpipe Extractor impl if not passed an extractor
instance as second argument."
[^String source & [extra... |
Update to release of patched tools.cli | (defproject com.palletops/cli-cmds "0.1.0-SNAPSHOT"
:description "Library for writing command line interfaces"
:url "https://githubs.com/pallet/cli-cmds"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
... | (defproject com.palletops/cli-cmds "0.1.0-SNAPSHOT"
:description "Library for writing command line interfaces"
:url "https://githubs.com/pallet/cli-cmds"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
... |
Add eastwood to repl dependencies. | (defproject dsbdp "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"}
:dependencies [[org.clojure/clojure "1.7.0"]
[clj-assorted-utils "1.11.1"]
... | (defproject dsbdp "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"}
:dependencies [[org.clojure/clojure "1.7.0"]
[clj-assorted-utils "1.11.1"]
... |
Change prefix into avow to full var name. | (ns incise.config
(:require [clojure.java.io :refer [reader file resource]]
[clojure.edn :as edn]
[manners.victorian :refer [avow!]])
(:import [java.io PushbackReader])
(:refer-clojure :exclude [merge load assoc get]))
(def ^:private config (atom {}))
(defn load []
(when-let [config-fi... | (ns incise.config
(:require [clojure.java.io :refer [reader file resource]]
[clojure.edn :as edn]
[manners.victorian :refer [avow!]])
(:import [java.io PushbackReader])
(:refer-clojure :exclude [merge load assoc get]))
(def ^:private config (atom {}))
(defn load []
(when-let [config-fi... |
Update clojars-deployer to use latest leiningen. | ;; Copyright 2008-2014 Red Hat, Inc, and individual contributors.
;;
;; This is free software; you can redistribute it and/or modify it
;; under the terms of the GNU Lesser General Public License as
;; published by the Free Software Foundation; either version 2.1 of
;; the License, or (at your option) any later versio... | ;; Copyright 2008-2014 Red Hat, Inc, and individual contributors.
;;
;; This is free software; you can redistribute it and/or modify it
;; under the terms of the GNU Lesser General Public License as
;; published by the Free Software Foundation; either version 2.1 of
;; the License, or (at your option) any later version... |
Use matching verison of cider. | {:repl {:plugins [[cider/cider-nrepl "0.18.0"]
[refactor-nrepl "2.4.0-SNAPSHOT"]]
:dependencies
[[acyclic/squiggly-clojure "0.1.9-SNAPSHOT"
:exclusions [org.clojure/tools.reader]]
[compliment "0.3.5"]]}
:env {:squiggly
"{:checkers [:eastwood]
:eastwo... | {:repl {:plugins [[cider/cider-nrepl "0.18.0-SNAPSHOT"]
[refactor-nrepl "2.4.0-SNAPSHOT"]]
:dependencies
[[acyclic/squiggly-clojure "0.1.9-SNAPSHOT" :exclusions [org.clojure/tools.reader]]
[compliment "0.3.5"]]}
:env {:squiggly
"{:checkers [:eastwood]
:eastwoo... |
Use env for db spec | (ns shouter.models.queries
(:require [yesql.core :refer [defqueries]]))
(def spec (or (System/getenv "DATABASE_URL")
"postgresql://localhost/shouter"))
(defqueries "queries.sql")
| (ns shouter.models.queries
(:require [yesql.core :refer [defqueries]]
[environ.core :refer [env]]))
(def spec (:database-url env))
(defqueries "queries.sql")
|
Add functions to format tasks into a table. | (ns todo-repl-webapp.views
(:require [hiccup.form :as form]
[hiccup.page :as page]
[hiccup.core :as core]))
(defn home [& _]
(core/html [:head
[:title "todo-repl"]
(page/include-css "css/bootstrap.min.css")
(page/include-js "http://code.jquery.com/jquery-1.10.... | (ns todo-repl-webapp.views
(:require [hiccup.form :as form]
[hiccup.page :as page]
[hiccup.core :as core]))
(defn home [& _]
(core/html [:head
[:title "todo-repl"]
(page/include-css "css/bootstrap.min.css")
(page/include-js "http://code.jquery.com/jquery-1.10.... |
Add Log4j as SLF4J implementation | (defproject clstreams "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"}
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/tools.namespace "0.3.0... | (defproject clstreams "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"}
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/tools.namespace "0.3.0... |
Fix test and add comment | (ns cmr.transmit.test.echo.rest
"Tests for cmr.transmit.echo.rest namespace"
(:require [clojure.test :refer :all]
[cmr.transmit.echo.rest :as rest]))
(deftest test-error-masked
(let [error-message "Unexpected error message: Token 123 does not exist."
status 500]
(is (= (format "Unexpected ... | (ns cmr.transmit.test.echo.rest
"Tests for cmr.transmit.echo.rest namespace"
(:require [clojure.test :refer :all]
[cmr.transmit.echo.rest :as rest]))
(deftest test-error-masked
(let [error-message "Unexpected error message: Token 123 does not exist."
status 500]
(is (thrown-with-msg?
... |
Stop using potentially not-real feature of require | (ns comic-reader.ui.site-list
(:refer-clojure :exclude [get set]
:rename {get cget})
(:require [re-frame.core :as re-frame]
[reagent.ratom :refer-macros [reaction]]
[comic-reader.ui.base :as base]))
(defn get [db]
(cget db :site-list))
(defn set [db [_ sites]]
(assoc ... | (ns comic-reader.ui.site-list
(:refer-clojure :exclude [get set])
(:require [re-frame.core :as re-frame]
[reagent.ratom :refer-macros [reaction]]
[comic-reader.ui.base :as base]))
(defn get [db]
(clojure.core/get db :site-list))
(defn set [db [_ sites]]
(assoc db :site-list sites))
(d... |
Add injections to keep myself from killing repls | (defproject me.arrdem/oxcart (slurp "VERSION")
:description "An experimental optimizing compiler for Clojure code"
:url "http://github.com/arrdem/oxcart"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [
[org.clojure/clojure ... | (defproject me.arrdem/oxcart (slurp "VERSION")
:description "An experimental optimizing compiler for Clojure code"
:url "http://github.com/arrdem/oxcart"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [
[org.clojure/clojure ... |
Add note to replace goog.require with require | (ns frontend.devtools
(:require [environ.core :refer [env]]))
(defmacro require-devtools! []
(when (:devtools env)
'(js/goog.require "frontend.devtools")))
| (ns frontend.devtools
(:require [environ.core :refer [env]]))
(defmacro require-devtools! []
(when (:devtools env)
;; TODO: Replace this with a ClojureScript require function
'(js/goog.require "frontend.devtools")))
|
Arrange smoke test on play game | (ns obb-api.handlers.play-game-test
(:require [clojure.test :refer :all]
[obb-api.service-test :as service]
[obb-rules.stash :as stash]
[obb-api.handlers.deploy-game-test :as deploy-game-test]
[io.pedestal.test :refer :all]
[io.pedestal.http :as bootstrap]))... | (ns obb-api.handlers.play-game-test
(:require [clojure.test :refer :all]
[obb-api.service-test :as service]
[obb-rules.stash :as stash]
[obb-api.handlers.deploy-game-test :as deploy-game-test]
[io.pedestal.test :refer :all]
[io.pedestal.http :as bootstrap]))... |
Add some content to front page | ;; Define template options here
; @layout default
; @title home
;; Your own function in template
(defn page-header [[fs & rs]]
[:div {:class "page-header"}
[:h1 [:span fs] rs]])
; Template is compiled with hiccup
(header
(:title site)
"The blog of Peter Barnett."
[:br]
(link "github.com/Pance" "https://... | ;; Define template options here
; @layout default
; @title home
;; Your own function in template
(defn page-header [[fs & rs]]
[:div {:class "page-header"}
[:h1 [:span fs] rs]])
; Template is compiled with hiccup
(header
(:title site)
[:p.text-center "Hello, I'm Peter Barnett"]
[:p.text-center "I am... |
Add 'count' to web api. | (ns
^{:author "Brian Craft"
:doc "A set of core functions for use with cavm.query.expression."}
cavm.query.functions
(:use clojure.core.matrix)
(:use clojure.core.matrix.operators)
(:refer-clojure :exclude [* - + == /])
(:gen-class))
(set-current-implementation :vectorz)
(defn- meannan1d [m]
(let [... | (ns
^{:author "Brian Craft"
:doc "A set of core functions for use with cavm.query.expression."}
cavm.query.functions
(:use clojure.core.matrix)
(:use clojure.core.matrix.operators)
(:refer-clojure :exclude [* - + == /])
(:gen-class))
(set-current-implementation :vectorz)
(defn- meannan1d [m]
(let [... |
Save stats as pretty-printed data. | (ns hxgm30.language.io
(:require
[clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.string :as string]))
(defn load-lines
[fullpath]
(->> fullpath
io/resource
io/reader
line-seq))
(defn load-clean-lines
[fullpath]
(->> fullpath
load-lines
(mapcat #(string/... | (ns hxgm30.language.io
(:require
[clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.pprint :as pprint]
[clojure.string :as string]))
(defn load-lines
[fullpath]
(->> fullpath
io/resource
io/reader
line-seq))
(defn load-clean-lines
[fullpath]
(->> fullpath
loa... |
Advance version number to 0.1.4-SNAPSHOT | (defproject io.aviso/rook "0.1.3"
:description "Ruby on Rails-style resource mapping for Clojure/Compojure web apps"
:url "https://github.com/AvisoNovate/rook"
:license {:name "Apache Sofware Licencse 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
;; Normally we don't AOT compile; onl... | (defproject io.aviso/rook "0.1.4-SNAPSHOT"
:description "Ruby on Rails-style resource mapping for Clojure/Compojure web apps"
:url "https://github.com/AvisoNovate/rook"
:license {:name "Apache Sofware Licencse 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
;; Normally we don't AOT com... |
Set up uberjar for use with the Procfile | (defproject deadman "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"}
:dependencies [[org.clojure/clojure "1.5.1"]
[ring "1.3.0"]
[compo... | (defproject deadman "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"}
:uberjar-name "deadman-standalone.jar"
:dependencies [[org.clojure/clojure "1.5.1"]
... |
Make cljs dep :scope :provided | (defproject coolant "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"}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-3211"... | (defproject coolant "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"}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-3211"... |
Prepare for next release cycle. | (defproject onyx-app/lein-template "0.9.11.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"
... | (defproject onyx-app/lein-template "0.9.11.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"
... |
Test retrieve-build-definitions function stubbing the api request | (ns build-mon.test.vso-api
(:require [midje.sweet :refer :all]
[clojure.java.io :as io]
[build-mon.vso-api :as api]))
(fact "vso-api-get-fn wraps an api token and returns a function which can be called with just a URL"
(let [result (api/vso-api-get-fn "SOME API TOKEN")]
(fn? res... | (ns build-mon.test.vso-api
(:require [midje.sweet :refer :all]
[clojure.java.io :as io]
[build-mon.vso-api :as api]))
(def account "VSO_ACCOUNT_NAME")
(def project "VSO_PROJECT_NAME")
(def token "VSO_API_TOKEN")
(fact "vso-api-get-fn wraps an api token and returns a function which makes a HT... |
Use new tools.cli functionality for command line parsing | ;; Copyright (c) Daniel Borchmann. All rights reserved.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashi... | ;; Copyright (c) Daniel Borchmann. All rights reserved.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashi... |
Delete the item from the list and the table | (ns app.operations
(:require [fulcro.client.mutations :as m :refer [defmutation]]))
(defmutation toggle-item-checked?!
[{:keys [id]}]
(action [{:keys [state]}]
(let [ident [:item/by-id id]
current-item (get-in @state ident)
updated-item (update current-item :item/checked... | (ns app.operations
(:require [fulcro.client.mutations :as m :refer [defmutation]]))
(defmutation toggle-item-checked?!
[{:keys [id]}]
(action [{:keys [state]}]
(let [ident [:item/by-id id]
current-item (get-in @state ident)
updated-item (update current-item :item/checked... |
Update to new version of beehive | (defproject beehive-http "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"}
:dependencies [[org.clojure/clojure "1.7.0"]
[net.uncontended/Precipice-Implem... | (defproject beehive-http "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"}
:dependencies [[org.clojure/clojure "1.7.0"]
[net.uncontended/Precipice-Implem... |
Update hello-world version to the latest release. | (defproject hello-world "0.20.0-SNAPSHOT"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]
[uncomplicate/neanderthal "0.20.0-SNAPSHOT"]]
:exclusions [[org.jcuda/jcuda-natives :classifier "apple-x86_... | (defproject hello-world "0.20.0"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]
[uncomplicate/neanderthal "0.20.0"]]
:exclusions [[org.jcuda/jcuda-natives :classifier "apple-x86_64"]
... |
Use out-dir instead of in-dir for manifest.json. | (ns incise.once
(:require (incise [load :refer [load-parsers-and-layouts]]
[config :as conf]
[utils :refer [delete-recursively directory?]])
[clojure.java.io :refer [file]]
[incise.parsers.core :refer [parse-all-input-files]]
[taoensso.timbre... | (ns incise.once
(:require (incise [load :refer [load-parsers-and-layouts]]
[config :as conf]
[utils :refer [delete-recursively directory?]])
[clojure.java.io :refer [file]]
[incise.parsers.core :refer [parse-all-input-files]]
[taoensso.timbre... |
Add dedicated namespace for storage initialization. | ;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) 2016 Andrey Antukh <niwi@niwi.nz>
(ns uxbox.media
"A media storage persistence layer."
(:requ... | ;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) 2016 Andrey Antukh <niwi@niwi.nz>
(ns uxbox.media
"A media storage impl for uxbox."
(:require... |
Change prod env to retroboard.herokuapp.com | (ns retroboard.config)
(def ws-url "ws://arcane-bastion-5301.herokuapp.com/ws")
| (ns retroboard.config)
(def ws-url "ws://retroboard.herokuapp.com/ws")
|
Disable generative test for now | (ns flare.report-test
(:require [clojure.test.check :as tc]
[clojure.test.check.clojure-test :refer [defspec]]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[clojure.test :refer [is deftest]]
[flare.diff :refer [diff*]]
... | (ns flare.report-test
(:require [clojure.test.check :as tc]
[clojure.test.check.clojure-test :refer [defspec]]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[clojure.test :refer [is deftest]]
[flare.diff :refer [diff*]]
... |
Update sat4j-solve after changing generate-dimacs-clauses | (ns logic.util)
(import '(org.sat4j.minisat SolverFactory)
'(org.sat4j.minisat.core Solver)
'(org.sat4j.core VecInt)
'(org.sat4j.specs IProblem)
'(org.sat4j.reader DimacsReader))
(defn sat4j-solve
[dimacs-map]
(let [solver (SolverFactory/newDefault)
reader (DimacsReader. so... | (ns logic.util)
(import '(org.sat4j.minisat SolverFactory)
'(org.sat4j.minisat.core Solver)
'(org.sat4j.core VecInt)
'(org.sat4j.specs IProblem)
'(org.sat4j.reader DimacsReader))
(defn sat4j-solve
[dimacs-map]
(let [solver (SolverFactory/newDefault)
reader (DimacsReader. so... |
Add the ability to actions subsystem pass payload. | (ns uxbox.ui.core
(:require [beicon.core :as rx]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Actions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defonce actions-lock (atom :nothing))
(defonce actions-s (rx/bus))
(defn acquire... | (ns uxbox.ui.core
(:require [beicon.core :as rx]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Actions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defonce actions-lock (atom :nothing))
(defonce actions-s (rx/bus))
;; TODO: impl... |
Update Jetty version to 9.4.28.v20200408 | (defproject ring/ring-jetty-adapter "1.8.0"
:description "Ring Jetty adapter."
:url "https://github.com/ring-clojure/ring"
:scm {:dir ".."}
:license {:name "The MIT License"
:url "http://opensource.org/licenses/MIT"}
:dependencies [[org.clojure/clojure "1.7.0"]
[ring/ring-core "1.... | (defproject ring/ring-jetty-adapter "1.8.0"
:description "Ring Jetty adapter."
:url "https://github.com/ring-clojure/ring"
:scm {:dir ".."}
:license {:name "The MIT License"
:url "http://opensource.org/licenses/MIT"}
:dependencies [[org.clojure/clojure "1.7.0"]
[ring/ring-core "1.... |
Test data creator updates every second | (ns brew-monitor.test-data-creator
(:require [clojurewerkz.elastisch.rest :as es]
[clojurewerkz.elastisch.rest.document :as esd]
[clj-time.core :as time]
[clj-time.format :as time-f]))
(def temps [20.0, 20.1, 20.2, 20.3, 20.5, 20.7, 21.0, 22.0, 21.9, 21.9, 21.8, 19.0, 19.5, 19.8, ... | (ns brew-monitor.test-data-creator
(:require [clojurewerkz.elastisch.rest :as es]
[clojurewerkz.elastisch.rest.document :as esd]
[clj-time.core :as time]
[clj-time.format :as time-f]))
(def temps [20.0, 20.1, 20.2, 20.3, 20.5, 20.7, 21.0, 22.0, 21.9, 21.9, 21.8, 19.0, 19.5, 19.8, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.