        (cs/split-lines)
        (filter #(pos? (count %)))
        (pmap json/read-json)))
+
+(defn open-log-kopet
+  [fname]
+  (->> (str dir-kopet fname)
+       (slurp)
+       (cs/split-lines)
+       (filter #(pos? (count %)))
+       (pmap json/read-json)))
+
+(defn open-file
+  [fname]
+  (->> (str "resources/relevant/" fname ".edn")
+       slurp read-string))
 
 (defonce cdb (-> {:bucket "znetroyalty"
                   :uris   ["http://127.0.0.1:8091/pools"]}

            (cc/get-json cdb (keyword (:key (cbkey "content" id)))
                         (merge from-db v))
            (cc/get-json cdb (keyword (:key (cbkey "content" id)))
                         (merge v {:ctype "content"
                                   :tutors []
                                   :hits {}}))))
        (println (:id v))
        (recur vs)))))








(defn user->member
  [fname]
  (let [raw (read-string (slurp "resources/avi-data.edn"))
        mapping (read-string (slurp "resources/lala.edn"))
        sraw (set (keys raw))]
    (loop [[[k v] & xs] (seq mapping) res {} i 0]
      (if k
        (do (when (== 0 (rem i 10000))
              (println i))
            (recur xs (merge res {(first (keep sraw k)) v}) (inc i)))
        (do (spit (str "resources/" fname ".edn") res)
            (take 20 res))))))

