Skip to content

Instantly share code, notes, and snippets.

@mattfysh
mattfysh / esquery.py
Created September 30, 2025 00:41
esquery + python
import re
from esprima.visitor import NodeVisitor, Visited
rsel = re.compile("(?:(?P<type>\\w+)|\\s+|(?P<child>>))")
def parse_selector(sel):
matches = [m.groupdict() for m in rsel.finditer(sel)]
parsed = []
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active March 24, 2026 12:39
Conventional Commits Cheatsheet
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@apollo-mg
apollo-mg / RDNA4_ROCm7_Guide.md
Last active March 24, 2026 12:34
Guide for running AI on AMD RDNA 4 GPUs with ROCm 7.1 on Linux (Updated with Performance Tuning)

Running AI on AMD RDNA 4 (RX 9000 Series): The ROCm 7.1 & Flash Attention Survival Guide

Hardware: AMD Radeon RX 9070 XT (gfx1201)
OS: Ubuntu 22.04 LTS
Software: ROCm 7.1.0, PyTorch 2.8 (Nightly/Custom)

Getting bleeding-edge AMD hardware to play nice with AI workflows often feels like solving a puzzle. If you picked up an RDNA 4 card (like the RX 9070 XT) and tried to install standard AI libraries, you likely hit walls of C++ assembly errors.

Here is the breakdown of why it fails, and the specific strategies to get Flash Attention 2, ComfyUI, and Flux.1 running natively.

@muink
muink / clowwindy-is-right.md
Last active March 24, 2026 12:27
个人感觉shadowsocks作者说的很对的一句话

shadowsocks作者说的很对的一句话与感想

个人感想:

  • 中国人很投机, 包括本人在部分情况下也是投机者. 总想不劳而获, 抄袭他人劳动成果. 想想我们学生时代的抄袭作弊之风盛行便可知... (然而为什么会这样)
  • "土皇帝"情节, 因自己在某方面上比别人强, 听听粉丝的追捧, 就觉得自己不可一世, 比别人优越, 殊不知人外有人山外有山, 而且自己在其他方面也有不如他人的地方. (然而为什么会这样)
  • 家长情节 总想要一个"家长"来管理一切, 把应该由自己解决的问题抛给别人"包办解决", 图一时之便. 久而久之结果就是并不了解你一切的"家长""包办解决"你的一切, 而你却失去了基本的思考解决问题能力, 看不到目标, 找不到方法, 只好任由"家长"摆布. 这种"爱"是现实的囚笼. (然而为什么会这样)

原文内容:

@kamran-600
kamran-600 / FaceDetectionInsideOvalWithCameraX.kt
Last active March 24, 2026 12:26
Face Detection inside oval with CameraX api
import android.content.Context
import androidx.annotation.OptIn
import androidx.camera.compose.CameraXViewfinder
import androidx.camera.core.AspectRatio
import androidx.camera.core.CameraSelector
import androidx.camera.core.ExperimentalGetImage
import androidx.camera.core.ImageAnalysis
import androidx.camera.core.ImageCapture
import androidx.camera.core.ImageCaptureException
@trfi
trfi / docker-compose.yml
Created March 24, 2026 12:22
SigNoz deployment configuration for Dokploy using Docker Compose
services:
otel-collector-conf:
image: alpine:3.20
command:
- /bin/sh
- -lc
- |
# Create OTel Collector configuration
cat > /otel/otel-collector-config.yaml <<'YAML'
receivers:
@mcxiaoke
mcxiaoke / miui-blotware-apps.md
Last active March 24, 2026 12:21
MIUI 13/14 bloatware apps, updated at 20240816

对于所有应用,不建议直接删除,使用adb shell pm disable-user package-name禁用即可,方便出问题时恢复。

DO NOT UNINSTALL:

  • com.miui.securitycenter
  • com.miui.securityadd
  • com.xiaomi.finddevice

(Don’t uninstall these three apps or services from your Xiaomi device. Otherwise, you may encounter device bricking or bootloop issues.)

@mateoltd
mateoltd / vectorizer-downloader-userscript.js
Last active March 24, 2026 12:20
Vectorizer Downloader
// ==UserScript==
// @name Vectorizer.AI Downloader
// @version 0.1.0
// @description Intercepts the canvas drawing process on vectorizer.ai to reconstruct and download the full SVG result for free.
// @author mateoltd
// @namespace http://tampermonkey.net/
// @license MIT
@huihut
huihut / Windows10-professional-activation.md
Created August 2, 2018 09:32
Windows10 专业版 激活方法
  1. 以管理员身份运行CMD
  2. slmgr.vbs /upk
  3. slmgr /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX
  4. slmgr /skms zh.us.to
  5. slmgr /ato