Skip to content

Instantly share code, notes, and snippets.

@regonn
Created March 30, 2018 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save regonn/778f23144fd7d5914fafa3743d80c96b to your computer and use it in GitHub Desktop.
Save regonn/778f23144fd7d5914fafa3743d80c96b to your computer and use it in GitHub Desktop.
using JSON
using Images
json = JSON.parsefile("./input/train.json")
iamges_json = json["images"][1:10]
for image_json in iamges_json
try
t = tempname()
download(image_json["url"][1], t)
img = load(t)
save("./images/$(image_json["image_id"]).jpg",img)
rm(t)
catch err
println("ERROR: ", err.msg)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment