-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #475 from IshanG97/download-data-bat-script
Fix issue #474: Windows .bat setup script
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
@echo off | ||
setlocal enabledelayedexpansion | ||
|
||
if not exist "%userprofile%\.kaggle\kaggle.json" ( | ||
set /p USERNAME=Kaggle username: | ||
echo. | ||
set /p APIKEY=Kaggle API key: | ||
|
||
mkdir "%userprofile%\.kaggle" | ||
echo {"username":"!USERNAME!","key":"!APIKEY!"} > "%userprofile%\.kaggle\kaggle.json" | ||
attrib +R "%userprofile%\.kaggle\kaggle.json" | ||
) | ||
|
||
pip install kaggle --upgrade | ||
|
||
kaggle competitions download -c carvana-image-masking-challenge -f train_hq.zip | ||
powershell Expand-Archive train_hq.zip -DestinationPath data\imgs | ||
move data\imgs\train_hq\* data\imgs\ | ||
rmdir /s /q data\imgs\train_hq | ||
del /q train_hq.zip | ||
|
||
kaggle competitions download -c carvana-image-masking-challenge -f train_masks.zip | ||
powershell Expand-Archive train_masks.zip -DestinationPath data\masks | ||
move data\masks\train_masks\* data\masks\ | ||
rmdir /s /q data\masks\train_masks | ||
del /q train_masks.zip | ||
|
||
exit /b 0 |