Skip to content

Instantly share code, notes, and snippets.

@phineas-pta
phineas-pta / README-ollama.md
Last active April 8, 2024 21:26
ollama model files (vietnamese LLM)
@phineas-pta
phineas-pta / dl_requests_tqdm.py
Last active April 18, 2024 16:10 — forked from yanqd0/dl_requests_tqdm.py
Python requests download file with a tqdm progress bar
import os
import requests
import werkzeug
from tqdm import tqdm
def download_ckpt(url:str, filename:str="", overwrite:bool=False, chunk_size:int=1) -> None:
"""
try auto detect file name if left empty
option to overwrite if file already existed
@phineas-pta
phineas-pta / KaiTi-fonts.md
Last active September 11, 2023 13:17
font khải thể cho chữ hán cổ - kaiti fonts for classical chinese texts
@phineas-pta
phineas-pta / xoa_dau.md
Last active April 13, 2024 16:31
xoá dấu tiếng Việt với Python

xoá dấu tiếng Việt với Python

phương pháp nhanh hơn và không cần cài thêm package

code hoàn chỉnh:

import unicodedata

BANG_XOA_DAU = str.maketrans(
@phineas-pta
phineas-pta / han_viet_api.md
Last active June 18, 2023 19:55
Sino-Vietnamese with thivien.net API
@phineas-pta
phineas-pta / fishing_grid_map.md
Last active January 17, 2024 19:41
fishing spatial data with R: convert GPS coordinates to statistical rectangles