How to get kaggle competition data via command line on virtual machine?

大城市里の小女人 提交于 2019-12-24 10:52:18

问题


I am looking for the easiest way to download the kaggle competition data (train and test) on the virtual machine using bash to be able to train it there without uploading it on git.


回答1:


First you need to copy your cookie information for kaggle site in a text file. There is a chrome extension which will help you to do this. Copy the cookie information and save it as cookies.txt.

Now transfer the file to the EC2 instance using the command

scp -i /path/my-key-pair.pem /path/cookies.txt user-name@ec2-xxx-xx-xxx-x.compute-1.amazonaws.com:~

Accept the competitions rules and copy the URLs of the datasets you want to download from kaggle.com. For example the URL to download the sample_submission.csv file of Intel & MobileODT Cervical Cancer Screening competition is: https://kaggle.com/c/intel-mobileodt-cervical-cancer-screening/download/sample_submission.csv.zip

Now, from the terminal use the following command to download the dataset into the instance.

wget -x --load-cookies cookies.txt https://kaggle.com/c/intel-mobileodt-cervical-cancer-screening/download/sample_submission.csv.zip



回答2:


Install CurlWget chrome extension.

start downloading your kaggle data-set. CurlWget will give you full wget command. paste this command to terminal with sudo.

Job is done.



来源:https://stackoverflow.com/questions/45261190/how-to-get-kaggle-competition-data-via-command-line-on-virtual-machine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!