Skip to content

Instantly share code, notes, and snippets.

@lexrus
lexrus / AI_007_prompt.en.txt
Last active November 3, 2025 08:58
AI 通宵干活 prompt
__This is the requirements section, please replace it yourself__
Above are the requirements, below are the decision-making requirements:
- I'm going to sleep now, all product and technical decisions are under your control, I'll come to review the results tomorrow morning
- I'll sleep for about 8 hours, so don't rush to produce results, take your time with all the details, don't save tokens, getting it right is most important
- When you encounter uncertainties, first check the documentation in context7, if still uncertain, search online
- Execute all subtasks in phases, run unit tests after each phase is completed, to avoid having to start over after completing everything only to find it doesn't work
- Don't get hung up on the UI part, try to use mainstream conventional approaches, I'll polish the details tomorrow, you just focus on getting the functionality working
@ppkliu
ppkliu / README_hfd.md
Created February 20, 2025 12:04 — forked from relic-yuexi/README_hfd.md
CLI-Tool for download Huggingface models and datasets with aria2/wget+git

🤗Huggingface 模型下载器

考虑到官方的 huggingface-cli 缺乏多线程下载支持,以及 hf_transfer 错误处理不足的问题,这个命令行工具巧妙地利用 wgetaria2 下载 LFS 文件,并使用 git clone 下载其他文件。

特性

  • ⏯️ 断点续传: 你可以随时重新运行或使用 Ctrl+C 中断下载。
  • 🚀 多线程下载: 利用多线程加速下载过程。
  • 🚫 文件排除: 使用 --exclude--include 跳过或指定要下载的文件,节省时间以避免下载模型的重复格式文件(例如 .bin 和 .safetensors)。
  • 🔐 认证支持: 对于需要 Huggingface 登录的私有模型,使用 --hf_username--hf_token 进行身份验证。
  • 🪞 镜像站点支持: 通过设置 HF_ENDPOINT 环境变量使用镜像站点。
@relic-yuexi
relic-yuexi / README_hfd.md
Last active November 27, 2025 23:33 — forked from padeoe/README_hfd.md
CLI-Tool for download Huggingface models and datasets with aria2/wget+git

🤗Huggingface 模型下载器

考虑到官方的 huggingface-cli 缺乏多线程下载支持,以及 hf_transfer 错误处理不足的问题,这个命令行工具巧妙地利用 wgetaria2 下载 LFS 文件,并使用 git clone 下载其他文件。

特性

  • ⏯️ 断点续传: 你可以随时重新运行或使用 Ctrl+C 中断下载。
  • 🚀 多线程下载: 利用多线程加速下载过程。
  • 🚫 文件排除: 使用 --exclude--include 跳过或指定要下载的文件,节省时间以避免下载模型的重复格式文件(例如 .bin 和 .safetensors)。
  • 🔐 认证支持: 对于需要 Huggingface 登录的私有模型,使用 --hf_username--hf_token 进行身份验证。
  • 🪞 镜像站点支持: 通过设置 HF_ENDPOINT 环境变量使用镜像站点。
@zaptrem
zaptrem / gist:717b168583a323ef8215ada1fb057d1d
Created December 2, 2022 05:34
ChatGPT Improves Itself
javascript:(function() {
var timeout = null;
var delay = 1000;
var script = document.createElement('script');
script.src = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js';
document.head.appendChild(script);
script.addEventListener('load', function() {
var mathJaxConfig = {
@ppkliu
ppkliu / scpi_tcp.py
Created May 22, 2021 02:34 — forked from pklaus/scpi_tcp.py
Python script to send commands to a Rigol scope (or any LXI/SCPI instrument) from first principles.
#!/usr/bin/env python
"""
Zeroconf Discovery for Rigol DS1000Z-series scopes
--------------------------------------------------
Documentation worth looking at:
* http://lxistandard.org/Documents/Specifications/LXI%20Device%20Specification%202011%20rev%201.4.pdf
* http://lxistandard.org/GuidesForUsingLXI/Introducing%20LXI%20To%20Your%20Network%20Administrator%20May%2024_2013.pdf
* http://lxistandard.org/GuidesForUsingLXI/LXI_Getting_Started_Guide_May_1_2013.pdf
@hypoxic
hypoxic / tds3034.py
Created October 15, 2020 01:54
Code used to capture a waveform from the Tek TDS3000 series and send it to python
# Hypoxic Capture via TDS 3034B
# Requires pyvisa and NI-VISA, not tested much, but figured I'd share as it would be helpful for others
import pyvisa
import numpy as np
import time as time
class Tek:
def __init__(self, source = "CH1"):
self.timeout = 5.0
@alirezamika
alirezamika / autoscraper-examples.md
Last active July 15, 2025 10:08
AutoScraper Examples

Grouping results and removing unwanted ones

Here we want to scrape product name, price and rating from ebay product pages:

url = 'https://www.ebay.com/itm/Sony-PlayStation-4-PS4-Pro-1TB-4K-Console-Black/203084236670' 

wanted_list = ['Sony PlayStation 4 PS4 Pro 1TB 4K Console - Black', 'US $349.99', '4.8'] 

scraper.build(url, wanted_list)
@decoc
decoc / CompileLocker.cs
Last active February 11, 2023 08:48
This editor utility can lock/unlock unity script compile from menu item. See more https://raspberly.hateblo.jp/entry/InvalidateUnityCompile
using UnityEngine;
using UnityEditor;
/// <summary>
/// This editor utility can lock/unlock unity script compile from menu item.
/// See more https://raspberly.hateblo.jp/entry/InvalidateUnityCompile
/// </summary>
public static class CompileLocker
{
[MenuItem("Compile/Lock", false, 1)]
@jasonboukheir
jasonboukheir / git
Last active August 31, 2025 14:25
git when in unix, git.exe when in wsl
#!/bin/sh
if pwd | grep /mnt/c > /dev/null; then
exec git.exe "$@"
else
exec /usr/bin/git "$@"
fi
@pirate
pirate / docker-compose-backup.sh
Last active October 9, 2025 12:11
Backup a docker-compose project, including all images, named and unnamed volumes, container filesystems, config, logs, and databases.
#!/usr/bin/env bash
### Bash Environment Setup
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail