Skip to content

Instantly share code, notes, and snippets.

@khiemdoan
khiemdoan / Awesome.md
Last active May 9, 2024 10:23
My own awesome list

Python

  • loguru - Loguru is a library which aims to bring enjoyable logging in Python.
  • more-itertools - More routines for operating on iterables, beyond itertools.
  • pydantic - Data validation using Python type hints.
  • msgspec - A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML.
  • SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper.
  • Advanced Alchemy - Advanced Alchemy is a carefully crafted, thoroughly tested, optimized companion library for SQLAlchemy, offering useful and easy-to-use features for your database projects.
  • SQLModel - SQL databases in Python, designed for simplicity, compatibility, and robustness.
  • [Tortoise ORM](https://github
@KillyMXI
KillyMXI / README.md
Last active May 9, 2024 10:23
Obsidian live-preview list threading and highlight
@douglasparker
douglasparker / README.md
Last active May 9, 2024 10:22
Disable & Enable MPO via the Windows Registry

Disable & Enable MPO via the Windows Registry

There is a well known issue where GPU drivers are crashing with multi-monitor setups due to an interaction with Windows MPO and both Nvidia and AMD GPUs.

Until this bug is fixed, the only solution is to disable MPO via the Windows Registry.

Disable MPO

To apply the fix, simply run mpo_disable.reg and reboot your computer.

@padeoe
padeoe / README_hfd.md
Last active May 9, 2024 10:22
CLI-Tool for download Huggingface models and datasets with aria2/wget+git

🤗Huggingface Model Downloader

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 smartly utilizes wget or aria2 for LFS files and git clone for the rest.

Features

  • ⏯️ Resume from breakpoint: You can re-run it or Ctrl+C anytime.
  • 🚀 Multi-threaded Download: Utilize multiple threads to speed up the download process.
  • 🚫 File Exclusion: Use --exclude or --include to skip or specify files, save time for models with duplicate formats (e.g., *.bin or *.safetensors).
  • 🔐 Auth Support: For gated models that require Huggingface login, use --hf_username and --hf_token to authenticate.
  • 🪞 Mirror Site Support: Set up with HF_ENDPOINT environment variable.
@wizioo
wizioo / gitignore_per_git_branch.md
Last active May 9, 2024 10:22
HowTo have specific .gitignore for each git branch

How to have specific .gitignore for each git branch

Objective

My objective is to have some production files ignored on specific branches. Git doesn't allow to do it.

Solution

My solution is to make a general .gitignore file and add .gitignore.branch_name files for the branches I want to add specific file exclusion. I'll use post-checkout hook to copy those .gitignore.branch_name in place of .git/info/exclude each time I go to the branch with git checkout branch_name.

@digitaljhelms
digitaljhelms / gist:4287848
Last active May 9, 2024 10:21
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active May 9, 2024 10:21
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@alimogh
alimogh / colors.py
Created May 9, 2024 10:20 — forked from rene-d/colors.py
ANSI color codes in Python
# SGR color constants
# rene-d 2018
class Colors:
""" ANSI color codes """
BLACK = "\033[0;30m"
RED = "\033[0;31m"
GREEN = "\033[0;32m"
BROWN = "\033[0;33m"
BLUE = "\033[0;34m"
@rene-d
rene-d / colors.py
Last active May 9, 2024 10:20
ANSI color codes in Python
# SGR color constants
# rene-d 2018
class Colors:
""" ANSI color codes """
BLACK = "\033[0;30m"
RED = "\033[0;31m"
GREEN = "\033[0;32m"
BROWN = "\033[0;33m"
BLUE = "\033[0;34m"
@SebaUbuntu
SebaUbuntu / README.md
Last active May 9, 2024 10:17
Generate framework compatibility matrix from fqnames

Generate framework compatibility matrix from fqnames

  • Download these 2 files
  • Compile AOSP without fcm from stock and wait for check_vintf to error out
  • Delete Python prefix from all lines (e.g. checkvintf E 06-24 00:30:22 49120 49120 check_vintf.cpp:554])
  • Paste the result in fqnames.txt
  • Launch the script