Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download #1

Open
onuigwevitus opened this issue Aug 19, 2020 · 4 comments
Open

Download #1

onuigwevitus opened this issue Aug 19, 2020 · 4 comments

Comments

@onuigwevitus
Copy link

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
Copy link
Author

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

@eaedk
Copy link
Owner

eaedk commented Aug 19, 2020

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

@onuigwevitus
Copy link
Author

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
Copy link
Author

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

I will try yours to get familiars with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants