{
  "id": 426784,
  "title": "What's the best way to save data? ",
  "url": "/competitions/asl-fingerspelling/discussion/426784",
  "author_name": "MUSTAFA ALSHUALA",
  "post_date": "2023-07-25T05:08:38.504000",
  "votes": 0,
  "comment_count": 5,
  "views": 0,
  "content": "<p>Hello everyone, <br>\nI've just joined the competition. The first challenge is how to download such huge data (more than 150 GB)! What I did is that I subscribed for 2TB in Google Drive and installed Google Drive on my local laptop. Unfortunately, the mounted drive didn't show me all the 2TB capacity. It showed me only 200 GB, not 2TB! </p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6227496%2Fbabc06848ffa005059fe3fa33d50ec2c%2Fgoogle_drive.png?generation=1690261545052175&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6227496%2Fc01c21ac2b52e8ee71c0062434711446%2Fgoogle_drive_2TB.png?generation=1690261566908281&amp;alt=media\" alt=\"\"></p>\n<p>My two questions here are, </p>\n<ul>\n<li>What's the preferred way to save such huge data? </li>\n<li>How to save my google drive inconsistency? </li>\n</ul>\n<p>Best Regards,<br>\nMustafa </p>",
  "messages": [
    {
      "id": 2357833,
      "postDate": "2023-07-25T06:32:52.260Z",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/mustafaalshuala\" target=\"_blank\">@mustafaalshuala</a><br>\nFor example, you can run the following code in GoogleColaboratory to download Kaggle data to your GoogleDrive.</p>\n<pre><code>import os\nimport time\n\n\n google.colab import drive\ndrive.mount()\n\n\n! pip install --upgrade --force-reinstall --no-deps  kaggle &gt; /dev/\n! mkdir ~/.kaggle\n! cp  ~/.kaggle/kaggle.json\n! chmod 600 ~/.kaggle/kaggle.json\n\n\nKAGGLE_API_COMMANDS = []\nDOWNLOAD_GOOGLE_DRIVE_PATH =  # -&gt; Ex:\n\n\n  ==[]:\n   API_COMMAND  KAGGLE_API_COMMANDS:\n    DATASET_PATH = API_COMMAND.split()[-1]\n    ZIP_FILE_NAME = DATASET_PATH.split()[-1]\n    (f)\n    (f)\n\n      os.path.exists(DOWNLOAD_GOOGLE_DRIVE_PATH):\n      !mkdir {DOWNLOAD_GOOGLE_DRIVE_PATH}\n\n       (API_COMMAND.split()):\n      !kaggle datasets download -d {DATASET_PATH} -p {DOWNLOAD_GOOGLE_DRIVE_PATH}\n    elif   (API_COMMAND.split()):\n      !kaggle competitions download -c {DATASET_PATH} -p {DOWNLOAD_GOOGLE_DRIVE_PATH}\n\n\n\nSLEEP_TIME = 60\n(f, =); time.sleep(SLEEP_TIME); ();time.sleep(1);\n\n\n  ==[]:\n   API_COMMAND  KAGGLE_API_COMMANDS:\n    DATASET_PATH = API_COMMAND.split()[-1]\n    ZIP_FILE_NAME = DATASET_PATH.split()[-1]\n    (f)\n    (f)\n\n    !unzip -q {DOWNLOAD_GOOGLE_DRIVE_PATH}/{ZIP_FILE_NAME}.zip -d {DOWNLOAD_GOOGLE_DRIVE_PATH}\n\n\n\nSLEEP_TIME = 60\n(f, =); time.sleep(SLEEP_TIME); ();time.sleep(1);\n\n\nDELETE_ZIP = \n DELETE_ZIP:\n    ==[]:\n     API_COMMAND  KAGGLE_API_COMMANDS:\n      DATASET_PATH = API_COMMAND.split()[-1]\n      ZIP_FILE_NAME = DATASET_PATH.split()[-1]\n      (f)\n      (f)\n\n      !rm {DOWNLOAD_GOOGLE_DRIVE_PATH}/{ZIP_FILE_NAME}.zip\n\n\n\nimport time\nSLEEP_TIME = 60\n(f, =); time.sleep(SLEEP_TIME); ();time.sleep(1);\n google.colab import runtime\nruntime.unassign()\n</code></pre>",
      "rawMarkdown": "Hi @mustafaalshuala\nFor example, you can run the following code in GoogleColaboratory to download Kaggle data to your GoogleDrive.\n\n```\nimport os\nimport time\n\n# MOUNT GoogleDrive\nfrom google.colab import drive\ndrive.mount('/content/drive')\n\n# Kaggle API\n! pip install --upgrade --force-reinstall --no-deps  kaggle > /dev/null\n! mkdir ~/.kaggle\n! cp \"*** YOUR GoogleDrive Folder Path ***/kaggle.json\" ~/.kaggle/kaggle.json\n! chmod 600 ~/.kaggle/kaggle.json\n\n# SET\nKAGGLE_API_COMMANDS = ['kaggle competitions download -c asl-fingerspelling']\nDOWNLOAD_GOOGLE_DRIVE_PATH = '*** YOUR GoogleDrive Folder Path ***' # -> Ex:'/content/drive/MyDrive'\n\n# ZIP DOWNLOAD\nif not KAGGLE_API_COMMANDS==[]:\n  for API_COMMAND in KAGGLE_API_COMMANDS:\n    DATASET_PATH = API_COMMAND.split()[-1]\n    ZIP_FILE_NAME = DATASET_PATH.split(\"/\")[-1]\n    print(f'DATASET_PATH: {DATASET_PATH}')\n    print(f'ZIP_FILE_NAME: {ZIP_FILE_NAME}')\n\n    if not os.path.exists(DOWNLOAD_GOOGLE_DRIVE_PATH):\n      !mkdir {DOWNLOAD_GOOGLE_DRIVE_PATH}\n\n    if \"-d\" in set(API_COMMAND.split()):\n      !kaggle datasets download -d {DATASET_PATH} -p {DOWNLOAD_GOOGLE_DRIVE_PATH}\n    elif \"-c\" in set(API_COMMAND.split()):\n      !kaggle competitions download -c {DATASET_PATH} -p {DOWNLOAD_GOOGLE_DRIVE_PATH}\n\n# SLEEP_TIME\n# (It takes a lot of time for large files to be updated on Google Drive)\nSLEEP_TIME = 60*60*3\nprint(f'SLEEP {SLEEP_TIME}sec => ', end=''); time.sleep(SLEEP_TIME); print('OK');time.sleep(1);\n\n# UNZIP\nif not KAGGLE_API_COMMANDS==[]:\n  for API_COMMAND in KAGGLE_API_COMMANDS:\n    DATASET_PATH = API_COMMAND.split()[-1]\n    ZIP_FILE_NAME = DATASET_PATH.split(\"/\")[-1]\n    print(f'DATASET_PATH: {DATASET_PATH}')\n    print(f'ZIP_FILE_NAME: {ZIP_FILE_NAME}')\n\n    !unzip -q {DOWNLOAD_GOOGLE_DRIVE_PATH}/{ZIP_FILE_NAME}.zip -d {DOWNLOAD_GOOGLE_DRIVE_PATH}\n\n# SLEEP_TIME\n# (It takes a lot of time for large files to be updated on Google Drive)\nSLEEP_TIME = 60*60*3\nprint(f'SLEEP {SLEEP_TIME}sec => ', end=''); time.sleep(SLEEP_TIME); print('OK');time.sleep(1);\n\n# DELETE ORIGINAL ZIP\nDELETE_ZIP = True\nif DELETE_ZIP:\n  if not KAGGLE_API_COMMANDS==[]:\n    for API_COMMAND in KAGGLE_API_COMMANDS:\n      DATASET_PATH = API_COMMAND.split()[-1]\n      ZIP_FILE_NAME = DATASET_PATH.split(\"/\")[-1]\n      print(f'DATASET_PATH: {DATASET_PATH}')\n      print(f'ZIP_FILE_NAME: {ZIP_FILE_NAME}')\n\n      !rm {DOWNLOAD_GOOGLE_DRIVE_PATH}/{ZIP_FILE_NAME}.zip\n\n# Shut Down\n# Computing Unit Save\nimport time\nSLEEP_TIME = 60*5\nprint(f'SLEEP {SLEEP_TIME}sec => ', end=''); time.sleep(SLEEP_TIME); print('OK');time.sleep(1);\nfrom google.colab import runtime\nruntime.unassign()\n\n```",
      "votes": 1,
      "replies": [
        {
          "id": 2379341,
          "postDate": "2023-08-08T05:55:42.237Z",
          "content": "<p>Thank you K.Mitsuhiro. That helps a lot.</p>",
          "rawMarkdown": "Thank you K.Mitsuhiro. That helps a lot."
        }
      ]
    },
    {
      "id": 2357784,
      "postDate": "2023-07-25T05:52:32.337Z",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/mustafaalshuala\" target=\"_blank\">@mustafaalshuala</a> , umm maybe you can use kaggle notebooks and from there you can easily access the competition data ( right corner -&gt; add date -&gt; search data name -&gt; press + button) . So you don't have to download all the data. :) </p>",
      "rawMarkdown": "Hi @mustafaalshuala , umm maybe you can use kaggle notebooks and from there you can easily access the competition data ( right corner -> add date -> search data name -> press + button) . So you don't have to download all the data. :) ",
      "votes": 1,
      "replies": [
        {
          "id": 2379342,
          "postDate": "2023-08-08T05:57:26.687Z",
          "content": "<p>Very good suggestion Ayush. <br>\nmmm.. I bought Colab Pro+ for GPU. Can I use Kaggle  notebooks. At the same time, I run on Google resource?  </p>",
          "rawMarkdown": "Very good suggestion Ayush. \nmmm.. I bought Colab Pro+ for GPU. Can I use Kaggle  notebooks. At the same time, I run on Google resource?  "
        }
      ]
    },
    {
      "id": 2357727,
      "postDate": "2023-07-25T05:08:38.503Z",
      "content": "<p>Hello everyone, <br>\nI've just joined the competition. The first challenge is how to download such huge data (more than 150 GB)! What I did is that I subscribed for 2TB in Google Drive and installed Google Drive on my local laptop. Unfortunately, the mounted drive didn't show me all the 2TB capacity. It showed me only 200 GB, not 2TB! </p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6227496%2Fbabc06848ffa005059fe3fa33d50ec2c%2Fgoogle_drive.png?generation=1690261545052175&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6227496%2Fc01c21ac2b52e8ee71c0062434711446%2Fgoogle_drive_2TB.png?generation=1690261566908281&amp;alt=media\" alt=\"\"></p>\n<p>My two questions here are, </p>\n<ul>\n<li>What's the preferred way to save such huge data? </li>\n<li>How to save my google drive inconsistency? </li>\n</ul>\n<p>Best Regards,<br>\nMustafa </p>",
      "rawMarkdown": "Hello everyone, \nI've just joined the competition. The first challenge is how to download such huge data (more than 150 GB)! What I did is that I subscribed for 2TB in Google Drive and installed Google Drive on my local laptop. Unfortunately, the mounted drive didn't show me all the 2TB capacity. It showed me only 200 GB, not 2TB! \n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6227496%2Fbabc06848ffa005059fe3fa33d50ec2c%2Fgoogle_drive.png?generation=1690261545052175&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6227496%2Fc01c21ac2b52e8ee71c0062434711446%2Fgoogle_drive_2TB.png?generation=1690261566908281&alt=media)\n\nMy two questions here are, \n- What's the preferred way to save such huge data? \n- How to save my google drive inconsistency? \n\nBest Regards,\nMustafa "
    },
    {
      "id": 2359823,
      "postDate": "2023-07-26T11:41:27.980Z",
      "rawMarkdown": "",
      "votes": 2,
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 2357833,
      "author_name": "K.Mitsuhiro",
      "author_url": "",
      "post_date": "2023-07-25T06:32:52.260000",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/mustafaalshuala\" target=\"_blank\">@mustafaalshuala</a><br>\nFor example, you can run the following code in GoogleColaboratory to download Kaggle data to your GoogleDrive.</p>\n<pre><code>import os\nimport time\n\n\n google.colab import drive\ndrive.mount()\n\n\n! pip install --upgrade --force-reinstall --no-deps  kaggle &gt; /dev/\n! mkdir ~/.kaggle\n! cp  ~/.kaggle/kaggle.json\n! chmod 600 ~/.kaggle/kaggle.json\n\n\nKAGGLE_API_COMMANDS = []\nDOWNLOAD_GOOGLE_DRIVE_PATH =  # -&gt; Ex:\n\n\n  ==[]:\n   API_COMMAND  KAGGLE_API_COMMANDS:\n    DATASET_PATH = API_COMMAND.split()[-1]\n    ZIP_FILE_NAME = DATASET_PATH.split()[-1]\n    (f)\n    (f)\n\n      os.path.exists(DOWNLOAD_GOOGLE_DRIVE_PATH):\n      !mkdir {DOWNLOAD_GOOGLE_DRIVE_PATH}\n\n       (API_COMMAND.split()):\n      !kaggle datasets download -d {DATASET_PATH} -p {DOWNLOAD_GOOGLE_DRIVE_PATH}\n    elif   (API_COMMAND.split()):\n      !kaggle competitions download -c {DATASET_PATH} -p {DOWNLOAD_GOOGLE_DRIVE_PATH}\n\n\n\nSLEEP_TIME = 60\n(f, =); time.sleep(SLEEP_TIME); ();time.sleep(1);\n\n\n  ==[]:\n   API_COMMAND  KAGGLE_API_COMMANDS:\n    DATASET_PATH = API_COMMAND.split()[-1]\n    ZIP_FILE_NAME = DATASET_PATH.split()[-1]\n    (f)\n    (f)\n\n    !unzip -q {DOWNLOAD_GOOGLE_DRIVE_PATH}/{ZIP_FILE_NAME}.zip -d {DOWNLOAD_GOOGLE_DRIVE_PATH}\n\n\n\nSLEEP_TIME = 60\n(f, =); time.sleep(SLEEP_TIME); ();time.sleep(1);\n\n\nDELETE_ZIP = \n DELETE_ZIP:\n    ==[]:\n     API_COMMAND  KAGGLE_API_COMMANDS:\n      DATASET_PATH = API_COMMAND.split()[-1]\n      ZIP_FILE_NAME = DATASET_PATH.split()[-1]\n      (f)\n      (f)\n\n      !rm {DOWNLOAD_GOOGLE_DRIVE_PATH}/{ZIP_FILE_NAME}.zip\n\n\n\nimport time\nSLEEP_TIME = 60\n(f, =); time.sleep(SLEEP_TIME); ();time.sleep(1);\n google.colab import runtime\nruntime.unassign()\n</code></pre>",
      "votes": 1,
      "replies": [
        {
          "id": 2379341,
          "author_name": "MUSTAFA ALSHUALA",
          "author_url": "",
          "post_date": "2023-08-08T05:55:42.237000",
          "content": "<p>Thank you K.Mitsuhiro. That helps a lot.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2357784,
      "author_name": "Ayush Kumar",
      "author_url": "",
      "post_date": "2023-07-25T05:52:32.337000",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/mustafaalshuala\" target=\"_blank\">@mustafaalshuala</a> , umm maybe you can use kaggle notebooks and from there you can easily access the competition data ( right corner -&gt; add date -&gt; search data name -&gt; press + button) . So you don't have to download all the data. :) </p>",
      "votes": 1,
      "replies": [
        {
          "id": 2379342,
          "author_name": "MUSTAFA ALSHUALA",
          "author_url": "",
          "post_date": "2023-08-08T05:57:26.687000",
          "content": "<p>Very good suggestion Ayush. <br>\nmmm.. I bought Colab Pro+ for GPU. Can I use Kaggle  notebooks. At the same time, I run on Google resource?  </p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2359823,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-07-26T11:41:27.980000",
      "content": "",
      "votes": 2,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2357833": "Hi @mustafaalshuala\nFor example, you can run the following code in GoogleColaboratory to download Kaggle data to your GoogleDrive.\n\n```\nimport os\nimport time\n\n# MOUNT GoogleDrive\nfrom google.colab import drive\ndrive.mount('/content/drive')\n\n# Kaggle API\n! pip install --upgrade --force-reinstall --no-deps  kaggle > /dev/null\n! mkdir ~/.kaggle\n! cp \"*** YOUR GoogleDrive Folder Path ***/kaggle.json\" ~/.kaggle/kaggle.json\n! chmod 600 ~/.kaggle/kaggle.json\n\n# SET\nKAGGLE_API_COMMANDS = ['kaggle competitions download -c asl-fingerspelling']\nDOWNLOAD_GOOGLE_DRIVE_PATH = '*** YOUR GoogleDrive Folder Path ***' # -> Ex:'/content/drive/MyDrive'\n\n# ZIP DOWNLOAD\nif not KAGGLE_API_COMMANDS==[]:\n  for API_COMMAND in KAGGLE_API_COMMANDS:\n    DATASET_PATH = API_COMMAND.split()[-1]\n    ZIP_FILE_NAME = DATASET_PATH.split(\"/\")[-1]\n    print(f'DATASET_PATH: {DATASET_PATH}')\n    print(f'ZIP_FILE_NAME: {ZIP_FILE_NAME}')\n\n    if not os.path.exists(DOWNLOAD_GOOGLE_DRIVE_PATH):\n      !mkdir {DOWNLOAD_GOOGLE_DRIVE_PATH}\n\n    if \"-d\" in set(API_COMMAND.split()):\n      !kaggle datasets download -d {DATASET_PATH} -p {DOWNLOAD_GOOGLE_DRIVE_PATH}\n    elif \"-c\" in set(API_COMMAND.split()):\n      !kaggle competitions download -c {DATASET_PATH} -p {DOWNLOAD_GOOGLE_DRIVE_PATH}\n\n# SLEEP_TIME\n# (It takes a lot of time for large files to be updated on Google Drive)\nSLEEP_TIME = 60*60*3\nprint(f'SLEEP {SLEEP_TIME}sec => ', end=''); time.sleep(SLEEP_TIME); print('OK');time.sleep(1);\n\n# UNZIP\nif not KAGGLE_API_COMMANDS==[]:\n  for API_COMMAND in KAGGLE_API_COMMANDS:\n    DATASET_PATH = API_COMMAND.split()[-1]\n    ZIP_FILE_NAME = DATASET_PATH.split(\"/\")[-1]\n    print(f'DATASET_PATH: {DATASET_PATH}')\n    print(f'ZIP_FILE_NAME: {ZIP_FILE_NAME}')\n\n    !unzip -q {DOWNLOAD_GOOGLE_DRIVE_PATH}/{ZIP_FILE_NAME}.zip -d {DOWNLOAD_GOOGLE_DRIVE_PATH}\n\n# SLEEP_TIME\n# (It takes a lot of time for large files to be updated on Google Drive)\nSLEEP_TIME = 60*60*3\nprint(f'SLEEP {SLEEP_TIME}sec => ', end=''); time.sleep(SLEEP_TIME); print('OK');time.sleep(1);\n\n# DELETE ORIGINAL ZIP\nDELETE_ZIP = True\nif DELETE_ZIP:\n  if not KAGGLE_API_COMMANDS==[]:\n    for API_COMMAND in KAGGLE_API_COMMANDS:\n      DATASET_PATH = API_COMMAND.split()[-1]\n      ZIP_FILE_NAME = DATASET_PATH.split(\"/\")[-1]\n      print(f'DATASET_PATH: {DATASET_PATH}')\n      print(f'ZIP_FILE_NAME: {ZIP_FILE_NAME}')\n\n      !rm {DOWNLOAD_GOOGLE_DRIVE_PATH}/{ZIP_FILE_NAME}.zip\n\n# Shut Down\n# Computing Unit Save\nimport time\nSLEEP_TIME = 60*5\nprint(f'SLEEP {SLEEP_TIME}sec => ', end=''); time.sleep(SLEEP_TIME); print('OK');time.sleep(1);\nfrom google.colab import runtime\nruntime.unassign()\n\n```",
    "2357784": "Hi @mustafaalshuala , umm maybe you can use kaggle notebooks and from there you can easily access the competition data ( right corner -> add date -> search data name -> press + button) . So you don't have to download all the data. :) ",
    "2357727": "Hello everyone, \nI've just joined the competition. The first challenge is how to download such huge data (more than 150 GB)! What I did is that I subscribed for 2TB in Google Drive and installed Google Drive on my local laptop. Unfortunately, the mounted drive didn't show me all the 2TB capacity. It showed me only 200 GB, not 2TB! \n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6227496%2Fbabc06848ffa005059fe3fa33d50ec2c%2Fgoogle_drive.png?generation=1690261545052175&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6227496%2Fc01c21ac2b52e8ee71c0062434711446%2Fgoogle_drive_2TB.png?generation=1690261566908281&alt=media)\n\nMy two questions here are, \n- What's the preferred way to save such huge data? \n- How to save my google drive inconsistency? \n\nBest Regards,\nMustafa ",
    "2359823": ""
  }
}