��c��RDUCK3 �v*Z�ܧ D���}.Q ! G�WF*�� � �� � l e
L � n � ! " �% "* -+ �, . �0 �3 �6 x: �? ]A 4E �G �L Q V �Y �Z v^ 1b �e pi l |o xr Ru �z %| � �� @� V� � 3� Ò h� ͙ � � �� �� <� D� }� �� � n� T� i� �� /� �� K� c� �� �� 3� #� �� X� j� ]� � $� �� �� =� C� � �� �� �� 4� _ < �
� � j V � � � E! �" S& K* 8, �. >4 �7 n: a< �? C �F 4I cK �K TL N �R xS fX
] Q_ Ia od �e rg �j �l �o s �v &w �x �{ �} � �� ӈ �� N� �� ;� �� �� �� ,� �� � i� [� �� �� J� ι � �� �� S� �� �� ^� �� �� �� 3� ?� �� �� �� �� �� �� &� q� ]� i� 4� ~ � � � � e � � � G �! �$ �% �( (+ ?- Q3 6 _9 �= �B uD �H $K �N �R SV �Y �] �_ *a �d ph j �k �p %t px �z n} u� � .� �� � +� t� �� �� �� �� %� � �� ާ �� i� � �� � 8� � Q�
� � ?� H� #� �� �� �� �� >� a� �� �� �� �� L� �� �� } � )
V > � � � _! �# �& + v- �/ 2 H5 �6 l: �> ^D �G �K iN �S �W XZ q[ �\ m^ �` Ae �h k 8l Xo ht |v z $} �� =� �� |� �� �� � ה Ė �� �� �� =� � ا � �� C� N� ߺ � � D� � �� I� z� �� �� �� �� J� N� �� -� =� �� 9� � � (defproject rill/rill "0.1.7-SNAPSHOT"
:description "An Event Sourcing Toolkit"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:url "https://github.com/rill-event-sourcing/rill"
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/core.async "0.1.338.0-5c5012-alpha"]
[org.clojure/tools.logging "0.2.6"]
[prismatic/schema "0.2.2"]
[slingshot "0.10.3"]
[environ "0.5.0"]
[identifiers "1.1.0"]
[org.clojure/java.jdbc "0.3.4"]
[postgresql "9.1-901.jdbc4"]
[com.taoensso/nippy "2.6.3"]
[com.mchange/c3p0 "0.9.2.1"]])
(defproject org.onyxplatform/onyx-datomic "0.8.1.0-alpha1"
: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"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:dependencies [[org.clojure/clojure "1.7.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.8.0"]]
:profiles {:dev {:dependencies [[midje "1.7.0"]
[com.datomic/datomic-free "0.9.5153"]]
:plugins [[lein-midje "3.1.3"]
[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
(defproject onyx-app/lein-template "0.9.7.0-alpha4"
: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)
(ns braid.server.bots
(:require
[org.httpkit.client :as http]
[taoensso.timbre :as timbre]
[braid.server.crypto :as crypto]
[braid.server.util :refer [->transit]])
(:import
java.io.ByteArrayInputStream))
(defn send-message-notification
[bot message]
(let [body (->transit message)
hmac (crypto/hmac-bytes (bot :token) body)]
(timbre/debugf "sending bot notification")
(println
; TODO: should this be a POST too?
@(http/put (bot :webhook-url)
{:headers {"Content-Type" "application/transit+msgpack"
"X-Braid-Signature" hmac}
:body (ByteArrayInputStream. body)}))))
(defn send-event-notification
[bot info]
(when-let [url (:event-webhook-url bot)]
(let [body (->transit info)
hmac (crypto/hmac-bytes (bot :token) body)]
(timbre/debugf "sending bot event notification")
(println
@(http/post url
{:headers {"Content-Type" "application/transit+msgpack"
"X-Braid-Signature" hmac}
:body (ByteArrayInputStream. body)})))))
(ns kosha.app.search
(:require [kosha.db.search :as db-search]
[kosha.app.util :as util]))
(def no-of-results (util/get-config :api :search-results))
(defn get-results
"Retrieves 2n best matches for given ragam or kriti name."
[query n]
(let [ragams (future (db-search/ragams query n))
kritis (future (db-search/kritis query n))]
(util/json-response (into [] (concat @ragams @kritis)))))
(defn handler [{:keys [params]}]
(let [query (:query params)]
(get-results query no-of-results)))
(ns fault.promise
(:import (fault ResilientPromise Status)
(clojure.lang IDeref IBlockingDeref IPending ILookup)))
(set! *warn-on-reflection* true)
(defn- status [status-enum]
(cond
(= Status/PENDING status-enum) :pending
(= Status/SUCCESS status-enum) :success
(= Status/ERROR status-enum) :error
(= Status/TIMED_OUT status-enum) :time-out))
(deftype CLJResilientPromise [^ResilientPromise promise]
IDeref
(deref [_] (.awaitResult promise))
IBlockingDeref
(deref
[_ timeout-ms timeout-val]
(if (.await promise timeout-ms)
(.result promise)
timeout-val))
IPending
(isRealized [_]
(.isDone promise))
ILookup
(valAt [this key] (.valAt this key nil))
(valAt [_ key default]
(case key
:status (status (.status promise))
:result (.result promise)
:error (.error promise)
default)))
(defproject {{name}} "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "https://example.com/FIXME"
:dependencies [[com.stuartsierra/component "0.2.2"]
[environ "1.0.0"]
[org.clojure/clojure "1.7.0"]
[prismatic/schema "0.4.3"]]
:min-lein-version "2.5.0"
:uberjar-name "{{hyphenated-name}}-standalone.jar"
:profiles
{:dev {:dependencies [[org.clojure/tools.namespace "0.2.5"]
[reloaded.repl "0.1.0"]]
:source-paths ["dev"]}
:uberjar {:aot :all
:main {{ns}}.main
:omit-source true}})
(ns gol.client.bl)
(defn neighbours
[[x y]]
(for [dx [-1 0 1] dy [-1 0 1]
:when (not= 0 dx dy)]
[(+ dx x) (+ dy y)]))
(defn stepper
[neighbours birth? survive?]
(fn [cells]
(set (for [[loc n] (frequencies (mapcat neighbours cells))
:when (if (cells loc) (survive? n) (birth? n))]
loc))))
(def step (stepper neighbours #{3} #{2 3}))
(defn filter-on-viewport
[bw bh coll]
(filter (fn [[x y]] (and (< -1 x bw) (< -1 y bh))) coll))
(defn filtered-on-viewport-stepper
[w h]
(comp set (partial filter-on-viewport w h) step))
(defn rand-2d
[width height]
(cons [(rand-int width) (rand-int height)] (lazy-seq (rand-2d width height))))
(defn rand-population
[width height]
(distinct (rand-2d width height)))
;; net utilities
;;
(ns dakait.net)
(defn get-json
"Sends a get request to the server and gets back with data already EDNed"
([path response-cb error-cb]
(get-json path {} response-cb error-cb))
([path params response-cb error-cb]
(let [r (.get js/jQuery path (clj->js params))]
(doto r
(.done (fn [data]
(response-cb (js->clj data :keywordize-keys true))))
(.fail (fn [e]
(error-cb (js->clj (.-responseJSON e) :keywordize-keys true))))))))
(defn http-post
"Post an HTTP request"
[path params scb ecb]
(let [r (.post js/jQuery path (clj->js params))]
(doto r
(.success scb)
(.fail ecb))))
(defn http-delete
"Post an HTTP delete request"
[url scb ecb]
(let [r (.ajax js/jQuery
(js-obj "url" url
"type" "DELETE"))]
(doto r
(.success scb)
(.fail ecb))))
(defproject cli4clj "1.7.1"
;(defproject cli4clj "1.7.2-SNAPSHOT"
:description "Create simple interactive CLIs for Clojure applications."
:url "https://github.com/ruedigergad/cli4clj"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.10.0"]
[clj-assorted-utils "1.18.3"]
[org.clojure/core.async "0.4.490"]
[jline/jline "2.14.6"]]
; :global-vars {*warn-on-reflection* true}
:html5-docs-docs-dir "ghpages/doc"
:html5-docs-ns-includes #"^cli4clj.*"
:html5-docs-repository-url "https://github.com/ruedigergad/cli4clj/blob/master"
:test2junit-output-dir "ghpages/test-results"
:test2junit-run-ant true
:main cli4clj.example
:aot :all
:plugins [[lein-cloverage "1.0.2"] [test2junit "1.3.3"] [lein-html5-docs "3.0.3"]]
:profiles {:repl {:dependencies [[jonase/eastwood "0.3.4" :exclusions [org.clojure/clojure]]]}}
)
(defproject ring/ring-core "1.6.0-beta4"
:description "Ring core libraries."
: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.5.1"]
[ring/ring-codec "1.0.1"]
[commons-io "2.5"]
[commons-fileupload "1.3.1"]
[clj-time "0.11.0"]
[crypto-random "1.2.0"]
[crypto-equality "1.0.0"]]
:profiles
{:provided {:dependencies [[javax.servlet/servlet-api "2.5"]]}
:dev {:dependencies [[javax.servlet/servlet-api "2.5"]]}
:1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
:1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]}
:1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]}})
(defproject org.omcljs/ambly "0.2.0"
:description "ClojureScript REPL into embedded JavaScriptCore."
:url "https://github.com/omcljs/ambly"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0-beta3"]
[org.clojure/clojurescript "0.0-3269"]
[com.github.rickyclarkson/jmdns "3.4.2-r353-1"]])
(ns reddio-frontend.screens.app
(:require [re-frame.core :as rf]
[reddio-frontend.bridge :as bridge]
[reddio-frontend.screens.shared.header :as header]
[reddio-frontend.screens.home.top-subreddits :as top-subreddits]))
(defn app []
[:> bridge/root-provider
[:div.app
[header/main]
[top-subreddits/main {:url-path "/r/listentothis"}]]])
(defproject bk1 "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"]
[graphql-clj "0.1.20" :exclusions [org.clojure/clojure]]
[ring "1.5.1"]
[ring/ring-json "0.4.0"]
[ring/ring-defaults "0.2.3"]
[ring-cors "0.1.9"]
[compojure "1.5.2"]
[org.clojure/core.match "0.3.0-alpha4"]
[clojure-future-spec "1.9.0-alpha14"]
[postgresql "9.3-1102.jdbc41"]
[tentacles "0.5.1"]
[org.clojure/java.jdbc "0.2.3"]
; https://github.com/barend/java-iban.git
[nl.garvelink.oss/iban "1.5.0"]]
:main ^:skip-aot bk1.core
:target-path "target/%s"
:profiles {:uberjar {:aot :all}}
:plugins [[lein-ring "0.9.7"]]
:ring {:handler bk1.handler/app :auto-reload? true :port 3002})
(defproject onyx-app/lein-template "0.10.0.0-beta5"
: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 re-frame/lein-template "0.3.22-SNAPSHOT"
:description "Leiningen template for a Reagent web app that implements the re-frame pattern."
:url "https://github.com/Day8/re-frame-template"
:license {:name "MIT"}
:deploy-repositories [["releases" :clojars]
["snapshots" :clojars]]
:scm {:name "git"
:url "https://github.com/Day8/re-frame-template"}
:eval-in-leiningen true)
(defproject io.aviso/rook "0.1.6-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 compile; only when tracking down reflection warnings.
:profiles {:reflection-warnings {:aot :all
:global-vars {*warn-on-reflection* true}}
:dev {:dependencies [[ring-mock "0.1.5"]]}}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/tools.logging "0.2.6"]
[compojure "1.1.6"]]
:plugins [[test2junit "1.0.1"]])
(defproject org.toomuchcode/clara-rules "0.2.2"
:description "Clara Rules Engine"
:url "http://rbrush.github.io/clara-rules/"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.codehaus.jsr166-mirror/jsr166y "1.7.0"]]
:plugins [[codox "0.6.4"]
[lein-javadoc "0.1.1"]]
:codox {:exclude [clara.other-ruleset clara.sample-ruleset clara.test-java
clara.test-rules clara.rules.memory clara.test-accumulators
clara.rules.testfacts clara.rules.java clara.rules.engine]}
:javadoc-opts {:package-names ["clara.rules"]}
:source-paths ["src/main/clojure"]
:test-paths ["src/test/clojure"]
:java-source-paths ["src/main/java"])
(defproject funcool/suricatta "0.5.0-SNAPSHOT"
: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 "provided"]
[org.jooq/jooq "3.7.0"]]
:javac-options ["-target" "1.8" "-source" "1.8" "-Xlint:-options"]
:profiles {:dev {:global-vars {*warn-on-reflection* true}
:plugins [[lein-ancient "0.6.7"]]
:dependencies [[org.postgresql/postgresql "9.4-1204-jdbc42"]
[com.h2database/h2 "1.4.190"]
[cheshire "5.5.0"]]}}
:java-source-paths ["src/java"])
(defproject kmg "0.1.0-SNAPSHOT"
:description "Knowledge Media Guide"
:url "https://github.com/alexpetrov/kmg"
: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-2234"]
[com.datomic/datomic-free "0.9.4894"]
[datomic-schema-grapher "0.0.1"]
[enfocus "2.1.0-SNAPSHOT"]
[compojure "1.1.8"]
[sonian/carica "1.1.0" :exclusions [[cheshire]]]
[fogus/ring-edn "0.2.0"]
[cljs-ajax "0.2.3"]
[com.taoensso/timbre "2.7.1"]
]
:profiles {:dev {:plugins [[lein-cljsbuild "1.0.3"]]}}
:plugins [[datomic-schema-grapher "0.0.1"]]
:cljsbuild {
:builds [{
:source-paths ["src"]
:compiler {
:output-to "resources/public/js/main.js"
:optimizations :whitespace
:pretty-print true}}]}
:ring {:handler kmg.core/app})
(defproject lein-jshint "0.1.5-SNAPSHOT"
:description "A Leiningen plugin for running JS code through JSHint."
:url "https://github.com/vbauer/lein-jshint"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[clj-glob "1.0.0" :exclusions [org.clojure/clojure]]
[lein-npm "0.4.0" :exclusions [org.clojure/clojure]]]
:plugins [[jonase/eastwood "0.1.4" :exclusions [org.clojure/clojure]]
[lein-release "1.0.5" :exclusions [org.clojure/clojure]]
[lein-kibit "0.0.8" :exclusions [org.clojure/clojure]]
[lein-bikeshed "0.1.7" :exclusions [org.clojure/clojure]]
[lein-ancient "0.5.5"]]
:eval-in-leiningen true
:pedantic? :abort
:local-repo-classpath true
:lein-release {:deploy-via :clojars
:scm :git})
(defproject com.palletops/leaven "0.1.0-SNAPSHOT"
:description "A lightweight component library for clojure and clojurescript."
:url "https://github.com/palletops/leaven"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:plugins [[com.keminglabs/cljx "0.4.0"]
[com.cemerick/clojurescript.test "0.3.1"]
[lein-cljsbuild "1.0.3"]]
:hooks [leiningen.cljsbuild]
:prep-tasks ["cljx" "javac" "compile"]
:source-paths ["target/generated/src/clj"]
:resource-paths ["target/generated/src/cljs"]
:test-paths ["target/generated/test/clj"]
:aliases {"auto-test" ["do" "clean," "cljx," "cljsbuild" "auto" "test"]
"jar" ["do" "cljx," "jar"]
"test" ["do" "cljx," "test"]})
(defproject io.aviso/tracker "0.1.4"
:description "Track per-thread operations when exceptions occur"
:url "https://github.com/AvisoNovate/tracker"
:license {:name "Apache Sofware Licencse 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/tools.logging "0.3.0"]
[io.aviso/pretty "0.1.14"]
[io.aviso/toolchest "0.1.1"]]
:plugins [[lein-shell "0.4.0"]]
:shell {:commands {"scp" {:dir "doc"}}}
:aliases {"deploy-doc" ["shell"
"scp" "-r" "." "hlship_howardlewisship@ssh.phx.nearlyfreespeech.net:io.aviso/tracker"]
"release" ["do"
"clean,"
"doc,"
"deploy-doc,"
"deploy" "clojars"]}
:codox {:src-dir-uri "https://github.com/AvisoNovate/tracker/blob/master/"
:src-linenum-anchor-prefix "L"
:defaults {:doc/format :markdown}}
:profiles {:dev {:dependencies [[org.slf4j/slf4j-api "1.7.6"]
[ch.qos.logback/logback-classic "1.1.1"]]}})
(defproject mvxcvi/vault "0.3.0-SNAPSHOT"
:description "Content-addressable data store."
:url "https://github.com/greglook/vault"
:license {:name "Public Domain"
:url "http://unlicense.org/"}
:aliases
{"tool-jar"
["with-profile" "tool" "uberjar"]}
:dependencies
[[byte-streams "0.1.10"]
[potemkin "0.3.4"]
[mvxcvi/clj-pgp "0.5.0"]
[mvxcvi/puget "0.5.0-SNAPSHOT"]
[org.clojure/clojure "1.6.0"]
[org.clojure/data.codec "0.1.0"]
[org.clojure/tools.cli "0.2.4"]]
:hiera
{:cluster-depth 2
:ignore-ns #{potemkin}}
:profiles
{:coverage
{:plugins
[[lein-cloverage "1.0.2"]]}
:tool
{:dependencies
[[mvxcvi/directive "0.1.0"]]
:source-paths ["tool"]
:jar-name "vault-tool-%s.jar"
:uberjar-name "vault-tool.jar"
:main vault.tool.main
:aot :all}
:repl
{:dependencies
[[mvxcvi/directive "0.1.0"]
[org.clojure/tools.namespace "0.2.4"]]
:source-paths ["repl" "tool"]}})
(defproject org.clojars.gonewest818/defcon "0.6.0-SNAPSHOT"
:description "Handle configuration settings with defaults"
:url "http://github.com/gonewest818/defcon"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[environ "1.1.0"]]
:deploy-repositories [["clojars" {:url "https://clojars.org/repo"
:username :env/clojars_username
:password :env/clojars_password
:sign-releases false}]]
:profiles {:dev {:dependencies [[midje "1.8.3"]]
:plugins [[lein-midje "3.2.1"]
[lein-cloverage "1.0.9"]]}})
(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 "1.5.1"]
[org.clojure/tools.analyzer "0.1.0-SNAPSHOT"]
[org.clojure/tools.analyzer.jvm "0.1.0-SNAPSHOT"]
[org.clojure/tools.emitter.jvm "0.0.1-SNAPSHOT"]
[org.clojure/tools.reader "0.8.4"]
]
:injections [(set! *print-length* 10)
(set! *print-level* 10)])
(defproject com.draines/postal "1.4.0-SNAPSHOT"
:resources-path "etc"
:repositories {"java.net" "http://download.java.net/maven/2"}
:dependencies [[org.clojure/clojure "1.2.0-master-SNAPSHOT"]
[org.clojure/clojure-contrib "1.2.0-SNAPSHOT"]
[javax.mail/mail "1.4.4-SNAPSHOT"
:exclusions [javax.activation/activation]]]
:dev-dependencies [[swank-clojure "1.2.1"]]
:source-path "src/clj"
:main com.draines.postal.main)
(defproject incise "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"]
[speclj "2.1.2"]
[ring "1.2.0"]
[hiccup "1.0.2"]
[compojure "1.1.5"]
[http-kit "2.1.10"]
[robert/hooke "1.3.0"]
[me.raynes/cegdown "0.1.0"]
[org.clojure/java.classpath "0.2.0"]
[org.clojure/tools.namespace "0.2.4"]
[org.clojure/tools.cli "0.2.4"]
[clj-time "0.5.1"]
[com.taoensso/timbre "2.6.1"]
[com.ryanmcg/stefon "0.5.0"]]
:profiles {:dev {:dependencies [[speclj "2.5.0"]]}}
:plugins [[speclj "2.5.0"]]
:test-paths ["spec/"]
:main incise.core)
(defproject demo "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.4.0"]
[ring/ring-core "1.2.0-beta1"]
[com.h2database/h2 "1.3.160"]
[org.clojure/java.jdbc "0.3.0-alpha4"]]
:profiles {:openshift {:immutant {:init immutant.init/load-all}}})
(defproject cljam "0.1.1"
:description "A DNA Sequence Alignment/Map (SAM) library for Clojure"
:url "https://chrovis.github.io/cljam"
:license {:name "Apache License, Version 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/tools.logging "0.2.6"]
[org.clojure/tools.cli "0.3.1"]
[me.raynes/fs "1.4.5"]
[pandect "0.3.1"]
[clj-sub-command "0.2.0"]
[bgzf4j "0.1.0"]]
:plugins [[lein-midje "3.1.3"]
[lein-bin "0.3.4"]
[lein-marginalia "0.7.1"]]
:profiles {:dev {:dependencies [[midje "1.6.3"]
[criterium "0.4.3"]
[cavia "0.1.2"]
[primitive-math "0.1.3"]]
:global-vars {*warn-on-reflection* true}}}
:main cljam.main
:aot [cljam.main]
:bin {:name "cljam"}
:repl-options {:init-ns user})
;; The only requirement of the project.clj file is that it includes a
;; defproject form. It can have other code in it as well, including
;; loading other task definitions.
(defproject leiningen "1.4.0-SNAPSHOT"
:description "A build tool designed not to set your hair on fire."
:url "http://github.com/technomancy/leiningen"
:license {:name "Eclipse Public License"}
:dependencies [[org.clojure/clojure "1.3.0-alpha1"]
[org.clojure.contrib/complete "1.3.0-alpha1" :classifier "bin"]
[ant/ant "1.6.5"]
[jline "0.9.94"]
[robert/hooke "1.0.2"]
[org.apache.maven/maven-ant-tasks "2.0.10"]]
:disable-implicit-clean true
:eval-in-leiningen true)
(defproject onyx-starter "0.1.0-SNAPSHOT"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
[org.onyxplatform/onyx "0.8.0"]
[com.stuartsierra/component "0.2.3"]]
:profiles {:dev {:dependencies [[org.clojure/tools.namespace "0.2.10"]]
:source-paths ["env/dev" "src"]}})
(defproject cider-ci_repository "2.0.0"
:description "Cider-CI Repository"
:license {:name "GNU AFFERO GENERAL PUBLIC LICENSE Version 3"
:url "http://www.gnu.org/licenses/agpl-3.0.html"}
:dependencies [
[cider-ci/clj-auth "2.0.0"]
[cider-ci/clj-utils "2.0.0"]
[clj-jgit "0.8.0"]
[org.clojure/tools.nrepl "0.2.6"]
]
:source-paths ["src"]
:profiles {
:dev { :resource-paths ["resources_dev"] }
:production { :resource-paths [ "/etc/cider-ci_repository" ] }}
:aot [cider-ci.repository.main]
:main cider-ci.repository.main
:repositories [["tmp" {:url "http://maven-repo-tmp.drtom.ch" :snapshots false}]]
)
(defproject buddy/buddy-auth "0.6.0"
:description "Authentication and Authorization facilities for ring based web applications."
:url "https://github.com/funcool/buddy-auth"
:license {:name "Apache 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0"}
:dependencies [[org.clojure/clojure "1.6.0" :scope "provided"]
[buddy/buddy-sign "0.6.0"]
[funcool/cuerdas "0.5.0"]
[clout "2.1.2"]]
:source-paths ["src"]
:test-paths ["test"]
:jar-exclusions [#"\.cljx|\.swp|\.swo|user.clj"]
:javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
:profiles {:dev {:codeina {:sources ["src"]
:exclude []
:language :clojure
:output-dir "doc/dist/latest/api"
:src-dir-uri "http://github.com/funcool/buddy-auth/blob/master/"
:src-linenum-anchor-prefix "L"}
:plugins [[funcool/codeina "0.1.0"
:exclusions [org.clojure/clojure]]]}})
(defproject sqls "0.1.0-SNAPSHOT"
:description "SQLS"
:url "https://bitbucket.org/mpietrzak/sqls"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [
[org.clojure/clojure "1.6.0-beta2"]
[org.clojure/data.json "0.2.4"]
[org.clojure/java.jdbc "0.3.3"]
[org.clojure/tools.logging "0.2.6"]
[org.xerial/sqlite-jdbc "3.7.2"]
[seesaw "1.4.4"]
]
; :main ^:skip-aot sqls.core
:main sqls.core
:java-source-paths ["src"]
:target-path "target/%s"
:plugins [[codox "0.6.7"]
[lein-ancient "0.5.4"]]
:profiles {:uberjar {:aot :all}}
:jvm-opts ["-Xms4M" "-Xmx1G" "-XX:+PrintGC"])
(ns membership-manager.routing.admin
(:require [compojure.core :refer :all]
[cemerick.friend :as friend]
[java-time :as t]
[membership-manager.store.users :as users]
[membership-manager.view.accounts :as account-views]))
(defroutes members
(GET "/members/" [] (account-views/member-list (vals (users/list-all))))
(GET "/members/add" [] (account-views/add-user))
(POST "/members/add" {params :params}
(let [details {:username (:username params)
:first-name (:first-name params)
:second-name (:second-name params)
:password "password" ;;TODO auto-generate password and show on user added screen - will eventually be email to user?
:change-password true}]
(users/create-user details #{} (t/instant))
(account-views/member-list (vals (users/list-all))))))
(defroutes all-routes
(context "/admin" []
(friend/wrap-authorize members #{::users/admin})))
(ns spectacles.presenter
(:require [quil.core :as q]
[quil.middleware :as m]
[spectacles.scheduler]))
(q/defsketch spectacles
:title "Presentation Cycle"
:size [1280 720]
:setup spectacles.scheduler/setup
:update spectacles.scheduler/update
:draw spectacles.scheduler/draw
:middleware [m/fun-mode]
; :features [:keep-on-top :present]
:bgcolor "#000000")
(defn -main
"Main NO-OP entry point"
[]
(println "Presentation started..."))
(defproject reiddraper/simple-check "0.1.0"
:description "A QuickCheck inspired property-based testing library."
:url "http://github.com/reiddraper/simple-check"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.0"]]
:plugins [[codox "0.6.4"]])
(defproject io.aviso/twixt "0.1.1"
:description "An extensible asset pipeline for Clojure web applications"
:url "https://github.com/AvisoNovate/twixt"
:license {:name "Apache Sofware Licencse 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/tools.logging "0.2.6"]
[ring/ring-core "1.1.8"]
[org.mozilla/rhino "1.7R4"]
[com.github.sommeri/less4j "1.0.4"]
[de.neuland/jade4j "0.3.12"]]
:repositories [["jade4j" "https://raw.github.com/neuland/jade4j/master/releases"]]
:profiles {:dev {:dependencies [[log4j "1.2.17"]]}})(defproject superstring "2.0.0"
:description "String manipulation library for clojure"
:url "http://github.com/expez/superstring"
:license {:name "Eclipse Public License 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:year 2015
:key "epl-1.0"}
:plugins [[codox "0.8.11"]]
:codox {:src-dir-uri "http://github.com/expez/superstring/blob/master/"
:src-linenum-anchor-prefix "L"}
:profiles {:dev {:dependencies [[org.clojure/test.check "0.7.0"]
[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.28"]
[com.cemerick/piggieback "0.2.1"]]
:repl-options {:init-ns superstring.core
:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}}})
(defproject io.aviso/twixt "0.1.2"
:description "An extensible asset pipeline for Clojure web applications"
:url "https://github.com/AvisoNovate/twixt"
:license {:name "Apache Sofware Licencse 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/tools.logging "0.2.6"]
[ring/ring-core "1.2.0"]
[org.mozilla/rhino "1.7R4"]
[com.github.sommeri/less4j "1.1.1"]
[de.neuland/jade4j "0.3.15"]
[hiccup "1.0.4"]]
:repositories [["jade4j" "https://raw.github.com/neuland/jade4j/master/releases"]]
:profiles {:dev {:dependencies [[log4j "1.2.17"]
[ring/ring-jetty-adapter "1.2.0"]]}})
(defproject naughtmq "0.0.2"
:description "A native-embedding wrapper for jzmq"
:url "https://github.com/gaverhae/naughtmq"
:scm {:name "git"
:url "https://github.com/gaverhae/naughtmq"}
:signing {:gpg-key "gary.verhaegen@gmail.com"}
:deploy-repositories [["clojars" {:creds :gpg}]]
:pom-addition [:developers [:developer
[:name "Gary Verhaegen"]
[:url "https://github.com/gaverhae"]
[:email "gary.verhaegen@gmail.com"]
[:timezone "+1"]]]
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[com.taoensso/timbre "3.1.6"]
[org.zeromq/jzmq "2.2.2"]]
:javac-options ["-target" "1.6" "-source" "1.6"]
:java-source-paths ["src"])
(defproject transit-clj "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"]
[org.clojure/data.generators "0.1.2"]
[com.fasterxml.jackson.core/jackson-core "2.3.1"]
[org.msgpack/msgpack "0.6.9"]
[org.clojure/data.fressian "0.2.0"]
[commons-codec 1.5]])
(defproject org.onyxplatform/onyx-peer-http-query "0.10.0.1-SNAPSHOT"
:description "An Onyx health and query HTTP server"
:url "https://github.com/onyx-platform/onyx-peer-http-query"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.10.1-SNAPSHOT"]
[ring/ring-core "1.6.2"]
[org.clojure/java.jmx "0.3.4"]
[ring-jetty-component "0.3.1"]
[cheshire "5.7.0"]]
: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}}
:profiles {:dev {:dependencies [[clj-http "3.4.1"]]
:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}})
(ns io.aviso.rook.resources.swagger
"Exposes a resource used to access the Swagger description for the mapped namespaces (excluding this one, and any other
endpoints with the :no-swagger metadata."
{:no-swagger true
:added "0.1.27"}
(:require [ring.util.response :as res]
[cheshire.core :as json]))
(defn swagger-json
"Returns the Swagger API description as (pretty) JSON."
{:route [:get "swagger.json"]}
[swagger-object]
;; It's a bit silly to stream this to JSON on each request; a cache would be nice. Later.
;; Don't want to rely on outer layers providing the right middleware, so we do the conversion
;; to JSON right here.
(-> swagger-object
(json/generate-string {:pretty true})
res/response
(res/content-type "application/json")))
(set-env!
:resource-paths #{"resources"}
:dependencies '[[org.clojure/clojure "1.8.0"]
[afrey/boot-asset-fingerprint "1.0.0-SNAPSHOT"]])
(require '[afrey.boot-asset-fingerprint :refer [asset-fingerprint]])
(deftask dev []
(comp
(asset-fingerprint)
(target)))
(defproject stencil "0.3.0-SNAPSHOT"
:description "Mustache in Clojure"
:dependencies [[org.clojure/clojure "1.3.0"]
[scout "0.1.0"]
[quoin "0.1.0-SNAPSHOT"]
[slingshot "0.8.0"]
[org.clojure/core.cache "0.6.1"]]
:profiles {:dev {:dependencies [[org.clojure/data.json "0.1.2"]]}
:clj1.2 {:dependencies [[org.clojure/clojure "1.2.1"]]}
:clj1.3 {:dependencies [[org.clojure/clojure "1.3.0"]]}
:clj1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}}
:extra-files-to-clean ["test/spec"])(defproject onyx-app/lein-template "0.11.1.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 rester "0.2.2-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.10.0"]
[org.clojure/data.csv "0.1.3"]
[clj-http "3.10.0"]
[org.clojure/tools.logging "0.3.1"]
[org.clojure/data.json "0.2.6"]
[cheshire "5.6.1"]
[org.clojure/data.xml "0.0.8"]
[json-path "2.0.0"]
[dk.ative/docjure "1.10.0"]
[io.forward/yaml "1.0.9"]
[org.clojure/core.async "0.4.490"]
[ch.qos.logback/logback-classic "1.2.3"]
[org.clojure/tools.cli "0.4.1"]
;; [org.clojure/core.specs.alpha "0.2.44"]
]
:main ^:skip-aot rester.core
:target-path "target/%s"
:profiles {:uberjar {:aot :all}
:dev {:dependencies [[org.clojure/test.check "0.10.0-alpha3"]]}}
:uberjar-name "rester.jar")
(defproject buddy/buddy-sign "0.5.1"
: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.6.0" :scope "provided"]
[com.taoensso/nippy "2.8.0"]
[buddy/buddy-core "0.5.0"]
[slingshot "0.12.2"]
[cats "0.4.0"]
[clj-time "0.9.0"]
[cheshire "5.4.0"]]
:source-paths ["src"]
:javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
:test-paths ["test"])
(ns teach-by-friends.shared.icons)
(defn import-icon [name]
(js/require (str "./images/" name ".png")))
(def ^:private icons
{:back (import-icon "back")
:close (import-icon "close")
:episodes (import-icon "episodes")
:favorites (import-icon "favorites")
:information (import-icon "information")
:words (import-icon "words_active")})
(defn get-icon [icon]
(get icons icon))(ns {{project-ns}}.dev
(:require [cemerick.piggieback :as piggieback]
[weasel.repl.websocket :as weasel]
[leiningen.core.main :as lein]))
(defn browser-repl []
(piggieback/cljs-repl :repl-env (weasel/repl-env :ip "0.0.0.0" :port 9001)))
(defn start-figwheel []
(future
(print "Starting figwheel.\n")
(lein/-main ["figwheel"])))
(ns dictionator.core
(:require [com.stuartsierra.component :as component]
[dictionator.system :as app])
(:gen-class))
(defn -main
"starts the Dictionator webservice"
[& args]
(let [[port] args]
(component/start
(app/prod-system {:web-port 3000}))))
(ns server.systems
(:require [system.core :refer [defsystem]]
(system.components
[http-kit :refer [new-web-server]])
[clj-consonant.local-store :refer [new-local-store]]
[server.handler :refer [app-server backend-server]]))
(defsystem development-system
[:app-server (new-web-server 3000 app-server)
:backend-server (new-web-server 3001 backend-server)
:consonant (new-local-store "/home/jannis/tmp/copaste-store.git")])
(defsystem production-system
[:app-server (new-web-server 3000 app-server)
:backend-server (new-web-server 3001 backend-server)
:consonant (new-local-store "/home/jannis/tmp/copaste-store.git")])
(ns discuss.references.lib
(:require [discuss.utils.common :as lib]))
(defn save-selected-reference!
"Saves the currently clicked reference for further processing."
[ref]
(lib/update-state-item! :reference-usages :selected-reference (fn [_] ref)))
(defn get-selected-reference
"Returns the currently selected reference."
[]
(get-in @lib/app-state [:reference-usages :selected-reference]))
(defn save-selected-statement!
"Saves the currently selected statement for further processing."
[statement]
(lib/update-state-item! :reference-usages :selected-statement (fn [_] statement)))
(defn get-selected-statement
"Returns the currently selected statement from reference usages."
[]
(get-in @lib/app-state [:reference-usages :selected-statement]))
(defn get-reference-usages
"Return list of reference usages, which were previously stored in the app-state.
TODO: optimize"
[]
(get-in @lib/app-state [:common :reference-usages]))(ns incise.parsers.impl.markdown-spec
(:require [speclj.core :refer :all]
[clojure.java.io :refer [file resource]]
(incise [load :refer (load-parsers-and-layouts)]
[config :as conf])
[incise.spec-helpers :refer :all]
[incise.parsers.html :refer [html-parser]]
[incise.parsers.impl.markdown :refer :all]
[me.raynes.cegdown :as md])
(:import [java.io File]))
(defn parse-markdown []
(let [markdown-file (file (resource "spec/markdown-options.md"))
parse (comp slurp first force (html-parser markdown-to-html))]
(parse markdown-file)))
(describe "parsing markdown"
(context "parsing with default options"
(around-with-custom-config :in-dir "resources/spec"
:out-dir "/tmp/")
(with result (parse-markdown))
(it "parses a markdown file into html"
(should-contain #"" @result))
(it "parses without hardwraps"
(should-contain "First line Second line" @result)))
(context "parsing with custom options"
(around-with-custom-config :in-dir "resources/spec"
:out-dir "/tmp/"
:parsers {:markdown {:extensions [:hardwraps]}})
(with result (parse-markdown))
(it "parses with hardwraps"
(should-contain "First line
Second line" @result))))
(run-specs)
(ns word-keeper.core
(:require [org.httpkit.server :refer [run-server]]
[compojure.core :refer [defroutes GET]]
[compojure.handler :refer [site]]
[compojure.route :refer [files not-found]]
[clostache.parser :refer [render-resource]]
[word-keeper.backend :refer :all]
[word-keeper.frontend :refer :all]))
<<<<<<< HEAD
(def consumer-key "5KvZggyamEy8yHD0oACgAkLxH")
(def consumer-secret "3DeEHXQ6LVh7LxSdApivzAOiwBAcGdvRorheKzheCchbPPQF6h")
=======
>>>>>>> FETCH_HEAD
(defroutes routes
(GET "/" [] action-index)
(files "/public/")
(not-found "
404. Not found
"))
(defn -main [& args]
(run-server (site #'routes) {:port 8080}))
(ns atom-finder.core
(:require [atom-finder.classifier :refer :all]
[atom-finder.count-subtrees :refer :all]
[atom-finder.constants :refer :all]
[atom-finder.util :refer :all]
[atom-finder.classifier-util :refer :all]
[atom-finder.results-util :refer :all]
[atom-finder.atoms-in-dir :refer :all]
[clojure.pprint :refer [pprint]]
[clojure.data.csv :as csv]
[clojure.java.io :as io]
))
(defn -main
[& args]
(print-atoms-in-dir
(expand-home "~/opt/src/redis")
(map atom-lookup [:macro-operator-precedence])
)
)
(->> "macro-operator-precedence_redis_2017-03-10_1.edn"
read-data
(take 30)
(found-atom-source :macro-operator-precedence)
;sum-found-atoms
)
;sum-found-atoms => {:macro-operator-precedence 1760}
;sum-found-atoms => {:macro-operator-precedence 759} # After removing atomic macros (#define M1 123)
(ns onyx.log.commands.complete-task
(:require [onyx.extensions :as extensions]))
(defmethod extensions/apply-log-entry :complete-task
[{:keys [args message-id]} replica]
(-> replica
(update-in [:completions (:job args)] conj (:task args))
(update-in [:completions (:job args)] vec)
(update-in [:allocations (:job args)] dissoc (:task args))))
(defmethod extensions/replica-diff :complete-task
[{:keys [args]} old new]
{:job (:job args)
:task (:task args)})
(defmethod extensions/reactions :complete-task
[{:keys [args]} old new diff peer-args]
(let [allocations (get-in old [:allocations (:job args) (:task args)])]
(when (some #{(:id peer-args)} (into #{} allocations))
[{:fn :volunteer-for-task :args {:id (:id peer-args)}}])))
(defmethod extensions/fire-side-effects! :complete-task
[{:keys [args]} old new diff state]
state)
(ns overseer.status
"Functions for querying the state of jobs in the system"
(:require [datomic.api :as d]
[clojure.set :as set]))
(defn jobs-with-status [db status]
(->> (d/q '[:find ?jid
:in $ ?status
:where
[?e :job/status ?status]
[?e :job/id ?jid]]
db
status)
(map first)
(set)))
(defn jobs-failed
"Find all jobs that have failed."
[db]
(jobs-with-status db :failed))
(defn jobs-unfinished
"Find all jobs that are not yet complete."
[db]
(->> (d/q '[:find ?jid
:where
[?e :job/status ?s]
[((comp not contains?) #{:finished :aborted :failed} ?s)]
[?e :job/id ?jid]]
db)
(map first)
(into #{})))
(defn jobs-started
"Find all jobs that are currently started."
[db]
(jobs-with-status db :started))
(defn jobs-ready
"Find all jobs that are ready to run.
Works by finding all jobs that are not yet done, and subtracting the
jobs who dependencies are not yet ready."
[db]
(set/difference
(jobs-unfinished db)
(->> (d/q '[:find ?jid
:where
[?j :job/dep ?dj]
[?dj :job/status ?djs]
[(not= :finished ?djs)]
[?j :job/id ?jid]]
db)
(map first)
(into #{}))))
(ns clj-http.examples.caching-middleware
(:require
[clj-http.client :as http]
[clojure.core.cache :as cache]))
(def http-cache (atom (cache/ttl-cache-factory {} :ttl (* 60 60 1000))))
(defn- cached-response
([client req]
(let [cache-key (str (:server-name req) (:uri req) "?" (:query-string req))]
(if (cache/has? @http-cache cache-key)
(do
(println "CACHE HIT")
(client req (reset! http-cache (cache/hit @http-cache cache-key)) nil ) )
(do
(println "CACHE MISS")
(let [resp (client req)]
(if (http/success? resp)
(do
(reset! http-cache (cache/miss @http-cache cache-key resp))
(client req resp nil))
(do
(client req resp nil)))))))))
(defn wrap-caching-middleware
[client]
(fn
([req]
(cached-response client req))))
(defn example [& uri]
(http/with-additional-middleware [#'wrap-caching-middleware]
(http/get (or uri "https://api.github.com"))))
;; Try this out:
;;
;; user> (use '[clj-http.examples.caching-middleware :as mw])
;; nil
;; user> (mw/example)
;; CACHE MISS
(ns circle.env
(:require midje.semi-sweet)
(:require clojure.test)
(:use [circle.sh :only (sh)])
(:require [clojure.string :as str])
(:use [clojure.contrib.except :only (throw-if-not)]))
(def env (condp = (System/getenv "CIRCLE_ENV")
"production" :production
"staging" :staging
nil :local))
(def production? (= env :production))
(def staging? (= env :staging))
(def local? (= env :local))
(throw-if-not (= 1 (count (filter true? [production? staging? local?]))))
(when production?
(alter-var-root (var midje.semi-sweet/*include-midje-checks*) (constantly false))
(alter-var-root (var clojure.test/*load-tests*) (constantly false)))
(defn username
"Returns the username that started this JVM"
[]
(-> (sh "whoami")
:out
(str/trim)))
(defn hostname
"hostname of the box"
[]
(-> (sh "hostname")
:out
(str/trim)))(ns {{project-ns}}.core
(:require [om.core :as om :include-macros true]{{{core-cljs-requires}}}))
(enable-console-print!)
(defonce app-state (atom {:text "Hello Chestnut!"}))
(defn main []
(om/root
(fn [app owner]
(reify
om/IRender
(render [_]
(dom/h1 {{#not-om-tools?}}nil {{/not-om-tools?}}(:text app)))))
app-state
{:target (. js/document (getElementById "app"))}))
(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? [number]
(cond
(= 2 number) true
(even? number) false
:else (empty? (for [n (range 3 (inc (sqrt number)) 2) :when (divides? number n)] n))))
(defn next-prime [start]
(loop [n (inc start)]
(if (prime? n)
n
(recur (inc n)))))
(defn nth-prime [index]
(when (not (pos? index))
(throw (IllegalArgumentException. "nth-prime expects a positive integer for an argument")))
(loop [cur-prime 2
num-times 1]
(if (= num-times index)
cur-prime
(recur (next-prime cur-prime) (inc num-times)))))
(ns onyx.messaging.aeron-media-driver
(:require [clojure.core.async :refer [chan afile
(file)
(.getCanonicalPath)
(subs (count (.getCanonicalPath prefix-file)))))
(defn- gitignore-file? [^File file]
(= (.getName file) ".gitignore"))
(defn delete-recursively
"Delete a directory tree."
[^File root]
(when root
(when (.isDirectory root)
(doseq [file (remove gitignore-file? (.listFiles root))]
(delete-recursively file)))
(.delete root)))
{:user {
:plugins [[cider/cider-nrepl "0.12.0-SNAPSHOT"]
[lein-ancient "0.6.8"]
[lein-bikeshed "0.3.0"]
[lein-kibit "0.1.2"]]
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/tools.reader "1.0.0-alpha3"]
[com.cemerick/url "0.1.1"]
[datomic-schema-grapher "0.0.1"]
[com.datomic/datomic-pro "0.9.5350"]
[me.raynes/fs "1.4.6"]
[clj-stacktrace "0.2.8"]
[acyclic/squiggly-clojure "0.1.5"]
^:replace [org.clojure/tools.nrepl "0.2.12"]
;; Consider using typed? [org.clojure/core.typed "0.3.22"]
]
}
;; VisualVM profiling opts
:jvm-opts ["-Dcom.sun.management.jmxremote"
"-Dcom.sun.management.jmxremote.ssl=false"
"-Dcom.sun.management.jmxremote.authenticate=false"
"-Dcom.sun.management.jmxremote.port=43210"]}
(hash-map
:layout
(layout/geodesic
:radius 3.688
:pixel-spacing 0.02
:strut-pixels
[48 64 64 64]
:strip-struts
[[0 6 12 10]
[2 8 18 16]
[4 9 17 19]
[3 7 11 13]
[1 5 14 15]])
#_
(layout/star
:radius 3.688 ; 12.1'
:pixel-spacing 0.02 ; 2 cm
:strip-pixels 240
:strips 6)
:event-handler
(-> state/update-mode
handler/mode-selector
(handler/autocycle-modes
(comp #{:button/press :button/repeat} :type)))
:web-options
{:port 8080
:min-threads 2
:max-threads 5
:max-queued 25}
:modes
{:rainbow
(mode/rainbow)
:strobe
(mode/strobe
[(color/rgb 1 0 0)
(color/rgb 0 1 0)
(color/rgb 0 0 1)])
:lantern
(mode/lantern 0.5)}
:playlist
[:rainbow
:strobe
:lantern])
(def classifier-version "0.2.3")
(defproject puppetlabs.packages/pe-classifier "0.2.4-SNAPSHOT"
:description "Release artifacts for classifier"
:pedantic? :abort
:dependencies [[puppetlabs/classifier ~classifier-version]]
:uberjar-name "classifier-release.jar"
:repositories [["releases" "http://nexus.delivery.puppetlabs.net/content/repositories/releases/"]
["snapshots" "http://nexus.delivery.puppetlabs.net/content/repositories/snapshots/"]]
:main puppetlabs.trapperkeeper.main
:ezbake {:user "pe-classifier"
:group "pe-classifier"
:build-type "pe"})
(defproject buddy/buddy-sign "2.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.9.0-alpha17" :scope "provided"]
[com.taoensso/nippy "2.13.0" :scope "provided"]
[org.clojure/test.check "0.9.0" :scope "test"]
[buddy/buddy-core "1.3.0"]
[cheshire "5.7.1"]]
:source-paths ["src"]
:javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
:test-paths ["test"])
(defproject suricatta "0.2.0-SNAPSHOT"
:description "High level sql toolkit for clojure (backed by jooq library)"
:url "https://github.com/niwibe/suricatta"
:license {:name "BSD (2-Clause)"
:url "http://opensource.org/licenses/BSD-2-Clause"}
:profiles {:dev {:dependencies [[postgresql "9.3-1102.jdbc41"]
[com.h2database/h2 "1.3.176"]
[cheshire "5.3.1"]]
;; :global-vars {*warn-on-reflection* true}
}}
:java-source-paths ["src/java"]
:dependencies [[org.clojure/clojure "1.6.0"]
[org.jooq/jooq "3.5.0"]
[clojure.jdbc "0.3.2"]
[cats "0.2.0" :exclusions [org.clojure/clojure]]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]])
(defproject funcool/futura "0.2.0-SNAPSHOT"
:description "A basic building blocks for async programming."
:url "https://github.com/funcool/futura"
:license {:name "BSD (2 Clause)"
:url "http://opensource.org/licenses/BSD-2-Clause"}
:dependencies [[org.clojure/clojure "1.7.0-beta3" :scope "provided"]
[cats "0.4.0"]
[manifold "0.1.0"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
[org.reactivestreams/reactive-streams "1.0.0"]]
:deploy-repositories {"releases" :clojars
"snapshots" :clojars}
:source-paths ["src"]
:test-paths ["test"]
:jar-exclusions [#"\.swp|\.swo|user.clj"]
:javac-options ["-target" "1.8" "-source" "1.8" "-Xlint:-options"]
:profiles {:dev {:codeina {:sources ["src"]
:language :clojure
:output-dir "doc/api"}
:plugins [[funcool/codeina "0.1.0-SNAPSHOT"
:exclusions [org.clojure/clojure]]]}})
(defproject io.aviso/rook "0.1.8-SNAPSHOT"
:description "Ruby on Rails-style resource mapping for Clojure/Compojure web apps"
:url "https://github.com/AvisoNovate/rook"
:license {:name "Apache Sofware License 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
;; Normally we don't AOT compile; only when tracking down reflection warnings.
:profiles {:reflection-warnings {:aot :all
:global-vars {*warn-on-reflection* true}}
:dev {:dependencies [[ring-mock "0.1.5"]
[io.aviso/pretty "0.1.10"]
[speclj "2.9.1"]
[log4j "1.2.17"]]}}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/core.async "0.1.267.0-0d7780-alpha"]
[org.clojure/tools.logging "0.2.6"]
[ring-middleware-format "0.3.2"]
[prismatic/schema "0.2.1"]
[compojure "1.1.6"]]
:plugins [[test2junit "1.0.1"]
[speclj "2.9.1"]]
:test-paths ["spec"])
(defproject madouc "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"]
[ring/ring-core "1.5.1"]
[ring-logger "0.7.7"]
[ring-logger-timbre "0.7.5"]
[com.taoensso/timbre "4.8.0"]
[com.fzakaria/slf4j-timbre "0.3.4"]
[environ "1.1.0"]
[org.immutant/web "2.1.6"
:exclusions [ch.qos.logback/logback-classic]]]
:main madouc.core
:profiles {:dev {:plugins [[lein-environ "1.1.0"]]}
:uberjar {:aot :all}})
;(defproject cli4clj "1.0.0"
(defproject cli4clj "1.0.1-SNAPSHOT"
:description "Create simple interactive CLIs for Clojure applications."
:url "https://github.com/ruedigergad/cli4clj"
: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.0"]
[jline/jline "2.13"]]
:global-vars {*warn-on-reflection* true}
:html5-docs-docs-dir "ghpages/doc"
:html5-docs-ns-includes #"^cli4clj.*"
:html5-docs-repository-url "https://github.com/ruedigergad/cli4clj/blob/master"
:test2junit-output-dir "ghpages/test-results"
:test2junit-run-ant true
:main cli4clj.example
:plugins [[lein-cloverage "1.0.2"] [test2junit "1.1.3"] [lein-html5-docs "3.0.3"]])
(defproject onyx-app/lein-template "0.9.7.0-alpha1"
: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 leancloud.data.json "0.1.0-RC2"
: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"]]
:java-source-paths ["src/jvm"]
:source-paths ["src/clj"]
:jvm-opts ["-Xmx1g" "-server" "-XX:MaxPermSize=256m" "-XX:+UseConcMarkSweepGC" "-XX:+UseCMSCompactAtFullCollection" "-Dclojure.compiler.elide-meta='[:doc :added]'"]
:profiles {:dev {:dependencies [[criterium "0.4.3"]
[clj-tuple "0.1.6"]
[org.clojure/data.json "0.2.5"]]}})
(ns workflo.macros.spec-test
(:require #?(:cljs [cljs.test :refer-macros [deftest is]]
:clj [clojure.test :refer [deftest is]])
#?(:cljs [cljs.spec :as s]
:clj [clojure.spec :as s])
#?(:cljs [cljs.spec.test :as st]
:clj [clojure.spec.test :as st])
[workflo.macros.view]
[workflo.macros.query]
[workflo.macros.query.util]
[workflo.macros.command]
[workflo.macros.command.util]))
#?(:cljs (deftest test-specs
(doseq [v (s/speced-vars)]
(println " Testing" v)
(let [result (st/check-var v :num-tests 10 :max-size 10)]
(println " >" result)
(and (is (map? result))
(is (true? (:result result))))))))
#?(:clj (deftest test-specs
(doseq [s (st/testable-syms)]
(println " Testing" s)
(let [result (first (st/test s {:clojure.spec.test.check/opts
{:num-tests 10}}))]
(and (is (map? result))
(is (true? (:result result))))))))
(ns comic-reader.pages.sites
(:require [comic-reader.session :as session]
[reagent.core :as reagent :refer [atom]]
[secretary.core :refer [dispatch!]]))
(defn manga-site [site-data]
^{:key (:id site-data)} [:li (:name site-data)])
(defn site-list [sites]
[:div
[:h1 "Comic Sources"]
[:ul (map manga-site sites)]])
; An attempt to use in-place array mutation in Clojure
; Highly non-idiomatic. Should not be used. EXPERIMENTAL.
; Also it is ridiculously slow. Does anyone know why?
(defn generatePermutations [a n]
(if (zero? n)
(println (apply str a))
(doseq [i (range 0 (inc n))]
(generatePermutations a (dec n))
(let [j (if (even? n) i 0) oldn (aget a n) oldj (aget a j)]
(aset a n oldj) (aset a j oldn)))))
(if (not= (count *command-line-args*) 1)
(do
(println "Exactly one argument is required")
(System/exit 1))
(let [word (-> *command-line-args* first vec to-array)]
(time (generatePermutations word (dec (count word))))))
(ns cruncher.moves.main
(:require [cruncher.moves.data :as data]))
(defn get-name
"Return move object from moves-database by the move id."
[id]
(:name (get data/all id)))(ns leiningen.pallet-release.core)
(defn deep-merge
"Recursively merge maps."
[& ms]
(letfn [(f [a b]
(if (and (map? a) (map? b))
(deep-merge a b)
b))]
(apply merge-with f ms)))
(defn fail
"Fail with the given message, msg."
[msg]
(throw (ex-info msg {:exit-code 1})))
(defn fail-on-error
"Fail on a shell error"
[exit]
(when (and exit (pos? exit))
(fail "Shell command failed")))
(def push-repo-fmt
"https://pbors:${GH_TOKEN}@github.com%s.git")
(defn repo-coordinates
[{:keys [url] :as project}]
(when-not (or url (-> project :pallet-release :url))
(fail "No :url available in project.clj"))
(if-let [release-url (-> project :pallet-release :url)]
release-url
(let [u (java.net.URL. url)]
(if (= "github.com" (.getHost u))
(format push-repo-fmt (.getPath u))
(fail (str "Don't know how to create a pushable git url from"
url))))))
(defn release-config
"Return a pallet release configuration map"
[project]
{:url (repo-coordinates project)
:branch (or (-> project :pallet-release :branch)
"master")})
(ns servisne-info.tasks
(:use [raven-clj.core :only [capture]]
[raven-clj.interfaces :only [stacktrace]])
(:require [environ.core :refer [env]]
[overtone.at-at :as at-at]
[taoensso.timbre :as timbre]))
(defmacro deftask [task-name & body]
`(fn []
(try
(do
(timbre/info ~task-name " starting...")
~@body
(timbre/info ~task-name " done."))
(catch Exception e#
(capture (env :sentry-dsn)
(-> {:message (.getMessage e#)}
(stacktrace e#)))))))
(def tasks-pool (at-at/mk-pool :cpu-count 1))
(def default-period 3600)
(def periodic-tasks (atom []))
(defn add-periodic-task [task]
(swap! periodic-tasks conj task))
(defn schedule-periodic-tasks []
(doseq [task @periodic-tasks]
(at-at/every default-period task tasks-pool :initial-delay (/ default-period 10))))
(ns route-ccrs.core
(:require [clojure.tools.logging :as log]
[route-ccrs.active-routes :as ar]
[route-ccrs.route-ccr :as ccr]))
(defn calculate-and-record-ccrs! [sys]
(let [c {:connection (:db sys)}]
(log/info "CCR calculation started")
(->> (into [] ar/transduce-routes (ar/active-routes {} c))
(map
(fn [[r o]]
(ccr/ccr-entry-updates
r
(ccr/get-last-known-ccr r c)
(ccr/select-current-ccr (:db sys) o))))
(filter seq)
(reduce
(fn [c u]
(let [t (-> u second first)
tc (get c t 0)]
(ccr/update! (:db sys) u)
(assoc c t (inc tc))))
{})
(log/info "calculation complete, updated:"))))
(ns lt.objs.notifos
(:require [lt.object :as object]
[lt.objs.statusbar :as statusbar]
[lt.objs.command :as cmd]
[lt.util.js :refer [wait]]
[crate.binding :refer [map-bound bound deref?]])
(:require-macros [lt.macros :refer [behavior defui]]))
(def standard-timeout 10000)
(defn working [msg]
(when msg
(set-msg! msg))
(statusbar/loader-inc))
(defn done-working
([]
(statusbar/loader-dec))
([msg]
(set-msg! msg)
(statusbar/loader-dec)))
(defn msg* [m opts]
(let [m (if (string? m)
m
(pr-str m))]
(object/merge! statusbar/statusbar-loader (merge {:message m :class ""} opts))))
(defn set-msg! [msg opts]
(msg* msg opts)
(js/clearTimeout cur-timeout)
(set! cur-timeout (wait standard-timeout #(msg* ""))))
(cmd/command {:command :reset-working
:desc "Statusbar: Reset working indicator"
:exec (fn []
(statusbar/loader-set 0)
)})
(ns puppeteer.domain.entity.message)
(defrecord Field
[title value short?])
(defrecord Attachment
[text color fields])
(defrecord Message
[channel-id user-id text timestamp attachments for-me?])
(defproject org.onyxplatform/onyx-metrics "0.8.0.2"
: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"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:dependencies [[org.clojure/clojure "1.7.0"]
[interval-metrics "1.0.0"]
[stylefruits/gniazdo "0.4.0"]]
:java-opts ^:replace ["-server" "-Xmx3g"]
:global-vars {*warn-on-reflection* true
*assert* false
*unchecked-math* :warn-on-boxed}
:profiles {:dev {:dependencies [^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.8.0.1"]
[riemann-clojure-client "0.4.1"]]
:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}})
(defproject tttclj "0.0.1-SNAPSHOT"
:description "Cool new project to do things and stuff"
:dependencies [[org.clojure/clojure "1.4.0"]
[http-kit "2.1.16"]
[compojure "1.1.8"]]
:profiles {:dev {:dependencies [[midje "1.5.0"]]}}
:main tttclj.web)
(defproject org.onyxplatform/onyx-metrics "0.8.0.3-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"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:dependencies [[org.clojure/clojure "1.7.0"]
[interval-metrics "1.0.0"]
[stylefruits/gniazdo "0.4.0"]]
:java-opts ^:replace ["-server" "-Xmx3g"]
:global-vars {*warn-on-reflection* true
*assert* false
*unchecked-math* :warn-on-boxed}
:profiles {:dev {:dependencies [^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.8.0.1"]
[riemann-clojure-client "0.4.1"]]
:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}})
(ns om-tut.core
(:require [om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]))
(enable-console-print!)
(println "A new developer message. Pay attention, dev guy!")
;; define your app data so that it doesn't get over-written on reload
(defonce app-state (atom {:list ["Lion" "Zebra" "Buffalo" "Antelope"]}))
(om/root
(fn [data owner]
(om/component
(apply dom/ul #js {:className "animals"}
(map (fn [text] (dom/li nil text)) (:list data)))))
app-state
{:target (. js/document (getElementById "app0"))})
(defn on-js-reload []
;; optionally touch your app-state to force rerendering depending on
;; your application
;; (swap! app-state update-in [:__figwheel_counter] inc)
)
(ns detritus.types)
(defn atom? [x]
(instance? clojure.lang.Atom x))
(ns noir-app.init
(:require [immutant.web :as web]
[immutant.util :as util]
[noir.server :as server]
[lobos.config]))
(server/load-views-ns 'noir-app.views)
(web/start "/" (server/gen-handler {:mode :dev :ns 'noir-app}))
(ns ^:figwheel-always potoo.core
(:require [reagent.core :as r]
[ajax.core :refer [GET POST]]))
(defonce app-state
(r/atom {:potoos []}))
(defn potoo [p]
(let [{:keys [text name date]} p]
[:li
[:span (str text ", " name ", " date)]]))
(defn potoo-list []
(fn []
(GET "/api/potoos" {:keywords? true
:response-format :json
:handler #(swap! app-state assoc :potoos %)})
[:div
[:h1 "Potooooooos!"]
[:ul
(for [p (:potoos @app-state)]
^{:key p} [potoo p])]]))
(defn ^:export run []
(r/render
[potoo-list]
(js/document.getElementById "app")))
(run)
;; demo
(comment
(defn cp [text]
(let [name "Mr. Meeseeks"
date (str (js/Date.))
potoo {:key "zxc" :text text :name name :date date}]
(swap! app-state update-in [:potoos] conj potoo))))
(ns lambdacd.state.protocols
"Defines protocols that need to be implemented by a state component")
(defprotocol StepResultUpdateConsumer
"Components implementing this protocol can update the state of the pipeline"
(consume-step-result-update [self build-number step-id step-result]
"Tells the component to update the result of a particular step. Is called on every update so it needs to handle lots of requests"))
(defprotocol PipelineStructureConsumer
"Components implementing this protocol can set the structure a pipeline had for a particular build"
(consume-pipeline-structure [self build-number pipeline-structure-representation]
"Tells the component to update the structure of a particular build."))
(defprotocol NextBuildNumberSource
"Components implementing this protocol provide the LambdaCD execution engine with new build numbers"
(next-build-number [self]
"Returns the build number for the next build. Must be comparable and greater than all existing build numbers")) ; TODO: is build number an int?
(defprotocol QueryAllBuildNumbersSource
"Components implementing this protocol can supply a list of all build numbers present in the datastore"
(all-build-numbers [self]
"Returns a sorted list of build numbers present in the datastore"))
(defprotocol QueryStepResultsSource
"Components implementing this protocol can supply steps results of a build"
(get-step-results [self build-number]
"Returns a map of step-id to step results"))
(defprotocol PipelineStructureSource
"Components implementing this protocol can supply the structure of the pipeline for a particular build"
(get-pipeline-structure [self build-number]
"Returns a map describing the pipeline of for a particular build"))
(ns app.components.snippet-list
(:require [om.next :as om :refer-macros [defui]]
[om.dom :as dom]
[app.components.snippet :refer [snippet]]))
(defn sort-snippets [snippets]
(sort-by :uuid
(fn [id1 id2] (instance? om.tempid/TempId id1))
snippets))
(defui SnippetList
Object
(render [this]
(let [{:keys [snippets]} (om/props this)
{:keys [toggle-fn create-fn edit-fn delete-fn update-fn save-fn]}
(om/get-computed this)]
(dom/div #js {:className "snippet-list"}
(dom/h2 #js {:className "snippet-list-title"}
(dom/span #js {:className "snippet-list-title-text"} "Snippets")
(dom/span #js {:className "snippet-list-title-buttons"}
(dom/button #js {:className "snippet-list-title-button"
:onClick #(when create-fn (create-fn))}
"+ Create")))
(for [sn (sort-snippets (reverse snippets))]
(snippet (om/computed sn {:toggle-fn toggle-fn
:edit-fn edit-fn
:delete-fn delete-fn
:update-fn update-fn
:save-fn save-fn})))))))
(def snippet-list (om/factory SnippetList))
(ns clj-beautify.core
(:require [clj-beautify.file-handler :as f]
[clj-beautify.beautify :refer [format-clj]])
(:gen-class))
(defn format-file
"Given a file page and a valid mode (`clj`|`edn`) open and use
`clojure.tools.reader/read-string` to transform the file to a literal so that
if can be formatted by `clojure.pprint/write`. It then writes back to the same
file with a formatted string."
[filename mode]
(let [input (f/read-file filename)
output (format-clj input mode)]
(f/write-file filename output)))
(defn -main
"Entry point of the command line program that takes a file path (or directory)
and mode (clj|edn). Formats all files to specified mode and rewrites the
original files."
[& args]
(let [arg-cnt (count args)]
(when (< 2 arg-cnt)
(throw (Exception. (str "Invalid number of arguements. Expected 2 but "
"found " arg-cnt))))
;; TODO: do something with the valid args
(doseq [file (f/list-files (nth args 1))]
(format-file file (nth args 0)))))
(defn square [x] (* x x))
(meditations
"One may know what they seek by knowing what they do not seek"
(= [__ __ __] (let [not-a-symbol? (complement symbol?)]
(map not-a-symbol? [:a 'b "c"])))
"Praise and 'complement' may help you separate the wheat from the chaff"
(= [:wheat "wheat" 'wheat]
(let [not-nil? ___]
(filter not-nil? [nil :wheat nil "wheat" nil 'wheat nil])))
"Partial functions allow procrastination"
(= 20 (let [multiply-by-5 (partial * 5)]
(___ __)))
"Don't forget: first things first"
(= [__ __ __ __]
(let [ab-adder (partial concat [:a :b])]
(ab-adder [__ __])))
"Functions can join forces as one 'composed' function"
(= 25 (let [inc-and-square (comp square inc)]
(inc-and-square __)))
"Have a go on a double dec-er"
(= __ (let [double-dec (comp dec dec)]
(double-dec 10)))
"Be careful about the order in which you mix your functions"
(= 99 (let [square-and-dec ___]
(square-and-dec 10))))
(ns todo-repl.core
#_(:load "/todo-repl/date-parsing")
(:require [todo-repl.date-parsing :as dp])
#_(:use todo-repl.date-parsing))
(defn new-task [name due-by due-after context url]
{:name name
:due-after due-after
:due-by due-by
:context context
:url url
:status :incomplete
:created (str (java.util.Date.))
})
(defn new-task-better [{:keys [name due-after due-by context url]
:or {due-by "never"
due-after nil
context nil
url [{:label "" :url ""}] }}]
(new-task name
(dp/nl-to-date due-by)
(dp/nl-to-date due-after)
context
url))
(defn add-new-task-to [new-task tasks]
(cons (new-task-better new-task) tasks))
(defn filter-tasks [filter-attrib val tasks]
(filter #(= val (filter-attrib %)) tasks))
(defn complete-task [& xs]
(map #(assoc % :status :complete)) xs)
(ns re-frame.core
(:require
[re-frame.handlers :as handlers]
[re-frame.subs :as subs]
[re-frame.middleware :as middleware]))
;; -- API -------
(def register-handler handlers/register)
(def dispatch handlers/dispatch)
(def dispatch-sync handlers/dispatch-sync)
(def register-sub subs/register)
(def subscribe subs/subscribe)
(def pure middleware/pure)
(def debug middleware/debug)
(def undoable middleware/undoable)
(def path middleware/path)
(def validate middleware/validate)
(def trim-v middleware/trim-v)
; (def log-events middleware/log-events)
;; -- Convienience -------
;; virtually ever handler will be pure, make it easy
(defn register-pure-handler
([id handler]
(register-handler id pure handler))
([id middleware handler]
(register-handler id [pure middleware] handler)))
{:user {:plugins [[cider/cider-nrepl "0.10.0-SNAPSHOT"]
[refactor-nrepl "1.2.0-SNAPSHOT"]]
:dependencies [[org.clojure/tools.nrepl "0.2.12"]]}}
(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.7.0"]
[ring "1.3.2"]
[compojure "1.3.3"]
[clj-time "0.9.0"]
[org.clojure/data.json "0.2.6"]
[org.clojure/tools.cli "0.3.3"]]
: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 io.aviso/rook "0.1.10-SNAPSHOT"
:description "Ruby on Rails-style resource mapping for Clojure/Compojure web apps"
:url "https://github.com/AvisoNovate/rook"
:license {:name "Apache Sofware License 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
:profiles {:dev
{:dependencies [[ring-mock "0.1.5"]
[io.aviso/pretty "0.1.11"]
[clj-http "0.9.1"]
[speclj "3.0.2"]
[log4j "1.2.17"]]}}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/core.async "0.1.278.0-76b25b-alpha"]
[org.clojure/tools.logging "0.2.6"]
[ring "1.3.0"]
[medley "0.4.0"]
[ring-middleware-format "0.3.2"]
[prismatic/schema "0.2.3"]]
:plugins [[speclj "3.0.2"]]
:test-paths ["spec"]
:codox {:src-dir-uri "https://github.com/AvisoNovate/rook/blob/master/"
:src-linenum-anchor-prefix "L"
:defaults {:doc/format :markdown}})
(defproject onyx-app/lein-template "0.9.7.0-alpha8"
: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 fleetdb "0.2.0-RC1"
:description "A schema-free database optimized for agile development."
:url "http://github.com/mmcgrana/fleetdb"
:source-path "src/clj"
:java-source-path "src/jvm/"
:javac-fork "true"
:dependencies [[org.clojure/clojure "1.1.0"]
[org.clojure/clojure-contrib "1.1.0"]
[clj-stacktrace "0.1.0"]
[net.sf.jopt-simple/jopt-simple "3.2"]
[clj-json "0.2.0"]]
:dev-dependencies [[org.clojars.mmcgrana/lein-clojars "0.5.0"]
[org.clojars.mmcgrana/lein-javac "0.1.0"]
[clj-unit "0.1.0"]]
:namespaces [fleetdb.server])
(ns theatralia.t-core
(:require [midje.sweet :refer :all]
[clojure.test.check :as tc]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[theatralia.core :refer [first-element]]))
;; Credits: http://zotskolf.nl/2014/11/10/testcheckbasics.html
(def prop-first-element-returns-first-element
(prop/for-all [fst gen/simple-type
v (gen/vector gen/simple-type)]
(= fst (first-element (cons fst v) :default))))
(facts "about `first-element`"
(fact "it normally returns the first element"
(first-element [1 2 3] :default) => 1
(first-element '(1 2 3) :default) => 1
(tc/quick-check 100 prop-first-element-returns-first-element)
=> (just {:result true :num-tests 100 :seed anything}))
;; I'm a little unsure how Clojure types map onto the Lisp I'm used to.
(fact "default value is returned for empty sequences"
(first-element [] :default) => :default
(first-element '() :default) => :default
(first-element nil :default) => :default
(first-element (filter even? [1 3 5]) :default) => :default))
(ns exploud.numel
(:require [cemerick.url :refer [url]]
[cheshire.core :as json]
[environ.core :refer [env]]
[exploud.http :as http]))
(def timeout
"The number of milliseconds we'll wait for a response."
10000)
(def poke-numel-url
"The base URL for Numel in poke"
(url (env :service-numel-poke-url)))
(def prod-numel-url
"The base URL for Numel in prod"
(url (env :service-numel-prod-url)))
(defn application-registrations-url
[environment application]
(if (= "prod" (name environment))
(str (url prod-numel-url "1.x" "registration" application))
(str (url poke-numel-url "1.x" "registration" application))))
(defn application-registrations
[environment application]
(let [url (application-registrations-url environment application)
{:keys [body status] :as response} (http/simple-get url {:socket-timeout timeout})]
(if (= 200 status)
(json/parse-string body true)
(throw (ex-info "Unexpected response" {:type ::unexpected-response :response response})))))
(ns {{namespace}}
(:require [play-clj.core :refer :all])
(:import [com.badlogic.gdx.graphics Color]
[com.badlogic.gdx.graphics.g2d BitmapFont]
[com.badlogic.gdx.scenes.scene2d.ui Label Label$LabelStyle]))
(defscreen main-screen
:on-show
(fn [screen entities]
(update! screen :renderer (stage))
(conj entities (label "Hello world!" (color :white))))
:on-render
(fn [screen entities]
(clear!)
(draw! screen entities)
entities))
(defgame {{app-name}}
:on-create
(fn [this]
(set-screen! this main-screen)))
(ns arachnida.core)
(require '[clojure.java.jdbc :as jdbc])
(require '[clojure.pprint :as pprint])
(require '[hozumi.rm-rf :as rm-rf])
(require '[ring.adapter.jetty :as jetty])
(require '[ring.middleware.params :as http-params])
(require '[ring.util.response :as http-response])
(require '[ring.middleware.cookies :as cookies])
(require '[hiccup.page :as page])
(require '[hiccup.form :as form])
(require '[arachnida.db-spec :as db-spec])
(require '[arachnida.db-interface :as db-interface])
(require '[arachnida.git-data-fetcher :as git-data-fetcher])
(defn -main
[& args]
(git-data-fetcher/process))
(ns structural-typing.validators
"Validators. These differ from Bouncer validators in that (1) they default to optional, and
(2) the messages include the failing value."
(:require [bouncer.validators :as v]))
(defmacro defoptional [name doc message-format & body]
`(do
(v/defvalidator ~name {:optional true
:default-message-format ~message-format} ~@body)
(alter-meta! (var ~name) assoc :doc ~doc)))
(v/defvalidator ^{:doc "Fails if key is missing or its value is `nil`."} required
{:default-message-format "%s must be present and non-nil"}
[v]
(not (nil? v)))
(defoptional number
"Validates against optional `number?`"
"%s is `%s`, which is not a number"
[maybe-a-number]
(number? maybe-a-number))
(defproject ring/ring-jetty-adapter "1.9.1"
: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.9.1"]
[ring/ring-servlet "1.9.1"]
[org.eclipse.jetty/jetty-server "9.4.36.v20210114"]]
:aliases {"test-all" ["with-profile" "default:+1.8:+1.9:+1.10" "test"]}
:profiles
{:dev {:dependencies [[clj-http "3.10.0"]
[less-awful-ssl "1.0.6"]]
:jvm-opts ["-Dorg.eclipse.jetty.server.HttpChannelState.DEFAULT_TIMEOUT=500"]}
:1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]}
:1.9 {:dependencies [[org.clojure/clojure "1.9.0"]]}
:1.10 {:dependencies [[org.clojure/clojure "1.10.2"]]}})
(ns ^{:doc "When this library is loaded, create a logger named
'events' and send all application-specific events to it.
To view log messages in the browser console, add a call
to `(log/console-output)` to this namespace or evaluate this from the
REPL.
For more information see library.logging."}
one.repmax.logging
(:require [one.dispatch :as dispatch]
[one.logging :as log]))
(def ^{:doc "The logger that receives all application-specific events."}
logger (log/get-logger "events"))
(dispatch/react-to (constantly true)
(fn [t d] (log/info logger (str (pr-str t) " - " (pr-str d)))))
;; log to the console
(log/start-display (log/console-output))
(ns cglossa.core
(:require [reagent.core :as reagent :refer [atom]]
[plumbing.core :as plumbing :refer [map-vals]]
[cglossa.centre :as centre]))
(def state {:showing-results false})
(def data {:categories ["ku" "hest"]
:users ["per" "kari"]})
(defonce app-state (into {} (map-vals atom state)))
(defonce app-data (into {} (map-vals atom data)))
(defn navbar []
[:div.navbar.navbar-fixed-top [:div.navbar-inner [:div.container [:span.brand "Glossa"]]]])
(defn bottom [_ {:keys [categories]}]
[:div (for [cat @categories]
[:div cat])])
(defn app [s d]
[:div
[navbar]
[:div.container-fluid
[centre/top s d]]
[bottom s d]])
(defn ^:export main []
(reagent/render-component
(fn []
[app app-state app-data])
(. js/document (getElementById "app"))))
(ns pfrt.main
(:require [pfrt.pf :refer [packet-filter]]
[pfrt.web :refer [web-server]]
[pfrt.core.app :as app]
[pfrt.settings :as settings])
(:gen-class))
;; Global var, only used for store
;; a global app instance when this is
;; used from REPL.
(def main-app nil)
;; System private constructor with
;; clear and explicit dependency injection
;; on each app components.
(defn- make-app []
(let [config (settings/cfg)
pf (packet-filter config)
webserver (web-server config pf)]
(-> (app/->App [pf webserver])
(assoc :config config)
(app/init))))
;; Start function that should
;; only be used from REPL.
(defn start []
(alter-var-root #'main-app
(constantly (make-app)))
(start main-app))
;; Stop function that should
;; only be used from REPL.
(defn stop []
(app/stop main-app))
;; Main entry point
(defn -main
[& args]
(let [app-instance (make-app)]
(app/start app-instance)
(println "Application started.")))
(ns vinculum.main
(:require [vinculum.core :as core]))
(core/main)
;; This is usefull to display the functions, ask the user for the
;; input parameters, and then execute them, presenting the result to
;; the user.
;; Intended to expose the functions in a Browser, but it could be
;; anything else: command line, rich client, ...
;;
(ns fnx.meta.expose
"Get the public functions of a namespace"
(:use [midje.sweet]))
;;
;; * First we load the ns with `require`
;; * Then we get the public functions (read from bottom to top):
;; * We want only functions, not the other vars: We can spot them because they have an `:arglists` in their meta.
;; * Don't really know why, but we need to `ns-resolve` the symbols(?)
;; * Get the public vars with `ns-publics`
;;
(defn ns-public-fn
"Given a ns symbol, returns all the public fns of this ns."
[ns] (do (require ns)
(filter #(:arglists (meta %))
(map #(ns-resolve ns %)
(keys (ns-publics (find-ns ns)))))))
(fact "ns-public-fn"
(second (ns-public-fn 'fnx.meta.example)) => (resolve 'fnx.meta.example/hello-noir))
(fact "ns-public-fn: listing functions and calling them (it's more an example of usage than a true test)"
(map (fn [f] (apply f
(range 0 (count (first (:arglists (meta f)))))))
(ns-public-fn 'fnx.meta.example)) => ["arg=0", "Hello noir" "args=0,1"])
; Copyright 2009 Howard M. Lewis Ship
;
; 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 cascade.utils)
(defmacro lcond
"A reimplementation of Clojure's cond, with the addition of a special :let
keyword that injects an implicit let into the logic."
[& clauses]
(when clauses
(if (= 1 (count clauses))
(throw (IllegalArgumentException. "lcond requires an even number of forms")))
(let
[tst (first clauses)
expr (second clauses)
rst (next (next clauses))]
(if (= tst :let)
`(let [~@expr] (lcond ~@rst))
`(if ~tst ~expr (lcond ~@rst))))))
(ns example.one-bar-sequencer
(:use overtone.live))
(def metro (metronome 128))
; Our bar is a map of beat to instruments to play
(def bar {0 [kick]
0.5 [c-hat]
1 [kick snare]
1.5 [c-hat]
2 [kick]
2.5 [c-hat]
3 [kick snare]
3.5 [c-hat]})
; For every tick of the metronome, we loop through all our beats
; and find the apropriate one my taking the metronome tick mod 4.
; Then we play all the instruments for that beat.
(defn player
[tick]
(dorun
(for [k (keys bar)]
(let [beat (Math/floor k)
offset (- k beat)]
(if (= 0 (mod (- tick beat) 4))
(let [instruments (bar k)]
(dorun
(for [instrument instruments]
(at (metro (+ offset tick)) (instrument))))))))))
(ns blocks.store.replica-test
(:require
(blocks.store
[memory :refer [memory-store]]
[replica :refer [replica-store]]
[tests :refer [test-block-store]])
[clojure.test :refer :all]))
; TODO: test that writes actually populate all backing stores.
; TODO: test that removing blocks from one store still returns all blocks.
; TODO: test that listing provides merged block list.
(deftest ^:integration test-replica-store
(let [store (replica-store [(memory-store) (memory-store)])]
(test-block-store
"replica-store" store
:max-size 1024
:blocks 25)))
(println "Map Function Tests")
(is (= (map inc [1 2 3]) [2 3 4]))
(ns circle.backend.test-build
(:use midje.sweet)
(:use [circle.backend.build.test-utils :only (minimal-build)])
(:use circle.model.build))
(fact "checkout-dir handles spaces"
(let [b (minimal-build :build_num 42)]
(checkout-dir b) => "Dummy-Project-42"))
(fact "ensure-project-id works"
(let [b (minimal-build)]
@b => (contains {:_project_id truthy})))(defproject cljam "0.1.2"
:description "A DNA Sequence Alignment/Map (SAM) library for Clojure"
:url "https://chrovis.github.io/cljam"
:license {:name "Apache License, Version 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/tools.logging "0.2.6"]
[org.clojure/tools.cli "0.3.1"]
[me.raynes/fs "1.4.5"]
[pandect "0.3.2"]
[clj-sub-command "0.2.0"]
[bgzf4j "0.1.0"]]
:plugins [[lein-midje "3.1.3"]
[lein-bin "0.3.4"]
[lein-marginalia "0.7.1"]]
:profiles {:dev {:dependencies [[midje "1.6.3"]
[criterium "0.4.3"]
[cavia "0.1.2"]
[primitive-math "0.1.3"]]
:global-vars {*warn-on-reflection* true}}}
:main cljam.main
:aot [cljam.main]
:bin {:name "cljam"}
:repl-options {:init-ns user})
(defproject io.aviso/rook "0.1.4"
: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 when tracking down reflection warnings.
:profiles {:reflection-warnings {:aot :all
:global-vars {*warn-on-reflection* true}}
:dev {:dependencies [[ring-mock "0.1.5"]]}}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/tools.logging "0.2.6"]
[compojure "1.1.6"]]
:plugins [[test2junit "1.0.1"]])
(defproject stencil "0.3.0-SNAPSHOT"
:description "Mustache in Clojure"
:dependencies [[org.clojure/clojure "1.3.0"]
[scout "0.1.0"]
[slingshot "0.8.0"]
[org.clojure/core.cache "0.5.0"]]
:profiles {:dev {:dependencies [[org.clojure/data.json "0.1.2"]]}
:clj1.2 {:dependencies [[org.clojure/clojure "1.2.1"]]}
:clj1.3 {:dependencies [[org.clojure/clojure "1.3.0"]]}
:clj1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}}
:extra-files-to-clean ["test/spec"])(defproject ktra-indexer "0.1.0-SNAPSHOT"
:description "A simple application for indexing and searching KTRA track
listings"
:url "https://github.com/terop/ktra-indexer"
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.8.0"]
[compojure "1.5.1"]
[ring/ring-defaults "0.2.1"]
[ring/ring-devel "1.5.0"]
[org.immutant/web "2.1.5"]
[selmer "1.0.7"]
[cheshire "5.6.3"]
[org.postgresql/postgresql "9.4.1207"]
[org.clojure/java.jdbc "0.6.1"]
[honeysql "0.7.0"]
[clj-time "0.12.0"]
[buddy/buddy-auth "1.1.0"]
[com.yubico/yubico-validation-client2 "3.0.1"]
[org.apache.commons/commons-lang3 "3.4"]]
:main ktra-indexer.handler
:aot [ktra-indexer.handler]
:plugins [[lein-environ "1.0.3"]]
:profiles
{:dev {:dependencies [[ring/ring-mock "0.3.0"]]
:resource-paths ["resources"]
:env {:squiggly {:checkers [:eastwood :kibit :typed]}}}})
(defproject onyx-app/lein-template "0.9.9.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)
(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 (:type @(subscribe [:page])))]
(let [current-page (:type @(subscribe [:page]))]
(when (not= @prev-page current-page)
(when (= @prev-page :search)
(reset! search-query ""))
(reset! prev-page current-page)))
[:div.search-bar
[:input {:type "text"
:placeholder "Search..."
:value @search-query
:on-change
(fn [e]
(reset! search-query (.. e -target -value))
(dispatch [:braid.search/update-query! (.. e -target -value)]))}]
(if (and @search-query (not= "" @search-query))
[:a.action.clear
{:on-click (fn [] (reset! search-query ""))
:href (routes/group-page-path {:group-id @(subscribe [:open-group-id])
:page-id "inbox"})
:style {:color (color/->color @(subscribe [:open-group-id]))}}]
[:div.action.search])]))
(ns com.draines.postal.core
(:use [com.draines.postal.sendmail :only [sendmail-send]]
[com.draines.postal.smtp :only [smtp-send]]))
(defn send-message [msg]
(when-not (and (:from msg)
(:to msg)
(:subject msg)
(:body msg))
(throw (Exception. "message needs at least :from, :to, :subject, and :body")))
(if (:host msg)
(smtp-send msg)
(sendmail-send msg)))
(ns haystack.search-test
(:require [haystack.search :as sut :refer [search]]
;; [clojure.test :as t :refer :all]
[haystack.helpers :refer :all]
))
(test-search
matnrs-check
{:search "2843977 2542450"}
(max-docs 50)
(in-top 2843977 2)
(in-top 2542450 2)
)
(test-search
upcs-check
{:search "078477045442 980100350109"}
(max-docs 500)
(in-top 199152 2)
(in-top 2542450 2)
)
(ns zetawar.util
(:require
[fipp.edn]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Accessors
(defn solo
"Like first, but throws if more than one item."
[coll]
(assert (not (next coll)))
(first coll))
(defn only
"Like first, but throws unless exactly one item."
[coll]
(assert (not (next coll)))
(if-let [result (first coll)]
result
(assert false)))
(defn ssolo
"Same as (solo (solo coll))"
[coll]
(solo (solo coll)))
(defn oonly
"Same as (only (only coll))"
[coll]
(only (only coll)))
;; TODO: check performance
(defn select-values [m ks]
(reduce #(if-let [v (m %2)] (conj %1 v) %1) [] ks))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Debugging
;; TODO: refer to https://github.com/shaunlebron/How-To-Debug-CLJS/blob/master/src/example/macros.clj
(defn spy [x]
(js/console.debug
(with-out-str
(fipp.edn/pprint x)))
x)
(defproject onyx-app/lein-template "0.12.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)
(ns kiries.layout
(:use hiccup.core)
(:use hiccup.page))
(defn full-layout [title & content]
(html5
[:head
(include-css "/kibana/common/css/bootstrap.dark.min.css")
(include-css "/kibana/common/css/bootstrap-responsive.min.css")
(include-css "/kibana/common/css/font-awesome.min.css")
[:title title]]
[:body
[:div.container-fluid.main
[:div.row-fluid
content]]]))
(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 layout-with-name))
(defn get [& args]
(apply clojure.core/get @layouts args))
(defn register
"Register a layout function to a shortname"
[short-name layout-fn]
(swap! layouts
assoc (str short-name) layout-fn))
(ns time-tracker.fixtures
(:require [clojure.java.jdbc :as jdbc]
[time-tracker.migration :refer [migrate-db]]
[time-tracker.db :as db]
[time-tracker.core :refer [app]]
[time-tracker.auth.core :as auth]
[time-tracker.auth.test-helpers :refer [fake-token->credentials]]
[environ.core :as environ]
[time-tracker.config :as config])
(:use org.httpkit.server))
(defn init! [f]
(time-tracker.core/init!)
(f))
(defn destroy-db []
(jdbc/execute! config/db-spec [(str "DROP OWNED BY " (environ/env :test-db-username))]))
(defn migrate-test-db [f]
(migrate-db)
(f)
(destroy-db))
(defn serve-app [f]
(with-redefs [auth/token->credentials
fake-token->credentials]
(let [stop-fn (run-server app {:port 8000})]
(f)
(stop-fn :timeout 100))))
(defn isolate-db [f]
(jdbc/with-db-transaction [conn (db/connection)]
(jdbc/db-set-rollback-only! conn)
(with-redefs [db/connection (fn [] conn)]
(f))))
(defproject onyx-app/lein-template "0.10.0.0-alpha6"
: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 cli4clj "1.5.2"
;(defproject cli4clj "1.5.3-SNAPSHOT"
:description "Create simple interactive CLIs for Clojure applications."
:url "https://github.com/ruedigergad/cli4clj"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]
[clj-assorted-utils "1.18.2"]
[org.clojure/core.async "0.4.474"]
[jline/jline "2.14.6"]]
:global-vars {*warn-on-reflection* true}
:html5-docs-docs-dir "ghpages/doc"
:html5-docs-ns-includes #"^cli4clj.*"
:html5-docs-repository-url "https://github.com/ruedigergad/cli4clj/blob/master"
:test2junit-output-dir "ghpages/test-results"
:test2junit-run-ant true
:main cli4clj.example
:plugins [[lein-cloverage "1.0.2"] [test2junit "1.3.3"] [lein-html5-docs "3.0.3"]]
:profiles {:repl {:dependencies [[jonase/eastwood "0.2.6" :exclusions [org.clojure/clojure]]]}}
)
(defproject kiries "0.1.0-SNAPSHOT"
:description "A bundled deployment of Kibana, Riemann, and ElasticSearch"
:license "Eclipse Public License v1.0"
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/tools.cli "0.2.1"]
[clj-logging-config "1.9.6"]
[riemann "0.2.2"]
[clj-time "0.6.0"]
[clojurewerkz/elastisch "1.2.0"]
[org.elasticsearch/elasticsearch "0.90.3"]
[compojure "1.1.5"]
[hiccup "1.0.4"]
[org.markdownj/markdownj "0.3.0-1.0.2b4"]
[ring/ring-core "1.2.0"]
[ring/ring-jetty-adapter "1.2.0"]
[clojure-csv/clojure-csv "1.3.2"]
]
:resource-paths ["." "resources"]
:jar-exclusions [#"^htdocs"]
:main kiries.core
:aliases {"server" ["trampoline" "run" "-m" "kiries.core"]})
;(defproject cli4clj "1.2.5"
(defproject cli4clj "1.2.6-SNAPSHOT"
:description "Create simple interactive CLIs for Clojure applications."
:url "https://github.com/ruedigergad/cli4clj"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[clj-assorted-utils "1.15.0"]
[jline/jline "2.14.2"]]
:global-vars {*warn-on-reflection* true}
:html5-docs-docs-dir "ghpages/doc"
:html5-docs-ns-includes #"^cli4clj.*"
:html5-docs-repository-url "https://github.com/ruedigergad/cli4clj/blob/master"
:test2junit-output-dir "ghpages/test-results"
:test2junit-run-ant true
:main cli4clj.example
:plugins [[lein-cloverage "1.0.2"] [test2junit "1.2.5"] [lein-html5-docs "3.0.3"]]
:profiles {:repl {:dependencies [[jonase/eastwood "0.2.3" :exclusions [org.clojure/clojure]]]}}
)
(defproject me.manuelp/confunion "0.1.1-SNAPSHOT"
:description "Library for managing configuration based on EDN files."
:url "http://github.com/manuelp/confunion"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/tools.logging "0.2.6"]]
:plugins [[lein-marginalia "0.7.1"]]
:source-paths ["src/clojure"]
:test-paths ["test/clojure"]
:java-source-paths ["src/java"]
:javac-options ["-target" "1.7"
"-source" "1.7"])
(defproject com.stuartsierra/component "0.2.2"
: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}
:aliases {"test-all"
["with-profile" "clj1.4:clj1.5:clj1.6:clj1.7" "test"]}
:profiles {:dev {:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/tools.namespace "0.2.4"]]
:source-paths ["dev"]}
:clj1.7 {:dependencies [[org.clojure/clojure "1.7.0-master-SNAPSHOT"]]
:repositories {"sonatype-oss-public"
"https://oss.sonatype.org/content/groups/public"}}
:clj1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
:clj1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]}
:clj1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}})
(defproject thinktopic/cortex "0.1.0-SNAPSHOT"
:description "A neural network toolkit for Clojure."
:dependencies [[org.clojure/clojure "1.8.0-RC4"]
[com.taoensso/timbre "4.2.0"]
[net.mikera/vectorz-clj "0.40.0"]
[org.clojure/test.check "0.9.0"]]
:jvm-opts ["-Xmx8g"
"-XX:+UseConcMarkSweepGC"
"-XX:-OmitStackTraceInFastThrow"])
(ns audio-utils.recorder
(:require [om.next :as om :refer-macros [defui]]
[om.dom :as dom]
[audio-utils.util :refer [audio-context get-user-media]]
[audio-utils.gate :as g]))
(defui Recorder
Object
(start [this]
(let [audio-ctx (audio-context)
gate (g/gate {:audio-ctx audio-ctx})]
(om/update-state! this assoc
:audio-ctx audio-ctx
:gate gate)
(get-user-media {:audio true}
#(.connect-audio-nodes this %)
js/console.warn)))
(connect-audio-nodes [this stream]
(let [{:keys [audio-ctx gate]} (om/get-state this)
source (.createMediaStreamSource audio-ctx
stream)]
(.connect source (.-destination audio-ctx))))
(stop [this]
(let [audio-ctx (:audio-ctx (om/get-state this))]
(.close audio-ctx)
(om/update-state! this dissoc :audio-ctx)))
(componentWillReceiveProps [this new-props]
(when (not= (:record? (om/props this))
(:record? new-props))
(if (:record? new-props)
(.start this)
(.stop this))))
(render [this]
(dom/div nil)))
(def recorder (om/factory Recorder))
(ns org.scode.sob
(:gen-class)
(:require [org.scode.sob.markdown :as markdown]
[clojure.contrib.command-line :as cmdline]
[clojure.contrib.logging :as logging]
[ring.adapter.jetty])
(:use [org.scode.sob.repos :as repos]))
(defn die [msg]
(logging/fatal msg)
(System/exit 1))
(defn make-blog-app
[port base path]
(let [repos (repos/new path)]
(fn [req]
{:status 200
:headers {"Content-Type" "text/html"}
:body (str req)})))
(defn serve-blog
"Start serving a blog at http://*:port/base."
[port base path]
(logging/info (str "starting sob on *:" port base ", serving " path))
(ring.adapter.jetty/run-jetty (make-blog-app port base path) {:port port}))
(defn -main [& args]
(cmdline/with-command-line args
"sob - scode's own blog"
[[port "Select listen port" 8081]
[base "Select base URI path" "/"]
paths]
(if (> 1 (count paths))
(die "only one file system path currently supported"))
(if (empty? paths)
(die "must specify the path to a blog"))
(serve-blog port base (first paths))))
{
:name "split-filter-fastqs",
:path "",
:func (fn [eid & data]
(if (pg/eoi? eid)
(pg/done)
(let [exp (cmn/get-exp-info eid :exp)]
(infof "Splitting and filtering fastqs by replicates for %s" eid)
;; This case dispatching is lame! Need to fix with mmethod
(case exp
:tnseq (htts/split-filter-fastqs eid)
:rnaseq (htrs/split-filter-fastqs eid)
:wgseq (htws/split-filter-fastqs eid))
eid)))
:description "Uses experiment id EID to obtain set of initial fastqs for experiment and then splits them by experiment sample barcodes and filters these for quality, then writes new fastqs for all replicates.",
}
(ns incise.parsers.html-spec
(:require [incise.parsers.html :refer :all]
[incise.parsers.core :refer [map->Parse]]
[clojure.java.io :refer [file resource]]
[speclj.core :refer :all]))
(describe "File->Parse"
(with short-md-file (file (resource "spec/short-sample.md")))
(it "reads some stuff out of a file, yo"
(should= (map->Parse {:title "My Short Page"
:layout :page
:date "2013-08-12"
:path "2013/8/12/my-short-page/index.html"
:tags [:cool]
:category :blarg
:content "\n\nHey there!\n"
:extension "/index.html"})
(File->Parse identity @short-md-file))))
(run-specs)
(ns bytebuf.buffer
"Buffer abstractions."
(:import java.nio.ByteBuffer
io.netty.buffer.ByteBuf
io.netty.buffer.ByteBufAllocator))
(defprotocol IBuffer
(read-integer* [_] "Read an integer (32 bits) from buffer.")
(read-long* [_] "Read an long (64 bits) from buffer.")
(tell* [_] "Get the current position index of buffer.")
(seek* [_ val] "Set the current position index on buffer."))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; NIO ByteBuffer implementation
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(extend-type ByteBuffer
IBuffer
(read-integer* [buff]
(.getInt buff))
(read-long* [buff]
(.getLong buff))
(tell* [buff]
(.position buff))
(seek* [buff val]
(.position buff val)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Public Api
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(def ^{:private true}
allocator (ByteBufAllocator/DEFAULT))
(defn allocate
([size] (allocate size {}))
([size {:keys [type impl] :or {type :heap impl :nio}}]
(case impl
:nio (case type
:heap (ByteBuffer/allocate size)
:direct (ByteBuffer/allocateDirect size))
:netty (case type
:heap (.heapBuffer allocator size)
:direct (.directBuffer allocator size)))))
(defn seek!
"Set the position index on the buffer."
[buff ^long pos]
(seek! buff pos))
(ns dragon.data.sources.core
(:require [clojure.java.shell :as shell]
[dragon.config :as config]
[taoensso.timbre :as log]))
(defn execute-db-command!
[component]
(let [start-cfg (config/db-start-config component)
home (:home start-cfg)
args (:args start-cfg)]
(shell/with-sh-dir home
(log/debugf "Running command in %s ..." home)
(log/debug "Using shell/sh args:" args)
(apply shell/sh args))))
(defn remove-connection
[component]
(assoc component :conn nil))
(ns ^:figwheel-always re-view.core
(:require [clojure.string :as string]))
(defn parse-name [n]
(str (name (ns-name *ns*)) "/" n))
(defmacro defview
([view-name methods]
`(def ~view-name
(~'re-view.core/view ~(assoc methods
:display-name (str (last (string/split (name (ns-name *ns*)) #"\.")) "/" view-name)))))
([view-name a1 a2 & body]
(let [[methods args body] (if (map? a1)
[a1 a2 body]
[{} a1 (cons a2 body)])]
`(~'re-view.core/defview ~view-name
~(assoc methods :render `(~'fn ~args (~'re-view.hiccup/element (do ~@body))))))))
(ns matross.test.helper
"Helper functions for writing and running tests"
(:require [me.raynes.conch :refer [with-programs]]
[matross.connections.ssh :refer [translate-ssh-config ssh-connection]]
[matross.connections.core :refer [connect disconnect]]))
(defn get-available-vms []
(with-programs [vagrant grep cut]
(cut "-f1" "-d "
(vagrant "status" {:seq true})
{:seq true})))
(def vagrant-test-connection
(memoize (fn [] (translate-ssh-config (slurp (System/getenv "TEST_SSH_CONF"))))))
(defmacro task-tests
"Evaluate the body against the test vm connection, exposed as conn"
[conn & body]
`(let [~conn (ssh-connection (vagrant-test-connection))]
(connect ~conn)
~@body
(disconnect ~conn)))
(ns dna)
(defn- strand-convert [ch]
(cond
(= \T ch) \U
:else ch
)
)
(defn to-rna [dna]
(apply str (map strand-convert dna))
)(ns etcd-clojure.core-test
(:require [clojure.test :refer :all]
[etcd-clojure.core :as etcd]))
(defn setup-test []
(etcd/connect! "http://127.0.0.1:4001"))
(defn teardown-test []
(println "teardown"))
(defn once-fixtures [f]
(setup-test)
(try
(f)
(finally (teardown-test))))
(use-fixtures :once once-fixtures)
(deftest test-set
(testing "should set a value"
(is (= "bar" (get (etcd/set "foo" "bar") "value")))))
(deftest test-create
(testing "should set a value"
(is (= "bar" (get (etcd/create "foo" "bar") "value")))))
(deftest test-delete
(testing "should delete a value"
(etcd/set "foo" "bar")
(is (= "DELETE" (get (etcd/delete "foo") "action")))))
(deftest test-get
(testing "should get a value"
(etcd/set "foo" "bar")
(is (= "bar" (etcd/get "foo")))))
(ns tixi.mutators.delete
(:require [tixi.data :as d]
[tixi.mutators.shared :as msh]
[tixi.mutators.locks :as ml]
[tixi.mutators.undo :as mu]
[tixi.items :as i]))
(defn delete-items! [ids]
(when (not-empty ids)
(mu/snapshot!)
(doseq [id ids]
(ml/delete-from-locks! id (d/completed-item id))
(msh/update-state! update-in [:completed] dissoc id))))
(ns clj-ravendb.client-deleting-indexes-test
(:require [clojure.test :refer :all]
[clj-ravendb.client :refer :all]
[clj-ravendb.requests :as req]
[clj-ravendb.responses :as res]
[clj-ravendb.config :refer :all]))
(let [caching-client (client ravendb-url ravendb-database {:caching :aggressive :ssl-insecure? true :oauth-url oauth-url :api-key api-key})
client (client ravendb-url ravendb-database {:ssl-insecure? true :oauth-url oauth-url :api-key api-key})]
(doseq [i ["test-index" "test-index2"]]
(put-index! client {:index i
:where [[:== :name "TestDocument"]]
:select [:name]}))
(deftest test-delete-index-returns-correct-status-code
(testing "deleting an index returns the correct status code"
(let [actual (delete-index! client "test-index")
expected 204]
(is (= expected (actual :status))))))
(deftest test-delete-index-returns-correct-status-code-when-using-caching-client
(testing "deleting an index returns the correct status code"
(let [actual (delete-index! caching-client "test-index2")
expected 204]
(is (= expected (actual :status)))))))
;;;
;;; Copyright 2015 Ruediger Gad
;;;
;;; This software is released under the terms of the Eclipse Public License
;;; (EPL) 1.0. You can find a copy of the EPL at:
;;; http://opensource.org/licenses/eclipse-1.0.php
;;;
(ns
^{:author "Ruediger Gad",
:doc "Helper that are primarily used during experiments"}
dsbdp.experiment-helper
(:require
[clojure.walk :refer :all]
[dsbdp.byte-array-conversion :refer :all]))
(defmacro create-proc-fns
[fn-1 fn-n n]
(loop [fns (prewalk-replace {:idx 0} [fn-1])]
(if (< (count fns) n)
(recur (conj fns (prewalk-replace {:idx (count fns)} fn-n)))
(do
(println "proc-fns-full:" fns)
fns))))
(defmacro create-no-op-proc-fns
[n]
`(create-proc-fns (fn [~'_ ~'_]) (fn [~'_ ~'_]) ~n))
(defmacro create-inc-proc-fns
[n]
`(create-proc-fns (fn [~'i ~'_] (inc ~'i)) (fn [~'_ ~'o] (inc ~'o)) ~n))
(ns selmer.node
" Node protocol for the objects that get accum'd in the post-parse vector.
Same vector that will be processed by the runtime context-aware renderer.
Currently only TextNodes and FunctionNodes. Anything that requires action
upon context map data at runtime is handled by a generated anonymous function. "
(:gen-class))
;; Generic INode protocol
(defprotocol INode
(render-node [this context-map] "Renders the context"))
;; Implements fn handler for the context map. fn handlers can
;; access any data in the context map.
(deftype FunctionNode [handler]
INode
(render-node [this context-map]
(handler context-map)))
;; Implements dumb text content injection at runtime.
(deftype TextNode [text]
INode
(render-node [this context-map]
text))
(ns clj-chess.ecn
"Functions for reading chess games in ECN (extensible chess notation)
format."
(:require [clojure.edn :as edn]
[clojure.java.io :as io])
(:import (java.io PushbackReader)))
(defn reader
"Convenience function for creating a java PushbackReader for the given
file name. Why isn't this included in Clojure?"
[filename]
(PushbackReader. (io/reader filename)))
(defn edn-seq
"A lazy sequence of EDN objects in from the provided reader."
[rdr]
(when-let [game (edn/read rdr)]
(cons game (lazy-seq (edn-seq rdr)))))
(defn game-headers
"Returns a lazy sequence of the game headers of an ECN file."
[rdr]
(map (comp rest second) (edn-seq rdr)))
(defn games-in-file [ecn-file]
(edn-seq (reader ecn-file))); vi: ft=clojure
(set-env!
:resource-paths #{"src"}
:dependencies '[[org.clojure/clojure "1.8.0"]
[incanter "1.9.0"]])
(task-options!
aot {:all true}
pom {:project 'analyze-data
:version "0.0.0"}
jar {:main 'analyze-data.core})
(deftask build []
(comp (aot) (pom) (uber) (jar) (target)))
(ns quil.helpers.applet-listener
(:gen-class
:name quil.helpers.AppletListener
:main false
:init init
:state listeners
:constructors {[java.util.Map] []}
:methods [["dispose" [] java.lang.Void]]))
(defn safe-call [fn]
(when fn (fn)))
(defn -init [listeners]
[[] listeners])
(defn -dispose [this]
(safe-call (:on-dispose (.listeners this))));; https://github.com/technomancy/leiningen/blob/stable/doc/PROFILES.md
{:provided
{:dependencies
[[djblue/portal "0.21.2"]]}
:user
{:plugins
[[cider/cider-nrepl "0.27.4"]
[lein-ancient "1.0.0-RC3"]
[lein-check-namespace-decls "1.0.4"]
[lein-cljfmt "0.8.0"]
[lein-nsorg "0.3.0"]
[nrepl "0.9.0"]
[refactor-nrepl "3.1.0"]]}
:dependencies
[#_[alembic "0.3.2"]
[antq "RELEASE"]
[clj-kondo "RELEASE"]]
:aliases {"clj-kondo" ["run" "-m" "clj-kondo.main"]
"outdated" ["run" "-m" "antq.core"]}}
(ns devsetup
(:require [demo :as site]
[runtests]
[reagent.core :as r]
[figwheel.client :as fw]))
(defn test-results []
[runtests/test-output-mini])
(defn start! []
(demo/start! {:test-results test-results})
(runtests/run-tests))
(when r/is-client
(fw/start
{:websocket-url "ws://localhost:3449/figwheel-ws"
:jsload-callback #(start!)
:heads-up-display true
:load-warninged-code false}))
(start!)
(ns ^{:doc "Functions dealing with making various forms of
Midje output be ergonomically colorful."}
midje.emission.colorize
(:require [colorize.core :as color]
[clojure.string :as str]
[midje.config :as config])
(:use [midje.util.ecosystem :only [getenv on-windows?]]))
(defn colorize-setting []
(config/choice :colorize))
(defn- colorize-config-as-str []
(let [setting-as-str (str (colorize-setting))]
(when-not (str/blank? setting-as-str) setting-as-str)))
(defn- colorize-choice []
(str/upper-case (or (getenv "MIDJE_COLORIZE")
(colorize-config-as-str)
(str (not (on-windows?))))))
(defn init! []
(case (colorize-choice)
"TRUE" (do
(def fail color/red)
(def pass color/green)
(def note color/cyan))
("REVERSE" ":REVERSE") (do
(def fail color/red-bg)
(def pass color/green-bg)
(def note color/cyan-bg))
(do
(def fail str)
(def pass str)
(def note str))))
(ns themis.extended-protos
(:require [themis.protocols :as protocols]))
(extend-protocol protocols/Navigable
clojure.lang.PersistentVector
(-navigate [t coordinate-vec]
(get-in t coordinate-vec))
clojure.lang.IPersistentMap
(-navigate [t coordinate-vec]
(get-in t coordinate-vec)))
(ns madouc.db
(:require [mount.core :refer [defstate]]
[conman.core :as conman]
[madouc.config :refer [env]]))
(defn- make-pool-spec
[host db user pass]
{:jdbc-url (format "jdbc:postgresql://%s/%s" host db)
:username user
:password pass})
(defstate con
:start (conman/connect! (make-pool-spec
(env :db-host)
(env :db-name)
(env :db-user)
(env :db-password)))
:stop (conman/disconnect! con))
(ns hyphen-keeper.db
"Persistence for the hyphenation dictionary"
(:require [yesql.core :refer [defqueries]]))
(def ^:private db "jdbc:mysql://localhost:3306/hyphenation?user=hyphenation&serverTimezone=UTC")
(defqueries "hyphen_keeper/queries.sql" {:connection db})
(defn read-words
"Return a coll of words for given `spelling`"
[spelling]
(-> {:spelling spelling} words))
(defn read-words-paginated
"Return a coll of words for given `spelling` using `max-rows` and `offset` for pagination"
[spelling offset max-rows]
(-> {:spelling spelling :max_rows max-rows :offset offset}
words-paginated))
(defn search-words
"Return a coll of words for given `spelling` and given `search` term"
[spelling search]
(-> {:spelling spelling :search search}
words-search))
(defn save-word!
"Persist `word` with given `hyphenation` and `spelling`"
[word hyphenation spelling]
(-> {:word word :hyphenation hyphenation :spelling spelling}
save-word-internal!))
(defn remove-word! [word spelling]
(-> {:word word :spelling spelling}
remove-word-internal!))
(defproject debugging "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://github.com/funcool/catacumba"
:license {:name "BSD (2-Clause)"
:url "http://opensource.org/licenses/BSD-2-Clause"}
:dependencies [[org.clojure/clojure "1.7.0-RC1"]
[funcool/catacumba "0.1.0-alpha2"]
[prone "0.8.1"]]
:main ^:skip-aot debugging.core
:target-path "target/%s"
:profiles {:uberjar {:aot :all}})
(ns clj-git.test.core-test
(:require [clojure.java.io :as io]
[clojure.test :refer :all])
(:require [clj-git.core :as git] :reload-all))
(def es-src-dir (-> "clj_git"
io/resource
io/file
.getParent
(io/file "elasticsearch-src")
.getCanonicalPath))
(defn maybe-prep-repo [dir]
(if (.exists (io/file dir ".git"))
(do
(print "Elasticsearch source already cloned. Pulling...")
(flush)
(git/git-pull (git/load-repo dir)))
(do
(print "Elasticsearch source missing. Cloning...")
(flush)
(git/git-clone
dir
"https://github.com/elastic/elasticsearch.git")))
(println " Done."))
(deftest parse-commit
(maybe-prep-repo es-src-dir)
(time
(testing "the first thousand commits can parse"
(is (= 1000 (->> es-src-dir
git/load-repo
git/git-log
(take 1000)
count))))))
(def scenes [{:subject "Frankie"
:action "say"
:object "relax"}
{:subject "Lucy"
:action "❤s"
:object "Clojure"}
{:subject "Rich"
:action "tries"
:object "a new conditioner"}])
(println "People:" (->> scenes
(map :subject)
(interpose ", ")
(reduce str)))
;;=> People: Frankie, Lucy, Rich
(defproject io.nervous/hildebrand "0.2.1"
:description "High-level, asynchronous AWS client library"
:url "https://github.com/nervous-systems/hildebrand"
:License {:name "Unlicense" :url "http://unlicense.org/UNLICENSE"}
:scm {:name "git" :url "https://github.com/nervous-systems/hildebrand"}
:deploy-repositories [["clojars" {:creds :gpg}]]
:signing {:gpg-key "moe@nervous.io"}
:global-vars {*warn-on-reflection* true}
:source-paths ["src" "test"]
:plugins [[codox "0.8.11"]]
:codox {:include [hildebrand]
:defaults {:doc/format :markdown}}
:dependencies
[[org.clojure/clojure "1.6.0"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
[io.nervous/eulalie "0.1.1-SNAPSHOT"]
[io.nervous/glossop "0.1.0-SNAPSHOT"]
[prismatic/plumbing "0.4.1"]]
:exclusions [[org.clojure/clojure]])
(defproject onyx-app/lein-template "0.12.0.0-beta1"
: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)
(ns devcards.discuss.utils
(:require [discuss.communication.auth :as auth]
[sablono.core :as html :refer-macros [html]]))
(def shortcuts
(html [:div.btn.btn-primary {:onClick #(auth/login "Christian" "iamgroot")} "Login"]))
(ns user
(:refer-clojure :exclude [dec < range <= min long int > - time / >= inc + max complement atom])
(:require
[tick.alpha.api :refer :all]
;;[tick.deprecated.cal :refer [holidays-in-england-and-wales weekend?]]
[tick.viz :refer [show-canvas view label]]
;;[tick.deprecated.schedule :as sch :refer [schedule]]
[clojure.spec.alpha :as s]
clojure.test)
(:import [java.time DayOfWeek]))
(defn test-all []
(require 'tick.alpha.api-test 'tick.core-test 'tick.interval-test)
(clojure.test/run-all-tests #"(tick).*test$"))
(ns comic-reader.scrape
(:require [clojure.string :as s]
[net.cgrand.enlive-html :as html])
(:import java.net.URL))
(defn fetch-url [url]
(html/html-resource (URL. url)))
(defn extract-list [html selector normalize]
(map normalize (html/select html selector)))
(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 hu.ssh.github-changelog
(:require
[environ.core :refer [env]]
[tentacles.core :as core]
[tentacles.repos :as repos]
[tentacles.pulls :as pulls]
[clj-semver.core :as semver]))
(defn repo
"Gets the repository from its name"
([name] (repo "pro" name))
([org repo] [org repo]))
(defn parse-semver
"Checks for semantic versions with or without v predicate"
[tag]
(let [version (:name tag)
parse #(try (semver/parse %)
(catch java.lang.AssertionError _e nil))]
(if (= \v (first version))
(parse (apply str (rest version)))
(parse version))))
(defn changelog
"Fetches the changelog"
[user repo]
(let [tags (delay (map #(assoc % :version (parse-semver %)) (repos/tags user repo)))
pulls (delay (pulls/pulls user repo {:state "closed"}))
commits (delay (repos/commits user repo))]
(println (first @tags))))
(core/with-defaults {:oauth-token (env :github-token) :all_pages true}
(changelog "raszi" "node-tmp"))
(ns buildviz.main
(:require [buildviz.build-results :as results]
[buildviz.handler :as handler]
[buildviz.http :as http]
[buildviz.storage :as storage]))
(def jobs-filename "buildviz_jobs")
(def tests-filename "buildviz_tests")
(defn- persist-jobs! [build-data]
(storage/store! build-data jobs-filename))
(defn- persist-tests! [tests-data]
(storage/store! tests-data tests-filename))
(def app
(let [builds (storage/load-from-file jobs-filename)
tests (storage/load-from-file tests-filename)]
(-> (handler/create-app (results/build-results builds tests)
persist-jobs!
persist-tests!)
http/wrap-log-request
http/wrap-log-errors)))
(ns clojars.test.unit.certs
(:require [clojure.test :refer :all]))
(def sixty-days (* 86400 1000 60))
(deftest fail-when-gpg-key-is-about-to-expire
(let [expire-date #inst "2017-09-04T00:00:00.000-00:00"]
(is (< (System/currentTimeMillis)
(- (.getTime expire-date) sixty-days))
(format "Security GPG key expires on %s" expire-date))))
(deftest fail-when-tls-cert-is-about-to-expire
(let [expire-date #inst "2016-08-12T00:00:00.000-00:00"]
(is (< (System/currentTimeMillis)
(- (.getTime expire-date) sixty-days))
(format "clojars.org TLS cert expires on %s" expire-date))))
(ns radicalzephyr.boot-junit
{:boot/export-tasks true}
(:require [boot.core :as core])
(:import org.junit.runner.JUnitCore))
(defn failure->map [failure]
{:description (.. failure (getDescription) (toString))
:exception (.getException failure)
:message (.getMessage failure)})
(defn result->map [result]
{:successful? (.wasSuccessful result)
:run-time (.getRunTime result)
:run (.getRunCount result)
:ignored (.getIgnoredCount result)
:failed (.getFailureCount result)
:failures (map failure->map (.getFailures result))})
(core/deftask junit
"Run the jUnit test runner."
[p packages PACKAGE #{sym} "The set of Java packages to run tests in."]
(core/with-pre-wrap fileset
(let [result (JUnitCore/runClasses
(into-array Class
[#_ (magic goes here to find all test classes)]))]
(when (> (.getFailureCount result) 0)
(throw (ex-info "There were some test failures."
(result->map result)))))
fileset))
(ns wort.handler
(:require [compojure.core :refer :all]
[compojure.route :as route]
[ring.util.response :as resp]
[wort.core :as core]
[ring.middleware.defaults :refer [wrap-defaults site-defaults]]))
(defroutes app-routes
(GET "/" []
(resp/content-type (resp/resource-response "index.html" {:root "public"}) "text/html"))
(GET "/sound" []
(resp/response "../resources/a-team_crazy_fool_x.wav"))
(route/resources "/")
(route/not-found "Not Found"))
(def app
(wrap-defaults app-routes site-defaults))
(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.7.0"]
[ring "1.4.0"]
[compojure "1.4.0"]
[clj-time "0.11.0"]
[org.clojure/data.json "0.2.6"]
[org.clojure/tools.cli "0.3.3"]]
: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 quil/processing-js "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"})
(defproject buddy/buddy-sign "0.7.1"
: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.7.0" :scope "provided"]
[buddy/buddy-core "0.8.0"]
[com.taoensso/nippy "2.10.0"]
[funcool/cats "1.0.0"]
[clj-time "0.11.0"]
[cheshire "5.5.0"]]
:source-paths ["src"]
:javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
:test-paths ["test"])
(defproject cli4clj "1.2.3"
;(defproject cli4clj "1.2.3-SNAPSHOT"
:description "Create simple interactive CLIs for Clojure applications."
:url "https://github.com/ruedigergad/cli4clj"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[clj-assorted-utils "1.12.0"]
[jline/jline "2.14.2"]]
:global-vars {*warn-on-reflection* true}
:html5-docs-docs-dir "ghpages/doc"
:html5-docs-ns-includes #"^cli4clj.*"
:html5-docs-repository-url "https://github.com/ruedigergad/cli4clj/blob/master"
:test2junit-output-dir "ghpages/test-results"
:test2junit-run-ant true
:main cli4clj.example
:plugins [[lein-cloverage "1.0.2"] [test2junit "1.1.3"] [lein-html5-docs "3.0.3"]]
:profiles {:repl {:dependencies [[jonase/eastwood "0.2.2" :exclusions [org.clojure/clojure]]]}}
)
(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.9.3"]
[incanter/incanter-charts "1.9.3"]
[incanter/incanter-io "1.9.3"]
[org.clojure/data.json "1.0.0"]
[clj-http "3.11.0"]
[slingshot "0.12.2"]]
:plugins [[lein-cljfmt "0.7.0"]]
:main ^:skip-aot strava-activity-graphs.core
:target-path "target/%s"
:profiles {:uberjar {:aot :all}})
{:name "rnaseq-phase0-b",
:path "",
:graph {:strtscratch {:type "func"
:name "start-scratch-space"
:args ["#1"]}
:bcstats {:type "func"
:name "collect-barcode-stats"}
:wrtstats {:type "func"
:name "write-bcmaps"}
:setexp {:type "func"
:name "set-exp"}
:split-filter {:type "func"
:name "split-filter-fastqs"}
:coll {:type "func"
:name "collapser"}
:mail {:type "func"
:name "mailit"
:args ["#2" ; recipient
"Aerobio job status: tnseq phase-0b"
"Finished"]} ; subject, body intro
:edges {:strtscratch [:bcstats]
:bcstats [:wrtstats]
:wrtstats [:setexp]
:setexp [:split-filter]
:split-filter [:coll]
:coll [:mail]}}
:description "Tn-Seq w/o bcl2fastq - start-scratch-space through barcode stats and filter/splitter. Using (prebuilt) fastq files creates scratch space for fastq file processing, copies fastqs to canonical dir in scratch area, collects barcode and NT stats, then writes that to canonical area, sets the experiments db value, splits and filters fastqs by replicates and lastly collapses those fqs."
}
(ns fivethreeonern.sqlite
(:require [mount.core :refer-macros [defstate]]))
(def node-module (js/require "react-native-sqlite-storage"))
(defstate sqlite
:start (.openDatabase node-module #js {:name "531.db" :location "default"} #(js/console.log "sql ok") #(js/console.log "sql error")))
(defn execute-sql [tx final-cb [query & other-queries]]
(.executeSql tx query #js [] (fn [tx results]
(if (empty? other-queries)
(let [results (-> results .-rows .raw js->clj)]
(final-cb results))
(execute-sql tx final-cb other-queries)))))
(defn transaction [query-strings final-cb]
(.transaction @sqlite
(fn [tx]
(execute-sql tx final-cb query-strings))))
(defn query [query-str cb]
(transaction [query-str] cb))
(ns robb1e.web
(:require [compojure.core :refer [defroutes]]
[ring.adapter.jetty :as container]
[compojure.handler :as handler]
[compojure.route :as route]
[robb1e.controllers.home :as homeController])
(:gen-class))
(defroutes routes
(homeController/routes "postgresql://localhost:5432/robb1e")
(route/resources "/"))
(def application (handler/site routes))
(defn start [port]
(container/run-jetty application {:port port :join? false}))
(defn -main []
(start 8080))
;; Copyright (C) 2013 Anders Sundman
;;
;; This program 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 the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU Affero General Public License for more details.
;;
;; You should have received a copy of the GNU Affero General Public License
;; along with this program. If not, see .
(ns spira.core.util)
(defn uuid []
"Create a GUID string."
(str (java.util.UUID/randomUUID)))
(defn parse-uint [s]
"a2uint"
(Integer. (re-find #"\d+" s )))
(defn find-first [f coll]
"Get first item in a seq matching a predicate."
(first (filter f coll)))
(ns memoria.handlers.app
(:require [compojure.core :refer :all]
[compojure.route :as route]
[ring.middleware.params :refer [wrap-params]]
[ring.middleware.json :refer [wrap-json-response wrap-json-body]]
[taoensso.timbre :as timbre]
[memoria.db :as db]
[memoria.handlers.cards :as cards-handler]))
(defn wrap-request-logging [app]
(fn [request]
(timbre/info (str "Received request: " request))
(let [response (app request)]
(timbre/info (str "Response: " response "\n"))
response)))
(defn wrap-db-conn [app]
(fn [request]
(let [datasource (if (= "test" (get-in request [:headers "memoria-mode"]))
(db/test-datasource)
(db/datasource))]
(binding [db/*conn* datasource]
(app request)))))
(defroutes app-routes
cards-handler/cards-routes)
(def app
(-> app-routes
wrap-params
wrap-json-body
wrap-json-response
wrap-db-conn
wrap-request-logging))
(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.76"]
[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"]})
;; For repl.
;; Sample arb doc in edn
;;
;; [{:arb/metadata [{:html-tag :body}]
;; :arb/value [{:arb/metadata [{:html-tag :h1}]
;; :arb/value [{:text "Title"}]}
;; {:arb/metadata [{:html-tag :p}]
;; :arb/value [{:text "This is a paragraph."}]}]}]
(require '[clojure.core.async :refer [%s, автор (%s голосов)"
(:link p) (:title p) (:author p) (:fav-count p))))
(defn print-favorites [since-date]
(let [all-posts (posts/fetch-aw-posts #(is-more-recent since-date %))]
(dorun (take 15 (map print-post
(sort-by #(Integer/parseInt (:fav-count %)) #(compare %2 %1) all-posts))))
))
(defn print-favorites-of-month []
;; print favs with dates more recent than month ago
(print-favorites (t/minus (t/today-at 0 0) (t/months 1))))
;;(print-favorites-of-month)
(defproject todomvc-re-frame "0.11.0-rc2-SNAPSHOT"
: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.52"]
[reagent "0.9.0-rc1"]
[re-frame "0.11.0-rc2-SNAPSHOT"]
[binaryage/devtools "0.9.10"]
[clj-commons/secretary "1.2.4"]
[day8.re-frame/tracing "0.5.3"]]
:plugins [[lein-shadow "0.1.5"]]
: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 todomvc.core/main}}
:devtools {:http-root "resources/public"
:http-port 8280}}}}
:aliases {"dev-auto" ["shadow" "watch" "client"]})
(ns theatralia.core
(:require [goog.dom :as gdom]
[om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]))
;;; Credits: https://github.com/swannodette/om
(enable-console-print!)
(println "Hello world!")
(defn widget [data owner]
(reify
om/IRender
(render [this]
(dom/h1 nil (:text data)))))
(om/root widget {:text "Hello world!"}
{:target (. js/document (getElementById "app"))})
{
;; inf-clojure support
:jvm-opts ["-Dclojure.server.repl={:port 5555 :accept clojure.core.server/repl}"]
;; for all that repl goodness
:user { :dependencies [[org.clojure/tools.namespace "0.3.0-alpha4"]
[eftest "0.5.1"]]
:plugins [[lein-cljfmt "0.4.1" :exclusions [org.clojure/clojure]]
[lein-cloverage "1.0.6" :exclusions [org.clojure/clojure]]
[lein-ancient "0.6.10", :exclusions [org.clojure/clojure]]]}
}
(ns onyx.plugin.mysql
"Implementation of MySQL-specific utility functions."
(:require [honeysql.core :as hsql]
[honeysql.format :as hformat]))
(defn upsert
"Using honeysql-postgres, construct a SQL string to do upserts with Postgres.
We expect the key in the 'where' map to be a primary key."
[table row where]
(hsql/format {:insert-into table
:values [(merge where row)]
:on-duplicate-key-update row}))
(defmethod hformat/format-clause :on-duplicate-key-update [[_ values] _]
(str "ON DUPLICATE KEY UPDATE "
(hformat/comma-join (for [[k v] values]
(str (hformat/to-sql k) " = "
(hformat/to-sql v))))))
(hformat/register-clause! :on-duplicate-key-update 225)
(ns territory-bro.handler-test
(:require [clojure.test :refer :all]
[ring.mock.request :refer :all]
[territory-bro.handler :refer :all]))
(deftest test-app
(testing "main route"
(let [response (app (request :get "/"))]
(is (= 200 (:status response)))))
(testing "not-found route"
(let [response (app (request :get "/invalid"))]
(is (= 404 (:status response))))))
(use 'figwheel-sidecar.repl-api)
(start-figwheel!) ;; <-- fetches configuration
(cljs-repl)(ns bltool.data.steam
(:require [bltool.data.default :refer [read-games]])
(:require [bltool.flags :refer :all])
(:require [clj-http.client :as http])
(:require [clojure.data.xml :as xml])
(:require [clojure.string :refer [trim]]))
(register-flags ["--steam-name" "Steam Community name"]
["--steam-platform" "Default platform to use for Steam games (recommended: PC, PCDL, or Steam)" :default "PC"])
(defn- xml-to-map
[tag]
(let [tag-content (fn [tag] [(:tag tag) (apply str (:content tag))])]
(into {} (map tag-content (:content tag)))))
(defmethod read-games "steam" [_]
(let [name (:steam-name *opts*)
url (str "http://steamcommunity.com/id/" name "/games?tab=all&xml=1")]
(->> url http/get :body xml/parse-str xml-seq (filter #(= :game (:tag %)))
(map (comp trim :name xml-to-map))
sort
(map (fn [name] { :id "0" :name name :platform (:steam-platform *opts*) :progress "unplayed" })))))
(defproject funcool/promesa "0.5.0-SNAPSHOT"
:description "A promise library for ClojureScript"
:url "https://github.com/funcool/promesa"
:license {:name "BSD (2 Clause)"
:url "http://opensource.org/licenses/BSD-2-Clause"}
:dependencies [[org.clojure/clojure "1.7.0" :scope "provided"]
[org.clojure/clojurescript "1.7.48" :scope "provided"]
[funcool/cats "1.0.0-SNAPSHOT"]]
:deploy-repositories {"releases" :clojars
"snapshots" :clojars}
:source-paths ["src" "assets"]
:test-paths ["test"]
:jar-exclusions [#"\.swp|\.swo|user.clj"]
:codeina {:sources ["src"]
:reader :clojurescript
:target "doc/dist/latest/api"}
:plugins [[funcool/codeina "0.3.0"]
[lein-externs "0.1.3"]])
(defproject io.atomix/trinity "1.0.0-SNAPSHOT"
:description "A sweet little Clojure API for Atomix"
:url "http://github.com/atomix/trinity"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[io.atomix/atomix-all "1.0.1-SNAPSHOT"]
[io.atomix.catalyst/catalyst-netty "1.1.2"]]
:repositories [["sonatype-nexus-snapshots" {:url "https://oss.sonatype.org/content/repositories/snapshots"}]]
:plugins [[lein-codox "0.9.0"]
[lein-localrepo "0.5.3"]]
:codox {:output-path "target/docs/api"
:metadata {:doc/format :markdown}
:source-uri "http://github.com/atomix/trinity/blob/master/{filepath}#L{line}"})
(defproject hatnik/tools.backup "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"]
[com.google.apis/google-api-services-storage "v1beta2-rev43-1.18.0-rc"]
[com.google.http-client/google-http-client-jackson2 "1.17.0-rc"]
[com.google.oauth-client/google-oauth-client-jetty "1.17.0-rc"]]
:main hatnik.tools.backup
:aot :all)
(ns metabase.models.label
(:require [korma.core :as k]
[metabase.db :as db]
[metabase.models.interface :as i]
[metabase.util :as u]))
(i/defentity Label :label)
(defn- pre-insert [{label-name :name, :as label}]
(assoc label :slug (u/slugify label-name)))
(defn- pre-update [{label-name :name, :as label}]
(if-not label-name
label
(assoc label :slug (u/slugify label-name))))
(defn- pre-cascade-delete [{:keys [id]}]
(db/cascade-delete 'CardLabel :label_id id))
(u/strict-extend (class Label)
i/IEntity
(merge i/IEntityDefaults
{:can-read? (constantly true)
:can-write? (constantly true)
:pre-insert pre-insert
:pre-update pre-update
:pre-cascade-delete pre-cascade-delete}))
(ns ^:figwheel-always sidequarter-frontend.api
(:require-macros [sidequarter-frontend.env :refer [cljs-env]]
[cljs.core.async.macros :refer [go]])
(:require [cljs-http.client :as http]
[cljs.core.async :refer [! put! chan]]))
(def api-url (cljs-env :api-url))
(defn get-sidekiqs []
(http/jsonp api-url {:callback-name "callback"}))
(ns five-three-one.server
(:require [five-three-one.handler :refer [app]]
[environ.core :refer [env]]
[ring.adapter.jetty :refer [run-jetty]]
[five-three-one.model.migration :refer [migrate]])
(:gen-class))
(defn -main [& args]
(let [port (Integer/parseInt (or (env :port) "3000"))]
(migrate)
(run-jetty app {:port port :join? false})))
(ns ktra-indexer.config
"Namespace for configuration reading functions"
(:require [clojure.edn :as edn]))
(defn load-config
"Given a filename, load and return a config file."
[filename]
(edn/read-string (slurp filename)))
(defn get-conf-value
"Return a key value from the configuration."
[property & {:keys [k use-sample]
:or {k nil
use-sample false}}]
(let [config (load-config
(clojure.java.io/resource
(if use-sample
"config.edn_sample"
"config.edn")))]
(if k
(k (property config))
(property config))))
(defn db-conf
"Returns the value of the requested database configuration key"
[k & [use-sample]]
(get-conf-value :database :k k :use-sample use-sample))
(ns kolmogorov-music.test.kolmogorov
(:require [kolmogorov-music.kolmogorov :as kolmogorov]
[midje.sweet :refer :all]))
(defn foo [x] (inc x))
(def bar (comp foo foo))
(fact "Kolmogorov complexity is how many symbols a definition comprises."
(kolmogorov/complexity foo) => 2)
(fact "The symbol count is recursive within the current namespace."
(kolmogorov/complexity bar) => 7)
(fact "Symbols outside the current namespace are considered atoms."
(kolmogorov/complexity inc) => 0)
(ns clj-record.test.serialization-test
(:require
[clj-record.test.model.manufacturer :as manufacturer]
[clj-record.test.model.product :as product])
(:use clojure.contrib.test-is
clj-record.test.test-helper))
(defdbtest serialized-attributes-support-common-clojure-types
(let [record (manufacturer/create valid-manufacturer)]
(are (=
(do
(manufacturer/update (assoc record :name _1))
_1)
((manufacturer/get-record (record :id)) :name))
"some string" ; Cheating? This passes without serialization implemented.
)))
(defproject simple "0.11.0-rc2-SNAPSHOT"
: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.52"]
[reagent "0.9.0-rc1"]
[re-frame "0.11.0-rc2-SNAPSHOT"]]
:plugins [[lein-shadow "0.1.5"]]
: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"]})
(ns user
"Namespace to support hacking at the REPL."
(:require [clojure.main]
[clojure.string :as str]
[clojure.tools.namespace.move :refer :all]
[clojure.tools.namespace.repl :refer :all]
[midje.repl :refer :all]))
;;;; ___________________________________________________________________________
;;;; Require the standard REPL utils.
;;;;
;;;; This is useful in a `dev` namespace, and is needed in a `user` namespace
;;;; because the requires get blatted by `tnr/refresh` and `reset`.
(apply require clojure.main/repl-requires)
;;;; ___________________________________________________________________________
;;;; ---- 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)))
)
(ns hydrant.core-test
(:require [clojure.test :refer :all]
[hydrant.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
;; 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 containium.systems.elasticsearch
(:require [containium.systems :refer (require-system)]
[containium.systems.config :refer (Config get-config)])
(:import [containium.systems Startable Stoppable]
[org.elasticsearch.node Node NodeBuilder]))
;;; The public API for Elastic systems.
(defprotocol Elastic
(whut? [this])) ;;--- FIXME: What would be a good API for Elastic?
;;; The embedded implementation.
(defrecord EmbeddedElastic [^ Node node]
Elastic
(whut? [_])
Stoppable
(stop [_]
(println "Stopping embedded ElasticSearch node...")
(.close node)
(println "Embedded ElasticSearch node stopped.")))
(def embedded
(reify Startable
(start [_ systems]
(let [config (get-config (require-system Config systems) :elastic)
_ (println "Starting embedded ElasticSearch node, using config" config "...")
node (.node (NodeBuilder/nodeBuilder))]
(println "Embedded ElasticSearsch node started.")
(EmbeddedElastic. node)))))
(defproject ring/ring-core "0.2.5"
:description "Ring core libraries."
:url "http://github.com/mmcgrana/ring"
:dependencies [[org.clojure/clojure "1.1.0"]
[org.clojure/clojure-contrib "1.1.0"]
[commons-codec "1.4"]
[commons-io "1.4"]
[commons-fileupload "1.2.1"]
[javax.servlet/servlet-api "2.5"]]
:dev-dependencies [[lein-clojars "0.5.0"]])
(ns event-planner.pages.events)
(defn events-page [id]
[:div "Wow my id is: " id])
(ns cljam.pileup.common)
;; TODO: estiamte from actual data
(def ^:const window-width 1250)
(def ^:const step 2000)
(def ^:const center (int (/ step 2)))
;; routes.clj
(ns beebster-clj.routes
(:use beebster-clj.core beebster-clj.views compojure.core)
(:require [compojure.handler :as handler]
[compojure.route :as route]))
(defroutes app-routes
(route/resources "/")
(GET "/" [] (index-page))
(GET "/search" [] (about-page))
(GET "/categories" [category] (category-page category))
(POST "/results" [searchvalue] (result-page searchvalue))
(GET "/info" [index] (info-page index))
(ANY "/download" [index mode] (download-page index mode)))
(def app
(handler/site app-routes))
(defproject net.uncontended/beehive "0.5.2-SNAPSHOT"
:description "Beehive is a Clojure facade for the Precipice library."
:url "https://github.com/tbrooks8/Beehive"
:license {:name "Apache License, Version 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0"}
:signing {:gpg-key "tim@uncontended.net"}
:profiles {:dev {:dependencies [[org.clojure/core.async "0.1.346.0-17112a-alpha"]
[clj-http "1.0.1"]
[criterium "0.4.3"]]}}
:dependencies [[org.clojure/clojure "1.6.0"]
[net.uncontended/precipice-core "0.5.1"]])
(defproject org.onyxplatform/onyx-sql "0.7.3-SNAPSHOT"
:description "Onyx plugin for JDBC-backed SQL databases"
:url "https://github.com/MichaelDrogalis/onyx-sql"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/java.jdbc "0.3.3"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.7.3-20150901_140443-g6e4750b"]
[java-jdbc/dsl "0.1.3"]
[com.mchange/c3p0 "0.9.2.1"]
[honeysql "0.5.1"]]
:profiles {:dev {:dependencies [[midje "1.7.0"]
[environ "1.0.0"]
[mysql/mysql-connector-java "5.1.25"]]
:plugins [[lein-midje "3.1.3"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
(defproject lein-jshint "0.1.6-SNAPSHOT"
:description "A Leiningen plugin for running JS code through JSHint."
:url "https://github.com/vbauer/lein-jshint"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[clj-glob "1.0.0" :exclusions [org.clojure/clojure]]
[lein-npm "0.4.0" :exclusions [org.clojure/clojure]]]
:plugins [[jonase/eastwood "0.1.4" :exclusions [org.clojure/clojure]]
[lein-release "1.0.6" :exclusions [org.clojure/clojure]]
[lein-kibit "0.0.8" :exclusions [org.clojure/clojure]]
[lein-bikeshed "0.1.8" :exclusions [org.clojure/clojure]]
[lein-ancient "0.5.5"]]
:eval-in-leiningen true
:pedantic? :abort
:local-repo-classpath true
:lein-release {:deploy-via :clojars
:scm :git})
(defproject com.lemondronor/turboshrimp-h264j "0.2.2-SNAPSHOT"
:description (str "An AR.Drone video decoder for the turboshrimp library "
"that uses the h264j H.264 decoder.")
:url "https://github.com/wiseman/turboshrimp-h264j"
:license {:name "MIT License"
:url "http://opensource.org/licenses/MIT"}
:deploy-repositories [["releases" :clojars]]
:dependencies [[com.twilight/h264 "0.0.1"]
[org.clojure/clojure "1.6.0"]]
:profiles {:test
{:dependencies [[com.lemondronor/turboshrimp "0.3.2"]]
:resource-paths ["test-resources"]}
:dev
{:dependencies [[com.lemondronor/turboshrimp "0.3.2"]
[com.lemonodor/gflags "0.7.1"]]
:plugins [[lein-cloverage "1.0.2"]]
:source-paths ["examples"]}})
(defproject mars-ogler "0.0.1-SNAPSHOT"
:description "Holy cow, it's Mars!"
:url "http://github.com/aperiodic/mars-ogler"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]
[clj-time "0.4.4"]
[compojure "1.1.1"]
[hiccup "1.0.0"]
[enlive "1.0.1"]]
:plugins [[lein-ring "0.7.1"]]
:ring {:handler mars-ogler.routes/handler})
(defproject lein-fore-prob "0.1.3-SNAPSHOT"
:description "Leiningen plugin to populate a project from a 4clojure problem."
:url "https://github.com/bfontaine/lein-fore-prob"
:license {:name "Eclipse Public License"
:url "https://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[clj-http "3.10.0"]
[clj-soup/clojure-soup "0.1.3"]]
:profiles {:dev {}
:1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]}
:1.9 {:dependencies [[org.clojure/clojure "1.9.0"]]}
:1.10 {:dependencies [[org.clojure/clojure "1.10.0"]]}}
:aliases {"all" ["with-profile" "dev,1.8:dev,1.9:dev,1.10:dev"]}
:eval-in-leiningen true
:plugins [[lein-cloverage "1.0.2"]])
(defproject fault "0.1.0"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:profiles {:dev {:dependencies [[junit/junit "4.11"]
[org.mockito/mockito-core "1.10.8"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
[clj-http "1.0.1"]]
:junit ["test/java"]
:java-source-paths ["src/java" "test/java"]
:plugins [[lein-junit "1.1.3"]]
:junit-formatter "brief"}}
:javac-target "1.7"
:dependencies [[org.clojure/clojure "1.6.0"]
[criterium "0.4.3"]]
:source-paths ["src/clojure"]
:java-source-paths ["src/java"])
(defproject org.onyxplatform/onyx-metrics "0.8.0.5"
: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"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:dependencies [[org.clojure/clojure "1.7.0"]
[interval-metrics "1.0.0"]
[stylefruits/gniazdo "0.4.0"]]
:java-opts ^:replace ["-server" "-Xmx3g"]
:global-vars {*warn-on-reflection* true
*assert* false
*unchecked-math* :warn-on-boxed}
:profiles {:dev {:dependencies [^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.8.0"]
[riemann-clojure-client "0.4.1"]]
:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}})
(defproject clj-ravendb "0.4.2-SNAPSHOT"
:description "A Clojure library for consuming a RavenDB rest api."
:url "https://github.com/markwoodhall/clj-ravendb"
:license {:name "MIT License"
:url "http://opensource.org/licenses/mit-license.php"}
:plugins [[quickie "0.2.5"]]
:dependencies [[org.clojure/clojure "1.5.1"]
[clj-http "0.9.2"]
[org.clojure/core.async "0.1.303.0-886421-alpha"]
[org.clojure/data.json "0.2.3"]]
:deploy-repositories [
["clojars" {:sign-releases false}]
]
:scm {:name "github"
:url "https://github.com/markwoodhall/clj-ravendb"})
(defproject cascade "0.2-SNAPSHOT"
:description "Simple, fast, easy web applications in idiomatic Clojure"
:url "http://github.com/hlship/cascade"
:source-path "src/main/clojure"
:resources-path "src/main/resources"
:test-path "src/test/clojure"
:dev-resources-path "src/test/resources"
:dependencies [[org.clojure/clojure "1.3.0"]
[org.clojure/algo.monads "0.1.0"]
[compojure "0.6.5"]]
:dev-dependencies [[ring/ring-jetty-adapter "0.3.11"]])
(ns solver.core
(:gen-class))
(defn create-grid
([] (create-grid 1000))
([w] (create-grid w w))
([w h] (let [row (vec (map (fn [x] false) (range w)))
grid (vec (map (fn [x] row) (range h)))]
grid)))
(defn act-on
([f row a b] (let [low a
high (+ b 1)
difference (- high low)]
(vec (concat
(take low row)
(map f (take difference (drop low row)))
(drop high row)))))
([f grid a b c d] (let [low a
high (+ c 1)
difference (- high low)
act-on-row (fn [row] (act-on f row b d))]
(vec (concat
(take low grid)
(map act-on-row (take difference (drop low grid)))
(drop high grid))))))
(defn -main
"I don't do a whole lot ... yet."
[& args]
(println "Hello, World!"))
(ns karmanaut.utils
(:gen-class)
(:require [clojure.java.io :as io])
(:import [java.util Calendar
Date
GregorianCalendar
TimeZone]))
(defn env [key default]
(get (System/getenv) key default))
(defn version []
(if (.exists (io/as-file "project.clj"))
(-> "project.clj" slurp read-string (nth 2))
(-> (eval 'karmanaut.utils) .getPackage .getImplementationVersion)))
(defn utcnow []
(Date.))
(defn utcnow-midnight []
(let [tz (TimeZone/getTimeZone "UTC")
c (GregorianCalendar. tz)]
(doto c
(.set Calendar/HOUR_OF_DAY 0)
(.set Calendar/MINUTE 0)
(.set Calendar/SECOND 0)
(.set Calendar/MILLISECOND 0))
(.getTime c)))
(defn long-to-date
"Reddit timestamps are the number of seconds since the
Unix epoch, in UTC."
[epoch]
(Date. (* 1000 (long epoch))))
(ns clstreams.examples.count-words.system
(:require [clstreams.examples.count-words.pipelines :as pipelines]
[clstreams.examples.count-words.webapi :as webapi]
[com.stuartsierra.component :as component]))
(defn count-words-system []
(component/system-map
:pipeline (pipelines/count-words)
:webapi (component/using
(webapi/web-test)
[:pipeline])))
(defproject jcf/lein-template "0.1.1-SNAPSHOT"
:description "FIXME: write description"
:url "https://github.com/jcf/lein-template"
:license {:name "The MIT License"
:url "http://opensource.org/licenses/MIT"}
:deploy-repositories [["releases" :clojars]]
:eval-in-leiningen true
:profiles {:dev {:dependencies [[me.raynes/fs "1.4.6"]]}})
(defproject dotenv "0.1.0"
:description "dotenv: Load environment variables from .env file into the JVM System Properties"
:url "https://github.com/primedia/clj-dotenv"
:dependencies [ [org.clojure/clojure "1.5.1"]
;;[org.clojars.jackmorrill/dotenv "0.1.0"]
[local/dotenv.core "0.1.0"]
;;[org.clojars.jackmorrill/environs "0.1.0"]
[local/environs.core "0.1.0"]
]
:repositories {"project" "file:repo"})
(ns bogo-clojure.core
(:gen-class)
(:require [clojure.string :as string]
[bogo-clojure.bg-word :refer :all]
[bogo-clojure.bg-telex :refer :all]))
(defn get-action
;; Action is a function taking in current string, make transform,
;; return the new string
[key typemode]
(if (contains? typemode key)
(get typemode key)
:addchar))
(defn process-key
([astring key]
(process-key astring key TELEX))
([astring key typemode]
(let [[first-word last-word] (grammar-split-word astring)
action (get-action key typemode)]
(str first-word
(if (fn? action)
(action last-word)
(str last-word key))))))
(defn process-sequence
([sequence]
(process-sequence sequence TELEX))
([sequence typemode]
(reduce (fn [word key] (process-key word (str key) typemode))
""
sequence)))
(ns cljs-workers.test
(:require [cljs-workers.core :as main]
[cljs-workers.worker :as worker]))
(defn app
[]
(let [worker-pool (main/create-pool 2 "js/worker/worker.js")]
(main/do-with-pool! worker-pool {:handler :mirror, :arguments {:a "Hallo" :b "Welt" :c 10}} #(.debug js/console %))
(main/do-with-pool! worker-pool {:handler :mirror, :arguments {:a "Hallo" :b "Welt" :c 10 :d (js/ArrayBuffer. 10) :transfer [:d]} :transfer [:d]} #(.debug js/console %))
(main/do-with-pool! worker-pool {:handler :mirror, :arguments {:a "Hallo" :b "Welt" :c 10 :d (js/ArrayBuffer. 10) :transfer [:d]} :transfer [:c]} #(.debug js/console %))
(main/do-with-pool! worker-pool {:handler :mirror, :arguments {:a "Hallo" :b "Welt" :c 10 :d (js/ArrayBuffer. 10) :transfer [:c]} :transfer [:d]} #(.debug js/console %))))
(defn worker
[]
(worker/register
:mirror
(fn [arguments]
arguments))
(worker/bootstrap))
(if (and (main/supported?) (main/main?))
(app)
(worker))
;; 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
(ns uxbox.services.core)
(def +hierarchy+
(as-> (make-hierarchy) $
(derive $ :auth/login :command)))
(defmulti -novelty
(fn [conn data] (:type data))
:hierarchy #'+hierarchy+)
(defmulti -query
(fn [conn data] (:type data))
:hierarchy #'+hierarchy+)
(defmethod -novelty :default
[data]
(throw (ex-info "Not implemented" {})))
(defmethod -query :default
[data]
(throw (ex-info "Not implemented" {})))
(ns io.aviso.rook.utils
"Kitchen-sink of useful standalone utilities."
(:import
(java.util UUID))
(:use
[clojure.core.async :only [go >!]])
(:require
[clojure.pprint :as pprint]))
(defn new-uuid
"Generates a new UUID string, via UUIDrandomUUID."
[]
(-> (UUID/randomUUID) .toString))
(defn response
"Construct Ring response for success or other status."
([body] (response 200 body))
([status body] {:status status :body body}))
(defn pretty-print
"Pretty-prints the supplied object to a returned string."
[object]
(pprint/write object
:stream nil
:pretty true))
(defmacro try-go
"Wraps the body in a go block and a try block. The try block will
catch any throwable and put it into the exception channel. This allow a failure
to be communicated out of an asynchronous process and back to some originator
that can report it, or attempt recovery."
[exception-ch & body]
`(let [ch# ~exception-ch]
(go
(try
~@body
(catch Throwable t#
(>! ch# t#)
;; Re-throw the exception; that's the only way to get out of the go block
;; without returning a value.
(throw t#))))))(ns circle.backend.build.test-run-build
(:use midje.sweet)
(:use [circle.backend.build.test-utils :only (minimal-build)])
(:use [circle.backend.action :only (defaction)])
(:use [circle.backend.build :only (build successful?)])
(:use [circle.backend.build.run :only (run-build)])
(:use [circle.util.predicates :only (ref?)]))
(circle.db/init)
(defaction successful-action [act-name]
{:name act-name}
(fn [build]
nil))
(defn successful-build []
(build {:project-name "succesful build"
:build-num 1
:vcs-url "git@github.com:foo/bar.git"
:vcs-revision "f00b4r"
:actions [(successful-action "1")
(successful-action "2")
(successful-action "3")]}))
(fact "successful build is successful"
(let [build (run-build (successful-build))]
build => ref?
@build => map?
(-> @build :action-results) => seq
(-> @build :action-results (count)) => 3
(for [res (-> @build :action-results)]
(> (-> res :stop-time) (-> res :start-time)) => true)
(successful? build) => truthy))(ns metrics.core
(:import [com.codahale.metrics MetricRegistry Metric]))
(def ^{:tag "MetricRegistry" :doc "Default registry used by public API functions when no explicit registry argument is given"}
default-registry
(MetricRegistry.))
(defn ^MetricRegistry new-registry
[]
(MetricRegistry.))
(defn ^String metric-name
[title]
(if (string? title)
(MetricRegistry/name "default"
^"[Ljava.lang.String;" (into-array String ["default" ^String title]))
(MetricRegistry/name
^String (first title)
^"[Ljava.lang.String;" (into-array String
[(second title)
(last title)]))))
(defn add-metric
"Add a metric with the given title."
([title ^Metric metric]
(add-metric default-registry title metric))
([^MetricRegistry reg title ^Metric metric]
(.register reg (metric-name title) metric)))
(defn remove-metric
"Remove the metric with the given title."
([title]
(remove-metric default-registry title))
([^MetricRegistry reg title]
(.remove reg (metric-name title))))
(defn replace-metric
"Replace a metric with the given title."
([title ^Metric metric]
(replace-metric default-registry title metric))
([^MetricRegistry reg title ^Metric metric]
(remove-metric reg (metric-name title))
(add-metric reg (metric-name title) metric)))
interfaces {
restore-original-config-on-shutdown: false
interface eth0 {
description: "Internal pNodes interface"
disable: false
default-system-config
}
}
protocols {
igmp {
disable: false
interface eth0 {
vif eth0 {
disable: false
version: 3
}
}
traceoptions {
flag all {
disable: false
}
}
}
}
;; Licensed to the Apache Software Foundation (ASF) under one
;; or more contributor license agreements. See the NOTICE file
;; distributed with this work for additional information
;; regarding copyright ownership. The ASF licenses this file
;; to you 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 chaintool.build.core
(:require [chaintool.build.golang :as golang])
(:refer-clojure :exclude [compile]))
(defn compile [params]
;; generate golang output (shim, protobufs, etc)
;; FIXME: we need to switch on the Platform type
(golang/compile params))
(defproject {{raw-name}} "0.1.0-SNAPSHOT"
:description "FIXME: Write a description."
:url "FIXME: Add a URL."
:scm {:name "git"
:url "FIXME: Add a URL."}
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:main {{namespace}}.site
:source-paths ["src/main/clj"
"src/main/cljs"]
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2850"]
[aviary "0.1.6"]
[enlive "1.1.5"]
[garden "1.2.5"]]
:profiles {:dev {:source-paths ["src/dev/clj"
"src/dev/cljs"]
:dependencies [[weasel "0.5.0"]
[com.cemerick/piggieback "0.1.5"]]
:repl-options {:init ({{namespace}}.dev/start-dev)
:init-ns {{namespace}}.dev
:nrepl-middleware
[cemerick.piggieback/wrap-cljs-repl]}}}
:aliases {"ship" ["run" ":ship"]
"export" ["run" ":export"]})
(ns aspire.core-test
(:require [clojure.test :refer :all]
[aspire.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
(deftest pass-test
(testing "I pass"
(is (= 1 1))))
(set-env!
:source-paths #{"src/main/java"}
:test-paths #{"src/test/java"}
:dependencies '[[junit "4.12" :scope "test"]])
(def +version+ "0.1.0")
(task-options!
pom {:project 'http-server
:version +version+
:description "A Java HTTP server."
:url "https://github.com/RadicalZephyr/http-server"
:scm {:url "https://github.com/RadicalZephyr/http-server.git"}
:licens {"MIT" "http://opensource.org/licenses/MIT"}})
(require 'clojure.set)
(deftask junit
"Run the jUnit test runner."
[]
(set-env! :source-paths #(clojure.set/union % (get-env :test-paths)))
(with-pre-wrap fileset
fileset))
(deftask test
"Compile and run my jUnit tests."
[]
(comp (javac)
(junit)))
(deftask build
"Build my http server."
[]
(comp (javac)
(pom)
(jar)))
(ns backend.boot
{:boot/export-tasks true}
(:require [boot.core :refer :all]
[reloaded.repl :refer [go]]
[backend.main :refer :all]))
(deftask start-app
[p port PORT int "Port"]
(let [x (atom nil)]
(with-pre-wrap fileset
(swap! x (fn [x]
(if x
x
(do (setup-app! {:port port})
(go)))))
fileset)))
(ns user
(:use io.aviso.repl
clojure.pprint)
(:require [clojure.tools.logging :as l]))
(install-pretty-exceptions)
(defmacro other-thread
[& body]
`(.start (Thread. (bound-fn [] ~@body))))
;; 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/.
;;;; Development settings.
{:config {:cassandra {:config-file "cassandra.yaml"}
:kafka {:port "9090"
:broker-id "1"
:log-dir "target/kafka-log"
:zk-connect "localhost:2181"}
:http-kit {:port 8080}}
:modules []
:resolve-dependencies true}
(ns leiningen.difftest
(:require [leiningen.test :as test]))
(defn difftest [project & args]
(apply test/test (-> project
(update-in [:injections] conj
'((ns-resolve (doto 'difftest.core
require) 'activate)))
(update-in [:dependencies] into {'difftest "1.3.8"}))
args))(defproject clik-clak-joe "0.1.0-SNAPSHOT"
:description "React Native tic-tac-toe in ClojureScript"
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-3153"]
[org.omcljs/om "0.9.0-SNAPSHOT"]
[org.omcljs/ambly "0.1.0-SNAPSHOT"]]
:plugins [[lein-cljsbuild "1.0.5"]]
:source-paths ["src"]
:clean-targets ["js" "out"]
:cljsbuild {:builds {:dev
{:source-paths ["src"]
:compiler {:output-dir "out"
:output-to "out/main.js"
:optimizations :none
#_:foreign-libs #_[{:provides ["reactnative"]
:file "http://localhost:8081/Examples/TicTacToe/TicTacToeApp.includeRequire.runModule.bundle"}]}}
:rel
{:source-paths ["src"]
:compiler {:output-to "out/main.js"
:optimizations :advanced
:externs ["externs.js"]
:pretty-print false
:pseudo-names false}}}})
(ns isla.test.talk
(:use [isla.talk])
(:use [clojure.test])
(:use [clojure.pprint]))
;; list-rooms
(deftest test-0-rooms
(is (re-find #"no way out of this room"
(list-rooms []))))
(deftest test-1-room
(is (re-find #"see a door to the palace"
(list-rooms [{:name "palace"}]))))
(deftest test-2-rooms
(is (re-find #"see a door to the palace and the garden"
(list-rooms [{:name "palace"} {:name "garden"}]))))
(deftest test-3-rooms
(is (re-find #"see a door to the palace, the garden and the bedroom."
(list-rooms [{:name "palace"} {:name "garden"} {:name "bedroom"}]))))(ns structural-typing.use.f-error-messages
(:require [structural-typing.preds :as pred])
(:use midje.sweet
structural-typing.type
structural-typing.global-type
structural-typing.clojure.core
structural-typing.assist.testutil))
(future-fact "There should be an error if there's an instance of `includes` in a path")
(future-fact "reject impossible condensed type descriptions"
(type! :X 1)
;; vector is an old-style description
;; other kinds of seqs?
;; records?
)
(ns uk.org.potentialdifference.darknet.config)
(def ip "192.168.1.24")
(def config
{:ws-url (str "wss://" ip ":8081")
:api-url (str "http://") ip ":8080"
:api-key "x9RHJ2I6nWi376Wa"})
{:npm-dev-deps {"shadow-cljs" "2.8.69"
"karma" "4.3.0"
"karma-chrome-launcher" "3.1.0"
"karma-cljs-test" "0.1.0"
"karma-junit-reporter" "1.2.0"}}
(ns less4clj.util)
;;
;; Debugging
;; from boot.util
;;
; Hack to detect boot verbosity
(defn- get-verbosity []
(try
(require 'boot.util)
; Deref var and atom
@@(resolve 'boot.util/*verbosity*)
(catch Exception _
1)))
(defn- print*
[verbosity args]
(when (>= (get-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 doctopus.configuration
(:require [nomad :refer [defconfig]]
[clojure.java.io :as io]))
(defconfig server-config (io/resource "configuration.edn"))
(ns nightcode.repl
(:require [nightcode.editors :as editors]
[nightcode.lein :as lein]
[nightcode.sandbox :as sandbox]
[nightcode.shortcuts :as shortcuts]
[nightcode.ui :as ui]
[nightcode.utils :as utils]
[seesaw.core :as s]))
(defn run-repl!
"Starts a REPL process."
[process in-out]
(lein/stop-process! process)
(->> (if (sandbox/get-dir)
(clojure.main/repl)
(lein/start-process-indirectly! process nil "clojure.main"))
(lein/start-thread! in-out)))
(defn create-pane
"Returns the pane with the REPL."
[console]
(let [process (atom nil)
run! (fn [& _]
(s/request-focus! (-> console .getViewport .getView))
(run-repl! process (ui/get-io! console)))
pane (s/config! console :id :repl-console)]
(utils/set-accessible-name! (.getTextArea pane) :repl-console)
; start the repl
(run!)
; create a shortcut to restart the repl
(when-not (sandbox/get-dir)
(shortcuts/create-hints! pane)
(shortcuts/create-mappings! pane {:repl-console run!}))
; return the repl pane
pane))
(ns whitman.db-test
(:require [clojure.test :refer :all]
[whitman.db :as db]))
(deftest test-db-url-with-default
(let [cfg {"database" "test"}]
(is (= (db/db-url cfg) "mongodb://localhost:27017/test"))))
(deftest test-db-url-when-specified
(let [cfg {"connection" "whitman.monkey-robot.com:27017"
"database" "test"}]
(is (= (db/db-url cfg) "mongodb://whitman.monkey-robot.com:27017/test"))))
(deftest test-db-with-default
(let [cfg {"database" "test"}]
(-> cfg
db/db
nil?
not
is)))
(deftest test-db-when-specified
(let [cfg {"connection" "whitman.monkey-robot.com:27017"
"database" "test"}]
(-> cfg
db/db
nil?
not
is)))
;; Copyright 2014 Red Hat, Inc, and individual contributors.
;;
;; 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.
(defproject basic "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-beta2"]
;; we can't depend on this, or we'll get the version
;; from .m2, not the version we're building
;;[org.projectodd.wunderboss/wunderboss-clojure "0.1.0-SNAPSHOT"]
])
(ns script.bootstrap.build
(:require
[cljs.source-map :as sm]
[cognitect.transit :as transit]
[planck.core :refer [slurp spit]]
[planck.repl :refer [strip-source-map]]))
(defn cljs->transit-json
[x]
(let [wtr (transit/writer :json)]
(transit/write wtr x)))
(let [file (first *command-line-args*)
sm-json (slurp file)
decoded (sm/decode (.parse js/JSON sm-json))
stripped (^:private-var-access-nowarn strip-source-map decoded)
transit-json (cljs->transit-json stripped)]
(spit file transit-json))
(defproject ring-example "0.1.0-SNAPSHOT"
:description "Reitit Ring App with Swagger"
:dependencies [[org.clojure/clojure "1.10.0"]
[ring/ring-jetty-adapter "1.7.1"]
[metosin/reitit "0.3.9"]]
:repl-options {:init-ns example.server}
:profiles{:dev {:dependencies [[ring/ring-mock "0.3.2"]]}})
(ns swanson.models.db
(:require [clojure.java.jdbc :as sql]))
(def db {:subprotocol "postgresql"
:subname "//localhost/swanson"
:user "admin"
:password "admin"})
(defn create-users-table []
(sql/with-connection db
(sql/create-table
:users
[:id "varchar(32) PRIMARY KEY"]
[:username "varchar(100)"]
[:pass "varchar(100)"])))
(defn get-user "first query" [id]
(sql/with-connection db
(sql/with-query-results
res ["SELECT * FROM users WHERE id = ?"] (first res))))
(ns kolmogorov-music.kolmogorov
(:require [clojure.repl :as repl]))
(defn in-ns? [sym ns]
(contains? (ns-interns ns) sym))
(defn sexpr [sym]
(-> sym repl/source-fn read-string))
(defn definition [sym]
(-> sym sexpr last))
(defn complexity-sym [sym ns]
(if (in-ns? sym ns)
(->> (definition sym)
flatten
(map #(-> % (complexity-sym ns) inc))
(apply +))
0))
(defn complexity-sexpr [sexpr ns]
(if (seq? sexpr)
(->> sexpr
(map #(-> % (complexity-fn ns) inc))
(apply +))
(complexity-fn sexpr ns)))
(defmacro complexity [sexpr]
(complexity-sexpr sexpr *ns*))
(complexity (+ 4 4))
(ns user
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.pprint :refer (pprint)]
[clojure.repl :refer :all]
[clojure.tools.namespace.repl :refer (refresh refresh-all)]
[pathfinder.system :as sys]
[midje.repl :refer (autotest)]))
;;; this file will be loaded by the repl automatically on start up
;;; lifecycle
(def system
"Entry point in to the current system state."
nil)
(defn init
"Constructs the current development system."
[]
(alter-var-root #'system
(constantly (sys/system {:jetty {:port 9400
:join? false}
:elasticsearch {:endpoint "http://localhost:9200"}}))))
(defn start
"Starts the current development system."
[]
(alter-var-root #'system sys/start))
(defn stop
"Shuts down and destroys the current development system."
[]
(alter-var-root #'system
(fn [s] (when s (sys/stop s)))))
(defn go
"Initializes the current development system and starts it running."
[]
(init)
(start))
(defn reset []
(stop)
(refresh :after 'user/go))
;;; utilities
(ns user
(:require [ruuvi.system]
[clojure.edn :as edn]
[clojure.tools.logging :refer [info error] :as log]
[com.stuartsierra.component :as component]
[clojure.tools.namespace.repl :refer [refresh refresh-all]]
))
(def system nil)
(defn init
"Constructs the current development system."
[]
(alter-var-root
#'system
(constantly (ruuvi.system/create-system "dev/config.edn"))))
(defn start
"Starts the current development system."
[]
(try
(alter-var-root #'system component/start)
(catch Exception e (error e "Failed to start system")
(throw e))))
(defn stop
"Shuts down and destroys the current development system."
[]
(try
(alter-var-root #'system
(fn [s] (when s (component/stop s))))
(catch Exception e (error e "Failed to stop system")
(throw e))))
(defn go
"Initializes the current development system and starts it running."
[]
(init)
(start))
(defn reset []
(stop)
(info "Resetting...")
(refresh :after 'user/go)
(info "Reset complete")
:reset-complete)
(def start-t (System/currentTimeMillis))
(defn random-sampler [ ]
(let [current (atom 0.0)]
(fn [ ]
(swap! current #(+ % (/ (+ (Math/random) (Math/random)) 2) -0.5)))))
(def rs-0 (random-sampler))
(def rs-1 (random-sampler))
(def rs-2 (random-sampler))
(defsensor random-unconstrained {:poll-interval (seconds 10)}
(rs-0))
(defsensor random-positive {:poll-interval (seconds 10)}
(+ 0.1 (Math/abs (rs-1))))
(defsensor random-negative {:poll-interval (seconds 10)}
(- -0.1 (Math/abs (rs-2))))
(defsensor math {:poll-interval (seconds 10)}
{:sine (+ 0.3 (Math/sin (/ (- (System/currentTimeMillis) start-t) (minutes 1))))
:cosine (Math/cos (/ (- (System/currentTimeMillis) start-t) (minutes 1))) })
(defsensor steps-ascending {:poll-interval (seconds 5)}
(+ 2.3
(mod (/ (- (System/currentTimeMillis) start-t) (minutes 4))
3)))
(ns docker-clojure.dockerfile.tools-deps)
(defn install-deps [{:keys [distro]}]
(case distro
"alpine"
["RUN echo '@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \\"
" apk add --update --no-cache bash curl rlwrap@testing"]
"debian"
["RUN apt-get update && apt-get install -y rlwrap"]
nil))
(defn contents [{:keys [build-tool-version] :as variant}]
(-> [(format "ENV CLOJURE_VERSION=%s" build-tool-version)
""
"WORKDIR /tmp"
""]
(concat (install-deps variant))
(concat
[""
"RUN wget https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh \\"
" && chmod +x linux-install-$CLOJURE_VERSION.sh \\"
" && ./linux-install-$CLOJURE_VERSION.sh"
""
"RUN clojure -e \"(clojure-version)\""
""
"# Docker bug makes rlwrap crash w/o short sleep first"
"# Bug: https://github.com/moby/moby/issues/28009"
"CMD sleep 1; clj"])
(->> (remove nil?))))
(defproject madouc "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"]
[ring/ring-core "1.5.1"]
[ring/ring-devel "1.5.1"]
[ring-logger "0.7.7"]
[ring-logger-timbre "0.7.5"]
[com.taoensso/timbre "4.8.0"]
[com.fzakaria/slf4j-timbre "0.3.4"]
[compojure "1.5.2"]
[metosin/compojure-api "1.1.10"]
[yogthos/config "0.8"]
[org.immutant/web "2.1.6"
:exclusions [ch.qos.logback/logback-classic]]
[selmer "1.10.6"]
[mount "0.1.11"]]
:main madouc.core
:profiles {:dev {:resource-paths ["config/dev"]}
:prod {:resource-paths ["config/prod"]}
:uberjar {:aot :all}})
(defproject govuk/blinken "0.1.0-SNAPSHOT"
:description "Dashboard to integrate multiple alert systems"
:url "https://github.com/alphagov/blinken"
:license {:name "MIT"
:url "http://opensource.org/licenses/MIT"}
:dependencies [[org.clojure/clojure "1.5.1"]
[docopt "0.6.1"]
[http-kit "2.1.16"]
[cheshire "5.2.0"]
[hiccup "1.0.4"]
[clj-yaml "0.4.0"]
[compojure "1.1.6"]
[org.clojure/core.async "0.1.267.0-0d7780-alpha"]
[org.clojure/tools.logging "0.2.6"]]
:main govuk.blinken)
(defproject compojure "1.1.8"
: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.3.0"]
[org.clojure/tools.macro "0.1.0"]
[clout "1.2.0"]
[ring/ring-core "1.3.1"]]
:plugins [[codox "0.8.0"]]
:codox {:src-dir-uri "http://github.com/weavejester/compojure/blob/1.1.8/"
:src-linenum-anchor-prefix "L"}
:profiles
{:dev {:dependencies [[ring-mock "0.1.3"]
[javax.servlet/servlet-api "2.5"]]}
:1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
:1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]}
:1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}})
(defproject org.toomuchcode/clara-rules "0.1.1"
:description "Clara Rules Engine"
:url "http://rbrush.github.io/clara-rules/"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.codehaus.jsr166-mirror/jsr166y "1.7.0"]]
:plugins [[codox "0.6.4"]
[lein-javadoc "0.1.1"]]
:codox {:exclude [clara.other-ruleset clara.sample-ruleset clara.test-java
clara.test-rules clara.rules.memory clara.test-accumulators
clara.rules.testfacts clara.rules.java clara.rules.engine]}
:javadoc-opts {:package-names ["clara.rules"]}
:source-paths ["src/main/clojure"]
:test-paths ["src/test/clojure"]
:java-source-paths ["src/main/java"])
(defproject org.onyxplatform/onyx-bookkeeper "0.8.1.0-0.8.1"
:description "Onyx plugin for BookKeeper"
:url "https://github.com/onyx-platform/onyx-bookkeeper"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
: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}}
:dependencies [[org.clojure/clojure "1.7.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.8.1"]]
:profiles {:dev {:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
(defproject wall-follower "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 "ev3main.jar"
:main wall_follower.Main
:source-paths ["src/clj"]
:java-source-paths ["src/java"]
:aliases {"run-ev3" ["do" "uberjar,"
"shell" "scp" "target/ev3main.jar" "root@10.0.1.1:,"
"shell" "ssh" "root@10.0.1.1" "/bin/jrun -jar /home/root/ev3main.jar"]
"shutdown-ev3" ["shell" "ssh" "root@10.0.1.1" "halt"]}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojars.earthlingzephyr/lejos-ev3 "0.5.0-SNAPSHOT"]]
:plugins [[lein-shell "0.3.0"]])
(defproject fixturex/fixturex "0.3.0"
:description "A library of helpful test fixture macros and functions."
:url "http://www.ryanmcg.com/fixturex/"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]]
:repack [{:type :clojure
:levels 1
:path "src"}]
:profiles {:dev {:dependencies [[incise "0.5.0"]
[com.ryanmcg/incise-codox "0.1.0"]
[com.ryanmcg/incise-vm-layout "0.5.0"]]
:plugins [[lein-repack "0.2.7"]]
:aliases {"incise" ^:pass-through-help ["run" "-m" "incise.core"]}}
:1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
:1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]}
:1.7 {:dependencies [[org.clojure/clojure "1.7.0-alpha4"]]}})
(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.2"]
[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]})
(defproject onyx-app/lein-template "0.9.0.9"
:description "Onyx Leiningen application template"
:url "https://github.com/onyx-platform/onyx-template"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
: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)
;; 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.0"
: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"]
[lein-ancient "0.6.7"]])
(defproject stencil "0.1.0-SNAPSHOT"
:description "Mustache in Clojure"
:dependencies [[clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]]
:dev-dependencies [[swank-clj "0.1.6-SNAPSHOT"]
[org.clojure/clojure-contrib "1.2.0"]]
:tasks [cake.tasks.swank-clj stencil.cake.tasks])(defproject clucy "0.4.0"
:description "A Clojure interface to the Lucene search engine"
:url "http://github/weavejester/clucy"
:dependencies [[org.clojure/clojure "1.7.0"]
[org.apache.lucene/lucene-core "5.3.0"]
[org.apache.lucene/lucene-queryparser "5.3.0"]
[org.apache.lucene/lucene-analyzers-common "5.3.0"]
[org.apache.lucene/lucene-highlighter "5.3.0"]]
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:profiles {:1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
:1.5 {:dependencies [[org.clojure/clojure "1.5.0"]]}
:1.6 {:dependencies [[org.clojure/clojure "1.6.0-master-SNAPSHOT"]]}}
:codox {:src-dir-uri "http://github/weavejester/clucy/blob/master"
:src-linenum-anchor-prefix "L"})
(defproject trinity "0.1.0-SNAPSHOT"
:description "A sweet little Clojure API for Atomix"
:url "http://github.com/atomix/trinity"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[io.atomix/atomix "0.1.0-SNAPSHOT"]
[io.atomix/atomix-atomic "0.1.0-SNAPSHOT"]
[io.atomix/atomix-collections "0.1.0-SNAPSHOT"]
[io.atomix/atomix-coordination "0.1.0-SNAPSHOT"]
[io.atomix/catalyst-netty "1.0.0-SNAPSHOT"]]
:repositories [["sonatype-nexus-snapshots" {:url "https://oss.sonatype.org/content/repositories/snapshots"}]]
:plugins [[codox "0.8.13"]]
:codox {:output-dir "target/docs/docs"
:defaults {:doc/format :markdown}
:src-dir-uri "http://github.com/atomix/trinity/blob/master/"
:src-linenum-anchor-prefix "L"})
(defproject kixi.hecuba.weather "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/data.csv "0.1.2"]
[clj-http "2.0.0"]
[clj-time "0.10.0"]])
(defproject reply "0.1.0-alpha1"
:description "REPL-y: A fitter, happier, more productive REPL for Clojure."
:dependencies [[org.clojure/clojure "1.3.0"]
[org.clojars.trptcolin/jline "2.6-alpha1"]
[org.thnetos/cd-client "0.3.1" :exclusions [org.clojure/clojure]]
[clj-stacktrace "0.2.4"]
[clojure-complete "0.1.4" :exclusions [org.clojure/clojure]]
[org.clojure/tools.nrepl "0.0.5"]]
:dev-dependencies [[midje "1.3-alpha4" :exclusions [org.clojure/clojure]]
[lein-midje "[1.0.0,)"]]
:repositories {
"sonatype" {:url "http://oss.sonatype.org/content/repositories/snapshots" } }
:aot [reply.reader.jline.JlineInputReader]
:source-path "src/clj"
:java-source-path "src/java")
(defproject protobuf "0.6.0-beta19"
:description "Clojure-protobuf provides a clojure interface to Google's protocol buffers."
:dependencies [[org.clojure/clojure "1.4.0"]
[ordered-collections "0.4.0"]
[useful "0.8.2-alpha1"]
[schematic "0.0.5"]]
:plugins [[lein-protobuf "0.1.0-alpha1"]]
:profiles {:dev {:dependencies [[gloss "0.2.1"]
[io "0.2.0-beta2"]]}}
:hooks [leiningen.protobuf]
;; Bug in the current 1.x branch of Leiningen causes
;; jar to implicitly clean no matter what, wiping stuff.
;; This prevents that.
:disable-implicit-clean true
:checksum-deps true
:java-source-paths ["src"])
(defproject org.onyxplatform/onyx-peer-http-query "0.10.0.0-alpha5"
:description "An Onyx health and query HTTP server"
:url "https://github.com/onyx-platform/onyx-peer-http-query"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[ring/ring-core "1.5.1"]
[org.clojure/java.jmx "0.3.3"]
[ring-jetty-component "0.3.1"]
[cheshire "5.7.0"]]
: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}}
:profiles {:dev {:dependencies [[clj-http "3.4.1"]
[org.onyxplatform/onyx-metrics "0.10.0.0-alpha1"]
[org.onyxplatform/onyx "0.10.0-alpha5"]]
:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}})
;; The only requirement of the project.clj file is that it includes a
;; defproject form. It can have other code in it as well, including
;; loading other task definitions.
(defproject leiningen "1.4.0-SNAPSHOT"
:description "A build tool designed not to set your hair on fire."
:url "http://github.com/technomancy/leiningen"
:license {:name "Eclipse Public License"}
:dependencies [[org.clojure/clojure "1.3.0-master-SNAPSHOT"]
[ant/ant "1.6.5"]
[jline "0.9.94"]
[robert/hooke "1.0.2"]
[org.apache.maven/maven-ant-tasks "2.0.10"]]
:disable-implicit-clean true)
;; 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/.
(defproject containium "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Mozilla Public License 2.0"
:url "http://mozilla.org/MPL/2.0/"}
:dependencies [[org.clojure/clojure "1.5.1"]
[boxure "0.1.0-SNAPSHOT"]
[org.clojure/tools.nrepl "0.2.3"]
[jline "2.11"]
[ring "1.2.0"]
[http-kit "2.1.10"]
[org.apache.httpcomponents/httpclient "4.2.3"]
[org.apache.cassandra/cassandra-all "1.2.8"]
[org.elasticsearch/elasticsearch "0.90.3"]
[org.scala-lang/scala-library "2.9.2"]
[kafka/core-kafka_2.9.2 "0.7.2"]]
:main containium.core)
(defproject pinpointer "0.1.0-SNAPSHOT"
:description "Pinpointer makes it easy to grasp which part of data is violating spec conformance."
:url "https://github.com/athos/Pinpointer"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [;; clj stuff
[org.clojure/clojure "1.9.0-alpha17"]
[org.clojure/spec.alpha "0.1.123"]
[spectrace "0.1.0-SNAPSHOT"]
[rewrite-clj "0.5.1"]
[clansi "1.0.0"]
;; cljs stuff
[org.clojure/clojurescript "1.9.562" :scope "provided"]
[rewrite-cljs "0.4.1"]]
:plugins [[lein-cljsbuild "1.1.4"]]
:cljsbuild
{:builds
{:dev {:source-paths ["src"]
:compiler {:output-to "target/main.js"
:output-dir "target"
:optimizations :whitespace
:pretty-print true}}}})
(defproject useful "0.8.3-alpha3"
:description "A collection of generally-useful Clojure utility functions"
:dependencies [[org.clojure/clojure "1.4.0"]
[org.clojure/tools.macro "0.1.1"]]
:multi-deps {"1.3" [[org.clojure/clojure "1.3.0"]]
"1.2" [[org.clojure/clojure "1.2.1"]]
:all [[org.clojure/tools.macro "0.1.1"]]})
(defproject org.onyxplatform/onyx-datomic "0.10.0.0-alpha7"
: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"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:dependencies [[org.clojure/clojure "1.8.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.10.0-alpha7"]]
:test-selectors {:default (complement :ci)
:ci :ci
:all (constantly true)}
:profiles {:dev {:dependencies [[com.datomic/datomic-free "0.9.5544"]
[aero "0.2.0"]]
:plugins [[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]
:resource-paths ["test-resources/"]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
(ns reabledit.util)
(defn set-selected!
[state row col]
(swap! state assoc :selected [row col]))
(defn enable-edit!
[columns data state]
(if-not (:disable-edit (nth columns (second (:selected @state))))
(let [row-data (nth data (first (:selected @state)))]
(swap! state assoc :edit {:initial row-data
:updated row-data}))))
(defn disable-edit!
[state element-id]
(swap! state dissoc :edit)
;; Dirty as fudge, but what can you do with Reagent?
(.focus (.getElementById js/document element-id)))
(defn move-cursor-to-end!
[e]
(let [el (.-target e)
length (count (.-value el))]
(set! (.-selectionStart el) length)
(set! (.-selectionEnd el) length)))
(ns markiki.views
(:require [reagent.core :as reagent :refer [atom]]
[re-frame.core :refer [subscribe dispatch]]))
(defn searchbar []
(fn []
[:form
[:div.form-group.has-error.has-feedback
[:input#searchbar.form-control.input-lg
{:type "text"
:placeholder "Search"
:on-change #(dispatch [:searchbar-change (-> % .-target .-value)])}]
[:span.glyphicon.glyphicon-search.form-control-feedback]]]))
(defn markiki-app []
(let [loading? (subscribe [:loading?])
searchbar-val (subscribe [:searchbar])
last-article (subscribe [:last-article])
articles (subscribe [:articles])]
(fn []
[:div
[searchbar]
[:div "Searching for: " @searchbar-val]])))
(defproject com.gfredericks/seventy-one "0.1.2-SNAPSHOT"
:description "71 in Clojure"
:url "https://github.com/gfredericks/seventy-one"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]]
:plugins [[codox "0.8.12"]
[lein-cljsbuild "1.0.6"]]
:deploy-repositories [["releases" :clojars]]
:profiles {:dev {:dependencies [[org.clojure/clojurescript "0.0-3308"]
[org.clojure/test.check "0.7.0"]]
:cljsbuild {:builds [{:source-paths ["src" "test"]
:compiler {:output-to "resources/private/js/unit-test.js"
:optimizations :whitespace
:pretty-print true}}]}}})
(defproject govuk/blinken "0.1.0-SNAPSHOT"
:description "Dashboard to integrate multiple alert systems"
:url "https://github.com/alphagov/blinken"
:license {:name "MIT"
:url "http://opensource.org/licenses/MIT"}
:dependencies [[org.clojure/clojure "1.5.1"]
[docopt "0.6.1"]
[http-kit "2.1.16"]
[cheshire "5.2.0"]
[hiccup "1.0.4"]
[clj-yaml "0.4.0"]
[compojure "1.1.6"]
[lein-daemon "0.5.4"]
[org.clojure/core.async "0.1.267.0-0d7780-alpha"]
[org.clojure/tools.logging "0.2.6"]]
:main govuk.blinken)
(defproject ezglib "0.1.4-SNAPSHOT"
:description "An easy game library for ClojureScript."
:url "https://github.com/bakpakin/ezglib"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:scm {:name "git"
:url "https://github.com/bakpakin/ezglib"}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2268"]]
:plugins [[lein-cljsbuild "1.0.3"]]
:hooks [leiningen.cljsbuild]
:source-paths ["src"]
:cljsbuild {
:builds {
:src {
:jar true
:source-paths ["src"]
:incremental? true}
:examples {
:incremental? true
:source-paths ["src" "examples/src"]
:compiler {:output-to "examples/js/cljs.js"
:output-dir "examples/js"
:optimizations :none
:pretty-print true
:source-map "examples/js/cljs.js.map"}}}})
(defproject onyx-app/lein-template "0.13.0.0-alpha1"
: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 beatha "0.0.1-SNAPSHOT"
:description "Cellular automata experiments."
:url "http://github.com/gsnewmark/beatha"
:license {:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:distribution :repo}
:min-lein-version "2.3.4"
:source-paths ["src/clj" "src/cljs"]
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2156"]
[org.clojure/core.async "0.1.278.0-76b25b-alpha"]
[om "0.5.0"]
[com.facebook/react "0.9.0"]
[org.webjars/bootstrap "3.1.1"]]
:plugins [[lein-cljsbuild "1.0.3-SNAPSHOT"]]
:hooks [leiningen.cljsbuild]
:cljsbuild
{:builds {:beatha
{:source-paths ["src/cljs"]
:compiler
{:output-to "dev-resources/public/js/beatha.js"
:optimizations :advanced
:pretty-print false}}}})
(defproject onyx-app/lein-template "0.9.9.2"
: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 cli4clj "0.1.0"
;(defproject cli4clj "0.1.0-SNAPSHOT"
:description "Create simple interactive CLIs for Clojure applications."
:url "https://github.com/ruedigergad/cli4clj"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]]
:main cli4clj.example)
(defproject onyx-app/lein-template "0.9.10.0-beta6"
: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)
;;; Copyright (c) 2013 David Goldfarb. All rights reserved.
;;; Contact info: deg@degel.com
;;;
;;; The use and distribution terms for this software are covered by the Eclipse
;;; Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can
;;; be found in the file epl-v10.html at the root of this distribution.
;;; By using this software in any fashion, you are agreeing to be bound by the
;;; terms of this license.
;;;
;;; You must not remove this notice, or any other, from this software.
(defproject my-muxx-sites "0.1.1"
:description "Deployment project to wrap my web apps into a single site."
:url "https://github.com/deg/my-muxx-sites"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [;; Clojure itself
[org.clojure/clojure "1.5.1"]
;; Degel's Clojure utility library
[degel-clojure-utils "0.1.14"]
;; Degel's website multiplexer
[muxx "0.1.1"]
;; Our apps
[deg-scraps "0.1.1"]
[webol "0.1.2"]]
:profiles {:dev
{ :plugins [[lein-marginalia "0.7.1"]]}}
:min-lein-version "2.0.0"
:main degel.deploy.deployment)
;; 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 Juan de la Cruz
;; Copyright (c) 2016-2019 Andrey Antukh
(ns uxbox.view.ui.viewer.sitemap
(:require
[lentes.core :as l]
[rumext.alpha :as mf]
[uxbox.builtins.icons :as i]
[uxbox.view.data.viewer :as dv]
[uxbox.view.store :as st]))
(mf/defc sitemap
[{:keys [project pages selected] :as props}]
(let [project-name (:name project)
on-click #(st/emit! (dv/select-page %))]
[:div.view-sitemap
[:span.sitemap-title project-name]
[:ul.sitemap-list
(for [page pages]
(let [selected? (= (:id page) selected)
page-id (:id page)]
[:li {:class (when selected? "selected")
:on-click (partial on-click page-id)
:id (str "page-" page-id)
:key page-id}
[:div.page-icon i/page]
[:span (:name page)]]))]]))
(defproject measure "0.1.2"
:description "Say things about your application with authority, using Coda Hale's Metrics."
:url "https://github.com/KeepSafe/measure"
:scm {:name "git"
:url "https://github.com/KeepSafe/measure"}
:license {:name "Apache License, Version 2.0"
:url "http://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[com.codahale.metrics/metrics-core "3.0.1"]
[com.codahale.metrics/metrics-graphite "3.0.1"]]
:profiles {:dev {:plugins [[com.jakemccrary/lein-test-refresh "0.3.4"]
[lein-marginalia "0.7.1"]]}}
:repositories {"sonatype" {:url "http://oss.sonatype.org/content/repositories/releases"
:snapshots false
:releases {:checksum :fail :update :always}}}
:signing {:gpg-key "ben@getkeepsafe.com"}
:deploy-repositories [["clojars" {:creds :gpg}]]
:pom-addition [:developers [:developer
[:name "Ben Bader"]
[:url "http://getkeepsafe.com"]
[:email "ben@getkeepsafe.com"]
[:timezone "America/Los Angeles"]]]
)
(defproject funcool/potok "2.1.0"
:description "Reactive streams based state management toolkit for ClojureScript"
:url "https://github.com/funcool/potok"
:license {:name "BSD (2-Clause)"
:url "http://opensource.org/licenses/BSD-2-Clause"}
:dependencies [[org.clojure/clojure "1.8.0" :scope "provided"]
[org.clojure/clojurescript "1.9.495" :scope "provided"]
[funcool/beicon "3.2.0"]]
:deploy-repositories {"releases" :clojars
"snapshots" :clojars}
:source-paths ["src" "assets"]
:test-paths ["test"]
:jar-exclusions [#"\.swp|\.swo|user.clj"]
:plugins [[lein-ancient "0.6.10"]])
(defproject cli4clj "1.6.3"
;(defproject cli4clj "1.6.4-SNAPSHOT"
:description "Create simple interactive CLIs for Clojure applications."
:url "https://github.com/ruedigergad/cli4clj"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]
[clj-assorted-utils "1.18.2"]
[org.clojure/core.async "0.4.474"]
[jline/jline "2.14.6"]]
; :global-vars {*warn-on-reflection* true}
:html5-docs-docs-dir "ghpages/doc"
:html5-docs-ns-includes #"^cli4clj.*"
:html5-docs-repository-url "https://github.com/ruedigergad/cli4clj/blob/master"
:test2junit-output-dir "ghpages/test-results"
:test2junit-run-ant true
:main cli4clj.example
:aot :all
:plugins [[lein-cloverage "1.0.2"] [test2junit "1.3.3"] [lein-html5-docs "3.0.3"]]
:profiles {:repl {:dependencies [[jonase/eastwood "0.2.7" :exclusions [org.clojure/clojure]]]}}
)
(defproject iss "0.1.0-SNAPSHOT"
:description "Write inline styles; ship optimized CSS stylesheets."
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.226"]
[org.omcljs/om "0.9.0"]]
:jvm-opts ^:replace ["-Xmx1g" "-server"]
:source-paths ["src" "lib" "target/classes"]
:clean-targets ["out" "release"]
:target-path "target")
(ns clj.medusa.alert
(:require [amazonica.aws.simpleemail :as ses]
[amazonica.core :as aws]
[clojure.string :as string]
[clj.medusa.config :as config]
[clj.medusa.db :as db]
[clj.medusa.config :as config]))
(defn send-email [subject body destinations]
(when-not (:dry-run @config/state)
(ses/send-email :destination {:to-addresses destinations}
:source "telemetry-alerts@mozilla.com"
:message {:subject subject
:body {:html (str "" body "")}})))
(defn notify-subscribers [{:keys [metric_id date emails]}]
(let [{:keys [hostname]} @config/state
foreign_subscribers (when (seq? emails) (string/split emails #","))
{metric_name :name,
detector_id :detector_id
metric_id :id} (db/get-metric metric_id)
{detector_name :name} (db/get-detector detector_id)
subscribers (db/get-subscribers-for-metric metric_id)]
(send-email (str "Alert for " metric_name " (" detector_name ") on the " date)
(str "http://" hostname "/index.html#/detectors/" detector_id "/"
"metrics/" metric_id "/alerts/?from=" date "&to=" date)
(concat subscribers foreign_subscribers ["dev-telemetry-alerts@lists.mozilla.org"]))))
(defproject onyx-app/lein-template "0.12.0.0-alpha1"
: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 funcool/beicon "0.1.0-SNAPSHOT"
:description "A rxjs idiomatic wrapper for ClojureScript"
:url "https://github.com/funcool/beicon"
:license {:name "Public Domain"
:url "http://unlicense.org/"}
:dependencies [[org.clojure/clojure "1.7.0" :scope "provided"]
[org.clojure/clojurescript "1.7.48" :scope "provided"]
[funcool/cats "1.0.0"]]
:deploy-repositories {"releases" :clojars
"snapshots" :clojars}
:source-paths ["src" "assets"]
:test-paths ["test"]
:jar-exclusions [#"\.swp|\.swo|user.clj"]
:codeina {:sources ["src"]
:reader :clojurescript
:target "doc/dist/latest/api"
:src-uri "http://github.com/funcool/beicon/blob/master/"
:src-uri-prefix "#L"}
:plugins [[funcool/codeina "0.3.0"]
[lein-externs "0.1.3"]])
(defproject clj-gatling "0.4.2"
:description ""
:url "http://github.com/mhjort/clj-gatling"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[clj-containment-matchers "0.9.1"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
[clojure-csv/clojure-csv "2.0.1"]
[http-kit "2.1.16"]
[clj-time "0.8.0"]
[io.gatling/gatling-charts "2.0.3"]
[io.gatling.highcharts/gatling-charts-highcharts "2.0.3"]]
:repositories { "excilys" "http://repository.excilys.com/content/groups/public" })
;;;
;;; Copyright 2017, Ruediger Gad
;;;
;;; This software is released under the terms of the Eclipse Public License
;;; (EPL) 1.0. You can find a copy of the EPL at:
;;; http://opensource.org/licenses/eclipse-1.0.php
;;;
(ns
^{:author "Ruediger Gad",
:doc "Java Interop for using the DSL from within Java."}
dsbdp.DslHelper
(:require [dsbdp.data-processing-dsl :refer :all])
(:gen-class
:methods [^:static [generateProcessingFn [Object] clojure.lang.IFn]]))
(defn -generateProcessingFn [dsl-expression]
(if (string? dsl-expression)
(create-proc-fn (binding [*read-eval* false] (read-string dsl-expression)))
(create-proc-fn dsl-expression)))
(defproject planck "0.1.0"
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.189"]
[tailrecursion/cljson "1.0.7"]
[com.cognitect/transit-clj "0.8.275"]
[com.cognitect/transit-cljs "0.8.220"]
[malabarba/lazy-map "1.1"]]
:clean-targets ["out" "target"])
(ns robot-name)
(def ^:private random (java.util.Random.))
(def ^:private letters (map char (range 65 91)))
(defn- generate-name []
(str (apply str (take 2 (shuffle letters)))
(+ 100 (.nextInt random 899))))
(defn robot []
(atom {:name (generate-name)}))
(defn robot-name [robot]
(:name @robot))
(defn reset-name [robot]
(swap! robot assoc :name (generate-name)))
(ns shale.periodic
(:require [shale.sessions :as sessions])
(:use overtone.at-at))
(def thread-pool (mk-pool))
(defn schedule! []
(every 10 #(sessions/refresh-sessions nil) thread-pool :fixed-delay true))
(defn stop! []
(stop-and-reset-pool! thread-pool))
(defproject clj-http "0.3.3-SNAPSHOT"
:description "A Clojure HTTP library wrapping the Apache HttpComponents client."
:url "https://github.com/dakrone/clj-http/"
:repositories {"sona" "http://oss.sonatype.org/content/repositories/snapshots"}
:warn-on-reflection false
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.3.0"]
[org.apache.httpcomponents/httpclient "4.1.2"]
[org.apache.httpcomponents/httpmime "4.1.2"]
[commons-codec "1.5"]
[commons-io "2.1"]
[slingshot "0.10.2"]
[cheshire "2.2.2"]]
:profiles {:dev {:dependencies [[ring/ring-jetty-adapter "1.0.2"]
[ring/ring-devel "1.0.2"]]}
:1.2 {:dependencies [[org.clojure/clojure "1.2.1"]]}
:1.4 {:dependencies [[org.clojure/clojure "1.4.0-beta1"]]}}
:aliases {"all" ["with-profile" "dev,1.2:dev:dev,1.4"]}
:test-selectors {:default #(not (:integration %))
:integration :integration
:all (constantly true)}
:checksum-deps true)
(defproject compojure "1.3.4"
: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.5.1"]
[org.clojure/tools.macro "0.1.5"]
[clout "2.1.2"]
[medley "0.6.0"]
[ring/ring-core "1.4.0"]
[ring/ring-codec "1.0.0"]]
:plugins [[codox "0.8.12"]]
:codox {:src-dir-uri "http://github.com/weavejester/compojure/blob/1.3.4/"
:src-linenum-anchor-prefix "L"}
:profiles
{:dev {:jvm-opts ^:replace []
:dependencies [[ring/ring-mock "0.2.0"]
[criterium "0.4.3"]
[javax.servlet/servlet-api "2.5"]]}
:1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
:1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]}})
;; create the main project namespace
(ns modern-cljs.core)
;; enable cljs to print to the JavaScript console of the browser
(enable-console-print!)
;; print a friendly greeting to the console
(println "Hello, Modern ClojureScript World!")
(ns subman.routes
(:use [compojure.core :only [defroutes GET]])
(:require [compojure.route :as route]
[subman.models :as models]
[subman.api :as api]
[subman.views :as views]))
(defroutes main-routes
(GET "/" [] (views/index-page))
(GET "/api/search/" {params :params} (api/search params))
(route/resources "/")
(route/not-found (views/index-page)))
(defproject onyx-app/lein-template "0.12.2.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 org.onyxplatform/onyx-sql "0.7.3-SNAPSHOT"
:description "Onyx plugin for JDBC-backed SQL databases"
:url "https://github.com/MichaelDrogalis/onyx-sql"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/java.jdbc "0.3.3"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.7.3-20150828_152050-gd122e3e"]
[java-jdbc/dsl "0.1.3"]
[com.mchange/c3p0 "0.9.2.1"]
[honeysql "0.5.1"]]
:profiles {:dev {:dependencies [[midje "1.7.0"]
[environ "1.0.0"]
[mysql/mysql-connector-java "5.1.25"]]
:plugins [[lein-midje "3.1.3"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
(defproject onyx-app/lein-template "0.11.0.0-alpha1"
: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 de.otto/tesla-httpkit "0.1.5"
:description "httpkit addon for tesla-microservice."
:url "https://github.com/otto-de/tesla-httpkit"
:license {:name "Apache License 2.0"
:url "http://www.apache.org/license/LICENSE-2.0.html"}
:scm {:name "git"
:url "https://github.com/otto-de/tesla-httpkit"}
:dependencies [[org.clojure/clojure "1.7.0"]
[http-kit "2.1.19"]]
:exclusions [org.clojure/clojure
org.slf4j/slf4j-nop
org.slf4j/slf4j-log4j12
log4j
commons-logging/commons-logging]
:profiles {:provided {:dependencies [[de.otto/tesla-microservice "0.1.26"]
[com.stuartsierra/component "0.3.1"]]}
:dev {:dependencies [[javax.servlet/servlet-api "2.5"]
[org.slf4j/slf4j-api "1.7.14"]
[ch.qos.logback/logback-core "1.1.3"]
[ch.qos.logback/logback-classic "1.1.3"]
[ring-mock "0.1.5"]]
:plugins [[lein-ancient "0.5.4"]]}}
:test-paths ["test" "test-resources"])
(defproject org.onyxplatform/onyx-datomic "0.8.1.0-alpha4"
: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"
:username :env
:password :env
:sign-releases false}
"releases" {:url "https://clojars.org/repo"
:username :env
:password :env
:sign-releases false}}
:dependencies [[org.clojure/clojure "1.7.0"]
^{:voom {:repo "git@github.com:onyx-platform/onyx.git" :branch "master"}}
[org.onyxplatform/onyx "0.8.1-alpha4"]]
:profiles {:dev {:dependencies [[midje "1.7.0"]
[com.datomic/datomic-free "0.9.5153"]]
:plugins [[lein-midje "3.1.3"]
[lein-set-version "0.4.1"]
[lein-update-dependency "0.1.2"]
[lein-pprint "1.1.1"]]}
:circle-ci {:jvm-opts ["-Xmx4g"]}})
(ns puppetlabs.puppetserver.cli.gem-test
(:require [clojure.test :refer :all]
[puppetlabs.puppetserver.cli.gem :refer :all]))
(deftest cli-gem-environment-test
(let [fake-config {:jruby-puppet {:gem-home "/fake/path"}}
fake-env {"PATH" "/bin:/usr/bin", "FOO_DEBUG" "1"}]
(testing "The environment intended for the gem subcommand"
(is (not (empty? ((cli-gem-environment fake-config fake-env) "PATH")))
"has a non-empty PATH originating from the System")
(is (= "/bin:/usr/bin" ((cli-gem-environment fake-config fake-env)
"PATH"))
"does not modify the PATH environment variable")
(is (= "/fake/path" ((cli-gem-environment fake-config fake-env)
"GEM_HOME"))
"has GEM_HOME set to /fake/path from the provided config")
(is (= "1" ((cli-gem-environment fake-config fake-env)
"FOO_DEBUG"))
"preserves arbitrary environment vars for the end user"))))
(ns merkki.core)
(defn header
"Given a number and a string, tags the string as that header level and adds a new line"
[n s]
(str (reduce str (take n (repeat "#")))
" "
s
" \n"))
;; Pre-provided curried versions of header for quicker use
(def h1 (partial header 1))
(def h2 (partial header 2))
(def h3 (partial header 3))
(def h4 (partial header 4))
(def h5 (partial header 5))
(def h6 (partial header 6))
(defn u-header
"Generates an underlined, multi-line setext style header, using the given underline character"
[ch s]
(str s " \n"
(reduce str (take (count s) (repeat ch))) " \n"))
;; Pre-provided curried versions of u-header for h1 and h2
(def uh1 (partial u-header "="))
(def uh2 (partial u-header "-"))
(defn em
"Wraps string for emphasis"
[s]
(str "*" s "*"))
(defn strong
"Wraps string for strong emphasis"
[s]
(str "**" s "**"))
;; Copyright © 2016, JUXT LTD.
(ns edge.server
(:require
[aleph.http :as http]
[bidi.vhosts :refer [make-handler vhosts-model]]
[clojure.java.io :as io]
[clojure.tools.logging :refer :all]
[com.stuartsierra.component :refer [Lifecycle using]]
[schema.core :as s]
[yada.yada :refer [yada resource] :as yada])
(:import
[bidi.vhosts VHostsModel]))
(s/defrecord HttpServer [port :- s/Int
routes
server]
Lifecycle
(start [component]
(assoc component :server (yada/server routes {:port port})))
(stop [component]
(when-let [server (:server component)]
(.close server))
component))
(defn new-http-server [options]
(map->HttpServer options))
��}'qΖ]� �� q � s � � � D l � � � B � # {' ,,
. r1 ?4 U6 �6 �: �<