Pinned Loading
-
-
-
-
To download large files directly int...
To download large files directly into google drive (later we can split and download) 1{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"ToDownload.ipynb","provenance":[],"collapsed_sections":[]},"kernelspec":{"name":"python3","display_name":"Python 3"}},"cells":[{"cell_type":"code","metadata":{"id":"9deDxQoXyBx9","colab_type":"code","colab":{}},"source":["from google.colab import drive\n","drive.mount('/content/drive')\n","!ln -nfs 'drive/My Drive/Colab Notebooks' 'CoN'\n","ROOT_PATH = 'CoN' #'drive/My Drive/Colab Notebooks'\n","!pwd && ls -ial"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"5BiszSs761LX","colab_type":"code","colab":{}},"source":["import os\n","import requests\n","url = input('Enter URL >')\n","filename = input('Enter File name >')\n","filepath = os.path.join(ROOT_PATH,filename)\n","with open(filepath,'wb') as file:\n"," file.write(requests.get(url).content)\n","print('Done :)')"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"-NcVfIl_A3FM","colab_type":"text"},"source":["### To split large files into multiple files\n","```bash\n","split -b 1M path/to/file path/to/file_ # to split file into file_*\n","# 1024 bytes prefix\n","```\n","### To merge back\n","```bash\n","cat path/to/file_* > path/to/file # to merge files back\n","```\n","<br>\n","\n","#### Save md5 hash of original file to verify after merge\n","```bash\n","cd path/to/dir/ && md5sum file > file.md5\n","```\n","#### To check merged file\n","```bash\n","cd path/to/dir/ && md5sum -c file.md5\n","```"]}]}
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.