Skip to content

Instantly share code, notes, and snippets.

View xqm32's full-sized avatar
🎯
Focusing

Qiming Xu xqm32

🎯
Focusing
View GitHub Profile
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.13"
# dependencies = [
# "rich>=15.0.0",
# ]
# ///
from json import load
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.14"
# dependencies = [
# "msgpack>=1.1.2",
# "pendulum>=3.2.0",
# ]
# ///
@xqm32
xqm32 / confluencer.py
Last active May 12, 2026 07:34
Confluencer - The Confluence Search Tool for LLM Agents
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.14"
# dependencies = [
# "atlassian-python-api>=4.0.7",
# "loguru>=0.7.3",
# "markitdown>=0.1.5",
# "platformdirs>=4.9.6",
# "python-dotenv>=1.2.2",
const std = @import("std");
const B = u64;
const D = enum(u2) { l, r, u, d };
const K = union(enum) { m: D, u, r, q, n };
const M = struct { b: B, s: u32 };
const R = packed struct(u64) { r: u16, s: u32, _: u16 = 0 };
const T = mk();
const S = sk();
@xqm32
xqm32 / wst
Last active May 21, 2026 16:52
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.14"
# dependencies = [
# "rich>=14.3.3",
# ]
# ///
from json import dumps
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Micro Drift (Osmos-like)</title>
<style>
html, body {
margin: 0;
height: 100%;
{
"$defs": {
"GroupConfig": {
"properties": {
"name": {
"anyOf": [{ "type": "string" }, { "type": "null" }],
"default": null,
"title": "Name"
},
"schedule": {
@xqm32
xqm32 / wsc
Last active April 2, 2026 10:03
#!/usr/bin/env -S uv run --script --quiet
# /// script
# requires-python = ">=3.13"
# dependencies = []
# ///
import json
from pathlib import Path
import shutil
@xqm32
xqm32 / gacha.go
Created February 21, 2025 16:09
Gacha
package gacha
import "math/rand/v2"
var (
Char5Prob = []int{
60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 660, 1260, 1860, 2460, 3060, 3660, 4260, 4860, 5460, 6060, 6660, 7260, 7860, 8460, 9060,
package style
import (
"os"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/lipgloss/table"
"github.com/samber/lo"
"golang.org/x/term"
)