Skip to content

Instantly share code, notes, and snippets.

View lin-calvin's full-sized avatar
🐢
May no respond in weekdays (expect 5:10pm-6pm UTC+8 )

Calvin lin lin-calvin

🐢
May no respond in weekdays (expect 5:10pm-6pm UTC+8 )
  • High School park of Shenzhen Experimental School
  • Shenzhen
  • 11:09 (UTC +08:00)
View GitHub Profile
@padeoe
padeoe / README_hfd.md
Last active October 3, 2025 15:14
CLI-Tool for download Huggingface models and datasets with aria2/wget: hfd

🤗Huggingface Model Downloader

Note

(2025-01-08) Add feature for 🏷️Tag(Revision) Selection, contributed by @Bamboo-D.
(2024-12-17) Add feature for ⚡Quick Startup and ⏭️Fast Resume, enabling skipping of downloaded files, while removing the git clone dependency to accelerate file list retrieval.

Considering the lack of multi-threaded download support in the official huggingface-cli, and the inadequate error handling in hf_transfer, This command-line tool leverages curl and aria2c for fast and robust downloading of models and datasets.

Features

  • ⏯️ Resume from breakpoint: You can re-run it or Ctrl+C anytime.
@dmfigol
dmfigol / asyncio_loop_in_thread.py
Last active July 11, 2025 06:06
Python asyncio event loop in a separate thread
"""
This gist shows how to run asyncio loop in a separate thread.
It could be useful if you want to mix sync and async code together.
Python 3.7+
"""
import asyncio
from datetime import datetime
from threading import Thread
from typing import Tuple, List, Iterable