{"id":13547153,"url":"https://github.com/L0garithmic/FastColabCopy","last_synced_at":"2025-04-02T19:32:40.155Z","repository":{"id":48467357,"uuid":"386511101","full_name":"L0garithmic/FastColabCopy","owner":"L0garithmic","description":"Fast Multi-Threaded Google Colab File Transfering","archived":false,"fork":false,"pushed_at":"2022-02-18T13:37:20.000Z","size":8229,"stargazers_count":25,"open_issues_count":0,"forks_count":38,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-01-25T07:06:18.441Z","etag":null,"topics":["colab-notebook","multithreading","parallel-computing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/L0garithmic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-16T04:41:43.000Z","updated_at":"2023-12-26T09:58:31.000Z","dependencies_parsed_at":"2022-08-20T02:00:22.439Z","dependency_job_id":null,"html_url":"https://github.com/L0garithmic/FastColabCopy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L0garithmic%2FFastColabCopy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L0garithmic%2FFastColabCopy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L0garithmic%2FFastColabCopy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L0garithmic%2FFastColabCopy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/L0garithmic","download_url":"https://codeload.github.com/L0garithmic/FastColabCopy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246880252,"owners_count":20848834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["colab-notebook","multithreading","parallel-computing"],"created_at":"2024-08-01T12:00:51.689Z","updated_at":"2025-04-02T19:32:36.577Z","avatar_url":"https://github.com/L0garithmic.png","language":"Python","funding_links":[],"categories":["Examples"],"sub_categories":[],"readme":"![made-with-python](https://img.shields.io/badge/Made%20with-Python3-brightgreen)\n\n\u003c!-- LOGO --\u003e\n\u003cbr /\u003e\n\u003ch1\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/L0garithmic/FastColabCopy/main/img/logo.png\" alt=\"Logo\" width=\"140\" height=\"110\"\u003e\n  \u003cbr\u003eFastColabCopy\n\u003c/h1\u003e\n  \u003cp align=\"center\"\u003e\n    Python3 script to transfer files in Google Colab 10-50x faster.\n    \u003cbr /\u003e\n    \u003c/p\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e •\n  \u003ca href=\"#usage\"\u003eHow To Use\u003c/a\u003e •\n  \u003ca href=\"#examples\"\u003eExamples\u003c/a\u003e •\n  \u003ca href=\"#best-practice\"\u003eBest Practice\u003c/a\u003e •\n  \u003ca href=\"#credits\"\u003eCredits\u003c/a\u003e •\n  \u003ca href=\"examples.md\"\u003eMore Examples\u003c/a\u003e\n\u003c/p\u003e  \n\n\u003cp align=\"center\"\u003e\n  \n![screenshot](img/clip.gif)\n\u003c/p\u003e                                                                                                                             \n                                                                                                                                                      \n## About The Project\nFastColabCopy is a Python script for parallel (multi-threading) copying of files between two locations. Currently developed for Google-Drive to Google-Drive transfers using Google-Colab. This script frequently achieves 10-50x speed improvements when copying numerous small files.\n\n## Importing\n\nImport from GitHub:\n```py\n!wget https://raw.githubusercontent.com/L0garithmic/fastcolabcopy/main/fastcopy.py\nimport fastcopy\n```\n\nImport from Google Drive:\n```py\n!cp /gdrive/MyDrive/fastcopy.py .\nimport fastcopy\n```\n\n\n## Usage\n```sh\nusage: fast-copy.py [-h HELP] source destination [-d DELETE] [-s SYNC] [-r REPLACE]\n\noptional arguments:\n  -h --help            show this help message and exit\n  source                the drive you are copying from\n  destination           the drive you are copying to\n  -d --delete           delete the source files after copy\n  -s --sync             delete files in destination if not found in source (do not use, if using with rsync)\n  -r --replace          replace files if they exist\n  -t --thread           set the amount of parallel threads used\n  -l --size-limit       set max size of files copied (supports gb, mb, kb) eg 1.5gb\n```\nThe `source` and `destination` fields are required. Everything else is optional.\n\n## Examples\n```py\nfrom google.colab import drive\ndrive.mount('/gdrive', force_remount=False)\nimport os\n!wget -q https://raw.githubusercontent.com/L0garithmic/fastcolabcopy/main/fastcopy.py\nimport fastcopy\n!python fastcopy.py /gdrive/Shareddrives/Source/. /gdrive/Shareddrives/Destination --thread 20 --size-limit 400mb\n```\nIf you want to see copy execution time:\n```mod\n!pip install -q ipython-autotime\n%load_ext autotime\n```\nCheck out \u003ca href=\"examples.md\"\u003eexamples.md\u003c/a\u003e for some more examples.\n\n## Best Practice\nColab has wildly varying transfer speeds, because of this, the best we can offer are suggestions:\n- For large groups of medium/small files, 15-40 threads seems to work best.\n- For 50+ files with significantly varying sizes, try 2 sequentially copies. `-t 15 -l 400` then `-t 2`\n- For files that are 100MB+, it is best to use 2 threads. It is still faster then rsync.   \n- Currently `--sync` breaks if rsync is ran after. If you are mirroring drives. Disable `--sync` and use the rsync's `--delete` function.\n\n## Credits\n- Credit to [ikonikon](https://github.com/ikonikon/fast-copy) for the base multi-threading code.   \n- Thanks to [@Ostokhoon](https://www.freelancer.com/u/Ostokhoon) for ALL argument and folder hierarchy functionality.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FL0garithmic%2FFastColabCopy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FL0garithmic%2FFastColabCopy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FL0garithmic%2FFastColabCopy/lists"}