Skip to content

Instantly share code, notes, and snippets.

16-05-24 18:46:14 ip-172-31-33-208 INFO [thumbucket.utils.zip:18] - START ZIP WITH CMD: zip /tmp/20160523_BANDIER_SELF_JS_TS_16233.zip -r /tmp/1464115566841_20160523_BANDIER_SELF_JS_TS_16233/BFA_16233_2026567.jpg /tmp/1464115566841_20160523_BANDIER_SELF_JS_TS_16233/BFA_16233_2026568.jpg /tmp/1464115566841_20160523_BANDIER_SELF_JS_TS_16233/BFA_16233_2026569.jpg /tmp/1464115566841_20160523_BANDIER_SELF_JS_TS_16233/BFA_16233_2026570.jpg /tmp/1464115566841_20160523_BANDIER_SELF_JS_TS_16233/BFA_16233_2026571.jpg /tmp/1464115566841_20160523_BANDIER_SELF_JS_TS_16233/BFA_16233_2026572.jpg /tmp/1464115566841_20160523_BANDIER_SELF_JS_TS_16233/BFA_16233_2026573.jpg /tmp/1464115566841_20160523_BANDIER_SELF_JS_TS_16233/BFA_16233_2026574.jpg /tmp/1464115566841_20160523_BANDIER_SELF_JS_TS_16233/BFA_16233_2026575.jpg /tmp/1464115566841_20160523_BANDIER_SELF_JS_TS_16233/BFA_16233_2026576.jpg /tmp/1464115566841_20160523_BANDIER_SELF_JS_TS_16233/BFA_16233_2026577.jpg /tmp/1464115566841_20160523_BANDIER_SELF_JS_TS_16233/BFA_16
{"status":"ok","tags":[{"x":"0.57","y":"0.28","product":{"name":"Sherpa Vest","image":"https://d1bntizjlw65va.cloudfront.net/857d35687a2833a7bf174030d27d69c21b04f042.jpg","currency":"$","price":"225","brand":"Alala","brand_url":"http://www.pradux.com/brands/alala","url":"http://www.pradux.com/products/alala-sherpa-vest?rt=user\u0026r=8881","buy_url":"//www.pradux.com/go/0/u8881/0/50631/http%3A%2F%2Fwww.carbon38.com%2Fproduct%2Fsherpa-vest-black.html%3Fint_source%3Dalala%26int_block%3Dgrid-2%26int_version%3D0"},"photo":{"url":"http://www.pradux.com/photos/16218","image_url":"https://d1i5hut471lhig.cloudfront.net/f9fa0c4995b46680ecb8d0824ca9bc7358d9c8cb.jpg","title":"BFA’s Photo","description":"Check out products in this photo, including MICHI Melano Sweatshirt, Koral Activewear Forge Legging, and Alala Sherpa Vest."}},{"x":"0.46","y":"0.38","product":{"name":"Melano Sweatshirt","image":"https://d1bntizjlw65va.cloudfront.net/eb31c974b3942ff8edee006e3702ea135cfea8fb.jpg","currency":"$","price":"195","brand":"MIC
(def struct [{:img "foo3" :id 3}
{:img "foo2" :id 2}
{:img "foo" :id 1}])
(defn change-struct [input]
{:a1 (map :img input)
:a2 (map :id input)})
(=
(def struct [{:img "foo3" :id 3}
{:img "foo2" :id 2}
{:img "foo" :id 1}])
(defn change-struct [input]
(println input)
(reduce (fn [memo {:keys [img id]}]
(conj memo [[img] [id]] )
) [] input))
(def struct [{:img "foo3" :id 3}
{:img "foo2" :id 2}
{:img "foo" :id 1}])
(defn change-struct [input]
(println input)
(reduce (fn [memo {:keys [img id]}]
(conj memo [img] [id])
) [] input))
(defproject rtest "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[ring-server "0.4.0"]
[reagent "0.5.1"
:exclusions [org.clojure/tools.reader]]
def source_available_metrics
{
"friends" => {'cumulative'=>true, 'name'=>"Friends", 'primary'=>'true'},
"likes" => {'cumulative'=>false, 'name'=>"Likes Count", "item_metric"=>"posts"},
"posts" => {'cumulative'=>false, 'name'=>"Posts", 'primary'=>'true', 'has_many'=>['comments']},
"comments" => {'cumulative'=>false, 'name'=>"Comments", 'primary'=>'true'},
"post_comment_count" => {'cumulative'=>false, 'name'=>"Post Comments", "item_metric"=>"posts"}
}
end
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "correlate32_empty_v1"
Nerd-Machine:modern-cljs jdkealy$ lein trampoline cljsbuild repl-listen
Running ClojureScript REPL, listening on port 9000.
To quit, type: :cljs/quit
ClojureScript:cljs.user> (in-ns 'modern-cljs.login)
ClojureScript:modern-cljs.login> validate-form
{"_id"=>BSON::ObjectId('52cee7c830040e8281f81b72'), "api_id"=>"2013-12-25 17:25:32 UTC_user", "date"=>2013-12-25 17:25:32 UTC, "text"=>"", "link"=>"", "metrics"=>{"place"=>1, "user"=>1, "lat"=>40.9112317301, "lon"=>-73.9011385182, "id"=>15103893, "name"=>"Obrien"}, "source_id"=>BSON::ObjectId('52cee7c030040e8281f8196c'), "summary"=>false, "simhash"=>nil, "__metric_keys"=>["place", "user", "lat", "lon", "id", "name"]}