appending

appending

--- src/cljs/clojure_spotify_search/client.cljs
+++ src/cljs/clojure_spotify_search/client.cljs
@@ -12,6 +12,9 @@

 ;(js/console.log (get {:a 1 :b 2 } :a))

+(defn append-track [track]
+  (jq/append ($ :body) ( str "
Name: " ( track "name" )  " link: " (track "external_url") "
" )))
+
 (defn return-tracks [tracks]
   ((tracks "tracks") "items"))

@@ -24,10 +27,19 @@
 (defn error-handler [{:keys [status status-text]}]
   (.log js/console (str "something bad happened: " status " " status-text)))

+(defn print-track [track]
+  (js/console.log ( str ( track "name") (track "external_url") )))
+
+(append-track {"name" "sam" "external_url" "rodger"})
+
 (defn loop-tracks [response]
   (dotimes [i (count (return-tracks response)) ]
-    (js/console.log (str i ": " (((return-tracks response) i) "name")
-      ))))
+    (append-track ((return-tracks response) i))
+      ))
+
+;(js/console.log (str i ": " ((return-tracks response) i)
+(js/console.log (subvec {"name" "sam" "external_url" "rodger"} "rodger"))
+

 (GET "https://api.spotify.com/v1/search"
   {:params {:q "taking back sunday"


Slightly adjusted changes from @absurdfarce branch:

Changed base describe functions to use new system_schema keyspace

--- src/clojure/clojurewerkz/cassaforte/cql.clj
+++ src/clojure/clojurewerkz/cassaforte/cql.clj
@@ -275,32 +275,32 @@
   "Describes a keyspace"
   [^Session session ks]
   (first (select session
-                 (query/from :system :schema_keyspaces)
+                 (query/from :system_schema :keyspaces)
                  (query/where {:keyspace_name (name ks)}))))

 (defn describe-table
   "Describes a table"
   [^Session session ks table]
   (first (select session
-                 (query/from :system :schema_columnfamilies)
-                 (query/where {:columnfamily_name (name table)
-                               :keyspace_name     (name ks)}))))
+                 (query/from :system_schema :tables)
+                 (query/where {:table_name    (name table)
+                               :keyspace_name (name ks)}))))

 (defn describe-tables
-  "Returns all the tables description, taken from system.schema_columnfamilies "
+  "Returns all the tables description, taken from system_schema.tables"
   [^Session session ks]
   (select session
-          (query/from :system :schema_columnfamilies)
-          (query/where {:keyspace_name     (name ks)})))
+          (query/from :system_schema :tables)
+          (query/where {:keyspace_name (name ks)})))

 (defn describe-columns
   "Describes a table"
   [^Session session ks table]
   (select session
-          (query/from :system :schema_columns)
-          (query/where {:columnfamily_name (name table)
-                        :keyspace_name     (name ks)})))
+          (query/from :system_schema :columns)
+          (query/where {:table_name    (name table)
+                        :keyspace_name (name ks)})))
 ;;
 ;; Higher-level collection manipulation
 ;;


Fixed reflection warning.

Fixed reflection warning.

--- src/com/lemondronor/turboshrimp/network.clj
+++ src/com/lemondronor/turboshrimp/network.clj
@@ -14,7 +14,7 @@
   (DatagramSocket. (int port)))

-(defn make-tcp-socket [host port]
+(defn make-tcp-socket [^String host ^long port]
   (Socket. host port))


Fix the missing redirect from / to the dashboard

When the /v1 API was introduced, this redirect was accidentally removed,
causing / to not show the dashboard, and rather to error.

--- src/com/puppetlabs/puppetdb/http/server.clj
+++ src/com/puppetlabs/puppetdb/http/server.clj
@@ -30,6 +30,9 @@
     ["experimental" &]
     {:any experimental-app}

+    [""]
+    {:get (constantly (redirect "/dashboard/index.html"))}
+
     ;; Mount the v1 app at / for backward compatibility with unversioned API
     [&]
     {:any backward-compatible-v1-app}))


Use ? shorthand instead of s/nilable

Use ? shorthand instead of s/nilable

--- src/com/wsscode/pathom/connect/planner.cljc
+++ src/com/wsscode/pathom/connect/planner.cljc
@@ -213,7 +213,7 @@
 (>defn same-resolver?
   "Check if node1 and node2 have the same resolver name."
   [node1 node2]
-  [(s/nilable map?) (s/nilable map?) => boolean?]
+  [(? map?) (? map?) => boolean?]
   (boolean
     (and (pc-sym node1)
          (= (pc-sym node1) (pc-sym node2)))))
@@ -862,7 +862,7 @@

        (compute-run-graph (assoc indexes :edn-query-language.ast/node ...))"
   ([graph env]
-   [(s/nilable (s/keys))
+   [(? (s/keys))
     (s/keys
       :req [:edn-query-language.ast/node]
       :opt [::available-data])


testing to fix the bug where the last post of the thread isn't counted

--- src/mafia_votecount/scraper/team_liquid.clj
+++ src/mafia_votecount/scraper/team_liquid.clj
@@ -260,7 +260,7 @@
   (+ cycle-number (if (= cycle-type :day) 0 1)))

 (defn- scan-votes [player-message-maps hosts first-index cycle-number cycle-type]
-  (let [first-page-index (inc (* (quot (dec first-index) POSTS-PER-PAGE) POSTS-PER-PAGE))
+  (let [first-page-index (inc (* (quot first-index POSTS-PER-PAGE) POSTS-PER-PAGE))
         indexed (->> (enumerate player-message-maps first-page-index)
                      (drop-while #(< (first %) first-index))
                      (into (sorted-map)))


fix reflection warnings.

fix reflection warnings.

--- src/metabase/query_processor/parameters.clj
+++ src/metabase/query_processor/parameters.clj
@@ -5,7 +5,7 @@
             [clj-time.format :as tf]
             [medley.core :as m]
             [metabase.driver :as driver])
-  (:import (org.joda.time DateTimeConstants)))
+  (:import (org.joda.time DateTimeConstants DateTime)))

 (def ^:private ^:const relative-dates
@@ -27,22 +27,22 @@
     "Q3" (t/first-day-of-the-month (.withMonthOfYear (t/date-time year) DateTimeConstants/JULY))
     "Q4" (t/first-day-of-the-month (.withMonthOfYear (t/date-time year) DateTimeConstants/OCTOBER))))

-(defn- week-range [dt]
+(defn- week-range [^DateTime dt]
   ;; weeks always start on SUNDAY and end on SATURDAY
   ;; NOTE: in Joda the week starts on Monday and ends on Sunday, so to get the right Sunday we rollback 1 week
   {:end   (.withDayOfWeek dt DateTimeConstants/SATURDAY)
-   :start (.withDayOfWeek (t/minus dt (t/weeks 1)) DateTimeConstants/SUNDAY)})
-
-(defn- month-range [dt]
+   :start (.withDayOfWeek ^DateTime (t/minus dt (t/weeks 1)) DateTimeConstants/SUNDAY)})
+
+(defn- month-range [^DateTime dt]
   {:end   (t/last-day-of-the-month dt)
    :start (t/first-day-of-the-month dt)})

 ;; NOTE: this is perhaps a little hacky, but we are assuming that `dt` will be in the first month of the quarter
-(defn- quarter-range [dt]
+(defn- quarter-range [^DateTime dt]
   {:end   (t/last-day-of-the-month (t/plus dt (t/months 2)))
    :start (t/first-day-of-the-month dt)})

-(defn- year-range [dt]
+(defn- year-range [^DateTime dt]
   {:end   (t/last-day-of-the-month (.withMonthOfYear dt DateTimeConstants/DECEMBER))
    :start (t/first-day-of-the-month (.withMonthOfYear dt DateTimeConstants/JANUARY))})


correct key name

correct key name

--- storm-core/src/clj/backtype/storm/stats.clj
+++ storm-core/src/clj/backtype/storm/stats.clj
@@ -958,7 +958,7 @@
      (into {} (for [[id m] (:spout-id->stats acc-data)
                     :let [acked (:acked m)]]
                     [id (-> m
-                            (assoc :completeLatency
+                            (assoc :complete-latency
                                    (if (and acked (pos? acked))
                                      (div (:completeLatencyTotal m)
                                           (:acked m))


marking fail fast test as redis tests

marking fail fast test as redis tests

--- test/celestial/integration/puny.clj
+++ test/celestial/integration/puny.clj
@@ -69,7 +69,7 @@
         (car-exists? 123) => falsey
         (get-car-index :color "blue") => [])

-  (fact "fail fase actions"
+  (fact "fail fase actions" :integration :redis
         (p/entity planet :id name)
         (defn validate-planet [planet] {})
         (add-planet {:name "lunar"})


New test: get-last-day-of-week-3

New test: get-last-day-of-week-3

--- test/clj_calendar/calendar_test.clj
+++ test/clj_calendar/calendar_test.clj
@@ -565,3 +565,40 @@
             (.set calendar 2000 01 14 00 00 00)
             (is (= "2000-02-19" (get-last-day-of-week-formatted calendar))))))

+(deftest test-get-last-day-of-week-3
+    "Check the function clj-calendar.calendar/get-last-day-of-week"
+    (testing "the function clj-calendar.calendar/get-last-day-of-week"
+        (let [calendar (get-calendar)]
+            (.set calendar 2000 11 1 00 00 00)
+            (is (= "2000-12-02" (get-last-day-of-week-formatted calendar))))
+        (let [calendar (get-calendar)]
+            (.set calendar 2000 11 2 00 00 00)
+            (is (= "2000-12-02" (get-last-day-of-week-formatted calendar))))
+        (let [calendar (get-calendar)]
+            (.set calendar 2000 11 3 00 00 00)
+            (is (= "2000-12-09" (get-last-day-of-week-formatted calendar))))
+        (let [calendar (get-calendar)]
+            (.set calendar 2000 11 4 00 00 00)
+            (is (= "2000-12-09" (get-last-day-of-week-formatted calendar))))
+        (let [calendar (get-calendar)]
+            (.set calendar 2000 11 5 00 00 00)
+            (is (= "2000-12-09" (get-last-day-of-week-formatted calendar))))
+        (let [calendar (get-calendar)]
+            (.set calendar 2000 11 6 00 00 00)
+            (is (= "2000-12-09" (get-last-day-of-week-formatted calendar))))
+        (let [calendar (get-calendar)]
+            (.set calendar 2000 11 7 00 00 00)
+            (is (= "2000-12-09" (get-last-day-of-week-formatted calendar))))
+        (let [calendar (get-calendar)]
+            (.set calendar 2000 11 8 00 00 00)
+            (is (= "2000-12-09" (get-last-day-of-week-formatted calendar))))
+        (let [calendar (get-calendar)]
+            (.set calendar 2000 11 9 00 00 00)
+            (is (= "2000-12-09" (get-last-day-of-week-formatted calendar))))
+        (let [calendar (get-calendar)]
+            (.set calendar 2000 11 10 00 00 00)
+            (is (= "2000-12-16" (get-last-day-of-week-formatted calendar))))
+        (let [calendar (get-calendar)]
+            (.set calendar 2000 11 11 00 00 00)
+            (is (= "2000-12-16" (get-last-day-of-week-formatted calendar))))))
+


Formatting

Formatting

--- test/icecap/handlers/delay_test.clj
+++ test/icecap/handlers/delay_test.clj
@@ -45,9 +45,9 @@
   (testing "allowable delay ranges"
     (let [schema (get-schema :delay)]
       (are [amount] (nil? (s/check schema {:type :delay :amount amount}))
-           1
-           10
-           30))))
+        1
+        10
+        30))))

 (deftest delay-tests
   (testing "delay functions correctly"


We ignore "dates" that aren't useful

We ignore "dates" that aren't useful

--- test/vip/data_processor/s3_test.clj
+++ test/vip/data_processor/s3_test.clj
@@ -12,5 +12,5 @@
            (zip-filename* "52" "2015/03/27"))))

   (testing "poorly formatted dates use a workable filename"
-    (is (= "vipfeed-12345.zip"
+    (is (= "vipfeed-12345-.zip"
            (zip-filename* "12345" nil)))))


Update words.clj

Update words.clj

--- src/iyye/subcon/knowledge/words.clj
+++ src/iyye/subcon/knowledge/words.clj
@@ -22,6 +22,8 @@
     ;[iyye.subcon.knowledge.relation :as relation]
     ))

+(def dbg-IO (ref nil))
+
 (def action-words (ref {}))
 (def noun-words (ref {}))
 ;(def types-words (ref []))
@@ -50,6 +52,35 @@
   (let [type-atom (create-iyye-atom Name builtin)
         type (->Iyye_Type type-atom [])]
     type))
+
+(defn create-iyye-type-from-db [t]
+  "de-serialize t"
+  (let [mykey #(keyword (str %1 %2))
+        create-types #(clojure.string/split (t (mykey "Relation-Types-List" %1)) #"_")
+        create-data #(hash-map (keyword (t (mykey "Relation-Data-List1" %1)))
+                       (t (mykey "Relation-Data-List2" %1)))
+        relations-list
+        (loop [rel-vec []
+               num 0]
+          (if-not (t (mykey "Relation-name" num))
+            rel-vec
+            (let [rel-uname (t (mykey "Relation-uname" num))]
+              (recur (conj rel-vec
+                         (->Iyye_Relation
+                           (->Iyye_Atom (t (mykey "Relation-name" num))
+                                        rel-uname
+                                        false)
+                           (->Iyye_ModalPredicate
+                             (t (mykey "Relation-AccordingTo" num))
+                             (t (mykey "Relation-When" num))
+                             (t (mykey "Relation-Time" num))
+                             (t (mykey "Relation-Prob" num)))
+                           (create-types num)
+                           (:Function (@action-words (t (mykey "Relation-uname" num))))
+                           (:PredicateFunction (@action-words (t (mykey "Relation-uname" num))))
+                           (create-data num)))
+                   (inc num)))))]
+    (->Iyye_Type (->Iyye_Atom (:Name t) (:Uname t) false) relations-list)))

 (defn create-iyye-relation [Name Predicate Types Function PredicateFunction & builtin]
   (let [action-atom (create-iyye-atom Name builtin)
@@ -71,17 +102,50 @@

 (defn load-iyye-atom-from-db [uname])

-(defn load-iyye-atoms-from-db [name & [dbname]])
-
-(defn load-iyye-types-from-db [name]
-  (load-iyye-atoms-from-db name "types"))
+(defn load-iyye-atoms-from-db [name & [dbname]]
+  )
+
+(defn- print-io-str [IO prstr]
+  "helper dbg func"
+  (future (Thread/sleep 1000) (ioframes/process-output IO (pr-str prstr))))

 (defn load-iyye-relations-from-db [name]
   (load-iyye-atoms-from-db name "relations"))

+(defn load-iyye-types-from-db [name]
+  (let [types (persistence/read-knowledge-from-db "types" {})]
+    ))
+
 (defn save-iyye-type-to-db [type]
+  (let [types-list-str (fn [types]
+          (reduce #(str %1 "_" %2) types))
+        rel-key (fn [name ind]
+          (keyword (str name ind)))
+        get-rel
+        (fn [ind rel]
+          {(rel-key "Relation-name" ind) (:Name (:atom rel))
+             (rel-key "Relation-uname" ind) (:Uname (:atom rel))
+            (rel-key "Relation-AccordingTo" ind) (:AccordingTo (:Predicate rel))
+            (rel-key "Relation-When" ind) (:When (:Predicate rel))
+            (rel-key "Relation-Time" ind) (:Time (:Predicate rel))
+             (rel-key "Relation-Prob" ind) (:Prob (:Predicate rel))
+             (rel-key "Relation-Types-List" ind) (types-list-str (:Types rel))
+           (rel-key "Relation-Data-List1" ind) (types-list-str (map name (keys (:Data rel))))
+               (rel-key "Relation-Data-List2" ind) (types-list-str (vals (:Data rel)))
+           })]
+    (let [write-type (reduce conj {:Uname (:Uname (:atom type))
+                                   :Name  (:Name (:atom type))}
+                             (map-indexed get-rel (:Relations type)))
+          ]
+      ; (when @dbg-IO (print-io-str @dbg-IO (pr-str "add list: " type ":::"
+      ;                                          (map-indexed get-rel (:Relations type)))))
+      (persistence/write-knowledge-to-db "types" write-type))))
+
+(defn save-iyye-builtin-type-to-db [type]
+
   )
 ;(persistence/write-noun-to-db (into {} type))
+

 (defn get-iyye-atoms [name builtins]
   "returns a list of found atoms with supplied name"
@@ -100,8 +164,9 @@
         builtin (:Builtin (:atom type))]
       (do
         (dosync (alter noun-words #(assoc % uname type)))
-        (when (not builtin)
-          (save-iyye-type-to-db type)))))
+        (if (not builtin)
+          (save-iyye-type-to-db type)
+          (save-iyye-builtin-type-to-db type)))))

 (defn check-params [action params]
   (let [act-params (:Types action)]
@@ -128,21 +193,23 @@
   (let [actions-list (get-iyye-relations cmd)
         params-list (apply concat (map get-iyye-types params))]
     (case (count actions-list)
-      0 (future (Thread/sleep 1000) (ioframes/process-output IO (str "failed to parse: no matching action to " cmd)))
+      0 (print-io-str IO (str "failed to parse: no matching action to " cmd))
       1 (let [action (first actions-list)
               result (func action params-list)]
           (if result
-            (future (Thread/sleep 1000) (ioframes/process-output IO (pr-str result)))))
+            (print-io-str IO result)))
       (let [matching-actions
             (for [action actions-list :when (check-params action params-list)] action)]
         (if (empty? matching-actions)
-          (future (Thread/sleep 800) (ioframes/process-output IO (pr-str "Cant find " cmd " " params)))
+          (print-io-str IO (pr-str "Cant find " cmd " " params))
           (let [result (func (first matching-actions) params-list)]
             (if result
-              (future (Thread/sleep 1000) (ioframes/process-output IO (pr-str result)))
-              (future (Thread/sleep 1000) (ioframes/process-output IO (str "False"))))))))))
+              (print-io-str IO result)
+              (print-io-str IO "False"))))))))
+

 (defn action [cmd params IO]
+  (when (not @dbg-IO) (dosync (ref-set dbg-IO IO)))
   (if (= \? (last cmd))
     (run-action (subs cmd 0 (dec (count cmd))) params IO apply-query)
     (run-action cmd params IO apply-relation)))


