Last active
June 28, 2021 20:21
-
-
Save BlazerYoo/01daf8788cd8682827e18a426b398225 to your computer and use it in GitHub Desktop.
Download Kaggle data to Google Drive with authentication pipeline
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
# run `python kaggle.py` | |
from google.colab import drive | |
drive.mount('/content/gdrive') | |
import os, json | |
os.system('mkdir ~/.kaggle;touch ~/.kaggle/kaggle.json') | |
api_token = {"username":"username","key":"api_key"} | |
with open('/root/.kaggle/kaggle.json', 'w') as f: | |
json.dump(api_token, f) | |
os.system('chmod 600 ~/.kaggle/kaggle.json') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment