Skip to content

Instantly share code, notes, and snippets.

@qingy1337
qingy1337 / glm-4.5-nothink.jinja
Created July 28, 2025 21:49
GLM 4.5 disabled thinking chat template
[gMASK]<sop>
{%- if tools -%}
<|system|>
# Tools
You may call one or more functions to assist with the user query.
You are provided with function signatures within <tools></tools> XML tags:
<tools>
{% for tool in tools %}
@qingy1337
qingy1337 / qsetup.sh
Created July 26, 2025 02:19
Server setup
curl -LsSf https://astral.sh/uv/install.sh | sh && source $HOME/.local/bin/env
mkdir blackwell && cd blackwell
uv venv .venv --python=3.10 --seed
source .venv/bin/activate
uv pip install -U vllm --torch-backend=cu128 --extra-index-url https://wheels.vllm.ai/nightly
uv pip install unsloth unsloth_zoo bitsandbytes
uv pip install -U triton>=3.3.1 transformers
uv pip install huggingface_hub datasets deepspeed
uv pip install https://github.com/mjun0812/flash-attention-prebuild-wheels/releases/download/v0.3.13/flash_attn-2.8.1+cu128torch2.7-cp310-cp310-linux_x86_64.whl
--- Me ---
What is the integral of cot^4(x) + 3x^2 dx ?
--- Model ---
The core task is to compute an indefinite integral involving a trigonometric function and a polynomial. The approach requires applying integration techniques (e.g., substitution, partial fractions) and algebraic manipulation. This demands careful step-by-step analysis, so deep mathematical reasoning is essential here.
</judge>
<think_on>
<think>
We are to find the integral of cot^4(x) + 3x^2 dx.
@qingy1337
qingy1337 / tailscale.md
Last active June 13, 2025 15:30
Tailscale Useful Stuff

To automatically authenticate Tailscale on startup in Ubuntu, follow these steps:

  1. Generate a reusable auth key from the Tailscale admin console at https://login.tailscale.com/admin/authkeys. Make sure to select the appropriate options for your use case (e.g., whether the node is ephemeral or not).

  2. On your Ubuntu machine, run the following commands to set up the auth key and create a systemd service:

# Create a directory for the auth key
@qingy1337
qingy1337 / commands.md
Last active May 4, 2025 17:51
Useful Commands for MacOS
Action Description Command
Turn On Accents Enable system accents defaults write -g ApplePressAndHoldEnabled -bool true
Turn Off Accents Disable system accents defaults write -g ApplePressAndHoldEnabled -bool false
Lock Dock Resizing Prevent dock size changes defaults write com.apple.Dock size-immutable -bool true; killall Dock
Unlock Dock Resizing Allow dock size changes defaults write com.apple.Dock size-immutable -bool false; killall Dock
Hide Folders/Files Hides them in Finder chflags hidden path/to/file/or/folder
Remove Caps Lock Delay No more delay when pressing caps lock hidutil property --set '{"CapsLockDelayOverride":0}'
@qingy1337
qingy1337 / desmos_media_player.py
Last active April 20, 2025 20:34
MP3/Wav to Desmos converter
# --- Configuration ---
AUDIO_FILE = 'Your MP3 File.mp3' # <<< CHANGE THIS TO YOUR AUDIO FILE (can be .wav or .mp3)
TARGET_SR = 12000 # Target sample rate, best to choose from [8000, 11025, 16000, 22050] (lower = less data, 16k is probably the best for its size, but still can reach the 5MB graph size limit, you can use 10000 or 9000 too.)
N_PARTIALS = 30 # Sine waves per frame (higher = more detail, more accurate, a bit more noisy)
GAIN_DIGITS=3 # Number of decimal places for gain values (higher = more precise, but bigger graph size)
N_FFT = 1024 # FFT window size (advanced, don't change unless you know what you're doing) Default: 1024
HOP_LENGTH = 256 # Samples between frames (also advanced)
MAX_LIST_SIZE = 9999 # Max items per list (DO NOT CHANGE)
GAIN_SCALING_POWER = 1.0 # Compress gain dynamics (0.5 is sqrt) (turn up to 0.7-1.0 if the resulting graph is not clear)