[#73] Introduce tuple to clojure file

[#73] Introduce tuple to clojure file

--- priv/examples/case.clj
+++ priv/examples/case.clj
@@ -7,7 +7,7 @@
                 :c 3)
        z (case* y
                 x 2
-                :default)]
+                #[:default :value])]
   (erlang/display.e x)
   (erlang/display.e y)
   (erlang/display.e z))


(SERVER-391) Improve error message

(SERVER-391) Improve error message

--- src/clj/puppetlabs/services/jruby/jruby_puppet_service.clj
+++ src/clj/puppetlabs/services/jruby/jruby_puppet_service.clj
@@ -76,7 +76,12 @@
   `(loop [pool-instance# (jruby/borrow-instance ~jruby-service)]
      (if (nil? pool-instance#)
        (throw (IllegalStateException.
-                "Error: Attempt to borrow a JRuby instance from the pool timed out")))
+                (str "Attempt to borrow a JRuby instance from the pool "
+                     "timed out; Puppet Server is temporarily overloaded. If "
+                     "you get this error repeatedly, your server might be "
+                     "misconfigured or trying to serve too many agent nodes. "
+                     "Check Puppet Server settings: "
+                     "jruby-puppet.max-active-instances."))))
      (if (jruby-schemas/retry-poison-pill? pool-instance#)
        (do
          (jruby-core/return-to-pool pool-instance#)


fixes bug: allows start date in edit form to be earlier than today

--- src/cljs/early_vote_site/early_vote_site_detail/views.cljs
+++ src/cljs/early_vote_site/early_vote_site_detail/views.cljs
@@ -44,7 +44,7 @@
                 :date-atom (:start-date-atom form)
                 :max-date-atom (:end-date-atom form)
                 :pikaday-attrs
-                {:min-date (js/Date.)
+                {:min-date (if editing? () (js/Date.))
                  :max-date @(:end-date-atom form)}}]]
          [:td [pikaday/date-selector
                {:input-attrs
@@ -105,7 +105,11 @@
 (defn schedule->row
   [editing schedule]
   (if (contains? editing (:id schedule))
-    [schedule-form schedule]
+    (list
+      [schedule-form schedule]
+      [:tr
+       [:td {:colSpan "7" :style {:border "none" :padding-top "0"}}
+        [:div {:class "alert-box" :style {:margin "0"}} "This schedule may be associated with multiple Early Vote Sites. Edits made here will apply across all sites."]]])
     [:tr {:key (str "schedule-" (:id schedule))}
      [:td (utils/format-date-string (:start-date schedule))]
      [:td (utils/format-date-string (:end-date schedule))]


Add create-buffer and create-buffer-source to audio-utils.web-audio

--- src/main/audio_utils/web_audio.cljs
+++ src/main/audio_utils/web_audio.cljs
@@ -3,3 +3,27 @@
 (defn audio-context []
   (or (new js/window.AudioContext)
       (new js/window.webkitAudioContext)))
+
+(defn create-buffer
+  [ctx n-channels size sample-rate]
+  (.createBuffer ctx n-channels size sample-rate))
+
+(defn create-buffer-source
+  ([ctx]
+   (.createBufferSource ctx))
+  ([ctx n-channels sample-rate data]
+   (let [buf (create-buffer ctx n-channels
+                            (count (cond-> data
+                                     (> n-channels 1)
+                                     first))
+                            sample-rate)
+         src (create-buffer-source ctx)]
+     (doseq [channel (range 0 n-channels)
+             :let [channel-data (.getChannelData buf channel)
+                   input-data   (cond-> data
+                                  (> n-channels 1)
+                                  (get channel))]]
+       (doseq [[i x] (map-indexed vector input-data)]
+         (aset channel-data i x)))
+     (set! (.-buffer src) buf)
+     src)))


CMR-350: Removed unused namespace requires

--- src/cmr/search/data/query_to_elastic_converters/equator_crossing_longitude.clj
+++ src/cmr/search/data/query_to_elastic_converters/equator_crossing_longitude.clj
@@ -1,8 +1,6 @@
 (ns cmr.search.data.query-to-elastic-converters.equator-crossing-longitude
   "Defines protocols and functions to map from a query model to elastic search query"
-  (:require [clojurewerkz.elastisch.query :as q]
-            [clojure.string :as s]
-            [cmr.search.data.query-to-elastic :as q2e]
+  (:require [cmr.search.data.query-to-elastic :as q2e]
             [cmr.search.models.query :as qm]
             [cmr.common.services.errors :as errors]
             [cmr.search.data.messages :as m]))
@@ -10,7 +8,8 @@

 (defn- equator-crossing-longitude-condition-both
-  "Creates a grouped condition from an EquatorCrossingLongitudeCondition with both min-value and max.'"
+  "Creates a grouped condition from an EquatorCrossingLongitudeCondition with both min-value and
+  max-value.'"
   [min-value max-value]
   (if (>= max-value min-value)
     (qm/numeric-range :equator-crossing-longitude min-value max-value)


use lexicon supplied by babel.directory's language model for :es

--- src/babel/espanol/writer.clj
+++ src/babel/espanol/writer.clj
@@ -23,8 +23,6 @@
 ;; TODO: using pmap fails: cannot generate sentences; figure out why.
 (def use-map-fn pmap)

-(def lexicon (-> (-> ((-> models :es)) deref) :lexicon))
-
 (defn root-verbs [lexicon]
   (let [lexemes (vals lexicon)]
     (zipmap
@@ -42,12 +40,11 @@

 (defn todos [ & [count lexeme]]
   (let [count (if count (Integer. count) 10)
+        model (-> ((-> models :es)) deref)
+        type-of-model (type model)
+        lexicon (:lexicon model)
         lexemes (if lexeme (list (get lexicon lexeme))
                     (vals lexicon))
-
-        model (-> ((-> models :es)) deref)
-        type-of-model (type model)
-
         root-verbs (root-verbs lexicon)

         root-verb-array
@@ -61,7 +58,6 @@
     (log/info (str "done writing lexicon."))
     (log/info (str "generating examples with this many verbs:"
                    (.size root-verb-array)))
-
     (.size
      (->> root-verb-array
           (use-map-fn


Fix reflection warnings :unamused:

Fix reflection warnings :unamused:

--- src/metabase/driver/generic_sql.clj
+++ src/metabase/driver/generic_sql.clj
@@ -12,7 +12,8 @@
             [metabase.util :as u]
             [metabase.util.korma-extensions :as kx]
             [metabase.driver.sync :as sync])
-  (:import java.util.Map
+  (:import java.sql.DatabaseMetaData
+           java.util.Map
            clojure.lang.Keyword))

 (declare db->korma-db
@@ -210,7 +211,7 @@
    Fetch list of schemas, then for each one not in `excluded-schemas`, fetch its Tables, and combine the results.

    This is as much as 15x faster for Databases with lots of system tables than `post-filtered-active-tables` (4 seconds vs 60)."
-  [driver metadata]
+  [driver, ^DatabaseMetaData metadata]
   (let [all-schemas (set (map :table_schem (jdbc/result-set-seq (.getSchemas metadata))))
         schemas     (set/difference all-schemas (excluded-schemas driver))]
     (set (for [schema     schemas
@@ -221,14 +222,14 @@
 (defn post-filtered-active-tables
   "Alternative implementation of `IDriver/active-tables` best suited for DBs with little or no support for schemas.
    Fetch *all* Tables, then filter out ones whose schema is in `excluded-schemas` Clojure-side."
-  [driver metadata]
+  [driver, ^DatabaseMetaData metadata]
   (set (for [table (filter #(not (contains? (excluded-schemas driver) (:table_schem %)))
                            (jdbc/result-set-seq (.getTables metadata nil nil nil (into-array String ["TABLE", "VIEW"]))))]
          {:name   (:table_name table)
           :schema (:table_schem table)})))

 (defn- describe-table-fields
-  [metadata driver {:keys [schema name]}]
+  [^DatabaseMetaData metadata, driver, {:keys [schema name]}]
   (set (for [{:keys [column_name type_name]} (jdbc/result-set-seq (.getColumns metadata nil schema name nil))
              :let [calculated-special-type (column->special-type driver column_name (keyword type_name))]]
          (merge {:name        column_name
@@ -240,7 +241,7 @@
                   {:special-type calculated-special-type})))))

 (defn- add-table-pks
-  [metadata table]
+  [^DatabaseMetaData metadata, table]
   (let [pks (->> (.getPrimaryKeys metadata nil nil (:name table))
                  jdbc/result-set-seq
                  (mapv :column_name)
@@ -253,7 +254,7 @@
 (defn describe-database
   [driver database]
   (with-metadata [metadata driver database]
-    {:tables (active-tables driver metadata)}))
+    {:tables (active-tables driver, ^DatabaseMetaData metadata)}))

 (defn describe-table
   [driver table]


Increase version

Increase version

--- clj/project.clj
+++ clj/project.clj
@@ -1,4 +1,4 @@
-(defproject quil/lein-template "2.2.6.0"
+(defproject quil/lein-template "2.2.6.1"
   :description "Leiningen template for Quil ClojureScript project."
   :url "https://github.com/quil/quil-templates"
   :license {:name "Eclipse Public License"


Refactor

Refactor

--- src/net/sekao/nightcode/editors.clj
+++ src/net/sekao/nightcode/editors.clj
@@ -24,18 +24,17 @@
     [(.getMessage form)]
     (pr-str form)))

-(defn eval-forms [forms-str]
-  (->> forms-str
-       edn/read-string
-       es/code->results
-       (mapv form->serializable)))
-
 (defn handler [request]
   (case (:uri request)
     "/" (redirect "/paren-soup.html")
     "/eval" {:status 200
              :headers {"Content-Type" "text/plain"}
-             :body (pr-str (eval-forms (body-string request)))}
+             :body (->> request
+                        body-string
+                        edn/read-string
+                        es/code->results
+                        (mapv form->serializable)
+                        pr-str)}
     nil))

 (defn start-web-server! []
@@ -130,17 +129,9 @@

 ; specs

-(fdef eval-form-safely
-  :args (s/cat :form any? :nspace spec/ns?)
-  :ret any?)
-
-(fdef eval-form
-  :args (s/cat :form-str string? :nspace spec/ns?)
-  :ret vector?)
-
-(fdef eval-forms
-  :args (s/cat :forms-str string?)
-  :ret vector?)
+(fdef form->serializable
+  :args (s/cat :form any?)
+  :ret (s/or :error vector? :value string?))

 (fdef handler
   :args (s/cat :request map?)


Add :personal bool key to the board schema to flag if a board is personal.

--- src/oc/storage/resources/common.clj
+++ src/oc/storage/resources/common.clj
@@ -57,7 +57,8 @@
   :author lib-schema/Author
   (schema/optional-key :draft) schema/Bool
   :created-at lib-schema/ISO8601
-  :updated-at lib-schema/ISO8601})
+  :updated-at lib-schema/ISO8601
+  (schema/optional-key :personal) schema/Bool})

 (def ContentVisibility {
   (schema/optional-key :disallow-secure-links) schema/Bool


remove error

remove error


Temporary screenshot fix in example swarm.

--- src/brevis/example/swarm.clj
+++ src/brevis/example/swarm.clj
@@ -41,7 +41,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; ## Globals

-(def num-birds (atom 100))
+(def num-birds (atom 500))

 (def avoidance-distance (atom 10))
 (def boundary 250)


remove expectations

remove expectations

--- ssclj/jar/test/com/sixsq/slipstream/ssclj/middleware/cimi_params_impl_test.clj
+++ ssclj/jar/test/com/sixsq/slipstream/ssclj/middleware/cimi_params_impl_test.clj
@@ -1,186 +1,165 @@
 (ns com.sixsq.slipstream.ssclj.middleware.cimi-params-impl-test
   (:require
+    [clojure.test :refer [deftest is are]]
     [com.sixsq.slipstream.ssclj.filter.parser :as parser]
-    [com.sixsq.slipstream.ssclj.middleware.cimi-params-impl :refer :all]
-    [expectations :refer :all]))
+    [com.sixsq.slipstream.ssclj.middleware.cimi-params-impl :as t]))

 (defn set-and-extract
   "Sets the $key-name value in the parameters and then extracts
    the value of :key-name from :cimi-params in the result."
   [f key-name v]
-  (let [kw    (keyword key-name)
+  (let [kw (keyword key-name)
         pname (str "$" key-name)]
     (->> {:params {pname v}}
          (f)
          (:cimi-params)
          (kw))))

-(expect {:cimi-params {:k "value"}} (add-cimi-param {} :k "value"))
-(expect {:cimi-params {:a 1, :k "value"}} (add-cimi-param {:cimi-params {:a 1}} :k "value"))
+(deftest check-add-cimi-params
+  (are [expect args] (= expect (apply t/add-cimi-param args))
+                     {:cimi-params {:k "value"}} [{} :k "value"]
+                     {:cimi-params {:a 1, :k "value"}} [{:cimi-params {:a 1}} :k "value"]))

-(expect [] (as-vector nil))
-(expect [1] (as-vector 1))
-(expect ["a"] (as-vector "a"))
-(expect [1 2] (as-vector '(1 2)))
-(expect [1 2] (as-vector [1 2]))
-(expect [1 "a"] (as-vector '(1 "a")))
+(deftest check-as-vector
+  (are [expect arg] (= expect (t/as-vector arg))
+                    [] nil
+                    [1] 1
+                    ["a"] "a"
+                    [1 2] '(1 2)
+                    [1 2] [1 2]
+                    [1 "a"] '(1 "a")))

-(expect nil (as-long [1]))
-(expect nil (as-long {:a 1}))
-(expect nil (as-long #{1}))
-(expect 1 (as-long 1))
-(expect -1 (as-long -1))
-(expect nil (as-long 2.5))
-(expect nil (as-long 10/3))
-(expect 1 (as-long "1"))
-(expect -1 (as-long "-1"))
-(expect nil (as-long "2.5"))
-(expect nil (as-long "10/3"))
+(deftest check-as-long
+  (are [expect arg] (= expect (t/as-long arg))
+                    nil [1]
+                    nil {:a 1}
+                    nil #{1}
+                    1 1
+                    -1 -1
+                    nil 2.5
+                    nil 10/3
+                    1 "1"
+                    -1 "-1"
+                    nil "2.5"
+                    nil "10/3"))

-(expect nil (first-valid-long []))
-(expect nil (first-valid-long ["a"]))
-(expect nil (first-valid-long ["a" "b"]))
-(expect 1 (first-valid-long [1]))
-(expect 1 (first-valid-long ["1"]))
-(expect 1 (first-valid-long ["a" 1]))
-(expect 1 (first-valid-long ["a" 1 2]))
-(expect 1 (first-valid-long [1 2]))
-(expect 1 (first-valid-long ["a" 1 "c"]))
-(expect -1 (first-valid-long [-1]))
-(expect -1 (first-valid-long ["a" "-1" "c"]))
-(expect nil (first-valid-long [nil nil]))
-(expect nil (first-valid-long [{:a 1} [2]]))
+(deftest check-first-valid-long
+  (are [expect arg] (= expect (t/first-valid-long arg))
+                    nil []
+                    nil ["a"]
+                    nil ["a" "b"]
+                    1 [1]
+                    1 ["1"]
+                    1 ["a" 1]
+                    1 ["a" 1 2]
+                    1 [1 2]
+                    1 ["a" 1 "c"]
+                    -1 [-1]
+                    -1 ["a" "-1" "c"]
+                    nil [nil nil]
+                    nil [{:a 1} [2]]))

-(expect nil (get-index {"k" nil} "k"))
-(expect nil (get-index {} "k"))
-(expect 1 (get-index {"k" "1"} "k"))
-(expect 1 (get-index {"k" 1} "k"))
-(expect 1 (get-index {"k" ["a" 1]} "k"))
-(expect 1 (get-index {"k" ["1" "2"]} "k"))
+(deftest check-get-index
+  (are [expect arg] (= expect (t/get-index arg "k"))
+                    nil {"k" nil}
+                    nil {}
+                    1 {"k" "1"}
+                    1 {"k" 1}
+                    1 {"k" ["a" 1]}
+                    1 {"k" ["1" "2"]}))

-;; default value used for :last
-(expect {:cimi-params {:first nil :last default-last} :params {}}
-        (process-first-last {:params {}}))
-(expect {:first nil :last default-last}
-        (:cimi-params (process-first-last {:params {}})))
-(expect {:first nil :last default-last}
-        (:cimi-params (process-first-last {:params {"$first" ["a"], "$last" nil}})))
+(deftest check-process-first-last
+  (let [last-other-than-default (* 2 t/default-last)]
+    (are [expect arg] (= expect (:cimi-params (t/process-first-last arg)))
+                      {:first nil :last t/default-last} {:params {}}
+                      {:first nil :last t/default-last} {:params {}}
+                      {:first nil :last t/default-last} {:params {"$first" ["a"], "$last" nil}}
+                      {:first nil :last last-other-than-default} {:params {"$last" last-other-than-default}} ;; something other than default
+                      {:first 2 :last (inc t/default-last)} {:params {"$first" 2}} ;; adjust last value
+                      {:first 1 :last 2} {:params {"$first" 1, "$last" 2}}
+                      {:first 1 :last 2} {:params {"$first" "1", "$last" "2"}}
+                      {:first 1 :last 2} {:params {"$first" ["a" "1"], "$last" ["b" "2"]}})))

-;; given value for :last is kept
-(let [last-other-than-default (* 2 default-last)]
-  (expect {:cimi-params {:first nil :last last-other-than-default} :params {"$last" last-other-than-default}}
-          (process-first-last {:params {"$last" last-other-than-default}})))
+(deftest check-set-and-extract
+  (are [expect arg] (= expect (set-and-extract t/process-format "format" arg))
+                    "application/json" "json"
+                    "application/json" "JSON"
+                    "application/json" " JSON "
+                    "application/xml" "xml"
+                    "application/xml" "XML"
+                    "application/xml" " XML "
+                    "application/edn" "edn"
+                    "application/edn" "EDN"
+                    "application/edn" " EDN "
+                    nil "unknown"
+                    nil nil
+                    "application/json" ["json" "xml"]
+                    "application/json" ["unknown" "json" "xml"]))

-;; :last value is adjusted
-(expect {:cimi-params {:first 2 :last (inc default-last)} :params {"$first" 2}}
-        (process-first-last {:params {"$first" 2}}))
+(deftest check-comma-split
+  (are [expect arg] (= expect (t/comma-split arg))
+                    ["a" "b"] "a,b"
+                    ["a" "b"] " a , b "
+                    ["a" "b"] ", a , b ,"
+                    [] ""
+                    [] ","
+                    [] nil))

-(expect {:first 1 :last 2} (:cimi-params (process-first-last {:params {"$first" 1, "$last" 2}})))
-(expect {:first 1 :last 2} (:cimi-params (process-first-last {:params {"$first" "1", "$last" "2"}})))
-(expect {:first 1 :last 2} (:cimi-params (process-first-last {:params {"$first" ["a" "1"], "$last" ["b" "2"]}})))
+(deftest check-reduce-select-set
+  (are [expect arg] (= expect (t/reduce-select-set arg))
+                    #{"a" "b"} (set ["a" "b" "a" "b"])
+                    nil (set ["a" "b" "*"])
+                    nil nil))

-(expect "application/json" (set-and-extract process-format "format" "json"))
-(expect "application/json" (set-and-extract process-format "format" "JSON"))
-(expect "application/json" (set-and-extract process-format "format" " JSON "))
-(expect "application/xml" (set-and-extract process-format "format" "xml"))
-(expect "application/xml" (set-and-extract process-format "format" "XML"))
-(expect "application/xml" (set-and-extract process-format "format" " XML "))
-(expect "application/edn" (set-and-extract process-format "format" "edn"))
-(expect "application/edn" (set-and-extract process-format "format" "EDN"))
-(expect "application/edn" (set-and-extract process-format "format" " EDN "))
+(deftest check-select-param
+  (are [expect arg] (= expect (set-and-extract t/process-select "select" arg))
+                    nil nil
+                    nil "*"
+                    #{"a" "resourceURI"} "a"
+                    #{"a" "resourceURI"} " a "
+                    #{"a" "resourceURI"} "a,a"
+                    #{"a" "resourceURI"} [" a,a" "a" "a"]
+                    #{"a" "a2" "resourceURI"} " a, a2 "))

-(expect nil (set-and-extract process-format "format" "unknown"))
-(expect nil (set-and-extract process-format "format" nil))
+(deftest check-reduce-expand-set
+  (are [expect arg] (= expect (t/reduce-expand-set arg))
+                    :all #{"*"}
+                    :none #{}
+                    :none nil
+                    #{"a" "b"} #{"a" "b"}))

-(expect "application/json" (set-and-extract process-format "format" ["json" "xml"]))
-(expect "application/json" (set-and-extract process-format "format" ["unknown" "json" "xml"]))
+(deftest check-reduce-param
+  (are [expect arg] (= expect (set-and-extract t/process-expand "expand" arg))
+                    :none nil
+                    :all "*"
+                    #{"a"} "a"
+                    #{"a" "b"} "a,b"
+                    #{"a" "b"} " a , b "
+                    #{"a" "b"} ["a" "b"]))

-(expect ["a" "b"] (comma-split "a,b"))
-(expect ["a" "b"] (comma-split " a , b "))
-(expect ["a" "b"] (comma-split ", a , b ,"))
-(expect [] (comma-split ""))
-(expect [] (comma-split ","))
-(expect [] (comma-split nil))
+(deftest check-orderby-clause
+  (are [expect arg] (= expect (t/orderby-clause arg))
+                    nil ":"
+                    nil ":a:desc"
+                    ["a" :asc] "a"
+                    ["a" :asc] "a:"
+                    ["a" :desc] "a:desc"
+                    ["a" :asc] "a:dummy"))

-(expect #{"a" "b"} (reduce-select-set (set ["a" "b" "a" "b"])))
-(expect nil (reduce-select-set (set ["a" "b" "*"])))
-(expect nil (reduce-select-set nil))
+(deftest check-orderby-param
+  (are [expect arg] (= expect (set-and-extract t/process-orderby "orderby" arg))
+                    [] nil
+                    [["a" :asc]] "a:asc"
+                    [["a" :desc]] "a:desc"
+                    [["a" :desc] ["b" :asc]] "a:desc,b"
+                    [["a" :desc] ["b" :desc]] ["a:desc" "b:desc"]
+                    [["a" :desc]] ["a:desc" ":b"]
+                    [["a" :desc] ["b" :desc]] [" a : desc " "b : desc"]))

-(expect nil (set-and-extract process-select "select" nil))
-(expect nil (set-and-extract process-select "select" "*"))
-(expect #{"a" "resourceURI"} (set-and-extract process-select "select" "a"))
-(expect #{"a" "resourceURI"} (set-and-extract process-select "select" " a "))
-(expect #{"a" "resourceURI"} (set-and-extract process-select "select" "a,a"))
-(expect #{"a" "resourceURI"} (set-and-extract process-select "select" [" a,a" "a" "a"]))
-(expect #{"a" "a2" "resourceURI"} (set-and-extract process-select "select" " a, a2 "))
-
-(expect :all (reduce-expand-set #{"*"}))
-(expect :none (reduce-expand-set #{}))
-(expect :none (reduce-expand-set nil))
-(expect #{"a" "b"} (reduce-expand-set #{"a" "b"}))
-
-(expect :none (set-and-extract process-expand "expand" nil))
-(expect :all (set-and-extract process-expand "expand" "*"))
-(expect #{"a"} (set-and-extract process-expand "expand" "a"))
-(expect #{"a" "b"} (set-and-extract process-expand "expand" "a,b"))
-(expect #{"a" "b"} (set-and-extract process-expand "expand" " a , b "))
-(expect #{"a" "b"} (set-and-extract process-expand "expand" ["a" "b"]))
-
-(expect nil (orderby-clause ":"))
-(expect nil (orderby-clause ":a:desc"))
-(expect ["a" :asc] (orderby-clause "a"))
-(expect ["a" :asc] (orderby-clause "a:"))
-(expect ["a" :desc] (orderby-clause "a:desc"))
-(expect ["a" :asc] (orderby-clause "a:dummy"))
-
-(expect [] (set-and-extract process-orderby "orderby" nil))
-(expect [["a" :asc]] (set-and-extract process-orderby "orderby" "a:asc"))
-(expect [["a" :desc]] (set-and-extract process-orderby "orderby" "a:desc"))
-(expect [["a" :desc] ["b" :asc]] (set-and-extract process-orderby "orderby" "a:desc,b"))
-(expect [["a" :desc] ["b" :desc]] (set-and-extract process-orderby "orderby" ["a:desc" "b:desc"]))
-(expect [["a" :desc]] (set-and-extract process-orderby "orderby" ["a:desc" ":b"]))
-(expect [["a" :desc] ["b" :desc]] (set-and-extract process-orderby "orderby" [" a : desc " "b : desc"]))
-
-(expect [:Filter
-         [:AndExpr
-          [:Comp
-           [:Filter
-            [:AndExpr
-             [:Comp [:Attribute "a"] [:Op "="] [:IntValue "1"]]]]]]]
-        (set-and-extract process-filter "filter" "a=1"))
-
-(expect [:Filter
-         [:AndExpr
-          [:Comp
-           [:Filter
-            [:AndExpr
-             [:Comp [:Attribute "a"] [:Op "="] [:IntValue "1"]]]]]]]
-        (set-and-extract process-filter "filter" ["a=1"]))
-
-(expect [:Filter
-         [:AndExpr
-          [:Comp
-           [:Filter
-            [:AndExpr
-             [:Comp [:Attribute "a"] [:Op "="] [:IntValue "1"]]]]]
-          [:AndExpr
-           [:Comp
-            [:Filter
-             [:AndExpr
-              [:Comp [:Attribute "b"] [:Op "="] [:IntValue "2"]]]]]]]]
-        (set-and-extract process-filter "filter" ["a=1" "b=2"]))
-
-(expect (set-and-extract process-filter "filter" "a=1")
-        (set-and-extract process-filter "filter" ["a=1"]))
-
-(expect (parser/parse-cimi-filter "(a=1) and (b=2)")
-        (set-and-extract process-filter "filter" ["a=1" "b=2"]))
-
-(expect (parser/parse-cimi-filter "(a=1) and (b=2) and (c=3)")
-        (set-and-extract process-filter "filter" ["a=1" "b=2" "c=3"]))
-
-(expect (parser/parse-cimi-filter "(a=1 or c=3) and (b=2)")
-        (set-and-extract process-filter "filter" ["a=1 or c=3" "b=2"]))
-
-
-(run-all-tests)
+(deftest check-filter
+  (are [arg1 arg2] (= (parser/parse-cimi-filter arg1) (set-and-extract t/process-filter "filter" arg2))
+                   "(a=1)" "a=1"
+                   "(a=1)" ["a=1"]
+                   "(a=1) and (b=2)" ["a=1" "b=2"]
+                   "(a=1) and (b=2) and (c=3)" ["a=1" "b=2" "c=3"]
+                   "(a=1 or c=3) and (b=2)" ["a=1 or c=3" "b=2"]))


Remove debug msg

Remove debug msg

--- src/clj_crud/system/ring.clj
+++ src/clj_crud/system/ring.clj
@@ -99,7 +99,6 @@
                     ((fn [handler]
                        (fn wrap-cache-control [req]
                          (let [res (handler req)]
-                           (info "File res: " res)
                            (if (and (= :get (:request-method req))
                                     ;; InputStream when running from
                                     ;; heroku


coerce Date instances into LocalDate

coerce Date instances into LocalDate

--- src/clj_money/validation.clj
+++ src/clj_money/validation.clj
@@ -6,12 +6,14 @@
             [schema.coerce :as coerce]
             [schema.utils :as schema-utils]
             [clj-time.core :as t]
+            [clj-time.coerce :as tc]
             [clj-money.util :refer [parse-date]]
             [clj-money.inflection :refer [singular
                                           humanize
                                           ordinal]]
             [clj-money.schema :refer [friendly-message]])
-  (:import org.joda.time.LocalDate))
+  (:import org.joda.time.LocalDate
+           java.util.Date))

 (defn- apply-rule
   "Applies the rule to the context, returning an
@@ -78,9 +80,9 @@
   (when (= LocalDate schema)
     (coerce/safe
       (fn [value]
-        (if (string? value)
-          (parse-date value)
-          value)))))
+        (cond
+          (string? value) (parse-date value)
+          :else (tc/to-local-date value))))))

 (defn- full-humanized-message
   "Accepts a tuple containg an attribute key and a schema


Set locale to US

Set locale to US

--- src/clj_simple_chart/jfx.clj
+++ src/clj_simple_chart/jfx.clj
@@ -14,7 +14,10 @@
            (javafx.concurrent Worker$State)
            (javafx.event EventHandler)
            (javafx.scene.input KeyCode)
-           (javafx.beans.value ChangeListener)))
+           (javafx.beans.value ChangeListener)
+           (java.util Locale)))
+
+(defonce _init-locale (Locale/setDefault Locale/US))

 (defonce latch (CountDownLatch. 1))
 (defonce zoom (atom 1.0))


collision is a check

collision is a check

--- src/cljs/mpd/collisions.cljs
+++ src/cljs/mpd/collisions.cljs
@@ -1,5 +1,9 @@
 (ns mpd.collisions
   (:require [mpd.shared :refer [log]]))
+
+(defn distance [a b]
+  (Math/sqrt (+ (Math.pow (- (:x a) (:x b)) 2)
+                (Math.pow (- (:y a) (:y b)) 2))))

 (defn setup []
   (log "  collisions")
@@ -7,14 +11,18 @@
     ; for each player
     ;   for each bullet
     ;     check distance p <-> b
-    ;(doseq [player (conj (:enemies @state) (:player state))
-    ;        bullet (:bullets @state)]
-    ;  (when (< (distance player bullet) 50)
-    ;    (if (= player (:player state))
-    ;      (swap! state assoc-in [:player :hp]
-    ;             (- (:hp (:player @state)) (:damage bullet)))
-    ;      (swap! state assoc-in [:enemies (:id player)]
-    ;             (- (:hp (get (:enemies @state) (:id player))) (:damage bullet))))
-    ;    (swap! state assoc :bullets
-    ;           (remove #(= % bullet) (:bullets @state)))))
+    (doseq [player (conj (vals (:enemies @state)) (:player @state))
+            bullet (:bullets @state)]
+      (when (< (distance player bullet) 40)
+        (if (= player (:player @state))
+          ; if it's me
+          (swap! state assoc-in [:player :hp]
+                 (- (:hp (:player @state))
+                    (:damage bullet)))
+          ; if it's enemy
+          (swap! state assoc-in [:enemies (:id player) :hp]
+                 (- (:hp (get (:enemies @state) (:id player)))
+                    (:damage bullet))))
+        (swap! state assoc :bullets
+               (remove #(= % bullet) (:bullets @state)))))
     state))


Remove an unneeded function

Remove an unneeded function

--- src/clojure/picard/utils.clj
+++ src/clojure/picard/utils.clj
@@ -59,11 +59,9 @@
      (~then-fn res#)
      res#))

-;; TODO: Rename this o_O
-(defn hard-set!
-  "Hard because set! is already in use"
-  [atom val]
-  (swap! atom (constantly val)))
+(defmacro blank?
+  [str]
+  `(or (nil? ~str) (= "" ~str)))

 (defn string->byte-buffer
   ([s] (string->byte-buffer s "UTF-8"))


closer to loading level from db

closer to loading level from db

--- clojure/src/dnd/db.cljs
+++ clojure/src/dnd/db.cljs
@@ -30,7 +30,11 @@

 (defn load []
   (async
-    (->
-      (await (levels))
-      (.findOne #js {}))))
+    (-> (await (levels))
+      (.findOne #js {})
+      await
+      (js->clj :keywordize-keys true)
+      :blocks
+      )))

+


Add missing try-catch clauses to handle exceptions inside threads

--- src/cyanite_remover/core.clj
+++ src/cyanite_remover/core.clj
@@ -645,8 +645,9 @@
                   (dorun (map walk (t-get tree-impl path))))
                 (when (seq path)
                   (tp-process-path processor path))
-                (clog/error (str "Error in tree walker: " e ", "
-                                 "path: " path) e)))]
+                (catch Exception e
+                  (clog/error (str "Error in tree walker: " e ", "
+                                   "path: " path) e))))]
       (try
         (prog/set-progress-bar!
          "[:bar] :percent :done/:total Elapsed :elapseds ETA :etas")


Add an orbit granule to search response tests

--- test/cmr/system_int_test/search/granule_search_format_test.clj
+++ test/cmr/system_int_test/search/granule_search_format_test.clj
@@ -213,6 +213,13 @@
                                                 :spatial-coverage (dc/spatial {:gsr :geodetic})}))
         coll2 (d/ingest "PROV1" (dc/collection {:entry-title "Dataset2"
                                                 :related-urls [ru4 ru5]}))
