Last active
April 28, 2021 21:11
-
-
Save saas-coder/bffd825d5a1f7c5de33ba9ba9ec467d2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| urls = """https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/sentinel-2-part1.zip | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/extra_train-planet-dec17.zip | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/extra_train-planet-jun18.zip | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/starter-notebook.ipynb | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/extra_train-sentinel.zip | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/sentinel_for_points_collected_in_2015.zip | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/extra_train-planet-jun17.zip | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/extra_train-planet-dec18.zip | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/train-unique.csv | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/sample_submission.csv | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/extra_train.csv | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/auxilary_data-unique.csv | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/planet-jun18.zip | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/planet-dec17.zip | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/planet-dec18.zip | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/planet-jun17.zip | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/sentinel-2-part2.zip | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/ImageBands.docx | |
| https://api.zindi.africa/v1/competitions/lacuna-correct-field-detection-challenge/files/test.csv""" | |
| import requests | |
| import requests, zipfile | |
| !rm * -rf | |
| for url in urls.split(): | |
| myobj = {'auth_token': '******************'} | |
| x = requests.post(url, data = myobj,stream=True) | |
| target_path =url.split('/')[-1] | |
| 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment