Last active
February 17, 2021 17:51
-
-
Save Vaidic/5aafd90b9fc2acfa42a20deee636a2c8 to your computer and use it in GitHub Desktop.
Revisions
-
Vaidic revised this gist
Feb 17, 2021 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -22,4 +22,6 @@ os.chdir('/content/competitions/'+dataset) for file in os.listdir(): zip_ref = zipfile.ZipFile(file, 'r') zip_ref.extractall() zip_ref.close() os.listdir() -
Vaidic revised this gist
Feb 17, 2021 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import zipfile import os api_token = {"username":"USERNAME","key":"KEY"} !mkdir /root/.kaggle with open('/root/.kaggle/kaggle.json', 'w') as file: json.dump(api_token, file) !chmod 600 /root/.kaggle/kaggle.json -
Vaidic created this gist
Feb 17, 2021 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ !pip uninstall kaggle -y && pip install kaggle import json import zipfile import os api_token = {"username":"USERNAME","key":"KEY"} with open('/root/.kaggle/kaggle.json', 'w') as file: json.dump(api_token, file) !chmod 600 /root/.kaggle/kaggle.json !kaggle config set -n path -v/content !kaggle config view dataset = 'titanic' # change this to the dataset to download os.environ['dataset']=dataset !echo $dataset !kaggle competitions download -c $dataset !ls /content/competitions/$dataset os.chdir('/content/competitions/'+dataset) for file in os.listdir(): zip_ref = zipfile.ZipFile(file, 'r') zip_ref.extractall() zip_ref.close()