eaedk / zindi-spot-the-mask-challenge-standalone-notebook

3 stars 1 forks source link

Download #1

Open onuigwevitus opened 4 years ago

onuigwevitus commented 4 years ago

I like the way you created the download path. Seems understanding! I was thinking a shorter way to do it without using google drive.

onuigwevitus commented 4 years ago

I will see how I can use the method for challenging task from zindi

eaedk commented 4 years ago

Hi, thanks for your attention ... Can you explain the method you are thinking about ?

onuigwevitus commented 4 years ago

I use this code below but your code has given me additional options, Thanks;

import requests import requests, zipfile

the url and auth_value from the website

url = 'https://api.zindi.africa/v1/competitions/iclr-workshop-challenge-1-cgiar-computer-vision-for-crop-disease/files/train.zip' myobj = {'auth_token': 'sfffghgghgvkhuf'} #use your own

x = requests.post(url, data = myobj,stream=True) target_path = 'data.zip'

handle = open(target_path, "wb") for chunk in x.iter_content(chunk_size=512): if chunk: # filter out keep-alive new chunks handle.write(chunk) handle.close()

!unzip -qq /content/data.zip

onuigwevitus commented 4 years ago

This link provides how to use it. https://github.com/onuigwevitus/Zindi_colab

I will try yours to get familiars with it.