+        coll3 (d/ingest "PROV1" (dc/collection {:entry-title "OrbitDataset"
+                                                :spatial-coverage (dc/spatial {:gsr :orbit
+                                                                               :orbit {:inclination-angle 98.0
+                                                                                :period 97.87
+                                                                                :swath-width 390.0
+                                                                                :start-circular-latitude -90.0
+                                                                                :number-of-orbits 1.0}})}))

         make-gran (fn [coll attribs]
                     (d/ingest "PROV1" (dg/granule coll attribs)))
@@ -237,6 +244,11 @@
                                                                     :equator-crossing-longitude -45.0
                                                                     :equator-crossing-date-time "2011-01-01T12:00:00.000Z"}]
                                 :related-urls [ru1 ru2]
+                                :orbit-parameters {:inclination-angle 98.0
+                                                   :period 97.87
+                                                   :swath-width 390.0
+                                                   :start-circular-latitude -90.0
+                                                   :number-of-orbits 1.0}
                                 :spatial-coverage (dg/spatial
                                                     (poly/polygon [(umm-s/ords->ring -70 20, 70 20, 70 30, -70 30, -70 20)])
                                                     polygon-with-holes
@@ -257,7 +269,24 @@
                                 ;; FIXME - Commented this out because it seems wrong (dc not dg)
                                 ;; and is incompatible with spatial-coverage with orbit
                                 ; :spatial-coverage (dc/spatial nil :geodetic)
-                                })]
+                                })
+        gran3 (make-gran coll3 {:granule-ur "OrbitGranule"
+                                :beginning-date-time "2011-01-01T12:00:00Z"
+                                :ending-date-time "2011-01-11T12:00:00Z"
+                                :producer-gran-id "OrbitGranuleId"
+                                :day-night "NIGHT"
+                                :size 80.0
+                                :cloud-cover 30.0
+                                :related-urls [ru3]
+                                :spatial-coverage (dg/spatial (dg/orbit 120.0 50.0 "A" 50.0 "A"))
+                                :orbit-calculated-spatial-domains [{:orbital-model-name "MODEL NAME"
+                                                                    :orbit-number 2
+                                                                    :start-orbit-number 3.0
+                                                                    :stop-orbit-number 4.0
+                                                                    :equator-crossing-longitude -45.0
+                                                                    :equator-crossing-date-time "2011-01-01T12:00:00.000Z"}]
+                                })
+        ]

     (index/refresh-elastic-index)

