{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# Download data from kaggle\n\n**If you find my notebooks helpful, please leave an upvote :)**\n\n**The colab notebook link is: https://colab.research.google.com/drive/1HmIqgBh2j0BkqtzXK9Hua-5xdqRX0n87?usp=sharing** \n- [Easiest way to download kaggle data in Google Colab | Data Science and Machine Learning](https://www.kaggle.com/general/74235)\n\n- [How to fetch Kaggle Datasets into Google Colab | by MRINALI GUPTA | Analytics Vidhya | Medium](https://medium.com/analytics-vidhya/how-to-fetch-kaggle-datasets-into-google-colab-ea682569851a)\n\n- Your profile API(Go to profile page-Account-API-Create Token, then copy the user name and key)\n![taGtgV](https://testksj.oss-cn-beijing.aliyuncs.com/uPic/taGtgV.png)\n- Dataset API\n![dVh8qI](https://testksj.oss-cn-beijing.aliyuncs.com/uPic/dVh8qI.jpg)\nor\n![ZioIoN](https://testksj.oss-cn-beijing.aliyuncs.com/uPic/ZioIoN.png)","metadata":{"id":"ylOgIU81XVyc"}},{"cell_type":"code","source":"!pip install -U -q kaggle\n!mkdir -p ~/.kaggle\n!echo '{\"username\":\"xxxxx\",\"key\":\"xxxxxxxxxx\"}' > ~/.kaggle/kaggle.json  # change to you own kaggle profile API token\n!chmod 600 ~/.kaggle/kaggle.json","metadata":{"id":"2o8Zq9l6_pUI"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!kaggle competitions download -c hubmap-organ-segmentation # dataset API command","metadata":{"id":"lnbZbO6oAB4_","outputId":"bf33b5d3-e456-4ad7-a081-6ac6a0510cfa"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!kaggle competitions download -c hubmap-organ-segmentation -p \"../content/drive/MyDrive/Competition\"","metadata":{"id":"8aYkndaQCLz9","outputId":"63156bbf-0484-4a54-f3e1-54b3af557fe1"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!unzip -n '../content/drive/MyDrive/Competition/hubmap-organ-segmentation.zip' -d '../content/drive/MyDrive/Competition'","metadata":{"id":"KvawqNWDDA6_"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import os\nos.chdir(\"/content/drive/MyDrive/Colab Notebooks/Humbmap\")\n","metadata":{"id":"XtNUfMrZ6omG"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Connect with VSCode\n- [How to Use Google Colab with VS Code](https://www.freecodecamp.org/news/how-to-use-google-colab-with-vs-code/)\n- [2021-09-27-connect-to-colab-from-local-vscode.ipynb - Colaboratory](https://colab.research.google.com/github/JayThibs/jacques-blog/blob/master/_notebooks/2021-09-27-connect-to-colab-from-local-vscode.ipynb#scrollTo=7tQlMRMDGpun)","metadata":{"id":"wizHDVojXeht"}},{"cell_type":"code","source":"!pip install colabcode\n","metadata":{"id":"_w0mDL567Vju","outputId":"2016e5ad-64ff-4d70-fce8-31a59eb3e298"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from colabcode import ColabCode","metadata":{"id":"_VGJKqU77YL6"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!ngrok authtoken 2EU76ZrDyfZTswWaAkJ0v7dyTWb_6y83gw3Bmq1o6L3pBprnk","metadata":{"id":"KDtNhGFU8ngO","outputId":"4e2fa8ce-5c20-48b4-cb9a-84272c69819e"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ColabCode(port=10000, mount_drive=True)\n","metadata":{"id":"m4iGAyXJ8YYx","outputId":"6ceeda98-d796-40d7-9e1f-d343652dc717"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"id":"hbC_jnONAq1W"},"execution_count":null,"outputs":[]}]}