WIP AOC day 22

WIP AOC day 22

--- clj/advent-of-code-2016/src/advent_of_code_2016/day22.clj
+++ clj/advent-of-code-2016/src/advent_of_code_2016/day22.clj
@@ -1,4 +1,5 @@
-(ns advent-of-code-2016.day22)
+(ns advent-of-code-2016.day22
+  (:import (clojure.lang PersistentQueue)))

 (defn to-int [x] (Integer/parseInt x))

@@ -7,13 +8,13 @@
   (->> input
        (clojure.string/split-lines)
        (drop 2)
-       (map #(re-matches #".*-x(\d+)-y(\d+)\s+(\d+)T\s+(\d+)T\s+(\d+)T\s+.*" %))
+       (map #(re-matches #".*-x(\d+)-y(\d+)\s+(\d+)T\s+(\d+)T\s+.*" %))
        (map
-         (fn [[_ x y size used avail]]
-           {:grid [(to-int x) (to-int y)]
-            :size (to-int size)
-            :used (to-int used)
-            :avail (to-int avail)}))))
+         (fn [[_ x y size used]]
+           [
+              [(to-int x) (to-int y)]
+              {:size (to-int size)
+              :used (to-int used)}]))))

 (defn cartesian [xs ys]
   (for [x xs y ys]
@@ -21,13 +22,102 @@

 (defn cartesian-self [xs] (cartesian xs xs))

+(defn get-boundary
+  [nodes]
+  (let [xs (map (comp first first) nodes)
+        ys (map (comp second first) nodes)]
+    [(apply max xs) (apply max ys)]))
+
+(defn build-initial-state
+  [nodes [bound-x _]]
+  (let [nodes-map (zipmap (map first nodes) (map second nodes))]
+    (assoc nodes-map :data [bound-x 0])))
+
+(defn get-adjacent-coords
+  [[x y] [max-x max-y]]
+  (filter (fn [[x y]] (and (>= max-x x 0) (>= max-y y 0))) [[(inc x) y] [(dec x) y] [x (inc y)] [x (dec y)]]))
+
+(defn can-move?
+  [state from to]
+  (let [{usedFrom :used} (get state from)
+        {sizeTo :size usedTo :used} (get state to)]
+    (and (> usedFrom 0) (>= (- sizeTo usedTo) usedFrom))))
+
+(defn get-possible-moves-from
+  [state boundary from]
+  (for [to (get-adjacent-coords from boundary)
+        :when (can-move? state from to)]
+    [from to]))
+
+(defn get-possible-moves
+  [state boundary]
+  (->> state
+       (keys)
+       (filter vector?)
+       (mapcat #(get-possible-moves-from state boundary %)))
+  )
+
+(defn move
+  [state from to]
+  (let [from-node (get state from)
+        to-node (get state to)
+        new-from-node (assoc from-node :used 0)
+        new-to-node (assoc to-node :used (+ (:used to-node) (:used from-node)))
+        new-state (assoc state from new-from-node to new-to-node)]
+    (if (= (:data state) from) (assoc new-state :data to) new-state)))
+
+(defn solve-part-1
+  [input]
+  (->> input
+       (parse-input)
+       (cartesian-self)
+       (filter (fn [[[_ {usedA :used}] _]] (> usedA 0)))
+       (filter (fn [[[gridA _] [gridB _]]] (not= gridA gridB)))
+       (filter (fn [[[_ {usedA :used}] [_ {usedB :used sizeB :size}]]] (>= (- sizeB usedB) usedA)))
+       (count)))
+
+(defn feasible?
+  [new-state move previous-move boundary]
+  (and
+    (not= (reverse move) previous-move)                                                   ;not moving data back and forth
+    (>= (get-in new-state [[0 0] :size]) (get-in new-state [(:data new-state) :used]))    ;(0, 0) node still can possibly fits required data
+    (and (let [adj-to-data (get-adjacent-coords (:data new-state) boundary)              ;data can still be moved somewhere
+               used-data (get-in new-state [(:data new-state) :used])
+               adj-sizes (map #(get-in new-state [% :size]) adj-to-data)]
+           (some (fn [sz] (>= sz used-data)) adj-sizes)))
+    ))
+
+(defn find-shortest
+  [initial-state boundary iter-limit]
+  (loop [queue (conj PersistentQueue/EMPTY [initial-state 0 nil]) iter 0]
+    (let [[current-state current-steps previous-move] (peek queue)]
+      (cond
+        (and (not (nil? iter-limit)) (= iter-limit iter))
+          (do
+            (println "iterations limit exceeded, queue size: " (count (pop queue)), ", # of steps: " current-steps)
+            nil)
+        (empty? queue) (do (println "queue is empty") nil)
+        (= (:data current-state) [0 0]) {:steps current-steps :iterations iter}
+        :else
+          (let [next-queue-items
+                  (for [next-move (get-possible-moves current-state boundary)
+                        :let [next-state (apply move current-state next-move)]
+                        :when (feasible? next-state next-move previous-move boundary)]
+                    [next-state (inc current-steps) next-move])
+                next-queue (apply conj (pop queue) next-queue-items)]
+            (println "Queue size: " (count (pop next-queue)) ", steps: " current-steps)
+            (recur next-queue (inc iter)))))))
+
 (def input "root@ebhq-gridcenter# df -h\nFilesystem              Size  Used  Avail  Use%\n/dev/grid/node-x0-y0     91T   71T    20T   78%\n/dev/grid/node-x0-y1     88T   72T    16T   81%\n/dev/grid/node-x0-y2     94T   69T    25T   73%\n/dev/grid/node-x0-y3     88T   73T    15T   82%\n/dev/grid/node-x0-y4     94T   66T    28T   70%\n/dev/grid/node-x0-y5     87T   66T    21T   75%\n/dev/grid/node-x0-y6     86T   65T    21T   75%\n/dev/grid/node-x0-y7     89T   65T    24T   73%\n/dev/grid/node-x0-y8     91T   70T    21T   76%\n/dev/grid/node-x0-y9     86T   71T    15T   82%\n/dev/grid/node-x0-y10    90T   65T    25T   72%\n/dev/grid/node-x0-y11    89T   71T    18T   79%\n/dev/grid/node-x0-y12    86T   73T    13T   84%\n/dev/grid/node-x0-y13    89T   70T    19T   78%\n/dev/grid/node-x0-y14    93T   73T    20T   78%\n/dev/grid/node-x0-y15    92T   64T    28T   69%\n/dev/grid/node-x0-y16    92T   67T    25T   72%\n/dev/grid/node-x0-y17    88T   72T    16T   81%\n/dev/grid/node-x0-y18    92T   71T    21T   77%\n/dev/grid/node-x0-y19    92T   65T    27T   70%\n/dev/grid/node-x0-y20    90T   69T    21T   76%\n/dev/grid/node-x0-y21    94T   65T    29T   69%\n/dev/grid/node-x0-y22    91T   72T    19T   79%\n/dev/grid/node-x0-y23    88T   65T    23T   73%\n/dev/grid/node-x0-y24    86T   73T    13T   84%\n/dev/grid/node-x0-y25    87T   71T    16T   81%\n/dev/grid/node-x0-y26    90T   65T    25T   72%\n/dev/grid/node-x0-y27    91T   64T    27T   70%\n/dev/grid/node-x0-y28    88T   66T    22T   75%\n/dev/grid/node-x0-y29    92T   66T    26T   71%\n/dev/grid/node-x0-y30    85T   73T    12T   85%\n/dev/grid/node-x1-y0     89T   66T    23T   74%\n/dev/grid/node-x1-y1     91T   70T    21T   76%\n/dev/grid/node-x1-y2     93T   66T    27T   70%\n/dev/grid/node-x1-y3     88T   66T    22T   75%\n/dev/grid/node-x1-y4     94T   70T    24T   74%\n/dev/grid/node-x1-y5     89T   65T    24T   73%\n/dev/grid/node-x1-y6     94T   64T    30T   68%\n/dev/grid/node-x1-y7     92T   64T    28T   69%\n/dev/grid/node-x1-y8     91T   71T    20T   78%\n/dev/grid/node-x1-y9     86T   64T    22T   74%\n/dev/grid/node-x1-y10    89T   70T    19T   78%\n/dev/grid/node-x1-y11    94T   70T    24T   74%\n/dev/grid/node-x1-y12    85T   73T    12T   85%\n/dev/grid/node-x1-y13    85T   66T    19T   77%\n/dev/grid/node-x1-y14    86T   65T    21T   75%\n/dev/grid/node-x1-y15    90T   66T    24T   73%\n/dev/grid/node-x1-y16    87T   67T    20T   77%\n/dev/grid/node-x1-y17    90T   72T    18T   80%\n/dev/grid/node-x1-y18    88T   66T    22T   75%\n/dev/grid/node-x1-y19    90T   73T    17T   81%\n/dev/grid/node-x1-y20    87T   72T    15T   82%\n/dev/grid/node-x1-y21    94T   72T    22T   76%\n/dev/grid/node-x1-y22    91T   72T    19T   79%\n/dev/grid/node-x1-y23    86T   64T    22T   74%\n/dev/grid/node-x1-y24    87T   65T    22T   74%\n/dev/grid/node-x1-y25    89T   70T    19T   78%\n/dev/grid/node-x1-y26    86T   67T    19T   77%\n/dev/grid/node-x1-y27    93T   64T    29T   68%\n/dev/grid/node-x1-y28    89T   65T    24T   73%\n/dev/grid/node-x1-y29    88T   72T    16T   81%\n/dev/grid/node-x1-y30    89T   70T    19T   78%\n/dev/grid/node-x2-y0     86T   65T    21T   75%\n/dev/grid/node-x2-y1     94T   73T    21T   77%\n/dev/grid/node-x2-y2     94T   71T    23T   75%\n/dev/grid/node-x2-y3     91T   70T    21T   76%\n/dev/grid/node-x2-y4     85T   66T    19T   77%\n/dev/grid/node-x2-y5     89T   72T    17T   80%\n/dev/grid/node-x2-y6     86T   64T    22T   74%\n/dev/grid/node-x2-y7     94T   65T    29T   69%\n/dev/grid/node-x2-y8     93T   66T    27T   70%\n/dev/grid/node-x2-y9     87T   65T    22T   74%\n/dev/grid/node-x2-y10    88T   67T    21T   76%\n/dev/grid/node-x2-y11    88T   70T    18T   79%\n/dev/grid/node-x2-y12    89T   73T    16T   82%\n/dev/grid/node-x2-y13    88T   73T    15T   82%\n/dev/grid/node-x2-y14    94T   72T    22T   76%\n/dev/grid/node-x2-y15    90T   68T    22T   75%\n/dev/grid/node-x2-y16    86T   65T    21T   75%\n/dev/grid/node-x2-y17    91T   73T    18T   80%\n/dev/grid/node-x2-y18    90T   67T    23T   74%\n/dev/grid/node-x2-y19    90T   72T    18T   80%\n/dev/grid/node-x2-y20    89T   69T    20T   77%\n/dev/grid/node-x2-y21    88T   64T    24T   72%\n/dev/grid/node-x2-y22    91T   68T    23T   74%\n/dev/grid/node-x2-y23    86T   66T    20T   76%\n/dev/grid/node-x2-y24    89T   69T    20T   77%\n/dev/grid/node-x2-y25    92T   64T    28T   69%\n/dev/grid/node-x2-y26    86T   70T    16T   81%\n/dev/grid/node-x2-y27    93T   68T    25T   73%\n/dev/grid/node-x2-y28    93T   70T    23T   75%\n/dev/grid/node-x2-y29    89T   73T    16T   82%\n/dev/grid/node-x2-y30    90T   66T    24T   73%\n/dev/grid/node-x3-y0     89T   71T    18T   79%\n/dev/grid/node-x3-y1     94T   65T    29T   69%\n/dev/grid/node-x3-y2     93T   65T    28T   69%\n/dev/grid/node-x3-y3     86T   69T    17T   80%\n/dev/grid/node-x3-y4     89T   67T    22T   75%\n/dev/grid/node-x3-y5     94T   72T    22T   76%\n/dev/grid/node-x3-y6     87T   72T    15T   82%\n/dev/grid/node-x3-y7     86T   64T    22T   74%\n/dev/grid/node-x3-y8     88T   72T    16T   81%\n/dev/grid/node-x3-y9     92T   72T    20T   78%\n/dev/grid/node-x3-y10    94T   67T    27T   71%\n/dev/grid/node-x3-y11    89T   64T    25T   71%\n/dev/grid/node-x3-y12    90T   66T    24T   73%\n/dev/grid/node-x3-y13    90T   69T    21T   76%\n/dev/grid/node-x3-y14    94T   69T    25T   73%\n/dev/grid/node-x3-y15    92T   68T    24T   73%\n/dev/grid/node-x3-y16    93T   66T    27T   70%\n/dev/grid/node-x3-y17    94T   67T    27T   71%\n/dev/grid/node-x3-y18    88T   69T    19T   78%\n/dev/grid/node-x3-y19    86T   67T    19T   77%\n/dev/grid/node-x3-y20    90T   66T    24T   73%\n/dev/grid/node-x3-y21    85T   73T    12T   85%\n/dev/grid/node-x3-y22    93T   71T    22T   76%\n/dev/grid/node-x3-y23    93T   64T    29T   68%\n/dev/grid/node-x3-y24    93T   66T    27T   70%\n/dev/grid/node-x3-y25    88T   69T    19T   78%\n/dev/grid/node-x3-y26    88T   72T    16T   81%\n/dev/grid/node-x3-y27    91T   67T    24T   73%\n/dev/grid/node-x3-y28    86T   65T    21T   75%\n/dev/grid/node-x3-y29    85T   70T    15T   82%\n/dev/grid/node-x3-y30    87T   72T    15T   82%\n/dev/grid/node-x4-y0     88T   67T    21T   76%\n/dev/grid/node-x4-y1     89T   67T    22T   75%\n/dev/grid/node-x4-y2     91T   69T    22T   75%\n/dev/grid/node-x4-y3     86T   68T    18T   79%\n/dev/grid/node-x4-y4     88T   64T    24T   72%\n/dev/grid/node-x4-y5     92T   70T    22T   76%\n/dev/grid/node-x4-y6     91T   64T    27T   70%\n/dev/grid/node-x4-y7     88T   67T    21T   76%\n/dev/grid/node-x4-y8     87T   66T    21T   75%\n/dev/grid/node-x4-y9     90T   68T    22T   75%\n/dev/grid/node-x4-y10    92T   64T    28T   69%\n/dev/grid/node-x4-y11    93T   71T    22T   76%\n/dev/grid/node-x4-y12    88T   65T    23T   73%\n/dev/grid/node-x4-y13    92T   67T    25T   72%\n/dev/grid/node-x4-y14    91T   71T    20T   78%\n/dev/grid/node-x4-y15    89T   70T    19T   78%\n/dev/grid/node-x4-y16    85T   72T    13T   84%\n/dev/grid/node-x4-y17    87T   68T    19T   78%\n/dev/grid/node-x4-y18    90T   72T    18T   80%\n/dev/grid/node-x4-y19    94T   65T    29T   69%\n/dev/grid/node-x4-y20    92T   66T    26T   71%\n/dev/grid/node-x4-y21    92T   70T    22T   76%\n/dev/grid/node-x4-y22    85T   73T    12T   85%\n/dev/grid/node-x4-y23    85T   72T    13T   84%\n/dev/grid/node-x4-y24    90T   71T    19T   78%\n/dev/grid/node-x4-y25    85T   73T    12T   85%\n/dev/grid/node-x4-y26    87T   72T    15T   82%\n/dev/grid/node-x4-y27    94T   72T    22T   76%\n/dev/grid/node-x4-y28    88T   69T    19T   78%\n/dev/grid/node-x4-y29    93T   68T    25T   73%\n/dev/grid/node-x4-y30    89T   72T    17T   80%\n/dev/grid/node-x5-y0     93T   64T    29T   68%\n/dev/grid/node-x5-y1     87T   73T    14T   83%\n/dev/grid/node-x5-y2     94T   65T    29T   69%\n/dev/grid/node-x5-y3     92T   67T    25T   72%\n/dev/grid/node-x5-y4     86T   67T    19T   77%\n/dev/grid/node-x5-y5     90T   73T    17T   81%\n/dev/grid/node-x5-y6     93T   70T    23T   75%\n/dev/grid/node-x5-y7     85T   67T    18T   78%\n/dev/grid/node-x5-y8     94T   65T    29T   69%\n/dev/grid/node-x5-y9     85T   67T    18T   78%\n/dev/grid/node-x5-y10    86T   73T    13T   84%\n/dev/grid/node-x5-y11    94T   66T    28T   70%\n/dev/grid/node-x5-y12    89T   71T    18T   79%\n/dev/grid/node-x5-y13    88T   71T    17T   80%\n/dev/grid/node-x5-y14    93T   68T    25T   73%\n/dev/grid/node-x5-y15    93T   72T    21T   77%\n/dev/grid/node-x5-y16    92T   69T    23T   75%\n/dev/grid/node-x5-y17    86T   73T    13T   84%\n/dev/grid/node-x5-y18    90T   67T    23T   74%\n/dev/grid/node-x5-y19    85T   70T    15T   82%\n/dev/grid/node-x5-y20    91T   66T    25T   72%\n/dev/grid/node-x5-y21   505T  497T     8T   98%\n/dev/grid/node-x5-y22    92T   72T    20T   78%\n/dev/grid/node-x5-y23    85T   71T    14T   83%\n/dev/grid/node-x5-y24    85T   70T    15T   82%\n/dev/grid/node-x5-y25    93T   72T    21T   77%\n/dev/grid/node-x5-y26    85T   65T    20T   76%\n/dev/grid/node-x5-y27    86T   67T    19T   77%\n/dev/grid/node-x5-y28    91T   69T    22T   75%\n/dev/grid/node-x5-y29    90T   66T    24T   73%\n/dev/grid/node-x5-y30    87T   66T    21T   75%\n/dev/grid/node-x6-y0     86T   73T    13T   84%\n/dev/grid/node-x6-y1     86T   69T    17T   80%\n/dev/grid/node-x6-y2     87T   67T    20T   77%\n/dev/grid/node-x6-y3     91T   72T    19T   79%\n/dev/grid/node-x6-y4     88T   71T    17T   80%\n/dev/grid/node-x6-y5     92T   66T    26T   71%\n/dev/grid/node-x6-y6     88T   70T    18T   79%\n/dev/grid/node-x6-y7     94T   67T    27T   71%\n/dev/grid/node-x6-y8     93T   66T    27T   70%\n/dev/grid/node-x6-y9     91T   66T    25T   72%\n/dev/grid/node-x6-y10    90T   65T    25T   72%\n/dev/grid/node-x6-y11    94T   69T    25T   73%\n/dev/grid/node-x6-y12    93T   66T    27T   70%\n/dev/grid/node-x6-y13    91T   65T    26T   71%\n/dev/grid/node-x6-y14    87T   67T    20T   77%\n/dev/grid/node-x6-y15    89T   73T    16T   82%\n/dev/grid/node-x6-y16    89T   69T    20T   77%\n/dev/grid/node-x6-y17    86T   70T    16T   81%\n/dev/grid/node-x6-y18    89T   72T    17T   80%\n/dev/grid/node-x6-y19    93T   73T    20T   78%\n/dev/grid/node-x6-y20    90T   64T    26T   71%\n/dev/grid/node-x6-y21   508T  495T    13T   97%\n/dev/grid/node-x6-y22    90T   68T    22T   75%\n/dev/grid/node-x6-y23    85T   73T    12T   85%\n/dev/grid/node-x6-y24    88T   72T    16T   81%\n/dev/grid/node-x6-y25    90T   68T    22T   75%\n/dev/grid/node-x6-y26    86T   71T    15T   82%\n/dev/grid/node-x6-y27    90T   68T    22T   75%\n/dev/grid/node-x6-y28    85T   65T    20T   76%\n/dev/grid/node-x6-y29    93T   70T    23T   75%\n/dev/grid/node-x6-y30    92T   70T    22T   76%\n/dev/grid/node-x7-y0     94T   64T    30T   68%\n/dev/grid/node-x7-y1     90T   71T    19T   78%\n/dev/grid/node-x7-y2     85T   68T    17T   80%\n/dev/grid/node-x7-y3     89T   64T    25T   71%\n/dev/grid/node-x7-y4     89T   73T    16T   82%\n/dev/grid/node-x7-y5     93T   68T    25T   73%\n/dev/grid/node-x7-y6     93T   66T    27T   70%\n/dev/grid/node-x7-y7     92T   68T    24T   73%\n/dev/grid/node-x7-y8     93T   72T    21T   77%\n/dev/grid/node-x7-y9     91T   70T    21T   76%\n/dev/grid/node-x7-y10    90T   65T    25T   72%\n/dev/grid/node-x7-y11    85T   64T    21T   75%\n/dev/grid/node-x7-y12    94T   68T    26T   72%\n/dev/grid/node-x7-y13    88T   65T    23T   73%\n/dev/grid/node-x7-y14    90T   72T    18T   80%\n/dev/grid/node-x7-y15    85T   70T    15T   82%\n/dev/grid/node-x7-y16    93T   71T    22T   76%\n/dev/grid/node-x7-y17    85T   68T    17T   80%\n/dev/grid/node-x7-y18    87T   69T    18T   79%\n/dev/grid/node-x7-y19    87T   72T    15T   82%\n/dev/grid/node-x7-y20    91T   64T    27T   70%\n/dev/grid/node-x7-y21   503T  497T     6T   98%\n/dev/grid/node-x7-y22    94T   67T    27T   71%\n/dev/grid/node-x7-y23    92T   65T    27T   70%\n/dev/grid/node-x7-y24    89T   72T    17T   80%\n/dev/grid/node-x7-y25    87T   64T    23T   73%\n/dev/grid/node-x7-y26    91T   68T    23T   74%\n/dev/grid/node-x7-y27    88T   72T    16T   81%\n/dev/grid/node-x7-y28    91T   67T    24T   73%\n/dev/grid/node-x7-y29    87T   64T    23T   73%\n/dev/grid/node-x7-y30    89T   68T    21T   76%\n/dev/grid/node-x8-y0     89T   70T    19T   78%\n/dev/grid/node-x8-y1     94T   66T    28T   70%\n/dev/grid/node-x8-y2     93T   73T    20T   78%\n/dev/grid/node-x8-y3     88T   73T    15T   82%\n/dev/grid/node-x8-y4     91T   73T    18T   80%\n/dev/grid/node-x8-y5     88T   67T    21T   76%\n/dev/grid/node-x8-y6     91T   69T    22T   75%\n/dev/grid/node-x8-y7     92T   73T    19T   79%\n/dev/grid/node-x8-y8     89T   71T    18T   79%\n/dev/grid/node-x8-y9     90T   71T    19T   78%\n/dev/grid/node-x8-y10    87T   64T    23T   73%\n/dev/grid/node-x8-y11    93T   64T    29T   68%\n/dev/grid/node-x8-y12    88T   65T    23T   73%\n/dev/grid/node-x8-y13    93T   67T    26T   72%\n/dev/grid/node-x8-y14    89T   71T    18T   79%\n/dev/grid/node-x8-y15    88T   73T    15T   82%\n/dev/grid/node-x8-y16    86T   65T    21T   75%\n/dev/grid/node-x8-y17    93T   67T    26T   72%\n/dev/grid/node-x8-y18    88T   68T    20T   77%\n/dev/grid/node-x8-y19    86T   65T    21T   75%\n/dev/grid/node-x8-y20    94T   68T    26T   72%\n/dev/grid/node-x8-y21   508T  498T    10T   98%\n/dev/grid/node-x8-y22    86T   69T    17T   80%\n/dev/grid/node-x8-y23    92T   65T    27T   70%\n/dev/grid/node-x8-y24    88T   65T    23T   73%\n/dev/grid/node-x8-y25    91T   69T    22T   75%\n/dev/grid/node-x8-y26    94T   65T    29T   69%\n/dev/grid/node-x8-y27    92T   70T    22T   76%\n/dev/grid/node-x8-y28    92T   72T    20T   78%\n/dev/grid/node-x8-y29    86T   65T    21T   75%\n/dev/grid/node-x8-y30    87T   66T    21T   75%\n/dev/grid/node-x9-y0     93T   68T    25T   73%\n/dev/grid/node-x9-y1     91T   71T    20T   78%\n/dev/grid/node-x9-y2     87T   73T    14T   83%\n/dev/grid/node-x9-y3     92T   67T    25T   72%\n/dev/grid/node-x9-y4     90T   68T    22T   75%\n/dev/grid/node-x9-y5     88T   69T    19T   78%\n/dev/grid/node-x9-y6     87T   69T    18T   79%\n/dev/grid/node-x9-y7     86T   64T    22T   74%\n/dev/grid/node-x9-y8     86T   64T    22T   74%\n/dev/grid/node-x9-y9     93T   72T    21T   77%\n/dev/grid/node-x9-y10    90T   65T    25T   72%\n/dev/grid/node-x9-y11    94T   68T    26T   72%\n/dev/grid/node-x9-y12    90T   73T    17T   81%\n/dev/grid/node-x9-y13    89T   68T    21T   76%\n/dev/grid/node-x9-y14    86T   73T    13T   84%\n/dev/grid/node-x9-y15    94T   64T    30T   68%\n/dev/grid/node-x9-y16    93T   64T    29T   68%\n/dev/grid/node-x9-y17    87T   71T    16T   81%\n/dev/grid/node-x9-y18    90T   69T    21T   76%\n/dev/grid/node-x9-y19    92T   67T    25T   72%\n/dev/grid/node-x9-y20    87T   65T    22T   74%\n/dev/grid/node-x9-y21   501T  495T     6T   98%\n/dev/grid/node-x9-y22    86T   65T    21T   75%\n/dev/grid/node-x9-y23    86T   64T    22T   74%\n/dev/grid/node-x9-y24    90T   68T    22T   75%\n/dev/grid/node-x9-y25    93T   72T    21T   77%\n/dev/grid/node-x9-y26    88T   70T    18T   79%\n/dev/grid/node-x9-y27    94T   71T    23T   75%\n/dev/grid/node-x9-y28    90T   69T    21T   76%\n/dev/grid/node-x9-y29    92T   66T    26T   71%\n/dev/grid/node-x9-y30    86T   72T    14T   83%\n/dev/grid/node-x10-y0    91T   71T    20T   78%\n/dev/grid/node-x10-y1    88T   68T    20T   77%\n/dev/grid/node-x10-y2    91T   73T    18T   80%\n/dev/grid/node-x10-y3    89T   68T    21T   76%\n/dev/grid/node-x10-y4    86T   69T    17T   80%\n/dev/grid/node-x10-y5    94T   65T    29T   69%\n/dev/grid/node-x10-y6    94T   72T    22T   76%\n/dev/grid/node-x10-y7    85T   72T    13T   84%\n/dev/grid/node-x10-y8    88T   67T    21T   76%\n/dev/grid/node-x10-y9    93T   66T    27T   70%\n/dev/grid/node-x10-y10   87T   71T    16T   81%\n/dev/grid/node-x10-y11   93T   67T    26T   72%\n/dev/grid/node-x10-y12   87T   73T    14T   83%\n/dev/grid/node-x10-y13   85T   65T    20T   76%\n/dev/grid/node-x10-y14   93T   70T    23T   75%\n/dev/grid/node-x10-y15   86T   65T    21T   75%\n/dev/grid/node-x10-y16   86T   67T    19T   77%\n/dev/grid/node-x10-y17   89T   68T    21T   76%\n/dev/grid/node-x10-y18   86T   72T    14T   83%\n/dev/grid/node-x10-y19   88T   70T    18T   79%\n/dev/grid/node-x10-y20   87T   72T    15T   82%\n/dev/grid/node-x10-y21  507T  495T    12T   97%\n/dev/grid/node-x10-y22   85T   73T    12T   85%\n/dev/grid/node-x10-y23   91T   71T    20T   78%\n/dev/grid/node-x10-y24   91T   69T    22T   75%\n/dev/grid/node-x10-y25   93T   73T    20T   78%\n/dev/grid/node-x10-y26   92T   66T    26T   71%\n/dev/grid/node-x10-y27   92T   72T    20T   78%\n/dev/grid/node-x10-y28   92T   64T    28T   69%\n/dev/grid/node-x10-y29   91T   68T    23T   74%\n/dev/grid/node-x10-y30   86T   73T    13T   84%\n/dev/grid/node-x11-y0    89T   67T    22T   75%\n/dev/grid/node-x11-y1    90T   65T    25T   72%\n/dev/grid/node-x11-y2    87T   68T    19T   78%\n/dev/grid/node-x11-y3    94T   68T    26T   72%\n/dev/grid/node-x11-y4    86T   66T    20T   76%\n/dev/grid/node-x11-y5    88T   67T    21T   76%\n/dev/grid/node-x11-y6    86T   69T    17T   80%\n/dev/grid/node-x11-y7    89T   71T    18T   79%\n/dev/grid/node-x11-y8    85T   72T    13T   84%\n/dev/grid/node-x11-y9    86T   72T    14T   83%\n/dev/grid/node-x11-y10   86T   68T    18T   79%\n/dev/grid/node-x11-y11   88T   64T    24T   72%\n/dev/grid/node-x11-y12   91T   67T    24T   73%\n/dev/grid/node-x11-y13   86T   64T    22T   74%\n/dev/grid/node-x11-y14   88T   73T    15T   82%\n/dev/grid/node-x11-y15   92T   65T    27T   70%\n/dev/grid/node-x11-y16   86T   70T    16T   81%\n/dev/grid/node-x11-y17   91T   71T    20T   78%\n/dev/grid/node-x11-y18   90T   68T    22T   75%\n/dev/grid/node-x11-y19   87T   64T    23T   73%\n/dev/grid/node-x11-y20   89T   66T    23T   74%\n/dev/grid/node-x11-y21  509T  498T    11T   97%\n/dev/grid/node-x11-y22   91T   64T    27T   70%\n/dev/grid/node-x11-y23   85T   67T    18T   78%\n/dev/grid/node-x11-y24   93T   68T    25T   73%\n/dev/grid/node-x11-y25   89T   71T    18T   79%\n/dev/grid/node-x11-y26   87T   72T    15T   82%\n/dev/grid/node-x11-y27   87T   71T    16T   81%\n/dev/grid/node-x11-y28   87T   69T    18T   79%\n/dev/grid/node-x11-y29   85T   69T    16T   81%\n/dev/grid/node-x11-y30   89T   67T    22T   75%\n/dev/grid/node-x12-y0    93T   70T    23T   75%\n/dev/grid/node-x12-y1    92T   68T    24T   73%\n/dev/grid/node-x12-y2    94T   68T    26T   72%\n/dev/grid/node-x12-y3    91T   64T    27T   70%\n/dev/grid/node-x12-y4    85T   67T    18T   78%\n/dev/grid/node-x12-y5    85T   69T    16T   81%\n/dev/grid/node-x12-y6    92T   65T    27T   70%\n/dev/grid/node-x12-y7    92T   68T    24T   73%\n/dev/grid/node-x12-y8    93T   68T    25T   73%\n/dev/grid/node-x12-y9    90T   69T    21T   76%\n/dev/grid/node-x12-y10   85T   70T    15T   82%\n/dev/grid/node-x12-y11   89T   66T    23T   74%\n/dev/grid/node-x12-y12   90T   71T    19T   78%\n/dev/grid/node-x12-y13   93T   66T    27T   70%\n/dev/grid/node-x12-y14   86T   70T    16T   81%\n/dev/grid/node-x12-y15   87T   73T    14T   83%\n/dev/grid/node-x12-y16   92T   70T    22T   76%\n/dev/grid/node-x12-y17   85T   71T    14T   83%\n/dev/grid/node-x12-y18   85T   73T    12T   85%\n/dev/grid/node-x12-y19   92T   71T    21T   77%\n/dev/grid/node-x12-y20   88T   66T    22T   75%\n/dev/grid/node-x12-y21  504T  497T     7T   98%\n/dev/grid/node-x12-y22   88T   70T    18T   79%\n/dev/grid/node-x12-y23   91T   72T    19T   79%\n/dev/grid/node-x12-y24   89T   68T    21T   76%\n/dev/grid/node-x12-y25   86T   69T    17T   80%\n/dev/grid/node-x12-y26   94T   64T    30T   68%\n/dev/grid/node-x12-y27   85T   64T    21T   75%\n/dev/grid/node-x12-y28   94T   67T    27T   71%\n/dev/grid/node-x12-y29   85T   71T    14T   83%\n/dev/grid/node-x12-y30   89T   71T    18T   79%\n/dev/grid/node-x13-y0    87T   66T    21T   75%\n/dev/grid/node-x13-y1    92T   71T    21T   77%\n/dev/grid/node-x13-y2    93T   67T    26T   72%\n/dev/grid/node-x13-y3    88T   73T    15T   82%\n/dev/grid/node-x13-y4    92T   65T    27T   70%\n/dev/grid/node-x13-y5    87T   73T    14T   83%\n/dev/grid/node-x13-y6    88T   71T    17T   80%\n/dev/grid/node-x13-y7    86T   68T    18T   79%\n/dev/grid/node-x13-y8    87T   72T    15T   82%\n/dev/grid/node-x13-y9    90T   69T    21T   76%\n/dev/grid/node-x13-y10   90T   64T    26T   71%\n/dev/grid/node-x13-y11   93T   67T    26T   72%\n/dev/grid/node-x13-y12   92T   69T    23T   75%\n/dev/grid/node-x13-y13   88T   67T    21T   76%\n/dev/grid/node-x13-y14   92T   64T    28T   69%\n/dev/grid/node-x13-y15   89T   68T    21T   76%\n/dev/grid/node-x13-y16   87T   70T    17T   80%\n/dev/grid/node-x13-y17   87T   67T    20T   77%\n/dev/grid/node-x13-y18   93T   71T    22T   76%\n/dev/grid/node-x13-y19   87T   72T    15T   82%\n/dev/grid/node-x13-y20   91T   67T    24T   73%\n/dev/grid/node-x13-y21  503T  498T     5T   99%\n/dev/grid/node-x13-y22   91T   73T    18T   80%\n/dev/grid/node-x13-y23   92T   71T    21T   77%\n/dev/grid/node-x13-y24   94T   65T    29T   69%\n/dev/grid/node-x13-y25   92T   70T    22T   76%\n/dev/grid/node-x13-y26   85T   67T    18T   78%\n/dev/grid/node-x13-y27   86T   67T    19T   77%\n/dev/grid/node-x13-y28   86T   68T    18T   79%\n/dev/grid/node-x13-y29   86T   69T    17T   80%\n/dev/grid/node-x13-y30   92T   70T    22T   76%\n/dev/grid/node-x14-y0    88T   72T    16T   81%\n/dev/grid/node-x14-y1    91T   66T    25T   72%\n/dev/grid/node-x14-y2    92T   66T    26T   71%\n/dev/grid/node-x14-y3    86T   68T    18T   79%\n/dev/grid/node-x14-y4    86T   72T    14T   83%\n/dev/grid/node-x14-y5    88T   64T    24T   72%\n/dev/grid/node-x14-y6    91T   69T    22T   75%\n/dev/grid/node-x14-y7    92T   72T    20T   78%\n/dev/grid/node-x14-y8    93T   69T    24T   74%\n/dev/grid/node-x14-y9    87T   72T    15T   82%\n/dev/grid/node-x14-y10   86T   73T    13T   84%\n/dev/grid/node-x14-y11   88T   73T    15T   82%\n/dev/grid/node-x14-y12   85T   72T    13T   84%\n/dev/grid/node-x14-y13   89T   72T    17T   80%\n/dev/grid/node-x14-y14   93T   73T    20T   78%\n/dev/grid/node-x14-y15   89T   68T    21T   76%\n/dev/grid/node-x14-y16   87T   73T    14T   83%\n/dev/grid/node-x14-y17   91T   70T    21T   76%\n/dev/grid/node-x14-y18   93T   72T    21T   77%\n/dev/grid/node-x14-y19   91T   72T    19T   79%\n/dev/grid/node-x14-y20   86T   73T    13T   84%\n/dev/grid/node-x14-y21  509T  492T    17T   96%\n/dev/grid/node-x14-y22   85T   72T    13T   84%\n/dev/grid/node-x14-y23   88T   65T    23T   73%\n/dev/grid/node-x14-y24   89T   72T    17T   80%\n/dev/grid/node-x14-y25   90T   66T    24T   73%\n/dev/grid/node-x14-y26   86T   66T    20T   76%\n/dev/grid/node-x14-y27   90T   67T    23T   74%\n/dev/grid/node-x14-y28   94T   64T    30T   68%\n/dev/grid/node-x14-y29   89T   72T    17T   80%\n/dev/grid/node-x14-y30   91T   73T    18T   80%\n/dev/grid/node-x15-y0    90T   70T    20T   77%\n/dev/grid/node-x15-y1    88T   64T    24T   72%\n/dev/grid/node-x15-y2    86T   66T    20T   76%\n/dev/grid/node-x15-y3    94T   72T    22T   76%\n/dev/grid/node-x15-y4    85T   69T    16T   81%\n/dev/grid/node-x15-y5    89T   64T    25T   71%\n/dev/grid/node-x15-y6    93T   65T    28T   69%\n/dev/grid/node-x15-y7    93T   71T    22T   76%\n/dev/grid/node-x15-y8    92T   65T    27T   70%\n/dev/grid/node-x15-y9    94T   72T    22T   76%\n/dev/grid/node-x15-y10   92T   73T    19T   79%\n/dev/grid/node-x15-y11   88T   66T    22T   75%\n/dev/grid/node-x15-y12   88T   67T    21T   76%\n/dev/grid/node-x15-y13   88T   65T    23T   73%\n/dev/grid/node-x15-y14   89T   72T    17T   80%\n/dev/grid/node-x15-y15   93T   70T    23T   75%\n/dev/grid/node-x15-y16   94T   69T    25T   73%\n/dev/grid/node-x15-y17   88T   67T    21T   76%\n/dev/grid/node-x15-y18   88T   68T    20T   77%\n/dev/grid/node-x15-y19   92T   68T    24T   73%\n/dev/grid/node-x15-y20   93T   67T    26T   72%\n/dev/grid/node-x15-y21  501T  499T     2T   99%\n/dev/grid/node-x15-y22   90T   64T    26T   71%\n/dev/grid/node-x15-y23   89T   70T    19T   78%\n/dev/grid/node-x15-y24   92T   65T    27T   70%\n/dev/grid/node-x15-y25   90T   64T    26T   71%\n/dev/grid/node-x15-y26   94T   64T    30T   68%\n/dev/grid/node-x15-y27   90T   65T    25T   72%\n/dev/grid/node-x15-y28   91T   66T    25T   72%\n/dev/grid/node-x15-y29   87T   71T    16T   81%\n/dev/grid/node-x15-y30   90T   65T    25T   72%\n/dev/grid/node-x16-y0    92T   64T    28T   69%\n/dev/grid/node-x16-y1    92T   65T    27T   70%\n/dev/grid/node-x16-y2    87T   64T    23T   73%\n/dev/grid/node-x16-y3    94T   73T    21T   77%\n/dev/grid/node-x16-y4    90T   73T    17T   81%\n/dev/grid/node-x16-y5    93T   71T    22T   76%\n/dev/grid/node-x16-y6    86T   67T    19T   77%\n/dev/grid/node-x16-y7    90T   69T    21T   76%\n/dev/grid/node-x16-y8    90T   65T    25T   72%\n/dev/grid/node-x16-y9    85T   72T    13T   84%\n/dev/grid/node-x16-y10   87T   71T    16T   81%\n/dev/grid/node-x16-y11   92T   65T    27T   70%\n/dev/grid/node-x16-y12   89T   66T    23T   74%\n/dev/grid/node-x16-y13   88T   71T    17T   80%\n/dev/grid/node-x16-y14   90T   70T    20T   77%\n/dev/grid/node-x16-y15   93T   66T    27T   70%\n/dev/grid/node-x16-y16   94T   67T    27T   71%\n/dev/grid/node-x16-y17   93T   71T    22T   76%\n/dev/grid/node-x16-y18   87T   64T    23T   73%\n/dev/grid/node-x16-y19   85T   70T    15T   82%\n/dev/grid/node-x16-y20   93T   66T    27T   70%\n/dev/grid/node-x16-y21  507T  490T    17T   96%\n/dev/grid/node-x16-y22   92T   70T    22T   76%\n/dev/grid/node-x16-y23   85T   69T    16T   81%\n/dev/grid/node-x16-y24   89T   67T    22T   75%\n/dev/grid/node-x16-y25   91T   69T    22T   75%\n/dev/grid/node-x16-y26   88T   65T    23T   73%\n/dev/grid/node-x16-y27   90T   65T    25T   72%\n/dev/grid/node-x16-y28   88T   64T    24T   72%\n/dev/grid/node-x16-y29   87T   66T    21T   75%\n/dev/grid/node-x16-y30   89T   65T    24T   73%\n/dev/grid/node-x17-y0    86T   65T    21T   75%\n/dev/grid/node-x17-y1    89T   67T    22T   75%\n/dev/grid/node-x17-y2    92T   70T    22T   76%\n/dev/grid/node-x17-y3    87T   68T    19T   78%\n/dev/grid/node-x17-y4    87T   71T    16T   81%\n/dev/grid/node-x17-y5    91T   71T    20T   78%\n/dev/grid/node-x17-y6    92T   73T    19T   79%\n/dev/grid/node-x17-y7    94T   66T    28T   70%\n/dev/grid/node-x17-y8    94T   72T    22T   76%\n/dev/grid/node-x17-y9    85T   71T    14T   83%\n/dev/grid/node-x17-y10   87T   72T    15T   82%\n/dev/grid/node-x17-y11   90T   64T    26T   71%\n/dev/grid/node-x17-y12   91T   73T    18T   80%\n/dev/grid/node-x17-y13   87T   73T    14T   83%\n/dev/grid/node-x17-y14   88T   73T    15T   82%\n/dev/grid/node-x17-y15   90T   73T    17T   81%\n/dev/grid/node-x17-y16   90T   68T    22T   75%\n/dev/grid/node-x17-y17   92T   72T    20T   78%\n/dev/grid/node-x17-y18   87T   64T    23T   73%\n/dev/grid/node-x17-y19   86T   67T    19T   77%\n/dev/grid/node-x17-y20   86T   64T    22T   74%\n/dev/grid/node-x17-y21  510T  495T    15T   97%\n/dev/grid/node-x17-y22   90T   68T    22T   75%\n/dev/grid/node-x17-y23   91T   71T    20T   78%\n/dev/grid/node-x17-y24   89T   73T    16T   82%\n/dev/grid/node-x17-y25   85T   67T    18T   78%\n/dev/grid/node-x17-y26   89T   70T    19T   78%\n/dev/grid/node-x17-y27   85T   67T    18T   78%\n/dev/grid/node-x17-y28   89T   66T    23T   74%\n/dev/grid/node-x17-y29   89T   67T    22T   75%\n/dev/grid/node-x17-y30   93T   65T    28T   69%\n/dev/grid/node-x18-y0    93T   66T    27T   70%\n/dev/grid/node-x18-y1    88T   65T    23T   73%\n/dev/grid/node-x18-y2    87T   64T    23T   73%\n/dev/grid/node-x18-y3    89T   66T    23T   74%\n/dev/grid/node-x18-y4    91T   72T    19T   79%\n/dev/grid/node-x18-y5    85T   65T    20T   76%\n/dev/grid/node-x18-y6    93T   73T    20T   78%\n/dev/grid/node-x18-y7    85T   64T    21T   75%\n/dev/grid/node-x18-y8    93T   65T    28T   69%\n/dev/grid/node-x18-y9    88T   69T    19T   78%\n/dev/grid/node-x18-y10   86T   73T    13T   84%\n/dev/grid/node-x18-y11   94T   70T    24T   74%\n/dev/grid/node-x18-y12   86T   68T    18T   79%\n/dev/grid/node-x18-y13   94T   72T    22T   76%\n/dev/grid/node-x18-y14   91T   65T    26T   71%\n/dev/grid/node-x18-y15   94T   73T    21T   77%\n/dev/grid/node-x18-y16   93T   67T    26T   72%\n/dev/grid/node-x18-y17   86T   69T    17T   80%\n/dev/grid/node-x18-y18   91T   65T    26T   71%\n/dev/grid/node-x18-y19   85T   73T    12T   85%\n/dev/grid/node-x18-y20   85T   67T    18T   78%\n/dev/grid/node-x18-y21  506T  499T     7T   98%\n/dev/grid/node-x18-y22   91T   65T    26T   71%\n/dev/grid/node-x18-y23   88T   68T    20T   77%\n/dev/grid/node-x18-y24   92T   68T    24T   73%\n/dev/grid/node-x18-y25   89T   67T    22T   75%\n/dev/grid/node-x18-y26   92T   64T    28T   69%\n/dev/grid/node-x18-y27   87T   64T    23T   73%\n/dev/grid/node-x18-y28   85T   67T    18T   78%\n/dev/grid/node-x18-y29   94T   68T    26T   72%\n/dev/grid/node-x18-y30   93T   73T    20T   78%\n/dev/grid/node-x19-y0    86T   73T    13T   84%\n/dev/grid/node-x19-y1    87T   70T    17T   80%\n/dev/grid/node-x19-y2    85T   65T    20T   76%\n/dev/grid/node-x19-y3    90T   69T    21T   76%\n/dev/grid/node-x19-y4    87T   65T    22T   74%\n/dev/grid/node-x19-y5    91T   67T    24T   73%\n/dev/grid/node-x19-y6    90T   66T    24T   73%\n/dev/grid/node-x19-y7    89T   68T    21T   76%\n/dev/grid/node-x19-y8    93T   68T    25T   73%\n/dev/grid/node-x19-y9    89T   69T    20T   77%\n/dev/grid/node-x19-y10   87T   72T    15T   82%\n/dev/grid/node-x19-y11   87T   65T    22T   74%\n/dev/grid/node-x19-y12   92T   67T    25T   72%\n/dev/grid/node-x19-y13   85T   64T    21T   75%\n/dev/grid/node-x19-y14   90T   64T    26T   71%\n/dev/grid/node-x19-y15   91T   71T    20T   78%\n/dev/grid/node-x19-y16   92T   70T    22T   76%\n/dev/grid/node-x19-y17   91T   69T    22T   75%\n/dev/grid/node-x19-y18   90T   67T    23T   74%\n/dev/grid/node-x19-y19   93T   66T    27T   70%\n/dev/grid/node-x19-y20   90T   66T    24T   73%\n/dev/grid/node-x19-y21  503T  496T     7T   98%\n/dev/grid/node-x19-y22   94T   73T    21T   77%\n/dev/grid/node-x19-y23   92T   73T    19T   79%\n/dev/grid/node-x19-y24   88T   69T    19T   78%\n/dev/grid/node-x19-y25   87T   65T    22T   74%\n/dev/grid/node-x19-y26   93T   72T    21T   77%\n/dev/grid/node-x19-y27   90T   72T    18T   80%\n/dev/grid/node-x19-y28   93T   65T    28T   69%\n/dev/grid/node-x19-y29   85T   68T    17T   80%\n/dev/grid/node-x19-y30   90T   67T    23T   74%\n/dev/grid/node-x20-y0    86T   66T    20T   76%\n/dev/grid/node-x20-y1    87T   64T    23T   73%\n/dev/grid/node-x20-y2    87T   65T    22T   74%\n/dev/grid/node-x20-y3    94T   65T    29T   69%\n/dev/grid/node-x20-y4    86T   72T    14T   83%\n/dev/grid/node-x20-y5    85T   70T    15T   82%\n/dev/grid/node-x20-y6    88T   66T    22T   75%\n/dev/grid/node-x20-y7    88T   65T    23T   73%\n/dev/grid/node-x20-y8    87T   67T    20T   77%\n/dev/grid/node-x20-y9    94T   69T    25T   73%\n/dev/grid/node-x20-y10   87T   68T    19T   78%\n/dev/grid/node-x20-y11   94T   69T    25T   73%\n/dev/grid/node-x20-y12   88T   72T    16T   81%\n/dev/grid/node-x20-y13   85T   69T    16T   81%\n/dev/grid/node-x20-y14   89T   68T    21T   76%\n/dev/grid/node-x20-y15   85T   66T    19T   77%\n/dev/grid/node-x20-y16   91T   65T    26T   71%\n/dev/grid/node-x20-y17   91T   69T    22T   75%\n/dev/grid/node-x20-y18   89T   73T    16T   82%\n/dev/grid/node-x20-y19   86T   73T    13T   84%\n/dev/grid/node-x20-y20   88T   65T    23T   73%\n/dev/grid/node-x20-y21  504T  498T     6T   98%\n/dev/grid/node-x20-y22   86T   69T    17T   80%\n/dev/grid/node-x20-y23   90T   66T    24T   73%\n/dev/grid/node-x20-y24   90T   67T    23T   74%\n/dev/grid/node-x20-y25   85T    0T    85T    0%\n/dev/grid/node-x20-y26   93T   70T    23T   75%\n/dev/grid/node-x20-y27   92T   71T    21T   77%\n/dev/grid/node-x20-y28   85T   69T    16T   81%\n/dev/grid/node-x20-y29   87T   72T    15T   82%\n/dev/grid/node-x20-y30   88T   69T    19T   78%\n/dev/grid/node-x21-y0    94T   68T    26T   72%\n/dev/grid/node-x21-y1    94T   65T    29T   69%\n/dev/grid/node-x21-y2    91T   69T    22T   75%\n/dev/grid/node-x21-y3    92T   70T    22T   76%\n/dev/grid/node-x21-y4    94T   64T    30T   68%\n/dev/grid/node-x21-y5    91T   71T    20T   78%\n/dev/grid/node-x21-y6    92T   73T    19T   79%\n/dev/grid/node-x21-y7    93T   69T    24T   74%\n/dev/grid/node-x21-y8    85T   65T    20T   76%\n/dev/grid/node-x21-y9    86T   71T    15T   82%\n/dev/grid/node-x21-y10   88T   70T    18T   79%\n/dev/grid/node-x21-y11   93T   66T    27T   70%\n/dev/grid/node-x21-y12   89T   64T    25T   71%\n/dev/grid/node-x21-y13   92T   66T    26T   71%\n/dev/grid/node-x21-y14   85T   66T    19T   77%\n/dev/grid/node-x21-y15   88T   70T    18T   79%\n/dev/grid/node-x21-y16   88T   73T    15T   82%\n/dev/grid/node-x21-y17   85T   72T    13T   84%\n/dev/grid/node-x21-y18   94T   73T    21T   77%\n/dev/grid/node-x21-y19   93T   65T    28T   69%\n/dev/grid/node-x21-y20   93T   68T    25T   73%\n/dev/grid/node-x21-y21  502T  494T     8T   98%\n/dev/grid/node-x21-y22   87T   73T    14T   83%\n/dev/grid/node-x21-y23   87T   64T    23T   73%\n/dev/grid/node-x21-y24   91T   67T    24T   73%\n/dev/grid/node-x21-y25   90T   64T    26T   71%\n/dev/grid/node-x21-y26   94T   68T    26T   72%\n/dev/grid/node-x21-y27   87T   69T    18T   79%\n/dev/grid/node-x21-y28   85T   68T    17T   80%\n/dev/grid/node-x21-y29   93T   66T    27T   70%\n/dev/grid/node-x21-y30   93T   64T    29T   68%\n/dev/grid/node-x22-y0    89T   70T    19T   78%\n/dev/grid/node-x22-y1    92T   66T    26T   71%\n/dev/grid/node-x22-y2    91T   70T    21T   76%\n/dev/grid/node-x22-y3    85T   69T    16T   81%\n/dev/grid/node-x22-y4    93T   65T    28T   69%\n/dev/grid/node-x22-y5    88T   66T    22T   75%\n/dev/grid/node-x22-y6    90T   67T    23T   74%\n/dev/grid/node-x22-y7    88T   68T    20T   77%\n/dev/grid/node-x22-y8    85T   71T    14T   83%\n/dev/grid/node-x22-y9    92T   66T    26T   71%\n/dev/grid/node-x22-y10   93T   68T    25T   73%\n/dev/grid/node-x22-y11   92T   66T    26T   71%\n/dev/grid/node-x22-y12   91T   67T    24T   73%\n/dev/grid/node-x22-y13   87T   70T    17T   80%\n/dev/grid/node-x22-y14   92T   71T    21T   77%\n/dev/grid/node-x22-y15   86T   65T    21T   75%\n/dev/grid/node-x22-y16   94T   66T    28T   70%\n/dev/grid/node-x22-y17   87T   68T    19T   78%\n/dev/grid/node-x22-y18   86T   64T    22T   74%\n/dev/grid/node-x22-y19   91T   68T    23T   74%\n/dev/grid/node-x22-y20   92T   67T    25T   72%\n/dev/grid/node-x22-y21  510T  494T    16T   96%\n/dev/grid/node-x22-y22   85T   64T    21T   75%\n/dev/grid/node-x22-y23   91T   68T    23T   74%\n/dev/grid/node-x22-y24   94T   70T    24T   74%\n/dev/grid/node-x22-y25   92T   68T    24T   73%\n/dev/grid/node-x22-y26   88T   68T    20T   77%\n/dev/grid/node-x22-y27   88T   72T    16T   81%\n/dev/grid/node-x22-y28   93T   71T    22T   76%\n/dev/grid/node-x22-y29   88T   67T    21T   76%\n/dev/grid/node-x22-y30   90T   65T    25T   72%\n/dev/grid/node-x23-y0    87T   71T    16T   81%\n/dev/grid/node-x23-y1    85T   66T    19T   77%\n/dev/grid/node-x23-y2    91T   64T    27T   70%\n/dev/grid/node-x23-y3    88T   71T    17T   80%\n/dev/grid/node-x23-y4    94T   69T    25T   73%\n/dev/grid/node-x23-y5    85T   66T    19T   77%\n/dev/grid/node-x23-y6    87T   68T    19T   78%\n/dev/grid/node-x23-y7    88T   68T    20T   77%\n/dev/grid/node-x23-y8    93T   71T    22T   76%\n/dev/grid/node-x23-y9    85T   68T    17T   80%\n/dev/grid/node-x23-y10   89T   66T    23T   74%\n/dev/grid/node-x23-y11   89T   71T    18T   79%\n/dev/grid/node-x23-y12   87T   71T    16T   81%\n/dev/grid/node-x23-y13   91T   69T    22T   75%\n/dev/grid/node-x23-y14   91T   69T    22T   75%\n/dev/grid/node-x23-y15   90T   64T    26T   71%\n/dev/grid/node-x23-y16   89T   66T    23T   74%\n/dev/grid/node-x23-y17   90T   66T    24T   73%\n/dev/grid/node-x23-y18   93T   68T    25T   73%\n/dev/grid/node-x23-y19   93T   70T    23T   75%\n/dev/grid/node-x23-y20   85T   71T    14T   83%\n/dev/grid/node-x23-y21  510T  490T    20T   96%\n/dev/grid/node-x23-y22   91T   71T    20T   78%\n/dev/grid/node-x23-y23   90T   64T    26T   71%\n/dev/grid/node-x23-y24   93T   73T    20T   78%\n/dev/grid/node-x23-y25   94T   66T    28T   70%\n/dev/grid/node-x23-y26   85T   67T    18T   78%\n/dev/grid/node-x23-y27   88T   66T    22T   75%\n/dev/grid/node-x23-y28   93T   71T    22T   76%\n/dev/grid/node-x23-y29   88T   68T    20T   77%\n/dev/grid/node-x23-y30   89T   66T    23T   74%\n/dev/grid/node-x24-y0    93T   67T    26T   72%\n/dev/grid/node-x24-y1    94T   66T    28T   70%\n/dev/grid/node-x24-y2    90T   64T    26T   71%\n/dev/grid/node-x24-y3    86T   67T    19T   77%\n/dev/grid/node-x24-y4    93T   71T    22T   76%\n/dev/grid/node-x24-y5    86T   69T    17T   80%\n/dev/grid/node-x24-y6    86T   70T    16T   81%\n/dev/grid/node-x24-y7    86T   70T    16T   81%\n/dev/grid/node-x24-y8    87T   67T    20T   77%\n/dev/grid/node-x24-y9    86T   71T    15T   82%\n/dev/grid/node-x24-y10   94T   71T    23T   75%\n/dev/grid/node-x24-y11   93T   72T    21T   77%\n/dev/grid/node-x24-y12   90T   69T    21T   76%\n/dev/grid/node-x24-y13   91T   64T    27T   70%\n/dev/grid/node-x24-y14   90T   73T    17T   81%\n/dev/grid/node-x24-y15   88T   65T    23T   73%\n/dev/grid/node-x24-y16   90T   67T    23T   74%\n/dev/grid/node-x24-y17   88T   69T    19T   78%\n/dev/grid/node-x24-y18   92T   69T    23T   75%\n/dev/grid/node-x24-y19   93T   66T    27T   70%\n/dev/grid/node-x24-y20   91T   72T    19T   79%\n/dev/grid/node-x24-y21  509T  499T    10T   98%\n/dev/grid/node-x24-y22   91T   64T    27T   70%\n/dev/grid/node-x24-y23   90T   72T    18T   80%\n/dev/grid/node-x24-y24   85T   66T    19T   77%\n/dev/grid/node-x24-y25   91T   66T    25T   72%\n/dev/grid/node-x24-y26   87T   71T    16T   81%\n/dev/grid/node-x24-y27   88T   64T    24T   72%\n/dev/grid/node-x24-y28   90T   71T    19T   78%\n/dev/grid/node-x24-y29   90T   70T    20T   77%\n/dev/grid/node-x24-y30   87T   66T    21T   75%\n/dev/grid/node-x25-y0    93T   70T    23T   75%\n/dev/grid/node-x25-y1    88T   71T    17T   80%\n/dev/grid/node-x25-y2    88T   72T    16T   81%\n/dev/grid/node-x25-y3    86T   68T    18T   79%\n/dev/grid/node-x25-y4    85T   71T    14T   83%\n/dev/grid/node-x25-y5    85T   72T    13T   84%\n/dev/grid/node-x25-y6    92T   71T    21T   77%\n/dev/grid/node-x25-y7    89T   66T    23T   74%\n/dev/grid/node-x25-y8    90T   68T    22T   75%\n/dev/grid/node-x25-y9    90T   73T    17T   81%\n/dev/grid/node-x25-y10   93T   68T    25T   73%\n/dev/grid/node-x25-y11   87T   69T    18T   79%\n/dev/grid/node-x25-y12   89T   72T    17T   80%\n/dev/grid/node-x25-y13   88T   71T    17T   80%\n/dev/grid/node-x25-y14   89T   73T    16T   82%\n/dev/grid/node-x25-y15   90T   66T    24T   73%\n/dev/grid/node-x25-y16   89T   66T    23T   74%\n/dev/grid/node-x25-y17   91T   70T    21T   76%\n/dev/grid/node-x25-y18   87T   64T    23T   73%\n/dev/grid/node-x25-y19   86T   67T    19T   77%\n/dev/grid/node-x25-y20   94T   70T    24T   74%\n/dev/grid/node-x25-y21  506T  491T    15T   97%\n/dev/grid/node-x25-y22   89T   69T    20T   77%\n/dev/grid/node-x25-y23   89T   71T    18T   79%\n/dev/grid/node-x25-y24   88T   72T    16T   81%\n/dev/grid/node-x25-y25   88T   71T    17T   80%\n/dev/grid/node-x25-y26   94T   73T    21T   77%\n/dev/grid/node-x25-y27   93T   65T    28T   69%\n/dev/grid/node-x25-y28   85T   65T    20T   76%\n/dev/grid/node-x25-y29   89T   73T    16T   82%\n/dev/grid/node-x25-y30   94T   73T    21T   77%\n/dev/grid/node-x26-y0    91T   69T    22T   75%\n/dev/grid/node-x26-y1    91T   69T    22T   75%\n/dev/grid/node-x26-y2    94T   70T    24T   74%\n/dev/grid/node-x26-y3    91T   68T    23T   74%\n/dev/grid/node-x26-y4    86T   73T    13T   84%\n/dev/grid/node-x26-y5    85T   71T    14T   83%\n/dev/grid/node-x26-y6    85T   64T    21T   75%\n/dev/grid/node-x26-y7    85T   67T    18T   78%\n/dev/grid/node-x26-y8    94T   68T    26T   72%\n/dev/grid/node-x26-y9    87T   71T    16T   81%\n/dev/grid/node-x26-y10   85T   66T    19T   77%\n/dev/grid/node-x26-y11   91T   70T    21T   76%\n/dev/grid/node-x26-y12   89T   73T    16T   82%\n/dev/grid/node-x26-y13   94T   71T    23T   75%\n/dev/grid/node-x26-y14   86T   70T    16T   81%\n/dev/grid/node-x26-y15   85T   68T    17T   80%\n/dev/grid/node-x26-y16   92T   65T    27T   70%\n/dev/grid/node-x26-y17   91T   66T    25T   72%\n/dev/grid/node-x26-y18   88T   68T    20T   77%\n/dev/grid/node-x26-y19   87T   68T    19T   78%\n/dev/grid/node-x26-y20   94T   68T    26T   72%\n/dev/grid/node-x26-y21  506T  491T    15T   97%\n/dev/grid/node-x26-y22   85T   73T    12T   85%\n/dev/grid/node-x26-y23   85T   67T    18T   78%\n/dev/grid/node-x26-y24   90T   70T    20T   77%\n/dev/grid/node-x26-y25   92T   64T    28T   69%\n/dev/grid/node-x26-y26   89T   69T    20T   77%\n/dev/grid/node-x26-y27   90T   71T    19T   78%\n/dev/grid/node-x26-y28   94T   67T    27T   71%\n/dev/grid/node-x26-y29   88T   70T    18T   79%\n/dev/grid/node-x26-y30   89T   72T    17T   80%\n/dev/grid/node-x27-y0    88T   71T    17T   80%\n/dev/grid/node-x27-y1    90T   68T    22T   75%\n/dev/grid/node-x27-y2    87T   72T    15T   82%\n/dev/grid/node-x27-y3    92T   72T    20T   78%\n/dev/grid/node-x27-y4    89T   65T    24T   73%\n/dev/grid/node-x27-y5    86T   70T    16T   81%\n/dev/grid/node-x27-y6    93T   69T    24T   74%\n/dev/grid/node-x27-y7    93T   64T    29T   68%\n/dev/grid/node-x27-y8    94T   67T    27T   71%\n/dev/grid/node-x27-y9    89T   70T    19T   78%\n/dev/grid/node-x27-y10   85T   70T    15T   82%\n/dev/grid/node-x27-y11   91T   72T    19T   79%\n/dev/grid/node-x27-y12   90T   72T    18T   80%\n/dev/grid/node-x27-y13   91T   68T    23T   74%\n/dev/grid/node-x27-y14   86T   64T    22T   74%\n/dev/grid/node-x27-y15   91T   68T    23T   74%\n/dev/grid/node-x27-y16   92T   65T    27T   70%\n/dev/grid/node-x27-y17   91T   73T    18T   80%\n/dev/grid/node-x27-y18   89T   69T    20T   77%\n/dev/grid/node-x27-y19   85T   67T    18T   78%\n/dev/grid/node-x27-y20   93T   72T    21T   77%\n/dev/grid/node-x27-y21  510T  491T    19T   96%\n/dev/grid/node-x27-y22   92T   64T    28T   69%\n/dev/grid/node-x27-y23   90T   73T    17T   81%\n/dev/grid/node-x27-y24   85T   65T    20T   76%\n/dev/grid/node-x27-y25   91T   71T    20T   78%\n/dev/grid/node-x27-y26   87T   68T    19T   78%\n/dev/grid/node-x27-y27   88T   68T    20T   77%\n/dev/grid/node-x27-y28   89T   73T    16T   82%\n/dev/grid/node-x27-y29   87T   66T    21T   75%\n/dev/grid/node-x27-y30   87T   66T    21T   75%\n/dev/grid/node-x28-y0    92T   73T    19T   79%\n/dev/grid/node-x28-y1    85T   66T    19T   77%\n/dev/grid/node-x28-y2    86T   73T    13T   84%\n/dev/grid/node-x28-y3    86T   68T    18T   79%\n/dev/grid/node-x28-y4    90T   65T    25T   72%\n/dev/grid/node-x28-y5    88T   71T    17T   80%\n/dev/grid/node-x28-y6    93T   71T    22T   76%\n/dev/grid/node-x28-y7    87T   72T    15T   82%\n/dev/grid/node-x28-y8    87T   66T    21T   75%\n/dev/grid/node-x28-y9    94T   70T    24T   74%\n/dev/grid/node-x28-y10   90T   68T    22T   75%\n/dev/grid/node-x28-y11   93T   69T    24T   74%\n/dev/grid/node-x28-y12   92T   65T    27T   70%\n/dev/grid/node-x28-y13   93T   67T    26T   72%\n/dev/grid/node-x28-y14   85T   72T    13T   84%\n/dev/grid/node-x28-y15   88T   66T    22T   75%\n/dev/grid/node-x28-y16   94T   64T    30T   68%\n/dev/grid/node-x28-y17   92T   68T    24T   73%\n/dev/grid/node-x28-y18   92T   72T    20T   78%\n/dev/grid/node-x28-y19   94T   67T    27T   71%\n/dev/grid/node-x28-y20   88T   67T    21T   76%\n/dev/grid/node-x28-y21  509T  491T    18T   96%\n/dev/grid/node-x28-y22   85T   72T    13T   84%\n/dev/grid/node-x28-y23   90T   68T    22T   75%\n/dev/grid/node-x28-y24   90T   73T    17T   81%\n/dev/grid/node-x28-y25   87T   64T    23T   73%\n/dev/grid/node-x28-y26   88T   67T    21T   76%\n/dev/grid/node-x28-y27   85T   68T    17T   80%\n/dev/grid/node-x28-y28   87T   68T    19T   78%\n/dev/grid/node-x28-y29   91T   66T    25T   72%\n/dev/grid/node-x28-y30   91T   71T    20T   78%\n/dev/grid/node-x29-y0    85T   72T    13T   84%\n/dev/grid/node-x29-y1    85T   73T    12T   85%\n/dev/grid/node-x29-y2    93T   66T    27T   70%\n/dev/grid/node-x29-y3    93T   73T    20T   78%\n/dev/grid/node-x29-y4    92T   73T    19T   79%\n/dev/grid/node-x29-y5    87T   64T    23T   73%\n/dev/grid/node-x29-y6    86T   66T    20T   76%\n/dev/grid/node-x29-y7    86T   65T    21T   75%\n/dev/grid/node-x29-y8    91T   68T    23T   74%\n/dev/grid/node-x29-y9    91T   65T    26T   71%\n/dev/grid/node-x29-y10   88T   71T    17T   80%\n/dev/grid/node-x29-y11   86T   66T    20T   76%\n/dev/grid/node-x29-y12   91T   73T    18T   80%\n/dev/grid/node-x29-y13   85T   69T    16T   81%\n/dev/grid/node-x29-y14   85T   69T    16T   81%\n/dev/grid/node-x29-y15   92T   68T    24T   73%\n/dev/grid/node-x29-y16   86T   65T    21T   75%\n/dev/grid/node-x29-y17   92T   71T    21T   77%\n/dev/grid/node-x29-y18   88T   65T    23T   73%\n/dev/grid/node-x29-y19   93T   73T    20T   78%\n/dev/grid/node-x29-y20   94T   68T    26T   72%\n/dev/grid/node-x29-y21  502T  496T     6T   98%\n/dev/grid/node-x29-y22   86T   73T    13T   84%\n/dev/grid/node-x29-y23   92T   64T    28T   69%\n/dev/grid/node-x29-y24   91T   72T    19T   79%\n/dev/grid/node-x29-y25   87T   69T    18T   79%\n/dev/grid/node-x29-y26   90T   71T    19T   78%\n/dev/grid/node-x29-y27   89T   66T    23T   74%\n/dev/grid/node-x29-y28   93T   65T    28T   69%\n/dev/grid/node-x29-y29   93T   72T    21T   77%\n/dev/grid/node-x29-y30   92T   69T    23T   75%\n/dev/grid/node-x30-y0    91T   65T    26T   71%\n/dev/grid/node-x30-y1    91T   65T    26T   71%\n/dev/grid/node-x30-y2    85T   67T    18T   78%\n/dev/grid/node-x30-y3    90T   66T    24T   73%\n/dev/grid/node-x30-y4    92T   73T    19T   79%\n/dev/grid/node-x30-y5    90T   64T    26T   71%\n/dev/grid/node-x30-y6    87T   67T    20T   77%\n/dev/grid/node-x30-y7    90T   72T    18T   80%\n/dev/grid/node-x30-y8    89T   68T    21T   76%\n/dev/grid/node-x30-y9    89T   71T    18T   79%\n/dev/grid/node-x30-y10   89T   73T    16T   82%\n/dev/grid/node-x30-y11   94T   64T    30T   68%\n/dev/grid/node-x30-y12   87T   65T    22T   74%\n/dev/grid/node-x30-y13   89T   72T    17T   80%\n/dev/grid/node-x30-y14   94T   65T    29T   69%\n/dev/grid/node-x30-y15   93T   72T    21T   77%\n/dev/grid/node-x30-y16   88T   73T    15T   82%\n/dev/grid/node-x30-y17   89T   72T    17T   80%\n/dev/grid/node-x30-y18   89T   65T    24T   73%\n/dev/grid/node-x30-y19   89T   66T    23T   74%\n/dev/grid/node-x30-y20   94T   72T    22T   76%\n/dev/grid/node-x30-y21  510T  492T    18T   96%\n/dev/grid/node-x30-y22   91T   68T    23T   74%\n/dev/grid/node-x30-y23   91T   64T    27T   70%\n/dev/grid/node-x30-y24   91T   70T    21T   76%\n/dev/grid/node-x30-y25   87T   72T    15T   82%\n/dev/grid/node-x30-y26   92T   72T    20T   78%\n/dev/grid/node-x30-y27   93T   64T    29T   68%\n/dev/grid/node-x30-y28   86T   66T    20T   76%\n/dev/grid/node-x30-y29   94T   68T    26T   72%\n/dev/grid/node-x30-y30   94T   71T    23T   75%\n/dev/grid/node-x31-y0    91T   70T    21T   76%\n/dev/grid/node-x31-y1    88T   67T    21T   76%\n/dev/grid/node-x31-y2    86T   70T    16T   81%\n/dev/grid/node-x31-y3    93T   69T    24T   74%\n/dev/grid/node-x31-y4    87T   66T    21T   75%\n/dev/grid/node-x31-y5    87T   73T    14T   83%\n/dev/grid/node-x31-y6    93T   70T    23T   75%\n/dev/grid/node-x31-y7    90T   67T    23T   74%\n/dev/grid/node-x31-y8    92T   70T    22T   76%\n/dev/grid/node-x31-y9    89T   64T    25T   71%\n/dev/grid/node-x31-y10   90T   66T    24T   73%\n/dev/grid/node-x31-y11   90T   68T    22T   75%\n/dev/grid/node-x31-y12   88T   72T    16T   81%\n/dev/grid/node-x31-y13   93T   65T    28T   69%\n/dev/grid/node-x31-y14   90T   71T    19T   78%\n/dev/grid/node-x31-y15   87T   66T    21T   75%\n/dev/grid/node-x31-y16   86T   69T    17T   80%\n/dev/grid/node-x31-y17   85T   64T    21T   75%\n/dev/grid/node-x31-y18   88T   70T    18T   79%\n/dev/grid/node-x31-y19   85T   66T    19T   77%\n/dev/grid/node-x31-y20   87T   71T    16T   81%\n/dev/grid/node-x31-y21  510T  494T    16T   96%\n/dev/grid/node-x31-y22   90T   64T    26T   71%\n/dev/grid/node-x31-y23   90T   73T    17T   81%\n/dev/grid/node-x31-y24   92T   67T    25T   72%\n/dev/grid/node-x31-y25   92T   68T    24T   73%\n/dev/grid/node-x31-y26   94T   73T    21T   77%\n/dev/grid/node-x31-y27   94T   67T    27T   71%\n/dev/grid/node-x31-y28   89T   73T    16T   82%\n/dev/grid/node-x31-y29   94T   72T    22T   76%\n/dev/grid/node-x31-y30   88T   71T    17T   80%\n/dev/grid/node-x32-y0    89T   70T    19T   78%\n/dev/grid/node-x32-y1    92T   69T    23T   75%\n/dev/grid/node-x32-y2    87T   65T    22T   74%\n/dev/grid/node-x32-y3    93T   67T    26T   72%\n/dev/grid/node-x32-y4    91T   67T    24T   73%\n/dev/grid/node-x32-y5    90T   65T    25T   72%\n/dev/grid/node-x32-y6    87T   66T    21T   75%\n/dev/grid/node-x32-y7    92T   67T    25T   72%\n/dev/grid/node-x32-y8    89T   71T    18T   79%\n/dev/grid/node-x32-y9    90T   73T    17T   81%\n/dev/grid/node-x32-y10   87T   73T    14T   83%\n/dev/grid/node-x32-y11   92T   64T    28T   69%\n/dev/grid/node-x32-y12   86T   66T    20T   76%\n/dev/grid/node-x32-y13   85T   64T    21T   75%\n/dev/grid/node-x32-y14   94T   66T    28T   70%\n/dev/grid/node-x32-y15   89T   72T    17T   80%\n/dev/grid/node-x32-y16   91T   67T    24T   73%\n/dev/grid/node-x32-y17   86T   71T    15T   82%\n/dev/grid/node-x32-y18   93T   72T    21T   77%\n/dev/grid/node-x32-y19   89T   70T    19T   78%\n/dev/grid/node-x32-y20   94T   71T    23T   75%\n/dev/grid/node-x32-y21  506T  496T    10T   98%\n/dev/grid/node-x32-y22   87T   72T    15T   82%\n/dev/grid/node-x32-y23   90T   66T    24T   73%\n/dev/grid/node-x32-y24   88T   70T    18T   79%\n/dev/grid/node-x32-y25   88T   67T    21T   76%\n/dev/grid/node-x32-y26   90T   72T    18T   80%\n/dev/grid/node-x32-y27   86T   69T    17T   80%\n/dev/grid/node-x32-y28   85T   67T    18T   78%\n/dev/grid/node-x32-y29   92T   68T    24T   73%\n/dev/grid/node-x32-y30   91T   68T    23T   74%\n/dev/grid/node-x33-y0    90T   70T    20T   77%\n/dev/grid/node-x33-y1    94T   70T    24T   74%\n/dev/grid/node-x33-y2    87T   64T    23T   73%\n/dev/grid/node-x33-y3    85T   65T    20T   76%\n/dev/grid/node-x33-y4    94T   66T    28T   70%\n/dev/grid/node-x33-y5    91T   67T    24T   73%\n/dev/grid/node-x33-y6    89T   71T    18T   79%\n/dev/grid/node-x33-y7    88T   71T    17T   80%\n/dev/grid/node-x33-y8    87T   66T    21T   75%\n/dev/grid/node-x33-y9    89T   67T    22T   75%\n/dev/grid/node-x33-y10   90T   67T    23T   74%\n/dev/grid/node-x33-y11   91T   70T    21T   76%\n/dev/grid/node-x33-y12   86T   69T    17T   80%\n/dev/grid/node-x33-y13   85T   72T    13T   84%\n/dev/grid/node-x33-y14   93T   69T    24T   74%\n/dev/grid/node-x33-y15   87T   67T    20T   77%\n/dev/grid/node-x33-y16   91T   70T    21T   76%\n/dev/grid/node-x33-y17   86T   65T    21T   75%\n/dev/grid/node-x33-y18   85T   73T    12T   85%\n/dev/grid/node-x33-y19   92T   72T    20T   78%\n/dev/grid/node-x33-y20   89T   64T    25T   71%\n/dev/grid/node-x33-y21  506T  491T    15T   97%\n/dev/grid/node-x33-y22   92T   69T    23T   75%\n/dev/grid/node-x33-y23   86T   72T    14T   83%\n/dev/grid/node-x33-y24   89T   71T    18T   79%\n/dev/grid/node-x33-y25   85T   64T    21T   75%\n/dev/grid/node-x33-y26   94T   66T    28T   70%\n/dev/grid/node-x33-y27   91T   72T    19T   79%\n/dev/grid/node-x33-y28   90T   73T    17T   81%\n/dev/grid/node-x33-y29   87T   68T    19T   78%\n/dev/grid/node-x33-y30   94T   66T    28T   70%")
+;(def nodes (parse-input input))
+;(def boundary (get-boundary nodes))
+;(def initial-state (build-initial-state nodes boundary))

-;Part 1
-(->> input
-     (parse-input)
-     (cartesian-self)
-     (filter (fn [[{usedA :used} _]] (> usedA 0)))
-     (filter (fn [[{gridA :grid} {gridB :grid}]] (not= gridA gridB)))
-     (filter (fn [[{usedA :used} {availB :avail}]] (>= availB usedA)))
-     (count))
+(def sample-input "root@ebhq-gridcenter# df -h\nFilesystem            Size  Used  Avail  Use%\n/dev/grid/node-x0-y0   10T    8T     2T   80%\n/dev/grid/node-x0-y1   11T    6T     5T   54%\n/dev/grid/node-x0-y2   32T   28T     4T   87%\n/dev/grid/node-x1-y0    9T    7T     2T   77%\n/dev/grid/node-x1-y1    8T    0T     8T    0%\n/dev/grid/node-x1-y2   11T    7T     4T   63%\n/dev/grid/node-x2-y0   10T    6T     4T   60%\n/dev/grid/node-x2-y1    9T    8T     1T   88%\n/dev/grid/node-x2-y2    9T    6T     3T   66%")
+(def sample-nodes (parse-input sample-input))
+(def sample-boundary (get-boundary sample-nodes))
+(def sample-init-state (build-initial-state sample-nodes sample-boundary))
+
+(time (println (find-shortest sample-init-state sample-boundary nil)))
+
+(get-possible-moves sample-init-state sample-boundary)


Add deep versions of fapply and pure applicatives

--- src/deepfns/core.cljc
+++ src/deepfns/core.cljc
@@ -1,4 +1,7 @@
 (ns deepfns.core)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; fmap

 (declare deepfmap)

@@ -57,3 +60,138 @@
 (def <-$>
   "An alias for deepfmap"
   deepfmap)
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; fapply + pure
+
+(declare deepfapply)
+
+(defn- lst-fapply
+  ([fs m]
+   (apply list
+     ;; converts to fs to symbols
+     (mapcat #(map (partial deepfapply (eval %)) m) fs)))
+  ([fs m ms]
+    (apply list
+      (mapcat #(apply map (partial deepfapply (eval %)) m ms) fs))))
+
+(defn- seq-fapply
+  ([fs m]
+   (mapcat #(map (partial deepfapply %) m) fs))
+  ([fs m ms]
+   (mapcat #(apply map (partial deepfapply %) m ms) fs)))
+
+(defn- set-fapply
+  ([fs m]
+   (set
+     (mapcat #(map (partial deepfapply %) m) fs)))
+  ([fs m ms]
+   (set
+     (mapcat #(apply map (partial deepfapply %) m ms) fs))))
+
+(defn- vec-fapply
+  ([fs m]
+   (apply vector
+     (mapcat #(map (partial deepfapply %) m) fs)))
+  ([fs m ms]
+   (apply vector
+     (mapcat #(apply map (partial deepfapply %) m ms) fs))))
+
+(defn- group-keys [ms k]
+  (vals (map #(find % k) ms)))
+
+(defn- assc-fapply
+  ([fs m]
+   (reduce-kv (fn [acc fk f]
+                (if-let [[_ mv] (find m fk)]
+                  (assoc acc fk (deepfapply f mv))
+                  acc))
+     m fs))
+  ([fs m ms]
+   (let [mcoll (cons m ms)]
+     (reduce-kv (fn [acc fk f]
+                  ;; find all the matching keys in mcoll
+                  (when-let [vals (group-keys mcoll fk)]
+                    (assoc acc fk
+                      ;; eval the nested maps and bind them to the output
+                      (apply (partial deepfapply f) vals))))
+       m fs))))
+
+(defn deepfapply
+  "Similar to fapply but recursively evaluates all the arguments"
+  ([f]
+   (fn [m & ms]
+     (if ms
+       (deepfapply f m ms)
+       (deepfapply f m))))
+  ([fs m]
+   (cond
+     ;; map the fn for sequential/set types
+     (list? fs) (lst-fapply fs m)
+     (seq? fs) (seq-fapply fs m)
+     (vector? fs) (vec-fapply fs m)
+     (set? fs) (set-fapply fs m)
+     ;; match keys for maps and if found apply the fn (otherwise
+     ;;  just leave it)
+     (map? fs) (assc-fapply fs m)
+     ;; base cases:
+     ;; either use the fn
+     (fn? fs) (fs m)
+     :else
+     ;; or wrap list atoms in a constantly
+     ((constantly fs) m)))
+  ([fs m & ms]
+   (let [mcoll (cons m ms)]
+     (cond
+       ;; mapcat all the results for sequential/set types
+       (list? fs) (lst-fapply fs m ms)
+       (seq? fs) (seq-fapply fs m ms)
+       (vector? fs) (vec-fapply fs m ms)
+       (set? fs) (set-fapply fs m ms)
+       ;; match all keys for maps and apply the fn if ther was a match
+       (map? fs) (assc-fapply fs m ms)
+       ;; apply the fn to the args
+       (fn? fs) (apply fs mcoll)
+       :else
+       ;; list atoms should be constants
+       (map (constantly fs) mcoll)))))
+
+(def <-*>
+  "An alias for deepfapply"
+  deepfapply)
+
+
+(declare pure)
+
+(defn- coll-pure [t v]
+  (into (empty t)
+    (if (empty? t)
+      (conj t v)
+      (for [branch (map identity t)]
+        (if  (not (coll? branch))
+          v
+          (pure branch v))))))
+
+(defn- map-pure [t v]
+  (into (empty t)
+    (if (empty? t)
+      (assoc t nil v)
+      (map (fn [[k val :as branch]]
+             (if-not (coll? branch)
+               (into (empty t) [[k v]])
+               (into (empty t) [[k (pure val v)]])))
+        t))))
+
+(defn deeppure
+  "This is a recursive version of pure. It will replace all values in
+   the given type with val. All keys on maps will be preserved."
+  ([m]
+   (fn [value]
+     (pure m value)))
+  ([m value]
+   (cond
+     (map? m) (map-pure m value)
+     (coll? m) (coll-pure m value)
+     :else
+     value)))


Add optimizely script to inner site (#1803)

--- src/frontend/stefon.clj
+++ src/frontend/stefon.clj
@@ -6,6 +6,8 @@
                       :url "https://js.pusher.com/2.2/pusher.min.js"}
                      {:path "js/hosted/elevio.js"
                       :url "https://static.elev.io/js/v3.js"}
+                     {:path "js/hosted/optimizely.js"
+                      :url "https://cdn.optimizely.com/js/8188917468.js"}
                      {:path "js/hosted/segment-mAJ9W2SwLHgmJtFkpaXWCbwEeNk9D8CZ.js"
                       :url "https://cdn.segment.com/analytics.js/v1/mAJ9W2SwLHgmJtFkpaXWCbwEeNk9D8CZ/analytics.min.js"}
                      {:path "js/hosted/segment-AbgkrgN4cbRhAVEwlzMkHbwvrXnxHh35.js"


Ensure watcher runs pipeline at least once

--- boot/core/src/boot/task/built_in.clj
+++ boot/core/src/boot/task/built_in.clj
@@ -143,6 +143,7 @@
             return  (atom fileset)
             srcdirs (map (memfn getPath) (core/user-dirs fileset))
             watcher (apply file/watcher! :time srcdirs)]
+        (.offer q (System/currentTimeMillis))
         (add-watch core/last-file-change k #(.offer q %4))
         (core/cleanup (remove-watch core/last-file-change k))
         (when-not quiet (util/info "Starting file watcher (CTRL-C to quit)...\n\n"))


Add set of regexes for push task

Add set of regexes for push task

--- boot/core/src/boot/task/built_in.clj
+++ boot/core/src/boot/task/built_in.clj
@@ -635,19 +635,20 @@
   look for jar files created by the build pipeline. The jar file(s) must contain
   pom.xml entries."

-  [f file PATH            str  "The jar file to deploy."
-   g gpg-sign             bool "Sign jar using GPG private key."
-   k gpg-user-id NAME     str  "The name used to find the GPG key."
-   K gpg-keyring PATH     str  "The path to secring.gpg file to use for signing."
-   p gpg-passphrase PASS  str  "The passphrase to unlock GPG signing key."
-   r repo ALIAS           str  "The alias of the deploy repository."
-   t tag                  bool "Create git tag for this version."
-   B ensure-branch BRANCH str  "The required current git branch."
-   C ensure-clean         bool "Ensure that the project git repo is clean."
-   R ensure-release       bool "Ensure that the current version is not a snapshot."
-   S ensure-snapshot      bool "Ensure that the current version is a snapshot."
-   T ensure-tag TAG       str  "The SHA1 of the commit the pom's scm tag must contain."
-   V ensure-version VER   str  "The version the jar's pom must contain."]
+  [f file PATH            str      "The jar file to deploy."
+   F file-regex MATCH     #{regex} "The set of regexes of paths to deploy."
+   g gpg-sign             bool     "Sign jar using GPG private key."
+   k gpg-user-id NAME     str      "The name used to find the GPG key."
+   K gpg-keyring PATH     str      "The path to secring.gpg file to use for signing."
+   p gpg-passphrase PASS  str      "The passphrase to unlock GPG signing key."
+   r repo ALIAS           str      "The alias of the deploy repository."
+   t tag                  bool     "Create git tag for this version."
+   B ensure-branch BRANCH str      "The required current git branch."
+   C ensure-clean         bool     "Ensure that the project git repo is clean."
+   R ensure-release       bool     "Ensure that the current version is not a snapshot."
+   S ensure-snapshot      bool     "Ensure that the current version is a snapshot."
+   T ensure-tag TAG       str      "The SHA1 of the commit the pom's scm tag must contain."
+   V ensure-version VER   str      "The version the jar's pom must contain."]

   (let [tgt (core/tmp-dir!)]
     (core/with-pre-wrap fileset
@@ -656,6 +657,7 @@
         (let [jarfiles (or (and file [(io/file file)])
                            (->> (core/output-files fileset)
                                 (core/by-ext [".jar"])
+                                ((if (seq file-regex) #(core/by-re file-regex %) identity))
                                 (map core/tmp-file)))
               repo-map (->> (core/get-env :repositories) (into {}))
               r        (get repo-map repo)]


Disable twitter integration for now

Disable twitter integration for now

--- src/demogorgon/nh.clj
+++ src/demogorgon/nh.clj
@@ -287,28 +287,29 @@
                                   (:deathlev data)
                                   (:death data)))
                         (possessive-gender (:gender data))
-                        (:points data))
-            tweet-prefix (truncate (format "%s (%s %s %s %s), %s points, %s turns, %s"
-                                           (:name data)
-                                           (:role data)
-                                           (:race data)
-                                           (:gender data)
-                                           (:align data)
-                                           (:points data)
-                                           (:turns data)
-                                           (:death data))
-                                   120)
-            url (twitter/shorten-url (format "http://un.nethack.nu/user/%s/dumps/%s.%s.txt.html"
-                                             (:name data)
-                                             (:name data)
-                                             (:endtime data)))
-            final-tweet (str tweet-prefix ", " url)]
+                        (:points data))]
         (if (= (:region data) announce-region)
-          (announce irc out))
-        (try
-         (twitter/tweet final-tweet)
-         (catch Exception e
-           (.error logger "tweet failed" e)))))))
+          (announce irc out))))))
+
+        ;; (try
+        ;;  (twitter/tweet final-tweet)
+        ;;  (catch Exception e
+        ;;    (.error logger "tweet failed" e)))))))
+        ;;     tweet-prefix (truncate (format "%s (%s %s %s %s), %s points, %s turns, %s"
+        ;;                                    (:name data)
+        ;;                                    (:role data)
+        ;;                                    (:race data)
+        ;;                                    (:gender data)
+        ;;                                    (:align data)
+        ;;                                    (:points data)
+        ;;                                    (:turns data)
+        ;;                                    (:death data))
+        ;;                            120)
+        ;;     url (twitter/shorten-url (format "http://un.nethack.nu/user/%s/dumps/%s.%s.txt.html"
+        ;;                                      (:name data)
+        ;;                                      (:name data)
+        ;;                                      (:endtime data)))
+        ;;     final-tweet (str tweet-prefix ", " url)]

 (defn make-game-action-out [data]
   (condp = (:game_action data)


change to filter function

change to filter function

--- src/cljs/early_vote_site/election_detail/events.cljs
+++ src/cljs/early_vote_site/election_detail/events.cljs
@@ -62,9 +62,8 @@
                 :on-failure        [:get-early-vote-site-list/failure]}})

 (defn filter-early-vote-site-list
-  [{:keys [db]} [_ filter-type value]]
-  {:db (assoc-in db [:election-detail filter-type] value)
-   :dispatch-n []})
+  [db [_ filter-type value]]
+  (assoc-in db [:election-detail filter-type] value))

 (defn early-vote-site-json->clj
   [json]
@@ -139,11 +138,11 @@
 (def events
   {:db {:get-election/success get-election-success
         :get-early-vote-site-list/success get-early-vote-site-list-success
-        :early-vote-site/initiate-delete initiate-delete}
+        :early-vote-site/initiate-delete initiate-delete
+        :early-vote-site-list/filter filter-early-vote-site-list}
    :fx {:navigate/election-detail navigate
         :election-detail/get get-election-detail
         :early-vote-site-list/get get-early-vote-site-list
-        :early-vote-site-list/filter filter-early-vote-site-list
         :early-vote-site/delete delete-early-vote-site
         :early-vote-site-delete/success early-vote-site-delete-success
         :early-vote-site/duplicate duplicate-early-vote-site


Makes inline result address more specific to fix #1213 LightTable/Clojure#32

--- src/lt/objs/eval.cljs
+++ src/lt/objs/eval.cljs
@@ -303,13 +303,14 @@
                       (let [ed (:ed @this)
                             type (or (:type opts) :inline)
                             line (ed/line-handle ed (:line loc))
+                            ch (:ch loc)
                             res-obj (object/create ::inline-result {:ed this
                                                                     :class (name type)
                                                                     :opts opts
                                                                     :result res
                                                                     :loc loc
                                                                     :line line})]
-                        (when-let [prev (get (@this :widgets) [line type])]
+                        (when-let [prev (get (@this :widgets) [line ch type])]
                           (when (:open @prev)
                             (object/merge! res-obj {:open true}))
                           (object/raise prev :clear!))
@@ -317,7 +318,7 @@
                           (doseq [widget (map #(get (@this :widgets) [(ed/line-handle ed %) type]) (range (:start-line loc) (:line loc)))
                                   :when widget]
                             (object/raise widget :clear!)))
-                        (object/update! this [:widgets] assoc [line type] res-obj))))
+                        (object/update! this [:widgets] assoc [line ch type] res-obj))))

 ;;****************************************************
 ;; underline result
@@ -478,8 +479,10 @@
               :desc "Eval: Clear inline results"
               :exec (fn []
                       (when-let [ed (pool/last-active)]
-                        (doseq [[_ w] (:widgets @ed)]
-                          (object/raise w :clear!))))})
+                        (let [widgets (:widgets @ed)]
+                          (object/merge! ed {:widgets {}})
+                          (doseq [[_ w] widgets]
+                            (object/raise w :clear!)))))})

 (cmd/command {:command :eval-editor
               :desc "Eval: Eval editor contents"


Refactor some more partition code.

Refactor some more partition code.

--- src/merkle_db/partition.clj
+++ src/merkle_db/partition.clj
@@ -268,36 +268,44 @@
         [result records]))))

-(defn- join-last-part
+(defn- patch-records
+  "Apply changes to the given partition, combining with any pending records to
+  produce a sequence of new partitions and any newly pending records."
+  [store params pending part changes]
+  (let [emit-threshold (+ (max-limit params) (min-limit params))
+        records (read-all store part nil)
+        records' (concat pending (patch/patch-seq changes records))]
+    (cond
+      ; All data was removed from the partition.
+      (empty? records')
+        nil
+      ; Original partition data was unchanged by updates.
+      (= records records')
+        [[part] nil]
+      ; Accumulated enough records to output full partitions.
+      (<= emit-threshold (count records'))
+        (emit-parts store params emit-threshold records')
+      ; Not enough data to output a partition yet, keep pending.
+      :else
+        [nil records'])))
+
+
+(defn- merge-into
   "Combines a non-empty vector of partitions and some trailing records to
-  produce a valid final sequence of partitions. Returns the updated sequence."
+  produce a valid final sequence of partitions. Returns a result tuple with the
+  updated sequence of partitions, or records if underflowing."
   [store params parts pending]
-  (->> pending
-       (concat (read-all store (peek parts) nil))
-       (partition-records store params)
-       (into (pop parts))))
-
-
-(defn- flush-updates
-  "Finalize an update by ensuring any remaining pending records are emitted.
-  Returns a height 0 result tuple with serialized partition data, or a -1
-  result with records if not enough are left."
-  [store params result pending]
-  (cond
-    ; No pending data to handle, we're done.
-    (empty? pending)
-      (when (seq result)
-        [0 result])
-
-    ; Not enough records left to create a valid partition!
-    (< (count pending) (min-limit params))
-      (if (empty? result)
-        [-1 pending]
-        [0 (join-last-part store params result pending)])
-
-    ; Enough records to make one or more valid partitions.
-    :else
-      [0 (into result (partition-records store params pending))]))
+  (loop [parts (vec parts)
+         pending pending]
+    (if (<= (min-limit params) (count pending))
+      ; Enough records to make at least one valid partition.
+      [0 (into parts (partition-records store params pending))]
+      ; Need more records to form a partition.
+      (if (seq parts)
+        ; Join records from the last partition into pending.
+        (recur (pop parts) (concat (read-all store (peek parts) nil) pending))
+        ; No more partitions to join, return records result.
+        [-1 pending]))))

 (defn update-partitions!
@@ -316,54 +324,28 @@
     (throw (IllegalArgumentException.
              (str "Cannot carry index subtrees into a partition update: "
                   (pr-str carry)))))
-  (let [emit-threshold (+ (max-limit params) (min-limit params))]
-    (loop [outputs (if (and carry (zero? (first carry)))
-                     (vec (second carry))
-                     [])
-           pending (when (and carry (neg? (first carry)))
-                     (vec (second carry)))
-           inputs inputs]
-      (if (seq inputs)
-        ; Process next partition in the sequence.
-        (let [[part changes] (first inputs)]
-          (if (and (nil? pending) (empty? changes))
-            ; No pending records or changes, so use "pass through" logic.
-            (recur (conj outputs part) nil (next inputs))
-
-            ; Load partition data or use pending records.
-            (let [records (read-all store part nil)
-                  records' (concat pending (patch/patch-seq changes records))]
-              (cond
-                ; All data was removed from the partition.
-                (empty? records')
-                  (recur outputs nil (next inputs))
-
-                ; Original partition data was unchanged by updates.
-                (= records records')
-                  (recur (conj outputs part) nil (next inputs))
-
-                ; Accumulated enough records to output full partitions.
-                (<= emit-threshold (count records'))
-                  (let [[parts pending] (emit-parts store params emit-threshold records')]
-                    (recur (into outputs parts) pending (next inputs)))
-
-                ; Not enough data to output a partition yet, keep pending.
-                :else
-                  (recur outputs records' (next inputs))))))
-
-        ; No more partitions to process.
-        (flush-updates store params outputs pending)))))
-
-
-; TODO: needed?
-(defn update-root!
-  "Apply changes to a partition root node, returning a sequence of
-  updated partitions."
-  [store params part changes]
-  (let [result (update-partitions! store params [[part changes]])]
-    (if (neg? (first result))
-      [0 [(from-records store params (second result))]]
-      result)))
+  (loop [outputs (if (and carry (zero? (first carry)))
+                   (vec (second carry))
+                   [])
+         pending (when (and carry (neg? (first carry)))
+                   (vec (second carry)))
+         inputs inputs]
+    (if (seq inputs)
+      ; Process next partition in the sequence.
+      (let [[part changes] (first inputs)]
+        (if (and (nil? pending) (empty? changes))
+          ; No pending records or changes, so use "pass through" logic.
+          (recur (conj outputs part) nil (next inputs))
+          ; Load partition data or use pending records.
+          (let [[parts pending] (patch-records store params pending part changes)]
+            (recur (into outputs parts) pending (next inputs)))))
+      ; No more partitions to process.
+      (if (empty? pending)
+        ; No pending data to handle, we're done.
+        (when (seq outputs)
+          [0 outputs])
+        ; Merge loose records backward into partitions.
+        (merge-into store params outputs pending)))))

 (defn carry-back
@@ -375,7 +357,7 @@
       parts

     (neg? (first carry))
-      (join-last-part store params parts carry)
+      (merge-into store params parts (second carry))

     (zero? (first carry))
       (conj (vec parts) carry)


Converted macro container-checker into container-check-maker fn.

--- src/midje/util/checkers.clj
+++ src/midje/util/checkers.clj
@@ -82,7 +82,13 @@

 (defn tag-as-chatty-falsehood [value]
   (with-meta value {:midje/chatty-checker-falsehood true}))
+
+(defn- tag-as-checker [function]
+  (vary-meta function merge {:midje/checker true}))

+(defn tag-as-chatty-checker [function]
+  (tag-as-checker (vary-meta function merge {:midje/chatty-checker true})))
+
 (defn chatty-falsehood-to-map [value]
   (with-meta value {}))

@@ -116,14 +122,14 @@
   [ [binding-var] [function & arglist] ]
   (let [result-symbol (gensym "chatty-intermediate-results-")
         [complex-forms substituted-arglist] (chatty-untease result-symbol arglist)]
-    `(with-meta (fn [~binding-var]
-                  (let [~result-symbol (vector ~@complex-forms)]
-                    (if (~function ~@substituted-arglist)
-                      true
-                      (let [pairs# (map vector '~complex-forms ~result-symbol)]
-                        (tag-as-chatty-falsehood {:actual ~binding-var,
-                                                  :intermediate-results pairs#})))))
-       {:midje/chatty-checker true, :midje/checker true})))
+    `(tag-as-chatty-checker
+      (fn [~binding-var]
+        (let [~result-symbol (vector ~@complex-forms)]
+          (if (~function ~@substituted-arglist)
+            true
+            (let [pairs# (map vector '~complex-forms ~result-symbol)]
+              (tag-as-chatty-falsehood {:actual ~binding-var,
+                                        :intermediate-results pairs#}))))))))

  ;;Concerning Throwables
@@ -347,32 +353,36 @@
                    starting-candidate)))))

 -;;
-
-(defn compatibility-failure [actual expected kind]
+;; Initial argument processing
+
+(defn compatibility-check [actual expected kind]
+  "Fling an error of the combination of actual, expected, and kind won't work."
+  ;; Throwing Errors is just an implementation convenience.
   (cond (regex? expected)
-	(and (not (sequential? actual))
-	     (not (empty? kind))
-	     (noted-falsehood (str "I don't know how to make sense of a "
-				   "regular expression applied "
-				   kind ".")))
+	(cond (and (not (sequential? actual))
+		   (not (empty? kind)))
+	      (throw (Error. (str "I don't know how to make sense of a "
+				  "regular expression applied "
+				  kind "."))))

 	(not (collection-like? actual))
-	(noted-falsehood (format "You can't compare %s (%s) to %s (%s)."
-				 (pr-str actual) (type actual)
-				 (pr-str expected) (type expected)))
+	(throw (Error. (str "You can't compare " (pr-str actual) " (" (type actual)
+			    ") to " (pr-str expected) " (" (type expected) ").")))

 	(and (map? actual)
 	     (not (map? expected)))
-	(try (into {} expected) nil
+	(try (into {} expected)
 	     (catch Throwable ex
-	       (format "If %s is a map, %s should look like map entries."
-		       (pr-str actual) (pr-str expected))))))
+	       (throw (Error. (str "If " (pr-str actual) " is a map, "
+				   (pr-str expected)
+				   " should look like map entries.")))))))
+

 (defn- standardized-arguments [actual expected kind]
   "Reduce arguments to standard forms so there are fewer combinations to
-   consider."
-
+   consider. Also blow up for some incompatible forms."
+
+  (compatibility-check actual expected kind)
   (cond (sequential? actual)
 	(cond (set? expected)
 	      [actual (vec expected) (union kind #{:in-any-order})]
@@ -511,26 +521,18 @@

 ;; The interface

-(defmacro- container-checker [name checker-fn]
-  `(with-meta
-     (fn [expected# & kind#]
-       (vary-meta
-         (named '~name expected#
-                (fn [actual#]
-                  ;; (prn "checking" actual# expected# kind#)
-                  (add-actual actual#
-			      (if (chatty-checker-falsehood?
-				   (compatibility-failure actual# expected# kind#))
-				(compatibility-failure actual# expected# kind#)
-				(try (~checker-fn actual# expected# kind#)
-				     (catch Error ex#
-				       (tag-as-chatty-falsehood {
-								 :notes [(.getMessage ex#)]}))))))
-		merge
-		{:midje/chatty-checker true, :midje/checker true}))
-       {:midje/checker true})))
-
-(def contains (container-checker contains
+(defn- container-checker-maker [name checker-fn]
+  (tag-as-checker
+   (fn [expected & kind]
+      (tag-as-chatty-checker
+       (named name expected
+              (fn [actual]
+                (add-actual actual
+                            (try (checker-fn actual expected kind)
+                                 (catch Error ex
+                                   (noted-falsehood (.getMessage ex)))))))))))
+
+(def contains (container-checker-maker 'contains
     (fn [actual expected kind]
       (let [ [actual expected kind] (standardized-arguments actual expected kind)]
         (cond (regex? expected)
@@ -539,7 +541,7 @@
               :else
               (apply actual-x-contains? [actual expected kind]))))))

-(def just (container-checker just
+(def just (container-checker-maker 'just
     (fn [actual expected kind]
       (let [ [actual expected kind] (standardized-arguments actual expected kind)]
         (cond (regex? expected)
@@ -585,10 +587,10 @@
                                  (cl-format nil " of size ~R." (count expected)))]}))))))

 (def has-prefix
-     (container-checker has-prefix
+     (container-checker-maker 'has-prefix
       (has-xfix "prefix" #(re-pattern (str "^" (.toString %))) take)))
 (def has-suffix
-     (container-checker has-suffix
+     (container-checker-maker 'has-suffix
       (has-xfix "suffix" #(re-pattern (str (.toString %) "$" )) take-last)))

 (defn has [quantifier predicate]


Fixed typos in unit tests.

Fixed typos in unit tests.

--- test/com/lemondronor/turboshrimp/navdata_test.clj
+++ test/com/lemondronor/turboshrimp/navdata_test.clj
@@ -141,7 +141,7 @@
   (testing "which-option-type"
     (is (= (navdata/which-option-type 0) :demo))
     (is (= (navdata/which-option-type 16) :vision-detect))
-    (is (= (navdata/which-option-type 2342342)) nil))
+    (is (= (navdata/which-option-type 2342342) nil)))

   (testing "about parse-control-state"
     (testing "parse-control-state"
@@ -180,7 +180,7 @@
           (is (= (:type det) :vertical-deprecated))
           (is (= (:xc det) 1))
           (is (= (:yc det) 1))
-          (is (= (:width det)) 1)
+          (is (= (:width det) 1))
           (is (= (:height det) 1))
           (is (= (:dist det) 1))
           (is (= (:orientation-angle det) -1075.0))


Extract unknown type name into separate file

--- src/graphql_clj/validator/rules/known_type_names.clj
+++ src/graphql_clj/validator/rules/known_type_names.clj
@@ -7,10 +7,12 @@
 (defn- unknown-type-error [{:keys [type-name]} s]
   (format "Unknown type '%s'." type-name))

-(defnodevisitor unknown-type-name :pre :variable-definition
-  [{:keys [spec] :as n} s]
+(defn- unknown-type-name* [{:keys [spec] :as n} s]
   (when-not (s/get-spec spec)
     {:state (ve/update-errors s (unknown-type-error n s))
      :break true}))

+(defnodevisitor unknown-type-name :pre :variable-definition [n s]
+  (unknown-type-name* n s))
+
 (def rules [unknown-type-name])


CMR-5201: Updated tests for binary size estimate.

--- dev-resources/src/user.clj
+++ dev-resources/src/user.clj
@@ -15,4 +15,4 @@
    [cmr.opendap.dev :as dev]
    [org.httpkit.client :as httpc]))

-(logger/set-level! '[cmr org.httpkit] :trace logger/no-color-log-formatter)
+(logger/set-level! '[cmr org.httpkit] :debug logger/no-color-log-formatter)


Add meadow connecting logic; parameterize cost fn and dist fn

--- src/main/cljc/clojure_club/meadow_finder/mgrimm.cljc
+++ src/main/cljc/clojure_club/meadow_finder/mgrimm.cljc
@@ -4,6 +4,15 @@
     [clojure.pprint :as pp]
     [clojure.set :as set]
     [clojure-club.meadow-finder.core :as mc]))
+
+(def inf #?(:clj Double/POSITIVE_INFINITY, :cljs +Infinity))
+
+(defn manhattan [[y1 x1] [y2 x2]]
+  (+ (Math/abs (- y1 y2)) (Math/abs (- x1 x2))))
+
+(defn euclid [[y1 x1] [y2 x2]]
+  (Math/sqrt (+ (Math/pow (Math/abs (- x1 x2)) 2)
+                (Math/pow (Math/abs (- y1 y2)) 2))))

 (defn neighbors [[y x]]
   (let [ys ((juxt dec identity inc identity) y)
@@ -31,7 +40,7 @@
     (let [m (meadow-from cave coord)]
       [(conj meadows m) coords])))

-(defn meadows [cave]
+(defn find-meadows [cave]
   (let [h (count cave), w (count (first cave))]
     (->> [[] (for [y (range h), x (range w) :when (= \space (get-in cave [y x]))] [y x])]
          (iterate (partial step-cave cave))
@@ -41,57 +50,56 @@

 ;; Path finding ----------------------------------------------------------------

-(def inf #?(:clj Double/POSITIVE_INFINITY, :cljs +Infinity))
-(def cost
-  {nil    inf
-   \space inf
-   \^     10
-   \#     1})
-
-(defn manhattan [[y1 x1] [y2 x2]]
-  (+ (Math/abs (- y1 y2)) (Math/abs (- x1 x2))))
-
-(defn a* [{:keys [cave open closed] :as state}]
+(defn a* [cost-fn dist-fn {:keys [cave open closed] :as state}]
   (when-let [node (ffirst open)]
     (reduce
       (fn [{:keys [goal score] :as m} neighbor]
-        (let [new-score (+ (score node) (cost (get-in cave node)))]
+        (let [new-score (+ (score node) (or (cost-fn (get-in cave node)) inf))]
           (cond-> m
             (< new-score (or (score neighbor) inf))
-            (-> (update :open assoc neighbor (+ new-score (manhattan neighbor goal)))
+            (-> (update :open assoc neighbor (+ new-score (dist-fn neighbor goal)))
                 (update :paths assoc neighbor node)
                 (update :score assoc neighbor new-score)))))
       (-> state (update :open dissoc node) (update :closed conj node))
       (filter (complement closed) (neighbors node)))))

-(defn find-path [cave start goal]
-  (letfn [(path [node paths] (reverse (take-while identity (iterate paths node))))]
-    (->> {:cave cave
-          :goal goal
-          :open (priority-map start (manhattan start goal))
-          :closed #{}
-          :paths {}
-          :score {start 0}}
-         (iterate a*)
-         (drop-while (comp seq :open))
-         first
-         :paths
-         (path goal))))
+(defn find-path [cave start goal & [opts]]
+  (let [{:keys [cost-fn dist-fn] :or {cost-fn (constantly 1), dist-fn manhattan}} opts]
+    (letfn [(path [node paths] (reverse (take-while identity (iterate paths node))))]
+      (->> {:cave cave
+            :goal goal
+            :open (priority-map start (dist-fn start goal))
+            :closed #{}
+            :paths {}
+            :score {start 0}}
+        (iterate (partial a* cost-fn dist-fn))
+        (drop-while (comp seq :open))
+        first
+        :paths
+        (path goal)))))

-(defn annotate-path [cave path]
-  (let [dot \u00b7]
+(defn annotate-path [cave path & [opts]]
+  (let [{:keys [mark] :or {mark \u00b7}} opts]
     (reduce
       (fn [v [y x]]
         (let [pre (subs (v y) 0 x), post (subs (v y) (inc x))]
-          (assoc v y (apply str pre dot post))))
+          (assoc v y (apply str pre mark post))))
       cave path)))
+
+;; Meadow connecting -----------------------------------------------------------
+
+(defn find-routes [cave meadows]
+  (for [[m1 m2] (partition 2 1 meadows)
+        :let [c1 (rand-nth m1), c2 (rand-nth m2)]]
+    (find-path cave c1 c2 {:cost-fn {\space 1, \# 1}, :dist-fn euclid})))

 ;; -----------------------------------------------------------------------------

 ;; meadow finding tests
 #_
-(doseq [x (meadows mc/meadow-32x32x4)]
+(doseq [x (find-meadows mc/meadow-32x32x4)]
   (println x))
+

 ;; path finding tests
 (def expensive-cave
@@ -108,11 +116,19 @@
    "##############################"])

 #_
-(let [cave expensive-cave]
-  (doseq [x (annotate-path cave (find-path cave [0 15] [2 15]))]
+(let [cave expensive-cave2]
+  (doseq [x (annotate-path cave (find-path cave [0 15] [2 15] {:cost-fn {\# 1, \^ 10}}))]
     (println x)))

 #_
 (let [cave mc/meadow-32x32x4]
-  (doseq [x (annotate-path cave (find-path cave [0 0] [31 31]))]
+  (doseq [x (annotate-path cave (find-path cave [0 0] [31 31] {:cost-fn {\# 1, \^ 10}}))]
     (println x)))
+
+
+;; meadow connecting tests
+#_
+(let [cave mc/meadow-32x32x4
+      routes (find-routes cave (find-meadows cave))]
+  (doseq [x (annotate-path cave (apply concat routes) {:mark \space})]
+    (println x)))


Get also access property when loading boards list after org was created.

--- src/oc/storage/api/orgs.clj
+++ src/oc/storage/api/orgs.clj
@@ -408,7 +408,7 @@
                                   slug (:slug new-org)
                                   org-id (:uuid new-org)
                                   user-id (-> ctx :user :user-id)
-                                  boards (board-res/list-boards-by-org conn org-id [:created-at :updated-at :publisher-board])
+                                  boards (board-res/list-boards-by-org conn org-id [:created-at :updated-at :publisher-board :access])
                                   board-reps (map #(board-rep/render-board-for-collection slug % 0)
                                                 (map #(assoc % :access-level :author) boards))
                                   author-reps [(org-rep/render-author-for-collection new-org user-id :author)]


Clean up checker, split invariants

Clean up checker, split invariants

--- src/onyx_jepsen/checker.clj
+++ src/onyx_jepsen/checker.clj
@@ -4,6 +4,7 @@
             [onyx.system :as system]
             [onyx.log.zookeeper]
             [onyx.log.curator]
+            [clojure.stacktrace]
             [com.stuartsierra.component :as component]
             [onyx.log.replica :as replica]
             [clojure.core.async :as casync :refer [chan >!! <!! close! alts!!]]
@@ -32,62 +33,96 @@
 (defn pulses [conn peer-config]
   (onyx.log.curator/children conn (onyx.log.zookeeper/pulse-path (:onyx/id peer-config))))

-;;; TODO, check whether the jobs were even submitted, if not, nothing should be read back
-(defrecord Checker [peer-config n-peers]
+;; TODO, check whether the jobs were even submitted, if not, nothing should be read back
+;; important for short running tests
+(defrecord Checker [peer-config n-peers n-jobs]
   checker/Checker
   (check [checker test model history]
-    (let [ledger-reads (first (filter (fn [action]
-                                        (and (= (:f action) :read-ledgers)
-                                             (= (:type action) :ok)))
-                                      history))
+    (let [;;;;;;;;;
+          ;; Cluster invariants
           peer-log-reads (:value (first (filter (fn [action]
-                                                  (and (= (:f action) :read-peer-log)
-                                                       (= (:type action) :ok)))
-                                                history)))
+                                                            (and (= (:f action) :read-peer-log)
+                                                                 (= (:type action) :ok)))
+                                                          history)))
           final-replica (playback-log peer-config peer-log-reads)
           log-conn (:log (component/start (system/onyx-client peer-config)))
-          exception (if-let [killed-job (first (:killed-jobs final-replica))]
-                      (onyx.extensions/read-chunk log-conn :exception killed-job))
           all-peers-up? (= (count (:peers final-replica))
                            (* 5 n-peers))
           pulse-peers (pulses (:conn log-conn) peer-config)

           peers-match-pulses? (= (sort (map str (:peers final-replica)))
                                  (sort pulse-peers))
-          results (map (fn [lr]
-                         (map :value (:results lr)))
-                       (:value ledger-reads))
+
+          accepting-empty? (empty? (:accepted final-replica))
+          prepared-empty? (empty? (:prepared final-replica))
+
+          cluster-invariants {:all-peers-up? all-peers-up?
+                              :peers-match-pulses? peers-match-pulses?
+                              :accepting-empty? accepting-empty?
+                              :prepared-empty? prepared-empty?}
+
+          ;;;;;;;;;
+          ;; Job invariants
+
+          exception (if-let [killed-job (first (:killed-jobs final-replica))]
+                      (onyx.extensions/read-chunk log-conn :exception killed-job))
+
+          ledger-reads (first (filter (fn [action]
+                                        (and (= (:f action) :read-ledgers)
+                                             (= (:type action) :ok)))
+                                      history))
+
+
+          ledger-read-results (->> ledger-reads
+                                   :value
+                                   (mapcat (fn [[job-num reads]]
+                                             (map (fn [r]
+                                                    {:job-num job-num
+                                                     :read-results (:results r)})
+                                                  reads))))
+
+          ;; Add a check here that there are no overlaps in the ledgers read by the jobs
+          reads-correct-jobs? (empty?
+                                (remove (fn [{:keys [read-results job-num]}]
+                                          (or (empty? read-results)
+                                              (= #{job-num} (set (map :job-num read-results)))))
+                                        ledger-read-results))
+
           successfully-added (filter (fn [action]
                                        (and (= (:f action) :add)
                                             (= (:type action) :ok)))
                                      history)
+
           added-values (set (map :value successfully-added))
-          read-values (reduce into #{} results)
+
+          read-values (->> ledger-read-results
+                           (mapcat :read-results)
+                           (map :value)
+                           set)
+
           diff-written-read (clojure.set/difference added-values read-values)
           all-written-read? (empty? diff-written-read)

-          accepting-empty? (empty? (:accepted final-replica))
-          prepared-empty? (empty? (:prepared final-replica))
-
           ;; Check that all values at the output went through the second task first
-          all-stage-2 (set (mapcat (fn [lr]
-                                     (map :stage (:results lr)))
+          all-job-set (set (mapcat (fn [lr]
+                                     (map :job-num (:results lr)))
                                    (:value ledger-reads)))
-          all-through-intermediate? (= all-stage-2 #{2})
-          unacked-writes-read (clojure.set/difference read-values added-values)]
-      (doto {:valid? (and all-written-read? all-peers-up? accepting-empty? prepared-empty? peers-match-pulses?)
-             :peers-match-pulses? peers-match-pulses?
-             :pulse-peers pulse-peers
-             :peer-log peer-log-reads
-             :accepted-empty? accepting-empty?
-             :prepared-empty? prepared-empty?
-             :final-replica final-replica
-             :added added-values
-             :job-exception-cause (some-> exception (.getCause))
-             :job-exception-trace (some-> exception (.getStackTrace))
-             :read-values read-values
-             :diff-written-read diff-written-read
-             :unacknowledged-writes-read unacked-writes-read
-             :all-peers-up? all-peers-up?
-             :all-written-read? all-written-read?}
+          all-through-intermediate? (= all-job-set (set (range 0 n-jobs)))
+          unacked-writes-read (clojure.set/difference read-values added-values)
+          job-invariants {:job-completed? (nil? exception)
+                          :reads-correct-jobs? reads-correct-jobs?
+                          :all-written-read? all-written-read?}
+          invariants [job-invariants cluster-invariants]]
+      (doto {:valid? (empty? (filter false? (apply concat (map vals invariants))))
+             :job-invariants job-invariants
+             :cluster-invariants cluster-invariants
+             :run-information {:added added-values
+                               :read-values read-values
+                               :diff-written-read diff-written-read
+                               :unacknowledged-writes-read unacked-writes-read
+                               :job-exception-message (some-> exception (.getMessage))
+                               :job-exception-trace (if exception (with-out-str (clojure.stacktrace/print-stack-trace exception)))
+                               :pulse-peers pulse-peers
+                               :peer-log peer-log-reads
+                               :final-replica final-replica}}
         info))))


load_all.clj: added uploadpages

load_all.clj: added uploadpages

--- src/org/altlaw/load_all.clj
+++ src/org/altlaw/load_all.clj
@@ -16,6 +16,7 @@
    org.altlaw.jobs.procfiles.ohm1-map
    org.altlaw.jobs.procfiles.profed
    org.altlaw.jobs.procfiles.profed-map
+   org.altlaw.jobs.uploadpages

    org.altlaw.test.run
    org.altlaw.test.www
@@ -30,6 +31,7 @@
    org.altlaw.util.lucene
    org.altlaw.util.markdown
    org.altlaw.util.solr
+   org.altlaw.util.s3
    org.altlaw.util.zip

    org.altlaw.www.render