@@ -268,7 +297,7 @@
         (is (= gran-atom
                (:results response))))

-      (let [gran-atom (da/granules->expected-atom [gran1 gran2] [coll1 coll2] "granules.atom")
+      (let [gran-atom (da/granules->expected-atom [gran1 gran2 gran3] [coll1 coll2 coll3] "granules.atom")
             response (search/find-concepts-atom :granule {})]
         (is (= 200 (:status response)))
         (is (= gran-atom
@@ -298,7 +327,7 @@
         (is (= gran-json
                (:results response))))

-      (let [gran-json (dj/granules->expected-json [gran1 gran2] [coll1 coll2] "granules.json")
+      (let [gran-json (dj/granules->expected-json [gran1 gran2 gran3] [coll1 coll2 coll3] "granules.json")
             response (search/find-concepts-json :granule {})]
         (is (= 200 (:status response)))
         (is (= gran-json


added report error for bolt executor

added report error for bolt executor

--- storm-multicore/src/clj/backtype/storm/daemon/executor.clj
+++ storm-multicore/src/clj/backtype/storm/daemon/executor.clj
@@ -431,10 +431,7 @@
 (defmethod mk-threads :bolt [executor-data task-datas]
   (let [execute-sampler (mk-stats-sampler (:storm-conf executor-data))
         executor-stats (:stats executor-data)
-;        {:keys [storm-conf component-id worker-context transfer-fn report-error sampler
-;                open-or-prepare-was-called?]} executor-data
-
-        {:keys [storm-conf component-id worker-context transfer-fn open-or-prepare-was-called?]} executor-data
+        {:keys [storm-conf component-id worker-context transfer-fn report-error open-or-prepare-was-called?]} executor-data
         rand (Random. (Utils/secureRandomLong))
         tuple-action-fn (fn [task-id ^TupleImpl tuple]
                           ;; synchronization needs to be done with a key provided by this bolt, otherwise:
@@ -573,8 +570,7 @@
 ;                                                       (.getSourceStreamId tuple)
 ;                                                       delta))))
                        (reportError [this error]
-                         )
-;                         (report-error error)
+                         (report-error error))
                          ))))
         (reset! open-or-prepare-was-called? true)
         (log-message "Prepared bolt " component-id ":" (keys task-datas))
@@ -617,7 +613,7 @@
      :type executor-type
      ;; TODO: should refactor this to be part of the executor specific map (spout or bolt with :common field)
      :stats (mk-executor-stats <> (sampling-rate storm-conf))
-;     :interval->task->metric-registry (HashMap.)
+     :interval->task->metric-registry (HashMap.)
      :task->component (:task->component worker)
      :stream->component->grouper (outbound-components worker-context component-id)
      :report-error (throttled-report-error-fn <>)


layout tweeks on report match-page (row-fluid)

--- src/foosball/views/match.clj
+++ src/foosball/views/match.clj
@@ -26,7 +26,7 @@
         idp2    (str prefix "player" 2)
         idscore (str prefix "score")
         error-class {:class "control-group error"}]
-    [:div.span4.well
+    [:div.span6.well
      [:h2 (str "Team " team-num ":")]

      [:div.control-group
@@ -58,20 +58,20 @@
       "A match winner is the first team to reach ten goals while atleast two goals ahead of the opposing team." [:br]
       "In case of tie-break, report 11-9 or 9-11."]
      [:form.form-horizontal {:action "/report/match" :method "POST"}
-      [:div.row
+      [:div.row-fluid
        (team-controls :team1 1 team1 active-players validation-errors)
        (team-controls :team2 2 team2 active-players validation-errors)]

-      [:div.row
-       [:div.span4.well
+      [:div.row-fluid
+       [:div.offset2.span8.well
         [:h2 "Match:"]
         [:div.control-group
          [:label.control-label {:for "matchdate"} "Date played"]
-         [:div.controls [:input.span2 {:id "matchdate" :name "matchdate"
+         [:div.controls [:input.input-medium {:id "matchdate" :name "matchdate"
                                        :type "date" :value (format-datetime matchdate)}]]]]]
-      [:div.row
-       [:div.control-group.span4
-        [:button.btn.btn-primary.btn-large.btn-block.span4
+      [:div.row-fluid
+       [:div.control-group
+        [:button.btn.btn-primary.btn-large.btn-block.span8.offset2
          {:type "submit" :value "Report"} "Report Match Result " [:i.icon-ok.icon-white]]]]])))

 (defn- render-match [{:keys [matchdate team1 team2 id]} players & {:keys [admin] :or {admin false}}]


Column header changed from "Count" to "Times Solved"

--- src/foreclojure/problems.clj
+++ src/foreclojure/problems.clj
@@ -108,7 +108,7 @@
     [:tr
      [:th "Title"]
      [:th "Tags"]
-     [:th "Count"]
+     [:th "Times Solved"]
      [:th "Solved?"]]]
    (let [solved (get-solved (session/session-get :user))
          problems (get-problem-list)]


Don't overwrite times-solved when editing problems

--- src/foreclojure/problems.clj
+++ src/foreclojure/problems.clj
@@ -468,9 +468,10 @@
                           {:$inc {:seq 1}})))
             edit-url (str "https://4clojure.com/problem/"
                           id)
-            approved (true? (:approved (fetch-one :problems
-                                                  :where {:_id id}
-                                                  :only [:approved])))]
+            existing-problem (fetch-one :problems
+                                        :where {:_id id}
+                                        :only [:approved :times-solved])
+            approved (true? (:approved existing-problem))]

         (when (empty? author)           ; newly submitted, not a moderator tweak
           (try
@@ -490,7 +491,7 @@
                  {:_id id
                   :title title
                   :difficulty difficulty
-                  :times-solved 0
+                  :times-solved (or (:times-solved existing-problem) 0)
                   :description description
                   :tags (re-seq #"\S+" tags)
                   :restricted (re-seq #"\S+" restricted)


added drop-index and drop-index-named

added drop-index and drop-index-named

--- src/karras.clj
+++ src/karras.clj
@@ -142,6 +142,12 @@
 (defn ensure-index
   [#^DBCollection collection fields & options]
   (let [o? #(has-option? options %)]
-    (prn (o? :unique))
     (.ensureIndex collection (db-object fields)
-                  (o? :force) (o? :unique))))+                  (o? :force) (o? :unique))))
+
+(defn drop-index [#^DBCollection collection o]
+  (.dropIndex collection #^DBObject (db-object o)))
+
+(defn drop-index-named [#^DBCollection collection #^String s]
+  (.dropIndex collection s))
+


Add ability to unwrap a Both

Add ability to unwrap a Both

--- src/io/aviso/rook/schema.clj
+++ src/io/aviso/rook/schema.clj
@@ -3,7 +3,7 @@
   {:added "0.1.27"}
   (:require [schema.core :as s]
             [schema.macros :as macros])
-  (:import [schema.core Maybe EnumSchema]))
+  (:import [schema.core Maybe EnumSchema Both]))

 (defmacro schema
   "Creates a named schema, which includes metadata as per [[defschema]]. This is useful for one-off
@@ -58,7 +58,11 @@

   EnumSchema
   (unwrap-schema [this]
-    (.vs this)))
+    (.vs this))
+
+  Both
+  (unwrap-schema [this]
+    (.schemas this)))

 (defn with-description
   "Adds a :description key to the metadata of the schema.


added macros

added macros

--- src/macros.clj
+++ src/macros.clj
@@ -1,4 +1,16 @@
 (ns macros)
+
+(defmacro delay
+  [& body]
+  (list 'new 'clojure.lang.Delay (list* `^{:once true} fn* [] body)))
+
+(def tomorrow
+  (delay (prn "Exec Tomorrow") (+ 1 2)))
+
+(def fu
+  (future (prn "hi") (+ 1 2)))
+
+(dotimes [i 6] (future (prn i)))

 ;; FIXME
 (defmacro ignore [body & handler]
@@ -28,18 +40,3 @@

 (let [ex '(+ 1 2 3)]
   (cons '* (rest ex)))
-
-(read-string "#(+ 1 2)")
-
-(eval (read-string "'(1 2 3)"))
-
-(eval #(+ 1 2))
-
-(eval #(+ 1 2))
-
-(read-string "(if true 1 2)")
-
-(defn ignore-last [fn-call]
-  (butlast fn-call))
-
-#_(ignore-last (+ 1 2 3))


Change tone duration to 16 bars

Change tone duration to 16 bars

--- src/overtone_workspace/grunbles.clj
+++ src/overtone_workspace/grunbles.clj
@@ -8,7 +8,7 @@
                           (max 0 (+ (lf-noise1:kr speed)
                                     (env-gen (perc attack release) :action FREE))))
                       [1 (/ 2 3) (/ 3 2) 2]))]
-    (pan2 snd (sin-osc:kr 0.125))))
+    (pan2 snd (sin-osc:kr 1))))

 ;;(stop)
 ;; (grumble)
@@ -29,12 +29,12 @@
                 rates)
         dur (/ 60.0 (metro :bpm))
         attack (* dur 4) ; 1bar
-        rel (* dur (* 4 7))]  ; 7bars
+        rel (* dur (* 4 15))]  ; 15bars
     (at (metro beat)
         (do
           (if (zero? (mod beat 8)) (grumble :freq-mul 0.5 :attack attack :release rel))
-          (if (zero? (mod beat 8)) (grumble :freq-mul 1 :attack attack :release rel))
-          (if (zero? (mod beat 16)) (grumble :freq-mul (choose rates) :attack attack :release rel))
+          (if (zero? (mod beat 16)) (grumble :freq-mul 1 :attack attack :release rel))
+          (if (zero? (mod beat 32)) (grumble :freq-mul (choose rates) :attack attack :release rel))
           ))
     (apply-by (metro (inc beat)) #'player (inc beat) rates [])
     ))


(PDB-4655) command: track and wait on shovel thread when stopping

--- src/puppetlabs/puppetdb/command.clj
+++ src/puppetlabs/puppetdb/command.clj
@@ -851,20 +851,25 @@
                         (catch ExceptionInfo ex
                           (when-not (= :puppetlabs.puppetdb.threadpool/rejected
                                        (:kind (ex-data ex)))
-                            (throw ex)))))]
-        (doto (Thread. shovel)
-          (.setDaemon false)
-          (.start)))
-      (assoc context
-             :command-chan command-chan
-             :consumer-threadpool command-pool
-             :broadcast-threadpool broadcast-pool))))
+                            (throw ex)))
+                        (catch InterruptedException ex
+                          nil)))
+            shovel-thread (doto (Thread. shovel)
+                            (.setName "PuppetDB command shovel")
+                            (.setDaemon false)
+                            (.start))]
+        (assoc context
+               :command-shovel shovel-thread
+               :command-chan command-chan
+               :consumer-threadpool command-pool
+               :broadcast-threadpool broadcast-pool)))))

 (defn stop-command-service
   [{:keys [stop-status consumer-threadpool broadcast-threadpool command-chan
-           delay-pool]
+           delay-pool command-shovel]
     :as context}]
   (some-> command-chan async/close!)
+  (when command-shovel (.interrupt command-shovel))
   ;; FIXME: (PDB-4742) exception suppression?
   (some-> consumer-threadpool pool/shutdown-gated)
   (some-> broadcast-threadpool pool/shutdown-unbounded)
@@ -877,6 +882,13 @@
                              false)
     (log/info (trs "Halted delayed command processsing"))
     (log/info (trs "Forcibly terminating delayed command processing")))
+  (when command-shovel
+    ;; Pools are shut down, shovel has been interrupted, etc.  It
+    ;; should be finished by now.
+    (.join command-shovel 1)
+    (when (.isAlive command-shovel)
+      (log/info
+       (trs "Command processing transfer thread did not stop when expected"))))
   (async/unsub-all (:response-pub context))
   (async/untap-all (:response-mult context))
   (async/close! (:response-chan-for-pub context))


Fix some messed up paths.

Fix some messed up paths.

--- src/leiningen/protobuf.clj
+++ src/leiningen/protobuf.clj
@@ -130,9 +130,9 @@
            (extract-dependencies (io/file "proto" proto) target)
            (sh "protoc"
                proto
-               (str "--java_out=../" dest-path)
+               (str "--java_out=" dest-path)
                "-I."
-               (str "-I../" target "/proto")
+               (str "-I" target "/proto")
                :dir "proto"))
          (javac (assoc project :java-source-path dest-path))))))


Ensure ring/ring-servlet is in deps when compiling (fixes #24)

--- src/leiningen/ring/war.clj
+++ src/leiningen/ring/war.clj
@@ -149,7 +149,9 @@
 (defn compile-servlet [project]
   (let [handler-sym (get-in project [:ring :handler])
         handler-ns  (symbol (namespace handler-sym))
-        servlet-ns  (symbol (servlet-ns project))]
+        servlet-ns  (symbol (servlet-ns project))
+        project     (update-in project [:dependencies]
+                               conj ['ring/ring-servlet "1.0.2"])]
     (compile-form project servlet-ns
       `(do (ns ~servlet-ns
              (:require ring.util.servlet ~handler-ns)


Fixed spelling: lochrian -> locrian.

Fixed spelling: lochrian -> locrian.

--- src/overtone/music/pitch.clj
+++ src/overtone/music/pitch.clj
@@ -243,7 +243,7 @@
    :mixolydian        (rotate-ionian 4)
    :aeolian           (rotate-ionian 5)
    :minor             (rotate-ionian 5)
-   :lochrian          (rotate-ionian 6)
+   :locrian          (rotate-ionian 6)
    :pentatonic        [2 3 2 2 3]
    :major-pentatonic  [2 2 3 2 3]
    :minor-pentatonic  [3 2 2 3 2]


Send secret to server when submitting lunch time.

--- src/lunch_time/events.cljs
+++ src/lunch_time/events.cljs
@@ -67,7 +67,8 @@
    (if-let [backend (:backend db)]
      {:http-xhrio {:method :post
                    :params {:start (to-long (:start-time db))
-                            :end   (to-long (:end-time db))}
+                            :end   (to-long (:end-time db))
+                            :request-secret (:secret db)}
                    :uri backend
                    :format (ajax/transit-request-format)
                    :response-format (ajax/transit-response-format)


Cleaned up simulation code - removed cruft

--- src/polismath/simulation.clj
+++ src/polismath/simulation.clj
@@ -110,29 +110,13 @@

 ;(defn basic-test []
-(conv-update {:rating-mat (named-matrix)} (random-votes 600 10))
 (defn -main [& args]
-  (profile :info :clusters
-  (let [
-        ;a (time2 "conv-update  a  1000" (conv-update {:rating-mat (named-matrix)} (random-votes 600 10)))
-        b (time2 "conv-update  b  5000" (conv-update {:rating-mat (named-matrix)} (random-votes 1000 10)))
-        b2 (time2 "conv-update b2 5000*10+100*1" (conv-update b (random-votes 5000 12)))
-        ;b3 (time2 "conv-update b3 5000*10+5000*10" (conv-update b2 (random-votes 5000 10)))]
-        ]
-  (println (keys b)))))
+  (let [big-ptpts    10000
+        big-comments 10
+        a  (conv-update {:rating-mat (named-matrix)} (random-votes 100 10))
+        b  (time2 "CONVUP med" (conv-update a (random-votes 500 10)))
+        b2 (time2 "CONVUP big" (conv-update b (random-votes big-ptpts big-comments)))]
+    (profile :info :clusters
+      (time2 "CONVUP big-part" (conv-update b2 (random-votes big-ptpts big-comments :n-votes 100))))))

-;(defnp some-fun [x y]
-  ;(let [z (p :zlet (* x y))]
-    ;(loop [a (+ z 2)]
-      ;(p :in-loop1 (+ a 2))
-      ;(if (> a 0)
-        ;(recur (p :in-loop2 (- a 4)))
-        ;(* a 5)))))

-;(defn -main [& args]
-  ;(profile :info :test-prof (some-fun 7 8)))
-
-;  (pprint (sorted-map-by #(< (:id %1) (:id %2)) (:base-clusters b)))
-;  (pprint (group-by :id (:base-clusters b)))
-;  (pprint (map :members (sort-by :id (:base-clusters b))))
-


fix #184

fix #184

Former-commit-id: 70632378318dab89cdffcf60dd272ffa1957609b

--- src/status_im/components/react.cljs
+++ src/status_im/components/react.cljs
@@ -67,11 +67,13 @@
      :or   {font :default}} t]
    (r/as-element
      [text-class
-      (if (and platform-specific font)
+      (cond
+        (and platform-specific font)
         (-> opts
             (dissoc :platform-specific :font)
             (assoc :style (st/with-font style platform-specific font)))
-        opts)
+        style opts
+        :else {:style opts})
       t])))

 (defn text-input [props text]


added missing require

added missing require

Former-commit-id: 78cd61041b9333645bf76d2c2a77955894a73e9a

--- src/syng_im/handlers/discovery.cljs
+++ src/syng_im/handlers/discovery.cljs
@@ -1,5 +1,6 @@
 (ns syng-im.handlers.discovery
-  (:require [syng-im.models.discoveries :refer [save-discoveries
+  (:require [re-frame.core :refer [register-handler after dispatch]]
+            [syng-im.models.discoveries :refer [save-discoveries
                                                 discovery-list
                                                 signal-discovery-updated
                                                 discovery-updated?]]))


(TK-95) Ensure default timeout is 60 seconds

Fix issue wherein the default shutdown timeout was 30 seconds
rather than 60 seconds.

--- src/puppetlabs/trapperkeeper/services/webserver/jetty9_core.clj
+++ src/puppetlabs/trapperkeeper/services/webserver/jetty9_core.clj
@@ -484,8 +484,7 @@
                                  (.setHandler maybe-logged))
                                maybe-logged)]
       (.setHandler s statistics-handler)
-      (if (not (nil? shutdown-timeout))
-        (.setStopTimeout s (or shutdown-timeout default-graceful-stop-timeout)))
+      (.setStopTimeout s (or shutdown-timeout default-graceful-stop-timeout))
       (assoc webserver-context :server s))))

 (schema/defn ^:always-validate start-webserver! :- ServerContext


Refactor vector

Refactor vector


Improves capacity and consumption logs (#1255)

* Improves capacity and consumption logs

* Update compute_cluster.clj

--- scheduler/src/cook/kubernetes/compute_cluster.clj
+++ scheduler/src/cook/kubernetes/compute_cluster.clj
@@ -30,13 +30,15 @@
                                                  (merge-with -
                                                              (node-name->capacity node-name)
                                                              (node-name->consumed node-name)))
-                                               (keys node-name->capacity))]
-    (log/info "Capacity: " node-name->capacity "Consumption:" node-name->consumed)
+                                               (keys node-name->capacity))
+        compute-cluster-name (cc/compute-cluster-name compute-cluster)]
+    (log/info "In" compute-cluster-name "compute cluster, capacity:" node-name->capacity)
+    (log/info "In" compute-cluster-name "compute cluster, consumption:" node-name->consumed)
     (->> node-name->available
          (filter (fn [[node-name _]] (-> node-name node-name->node api/node-schedulable?)))
          (map (fn [[node-name available]]
                 {:id {:value (str (UUID/randomUUID))}
-                 :framework-id (cc/compute-cluster-name compute-cluster)
+                 :framework-id compute-cluster-name
                  :slave-id {:value node-name}
                  :hostname node-name
                  :resources [{:name "mem" :type :value-scalar :scalar (max 0.0 (:mem available))}
@@ -308,4 +310,4 @@
                                                     namespace
                                                     scan-frequency-seconds)]
     (cc/register-compute-cluster! compute-cluster)
-    compute-cluster))+    compute-cluster))


fix solveImportedClass

fix solveImportedClass

--- src/app/symbol_solver/scope.clj
+++ src/app/symbol_solver/scope.clj
@@ -162,7 +162,8 @@
   [cu nameToSolve]
   (let [imports (.getImports cu)
         relevantImports (filter (partial isImportMatchingSimpleName? nameToSolve) imports)
-        correspondingClasses (map typeSolver relevantImports)]
+        importNames (map (fn [i] (.getName (.getName i))) imports)
+        correspondingClasses (map typeSolver importNames)]
     (first correspondingClasses)))

 (extend-protocol scope


Improved robustness of servlet login cookie retrieval.

--- src/appengine_magic/core_local.clj
+++ src/appengine_magic/core_local.clj
@@ -52,8 +52,9 @@
     (doFilter [_ req resp chain]
       (let [all-cookies (.getCookies req)
             login-cookie (when all-cookies
-                           (.getValue (first (filter #(= "dev_appserver_login" (.getName %))
-                                                     (.getCookies req)))))
+                           (let [raw (first (filter #(= "dev_appserver_login" (.getName %))
+                                                    (.getCookies req)))]
+                             (when raw (.getValue raw))))
             [user-email user-admin? _] (when login-cookie
                                          (str/split login-cookie #":"))
             thread-environment-proxy (make-thread-environment-proxy :user-email user-email


don't show text in sidebar if avatar set

--- src/braid/ui/views/sidebar.cljs
+++ src/braid/ui/views/sidebar.cljs
@@ -30,7 +30,8 @@
              :title (group :name)
              :href (routes/page-path {:group-id (group :id)
                                       :page-id "inbox"})}
-            (string/join "" (take 2 (group :name)))
+            (when-not (group :avatar)
+              (string/join "" (take 2 (group :name))))
             [badge-view (group :id)]]))])))

 (defn new-group-view []


Updates to bring into symmetry with latest varaibles changes.

--- src/cmr/opendap/ous/service.clj
+++ src/cmr/opendap/ous/service.clj
@@ -2,6 +2,7 @@
   (:require
    [clojure.string :as string]
    [cmr.opendap.components.config :as config]
+   [cmr.opendap.errors :as errors]
    [cmr.opendap.http.request :as request]
    [cmr.opendap.http.response :as response]
    [ring.util.codec :as codec]
@@ -36,7 +37,9 @@
   [promise]
   (let [results @promise]
     (log/trace "Got results from CMR service search:" results)
-    (:items results)))
+    (if (errors/erred? results)
+      results
+      (:items results))))

 (defn get-metadata
   [search-endpoint user-token service-ids]
@@ -51,7 +54,10 @@
   [service-entry]
   (log/debug "Got service entry:" service-entry)
   (when-let [umm (:umm service-entry)]
+    (log/debug "Got UMM data for service ...")
+    (log/debug "Service is of type:" (:Type umm))
     (when (match-opendap umm)
+      (log/debug "Found matching pattern ....")
       {:service-id (get-in service-entry [:meta :concept-id])
        ;; XXX WARNING!!! The regex's saved in the UMM data are broken!
        ;;                We're manually hacking the regex to fix this ...


ws loop

ws loop

--- src/cljs/ceres_analytics/core.cljs
+++ src/cljs/ceres_analytics/core.cljs
@@ -34,12 +34,12 @@
                 (attr {:width width
                        :height height}))]
     (.. force
-        (nodes (.-nodes data))
-        (links (.-links data))
+        (nodes (:nodes data))
+        (links (:links data))
         start)
     (let [link (.. svg
                    (selectAll ".link")
-                   (data (.-links data))
+                   (data (:links data))
                    enter
                    (append "line")
                    (attr {:class "link"})
@@ -48,15 +48,15 @@
                    )
           node (.. svg
                    (selectAll ".node")
-                   (data (.-nodes data))
+                   (data (:nodes data))
                    enter
                    (append "circle")
                    (attr {:class "node"
                            :r "4"})
-                   (style {:fill (fn [d] (color (.-group d)))})
+                   (style {:fill (fn [d] (color (:group d)))})
                    (call (.-drag force)))]
       (do
-        (.. node (append "title") (text (fn [d] (.-value d))))
+        (.. node (append "title") (text (fn [d] (:value d))))
         (.. force
             (on "tick"
                  (fn []
@@ -77,10 +77,12 @@
     (if-not error
       (do
         (>! ws-channel {:topic :graph :data nil})
-        (let [{:keys [message error]} (<! ws-channel)]
-          (if error
-            (println "Error on incomming message: " error)
-            (draw-fdg  message "#graph-container"))))
+        (loop [{:keys [message error] :as in} (<! ws-channel)]
+          (if in
+            (if error
+              (println "Error on incomming message: " error)
+              (draw-fdg  message "#graph-container"))
+            (recur (<! ws-channel)))))
       (js/console.log "Error on connection: " (pr-str error)))))

 #_(draw-fdg graph-data-1 "#graph-container")


events testing

events testing

--- src/cljs/defender_cljs/events.cljs
+++ src/cljs/defender_cljs/events.cljs
@@ -53,7 +53,9 @@

 (on-keydown
  :right
- (.log js/console "test"))
+ (.log js/console "right down!"))

-(.log js/console "this was called")
+(on-keyup
+ :right
+ (.log js/console "right up!"))


Use default values for car dimensions

Use default values for car dimensions

--- src/cljs/ikea_clojure_cup/car.cljs
+++ src/cljs/ikea_clojure_cup/car.cljs
@@ -41,7 +41,9 @@

 (defn- vehicle-get
   ([car-state idx]
-   (get-in @car-state [:vehicles idx]))
+   (merge
+    {:width 0 :height 0 :depth 0}
+    (get-in @car-state [:vehicles idx])))
   ([car-state idx v]
    (swap! car-state assoc-in [:vehicles idx] v)))


defaults the kerberos throttler core pool size to the concurrency level (#588)

--- waiter/src/waiter/auth/kerberos.clj
+++ waiter/src/waiter/auth/kerberos.clj
@@ -118,7 +118,8 @@
          (pos? keep-alive-mins)
          (integer? max-queue-length)
          (pos? max-queue-length)]}
-  (let [executor (ThreadPoolExecutor. 1 concurrency-level keep-alive-mins TimeUnit/MINUTES (LinkedBlockingQueue.))]
+  (let [queue (LinkedBlockingQueue.)
+        executor (ThreadPoolExecutor. concurrency-level concurrency-level keep-alive-mins TimeUnit/MINUTES queue)]
     (metrics/waiter-gauge #(.getActiveCount executor)
                           "core" "kerberos" "throttle" "active-thread-count")
     (metrics/waiter-gauge #(- concurrency-level (.getActiveCount executor))


Better log message

Better log message

--- src/emender_jenkins/results.clj
+++ src/emender_jenkins/results.clj
@@ -380,7 +380,7 @@
                 (update-timestamp cache-timestamp)
                 true)
             (when (> cache-age max-age)
-                (log/info (str "Updating " cache-name " (the cache is " cache-age "ms old, max age is set to " max-age "ms"))
+                (log/info (str "Updating " cache-name " (the cache is " (int cache-age) " seconds old, max age is set to " max-age " seconds)"))
                 (function-to-call configuration)
                 (update-timestamp cache-timestamp)
                 true))))


name_servers typo

name_servers typo

--- src/terraboot/public_dns.clj
+++ src/terraboot/public_dns.clj
@@ -29,7 +29,7 @@
                             root-dns-zone-id
                             (string/join "." [environment project])
                             {:type "NS"
-                             :records (mapv #(core/output-of "aws_route53_zone" environment-dns-identifier (string/join  "." ["name_server" %])) (range 0 4))})
+                             :records (mapv #(core/output-of "aws_route53_zone" environment-dns-identifier (string/join  "." ["name_servers" %])) (range 0 4))})
      (public-route53-record environment-dns
                             (core/id-of "aws_route53_zone" environment-dns-identifier)
                             "vpn"


hardcoded key-name fix

hardcoded key-name fix

--- src/openstack/provider.clj
+++ src/openstack/provider.clj
@@ -48,7 +48,7 @@
     (.name (machine :hostname))
     (.flavor (openstack :flavor))
     (.image (image-id machine))
-    (.keypairName "ronen")
+    (.keypairName (openstack :key-name))
     (.networks (openstack :network-ids))
     (.build)))


adding security groups

adding security groups

--- src/openstack/provider.clj
+++ src/openstack/provider.clj
@@ -43,6 +43,10 @@

 (defn floating-ips [tenant] (-> (compute tenant) (.floatingIps)))

+(defn add-security-groups
+   [b groups]
+  (doseq [g groups] (.addSecurityGroup b g)) b)
+
 (defn model [{:keys [machine openstack] :as spec}]
   (-> (Builders/server)
     (.name (machine :hostname))
@@ -50,6 +54,7 @@
     (.image (image-id machine))
     (.keypairName (openstack :key-name))
     (.networks (openstack :network-ids))
+    (add-security-groups (openstack :security-groups))
     (.build)))

 (defn wait-for-ip  [servers' id network timeout]


[#389] [Client] Make `query-string` public (@kirked)

--- src/org/httpkit/client.clj
+++ src/org/httpkit/client.clj
@@ -44,7 +44,7 @@
                d))
            params))

-(defn- query-string
+(defn query-string
   "Returns URL-encoded query string for given params map."
   [m]
   (let [m (nested-param m)


use ensure-path-exists!

use ensure-path-exists!

--- src/overtone/sc/buffer.clj
+++ src/overtone/sc/buffer.clj
@@ -82,21 +82,20 @@
   ([path start]
      (buffer-alloc-read path start -1))
   ([path start n-frames]
+     (ensure-path-exists! path)
      (let [path (canonical-path path)
-           f    (file path)]
-       (when-not (.exists f)
-         (throw (Exception. (str "Unable to read file - file does not exist: " path))))
-       (let [id (alloc-id :audio-buffer)]
-         (with-server-sync  #(snd "/b_allocRead" id path start n-frames))
-         (let [info                              (buffer-info id)
-               {:keys [id size rate n-channels]} info]
-           (when (every? zero? [size rate n-channels])
-             (free-id :audio-buffer id)
-             (throw (Exception. (str "Unable to read file - perhaps path is not a valid audio file: " path))))
-
-           (map->BufferFile
-            (assoc info
-              :allocated-on-server (atom true))))))))
+           f    (file path)
+           id   (alloc-id :audio-buffer)]
+       (with-server-sync  #(snd "/b_allocRead" id path start n-frames))
+       (let [info                              (buffer-info id)
+             {:keys [id size rate n-channels]} info]
+         (when (every? zero? [size rate n-channels])
+           (free-id :audio-buffer id)
+           (throw (Exception. (str "Unable to read file - perhaps path is not a valid audio file: " path))))
+
+         (map->BufferFile
+          (assoc info
+            :allocated-on-server (atom true)))))))

 (derive BufferInfo ::buffer-info)
 (derive Buffer     ::buffer)


add js-comment for emitting  top-level JSDoc style comments

--- src/main/clojure/cljs/core.cljc
+++ src/main/clojure/cljs/core.cljc
@@ -864,6 +864,20 @@
   "Emit JavaScript \"debugger;\" statement."
   []
   (core/list 'js* "debugger;"))
+
+(core/defmacro js-comment
+  "Emit top-level JavaScript multi-line comment. New lines will create a
+  new comment line."
+  [comment]
+  (let [[x & ys] (string/split comment #"\n")]
+    (core/list 'js*
+     (core/str
+       "\n/**\n"
+       (core/str " * " x "\n")
+       (core/->> ys
+         (map #(core/str " * " (subs % 3) "\n"))
+         (reduce core/str ""))
+       " */\n"))))

 (core/defmacro true? [x]
   (bool-expr (core/list 'js* "~{} === true" x)))


destructuring prices in build-replacement

--- src-cljs/complico/prices.cljs
+++ src-cljs/complico/prices.cljs
@@ -44,12 +44,9 @@
       (apply currency price nil)
       (to-html))))

-(defn- build-replacement [price-parts]
-  (let [original-price (first price-parts)
-        currency (second price-parts)
-        price (nth price-parts 2)
-        replacement-price (convert-price currency price select-conv-func funcs/conversion-functions)]
-  (vector original-price replacement-price)))
+(defn- build-replacement [[original-price currency price]]
+  (let [replacement-price (convert-price currency price select-conv-func funcs/conversion-functions)]
+    (vector original-price replacement-price)))

 (defn- convert-prices [prices]
   (map build-replacement prices))


Various cleanup to conv-man

Various cleanup to conv-man

--- src/polismath/conv_man.clj
+++ src/polismath/conv_man.clj
@@ -70,7 +70,7 @@
         (get-or-set! coll-atom key))))

-(defn prep-for-uploading-bidToPid-mapping [results]
+(defn prep-bidToPid [results]
   {"bidToPid" (:bid-to-pid results)})

@@ -83,7 +83,7 @@
       (apply assoc-in-bc this-part kvs))))

-(defn prep-for-uploading-to-client [results]
+(defn prep-main [results]
   (let [base-clusters (:base-clusters results)]
     (-> results
       ; REFORMAT BASE CLUSTERS
@@ -104,19 +104,18 @@
         :n-cmts
         :pca
         :repness
-        :sid
+        :zid
         :user-vote-counts
         :votes-base}))))

-(defn format-conv-for-mongo [prep-fn conv zid lastVoteTimestamp]
+(defn format-for-mongo [prep-fn conv lastVoteTimestamp]
   (-> conv
     prep-fn
     ; core.matrix & monger workaround: convert to str with cheshire then back
     ch/generate-string
     ch/parse-string
     (assoc
-      "zid" zid
       "lastVoteTimestamp" lastVoteTimestamp)))

@@ -137,10 +136,10 @@
             updated-conv   (conv/conv-update conv votes)
             zid            (:zid updated-conv)]
         ; Format and upload main results
-        (->> (format-conv-for-mongo prep-for-uploading-to-client updated-conv zid last-timestamp)
+        (->> (format-for-mongo prep-main updated-conv last-timestamp)
           (mongo-upsert-results (mongo-collection-name "main")))
         ; format and upload bidtopid results
-        (->> (format-conv-for-mongo prep-for-uploading-bidToPid-mapping updated-conv zid last-timestamp)
+        (->> (format-for-mongo prep-bidToPid updated-conv last-timestamp)
           (mongo-upsert-results (mongo-collection-name "bidtopid")))
         ; Return the updated conv
         updated-conv)


Added valid-user-ids function, and fleshed out main a bit more (intercom)

--- src/polismath/intercom.clj
+++ src/polismath/intercom.clj
@@ -47,13 +47,32 @@
   (get user "user_id"))

+(defn valid-user-ids
+  [users]
+  (->> users
+       (map user-id)
+       (filter identity)))
+
+
+(defn gets
+  "Like get, but gives a coll mapped from all the keys"
+  [m ks & [not-found]]
+  (mapv #(get m % not-found) ks))
+
+
 (defn -main
   []
-  (->
-    (get-intercom-users)
-    (->>
-      (sort-by #(get % "created_at"))
-      (map #(vector (get % "created_at") (user-id-str %))))
-    (pp/wide-pp)))
+  (let [users        (get-intercom-users)
+        valid-ids    (valid-user-ids users)
+        users-wo-ids (filter #(not (get % "user_id")) users)]
+    ; First some nice summary stats information
+    (println "Total number of users:         " (count users))
+    (println "Number of users with valid ids:" (count valid-ids))
+    (println "Number w/o:                    " (count users-wo-ids))
+    ; Digging in deeper
+    (pp/wide-pp users-wo-ids)
+    (doseq [u users]
+      (println (gets u ["created_at" "user_id" "remote_created_at"])))
+    ))


Use clojure.tools.logging if it is available [IMMUTANT-443]

--- namespaces/common/src/main/clojure/immutant/logging.clj
+++ namespaces/common/src/main/clojure/immutant/logging.clj
@@ -29,22 +29,41 @@
   (binding [*out* *err*]
     (println level msg)))

+(defn tools-logging-logger []
+  (try
+    (require 'clojure.tools.logging)
+    (eval '(let [l (reify immutant.logging/Logger
+                     (trace [_ msg]
+                       (clojure.tools.logging/trace msg))
+                     (debug [_ msg]
+                       (clojure.tools.logging/debug msg))
+                     (info [_ msg]
+                       (clojure.tools.logging/info msg))
+                     (warn [_ msg]
+                       (clojure.tools.logging/warn msg))
+                     (error [_ msg]
+                       (clojure.tools.logging/error msg)))]
+             (constantly l)))
+    (catch java.io.FileNotFoundException _)))
+
 (def ^:private logger-lookup-fn
   (delay
-    (try
-      (eval `(import 'org.immutant.core.Immutant))
-      (eval '(fn [n] (Immutant/getLogger n)))
-      (catch Throwable _
-        (let [l (reify Logger
-                  (trace [_ msg])
-                  (debug [_ msg])
-                  (info [_ msg]
-                    (print-err "INFO:" msg))
-                  (warn [_ msg]
-                    (print-err "WARN:" msg))
-                  (error [_ msg]
-                    (print-err "ERROR:" msg)))]
-          (constantly l))))))
+    (if-let [logger-fn (tools-logging-logger)]
+      logger-fn
+      (try
+        (eval `(import 'org.immutant.core.Immutant))
+        (eval '(fn [n] (Immutant/getLogger n)))
+        (catch Throwable _
+          (let [l (reify Logger
+                    (trace [_ msg])
+                    (debug [_ msg])
+                    (info [_ msg]
+                      (print-err "INFO:" msg))
+                    (warn [_ msg]
+                      (print-err "WARN:" msg))
+                    (error [_ msg]
+                      (print-err "ERROR:" msg)))]
+            (constantly l)))))))

 (defn ^:private logger [name]
   (@logger-lookup-fn name))


Allow Cloudwatch to authenticate using IAM Instance Roles

--- src/riemann/cloudwatch.clj
+++ src/riemann/cloudwatch.clj
@@ -20,6 +20,8 @@

   (cloudwatch {:access-key \"AKJALPVWYQ6BFMVLSZDA\"
                :secret-key \"ZFEemkafy0paNMx5JcinMUiOC4dcMKhxXCL85DhM\"})
+
+  (cloudwatch {}) will make use of IAM Instance Profile.

   Options:

@@ -31,10 +33,15 @@

   :namespace   AWS CloudWatch namespace."
   [opts]
-  (let [opts (merge {:access-key "aws-access-key"
+  (let [opts (if (or (contains? opts :access-key) (contains? opts :access-key))
+               (merge
+                    {:access-key "aws-access-key"
                      :secret-key "aws-secret-key"
                      :endpoint   "monitoring.us-east-1.amazonaws.com"
-                     :namespace  "Riemann"} opts)]
+                     :namespace  "Riemann"} opts)
+               (merge
+                    {:endpoint   "monitoring.us-east-1.amazonaws.com"
+                     :namespace  "Riemann"} opts))]
     (fn [event]
       (when (:metric event)
         (when (:service event)


util/context.clj: added admin-username and admin-password

--- src/org/altlaw/util/context.clj
+++ src/org/altlaw/util/context.clj
@@ -56,3 +56,9 @@
   (or (get-property-function "org.altlaw.aws.secret.access.key")
       (get-property-function "fs.s3.awsSecretAccessKey")
       (throw (Exception. "No AWS Secret Access Key (tried org.altlaw.aws.secret.access.key and fs.s3.awsSecretAccessKey)"))))
+
+(defn admin-username []
+  (get-property "org.altlaw.www.admin.username"))
+
+(defn admin-password []
+  (get-property "org.altlaw.www.admin.password"))


Add spec validation for input-value

Add spec validation for input-value

--- fulcro-todo/src/main/app/ui.cljs
+++ fulcro-todo/src/main/app/ui.cljs
@@ -1,8 +1,10 @@
 (ns app.ui
   (:require [app.operations :as ops]
+            [app.schema :as schema]
+            [fulcro.client.core :as fc]
             [om.dom :as dom]
             [om.next :as om :refer [defui]]
-            [fulcro.client.core :as fc]))
+            [cljs.spec.alpha :as spec]))

 (defui ^:once ItemAdder
   static om/IQuery
@@ -13,7 +15,7 @@
   (render [this]
           (let [{:keys [item-adder/input-value]} (om/props this)
                 {:keys [update-input-value!]} (om/get-computed this)
-                valid-input-value? false]
+                valid-input-value? (spec/valid? :item/text input-value)]
             (dom/form
              #js {:className "item-adder"
                   :onSubmit #(.preventDefault %)}


Schema changes to Indicator to support loading IoC data  - The ThreatBrainSpecification :query field is optional  - Adds a :tags field, which will contain IoC categories and tags

--- src/cia/schemas/indicator.clj
+++ src/cia/schemas/indicator.clj
@@ -19,7 +19,7 @@
 (s/defschema ThreatBrainSpecification
   "An indicator which runs in threatbrain..."
   {:type (s/eq "ThreatBrain")
-   :query s/Str
+   (s/optional-key :query) s/Str
    :variables [s/Str] })

 (s/defschema SnortSpecification
@@ -71,6 +71,10 @@
     (s/optional-key :type)
     (describe [v/IndicatorType]
               "Specifies the type or types for this Indicator")
+
+    (s/optional-key :tags)
+    (describe [s/Str]
+              "Descriptors for this indicator")

     (s/optional-key :observable)
     (describe c/Observable
@@ -124,7 +128,7 @@
               "Test Mechanisms effective at identifying the cyber Observables specified in this cyber threat Indicator")

     ;; Extension fields:
-    :producer s/Str
+    :producer s/Str ;; TODO - Document what is supposed to be in this field!
     (s/optional-key :specifications) [(s/conditional
                                        #(= "Judgement" (:type %)) JudgementSpecification
                                        #(= "ThreatBrain" (:type %)) ThreatBrainSpecification


provide path in scan result

provide path in scan result

--- src/clj/hdfs_cleaner/hdfs.clj
+++ src/clj/hdfs_cleaner/hdfs.clj
@@ -24,6 +24,7 @@
              (when-not
                (.startsWith name ".")
                (merge {:name (-> path (.getName))
+                       :path (-> path (.toUri) (.getRawPath))
                        :is_dir (.isDirectory file)
                        :last_modified (.getModificationTime file)
                        :replication (.getReplication file)}


WIP add edit budget item by period detail

--- src/clj_money/web/budgets.clj
+++ src/clj_money/web/budgets.clj
@@ -162,7 +162,8 @@
            [:span.caret]]
           [:ul.dropdown-menu
            [:li [:a {:href (format "/budget-items/%s/edit/average" (:id item))} "By average"]]
-           [:li [:a {:href (format "/budget-items/%s/edit/total" (:id item))} "By total"]]]]])])])
+           [:li [:a {:href (format "/budget-items/%s/edit/total" (:id item))} "By total"]]
+           [:li [:a {:href (format "/budget-items/%s/edit/detail" (:id item))} "By period"]]]]])])])

 (defn- summarize-periods
   [items]
@@ -373,11 +374,12 @@
     [:div.row
      [:div.col-md-8
       (map #(period-input-group budget %)
-           (->> budget
-                :period-count
-                range
-                (map #(hash-map :index % :amount 0M))
-                (partition 3)))]]
+           (or (:periods item)
+               (->> budget
+                    :period-count
+                    range
+                    (map #(hash-map :index % :amount 0M))
+                    (partition 3))))]]
     [:input {:type :hidden :name :method :value :detail}]
     [:button.btn.btn-primary {:type :submit
                               :title "Click here to save this budget item."} "Save"]
@@ -466,6 +468,10 @@
   (-> item
       (assoc :total (reduce + (map :amount (:periods item))))
       (dissoc :periods)))
+
+(defmethod prepare-item-for-edit :detail
+  [item]
+  item)

 (defn edit-item
   "Renders a form for editing a budget item"


remove a duplicated require form

remove a duplicated require form

--- src/cljam/util/chromosome.clj
+++ src/cljam/util/chromosome.clj
@@ -1,7 +1,6 @@
 (ns cljam.util.chromosome
   "Utilities for handling chromosome name."
-  (:require [clojure.string :as cstr]
-            [clojure.string :as string]))
+  (:require [clojure.string :as cstr]))

 (defn normalize-name
   [s]


small fix to embedly

small fix to embedly

--- src/cljs/redditv/embedly.cljs
+++ src/cljs/redditv/embedly.cljs
@@ -60,11 +60,11 @@
          (fn []
            (if (.supports player "event" "play")
              (.on player "play" #(put! event-channel (events/player-playing)))
-             #(put! event-channel (events/player-ended)))
+             (put! event-channel (events/player-ended)))

            (if (.supports player "event" "ended")
              (.on player "ended" #(put! event-channel (events/player-ended)))
-             #(put! event-channel (events/player-ended)))
+             (put! event-channel (events/player-ended)))

            (.on player "error" #(put! event-channel (events/player-not-started)))


fixed bug in debug logging in client

fixed bug in debug logging in client

--- src/clojure/picard/client.clj
+++ src/clojure/picard/client.clj
@@ -277,12 +277,13 @@
     (when (and upstream-fn (not= (.isWritable ch) @writable?))
       (swap-then!
        writable? not
-       #(try
-          (debug {:msg "Sending upstream" :event [(if % :resume :pause)]
-                  :state %})
-          (upstream-fn (if % :resume :pause) nil)
-          (catch Exception err
-            (throw (Exception. "Not implemented yet"))))))))
+       (fn [currently-writable?]
+         (try
+           (debug {:msg "Sending upstream" :event [(if currently-writable? :resume :pause)]
+                   :state current-state})
+           (upstream-fn (if currently-writable? :resume :pause) nil)
+           (catch Exception err
+             (handle-err state err current-state))))))))

 (defn- handle-err
   [state err current-state]


Correcting internal error response on api.

--- src/cmr/common/api/errors.clj
+++ src/cmr/common/api/errors.clj
@@ -8,7 +8,7 @@
    :conflict 409})

 (def internal-error-ring-response
-  {:status 500 :body "An Internal Error has occurred."})
+  {:status 500 :body {:errors ["An Internal Error has occurred."]} :content-type :json})

 (defn exception-handler
   "A ring exception handler that will handle errors thrown by the cmr.common.services.errors


ignore dk.active.docjure (breaking things)

--- src/polismath/darwin/export.clj
+++ src/polismath/darwin/export.clj
@@ -18,7 +18,7 @@
             [clj-time.core :as t]
             [clj-time.coerce :as co]
     ;; Think I'm going to use the second one here, since it's simpler (less mutable)
-            [dk.ative.docjure.spreadsheet :as spreadsheet]
+            ;[dk.ative.docjure.spreadsheet :as spreadsheet]
             [clj-excel.core :as excel]
             [semantic-csv.core :as scsv]
             [clojure-csv.core :as csv]