text
stringlengths
185
73.3k
repo
stringlengths
7
100
path
stringlengths
4
146
language
stringclasses
7 values
hash
stringlengths
16
16
score
float64
7
8.5
stars
int64
0
237k
"""Installation state tracking for fast module startup. Tracks fingerprints of installed modules to skip redundant `uv pip install` calls. When a module's pyproject.toml/requirements.txt hasn't changed, we can skip the install step entirely, significantly speeding up startup. """ from __future__ import annotations i...
microsoft/amplifier-foundation
amplifier_foundation/modules/install_state.py
.py
a769fba684cdf5c6
7.62
16
"""Path construction utilities for bundle resources.""" from __future__ import annotations from pathlib import Path def construct_agent_path(base: Path, name: str) -> Path: """Construct path to an agent file. Looks for agent in agents/ subdirectory with .md extension. Args: base: Base director...
microsoft/amplifier-foundation
amplifier_foundation/paths/construction.py
.py
fd263eee46577877
7.62
16
"""URI parsing and path normalization utilities.""" from __future__ import annotations import os import platform import re from dataclasses import dataclass from pathlib import Path from urllib.parse import urlparse # Precompiled regex for parsing git+https:// URI paths. # Extracts path and optional ref (branch/tag)...
microsoft/amplifier-foundation
amplifier_foundation/paths/resolution.py
.py
743b71f52c15bf9e
7.62
16
""" 네이버 카페 공개 게시글 수집 (로그인 불필요) - 공개 카페만. 비공개 카페는 로그인 필요 → 이 스크립트 범위 밖 - 네이버는 안티봇 강함 → curl_cffi(브라우저 TLS) 또는 playwright 사용 - robots.txt·ToS 확인 필수 """ from curl_cffi import requests from bs4 import BeautifulSoup import json, sys, time, re HEADERS = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " ...
dmae97/omk-crawling
examples/naver_cafe_public.py
.py
4f8bead48ce45262
7.42
6
"""Detection heuristics — what's blocking us, what do we need?""" from __future__ import annotations import importlib.util from dataclasses import dataclass from enum import Flag, auto from functools import lru_cache from urllib.robotparser import RobotFileParser from omk_crawl.result import CrawlStatus class Bloc...
dmae97/omk-crawling
omk_crawl/detect.py
.py
cddd6c8a1b89b46f
7.42
6
"""Pipeline — compose fetch → extract → convert steps.""" from __future__ import annotations from collections.abc import Callable from dataclasses import dataclass, field from typing import Any from omk_crawl.result import CrawlResult, CrawlStatus from omk_crawl.router import SmartRouter @dataclass class Pipeline:...
dmae97/omk-crawling
omk_crawl/pipeline.py
.py
cea56acc8a92e2e5
7.42
6
"""Unified crawl result across all tools.""" from __future__ import annotations import time from dataclasses import dataclass, field from enum import Enum from typing import Any class CrawlStatus(Enum): """Outcome of a crawl attempt.""" OK = "ok" BLOCKED = "blocked" # 403 / WAF / anti-bot TLS_BLOC...
dmae97/omk-crawling
omk_crawl/result.py
.py
d602b704f2932e73
7.42
6
"""Detection-aware routing — pick the next tool from *what* is blocking us. The default escalation chain is a fixed ladder (lightest → heaviest). Once we detect the blocking mechanism, we can reorder the remaining rungs so the tool most likely to succeed is tried next — instead of climbing one rung at a time. That is ...
dmae97/omk-crawling
omk_crawl/routing.py
.py
85e9a91428712ed9
7.42
6
"""One-time GitHub star nudge shown after a successful interactive run. Rules this module never breaks: * stdout is sacred — every byte goes to **stderr**, so `omk-crawl url > out.md` and `omk-crawl url --json | jq` stay clean. * Only ever speaks on a real TTY (stdin *and* stderr), never in CI, never under pytest...
dmae97/omk-crawling
omk_crawl/star.py
.py
ceedce3848f876d6
7.42
6
"""Tool registry — all adapters in one place.""" from __future__ import annotations from omk_crawl.tools.apk_tool import ApkTool from omk_crawl.tools.appstore_tool import AppStoreTool from omk_crawl.tools.autoscraper_tool import AutoscraperTool from omk_crawl.tools.baemin_tool import BaeminTool from omk_crawl.tools.b...
dmae97/omk-crawling
omk_crawl/tools/__init__.py
.py
addec7c9ec3e5859
7.42
6
"""APK static analysis adapter — package:// or path to .apk.""" from __future__ import annotations import json import time from pathlib import Path from typing import Any from urllib.parse import unquote, urlparse from omk_crawl.mobile.apk_analyze import analyze_apk from omk_crawl.result import CrawlResult, CrawlSta...
dmae97/omk-crawling
omk_crawl/tools/apk_tool.py
.py
912a4cfcfc13bee7
7.42
6
"""Base tool adapter interface.""" from __future__ import annotations import abc from typing import Any from omk_crawl.detect import tool_available from omk_crawl.result import CrawlResult, CrawlStatus # Common kwargs every adapter understands *by name*. Each adapter declares which # it actually implements via `cap...
dmae97/omk-crawling
omk_crawl/tools/base.py
.py
f5244bebfd3331a1
7.42
6
"""InsaneSearch — hyper-aggressive single-URL unblocker. First-line breaker when everything else fails. Bypasses: - TLS/JA3 fingerprinting (impersonate rotation × 8 profiles) - Cloudflare / Turnstile (real browser fallback) - Akamai / Datadome / Imperva (header trickery) - Rate limiting (token bucket + jitter)...
dmae97/omk-crawling
omk_crawl/tools/insane_search_tool.py
.py
b420a94fafafc0a7
7.42
6
"""markitdown adapter — file → Markdown conversion.""" from __future__ import annotations from typing import Any from omk_crawl.result import CrawlResult, CrawlStatus, _timer from omk_crawl.tools.base import BaseTool class MarkitdownTool(BaseTool): name = "markitdown" pip_package = "markitdown[all]" la...
dmae97/omk-crawling
omk_crawl/tools/markitdown_tool.py
.py
85510eccd8683848
7.42
6
#!/usr/bin/env python3 from __future__ import annotations import argparse import re from datasets import load_dataset from transformers import AutoModelForCausalLM, AutoTokenizer # The canonical example deliberately uses Transformers generation, not vLLM. # TRL 0.20 probes any system-wide vLLM installation while imp...
rwkv-rs/hf-adapter
examples/finetune/grpo_lora.py
.py
d2bc502a265a8e0f
7.45
7
#!/usr/bin/env python3 # coding=utf-8 """Dependency-free, traversal-safe file helpers used by the converter. ``OBSOLETE_08_ADAPTER_FILES`` is only a removal list. It lets an in-place conversion clean files emitted by the 0.8 performance-oriented layout; none of those modules is copied, imported, or shipped by the 0.9 ...
rwkv-rs/hf-adapter
rwkv7_hf/adapter_manifest.py
.py
c3a3370ae909804a
7.45
7
# coding=utf-8 """Configuration for the readable, pure-PyTorch RWKV-7 HF reference model.""" from __future__ import annotations from transformers import PretrainedConfig class RWKV7Config(PretrainedConfig): """Describe an RWKV-7 checkpoint without selecting a hardware backend. The names intentionally match ...
rwkv-rs/hf-adapter
rwkv7_hf/configuration_rwkv7.py
.py
6b1b07047312e1fb
7.45
7
# coding=utf-8 """Small, hardware-neutral PyTorch operator boundary for RWKV-7.""" from __future__ import annotations import torch def rwkv7_recurrent( receptance: torch.Tensor, decay: torch.Tensor, key: torch.Tensor, value: torch.Tensor, a: torch.Tensor, b: torch.Tensor, initial_state: t...
rwkv-rs/hf-adapter
rwkv7_hf/ops_rwkv7.py
.py
4045c41a7b64d372
7.45
7
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Universal MCP Client - Bundle with any skill that needs MCP access. Supports both HTTP and stdio transports for connecting to MCP servers. Usage: # List available tools from an HTTP MCP server python mcp-client.py list --url http://localhost:8080 # List ...
Ub207/vault-sync
.qwen/skills/browsing-with-playwright/scripts/mcp-client.py
.py
03bc2c7137b4e2c1
7.48
8
# Copyright Reexpress AI, Inc. All rights reserved. import json import os import numpy as np import argparse import time from pathlib import Path import codecs import torch from collections import namedtuple from pydantic import BaseModel import asyncio def save_by_appending_json_lines(filename_with_path, json_lis...
ReexpressAI/reexpress_mcp_server
code/data_processing/code/analysis/data_utils.py
.py
2d1de7030bf280dd
7.48
8
# Copyright Reexpress AI, Inc. All rights reserved. # Management of tool-call counts. This implements hard (requiring a server restart) and soft (user resettable) limits # as a guard against runaway calling of the Reexpress tool and unnecessary sequential calls before adapting the model. from pathlib import Path impo...
ReexpressAI/reexpress_mcp_server
code/reexpress/mcp_utils_tool_limits_manager.py
.py
a15ff6c2c636fa93
7.48
8
""" Reusable FastAPI dependency factories for DB list-endpoint query parameters. The book filter fields are defined once in BOOK_FILTER_FIELDS. The book_filters() factory builds a dependency class from them, optionally omitting fields that are an endpoint's scope rather than a filter (e.g. the plan endpoint omits "pla...
LibexHQ/Libex
app/api/routes/db/filters.py
.py
37b000be6b1f3fd3
7.5
9
""" Shared filter query-parameter dependency for live (Audible-backed) list endpoints. Exposes only the filters that filter_dicts (app/services/filtering.py) actually applies to an in-memory book list — so what shows in the OpenAPI docs is exactly what works. Heavy free-text filters live on /db/book instead, which has...
LibexHQ/Libex
app/api/routes/filter_params.py
.py
1a5ee19c0574f58b
7.5
9
""" Narrators route schemas. """ # Third party from pydantic import BaseModel class AudioSampleResponse(BaseModel): url: str title: str | None = None genre: str | None = None source: str | None = None class NarratorProfileResponse(BaseModel): name: str description: str | None = None ima...
LibexHQ/Libex
app/api/routes/narrators/schemas.py
.py
7dee4120873b34ae
7.5
9
""" Core configuration for Libex. Settings are loaded from environment variables with sensible defaults. """ # Standard library from functools import lru_cache # Third party from pydantic_settings import BaseSettings, SettingsConfigDict class Settings(BaseSettings): model_config = SettingsConfigDict( en...
LibexHQ/Libex
app/core/config.py
.py
38fa89c476c2afcc
7.5
9
""" Custom exceptions for Libex. """ class LibexException(Exception): """Base exception for all Libex errors.""" def __init__(self, message: str, status_code: int = 500): self.message = message self.status_code = status_code super().__init__(self.message) class NotFoundException(Libe...
LibexHQ/Libex
app/core/exceptions.py
.py
aa0d3b87700dcdf9
7.5
9
# Standard library import atexit import datetime import logging import logging.handlers import os import queue import sys import time # Local from app.core.config import get_settings # Standard library - optional, Unix only. Grouped with the other conditional # imports rather than above, so the unconditional imports ...
LibexHQ/Libex
app/core/logging.py
.py
facb1c492a8c8ca2
7.5
9
""" Single source of truth for the libexdb.com migration notice. `build_migration_notice` is the ONLY predicate for whether the notice is on — it requires the flag, the new host, and both dates to be present, stripped, and parseable, with sunset not before announced. Every call site (the middleware that stamps headers...
LibexHQ/Libex
app/core/migration_notice.py
.py
3b1424a8f1e86572
7.5
9
""" Shared utility functions. """ # Standard library import re from datetime import datetime, time, timedelta, timezone def strip_html(text: str | None) -> str | None: """ Strips HTML tags and cleans up Audible text artifacts. Handles: HTML tags, escaped quotes, literal \\r\\n sequences, leading/trai...
LibexHQ/Libex
app/core/utils.py
.py
10f7fa9e42080be7
7.5
9
""" Background completion of author-books walks that ran out of time. A live author-books request is bounded by what a caller will wait for, and the fronting proxy gives up at 30 seconds regardless. A prolific author's walk can exceed that, and when it does the request has a partial ASIN list and a choice: hand it ove...
LibexHQ/Libex
app/services/audible/authors/completion.py
.py
f56d42daea1dffad
7.5
9
"""Behavioral tests for the Codex-manifest drift PostToolUse hook. The hook (``check-codex-manifest-drift.sh``) is a shift-left guard for the CI ``codex-manifest-drift`` gate. It must: - fire for ANY plugin's ``*/.codex-plugin/plugin.json`` or ``*/.claude-plugin/plugin.json`` edit (not just loom-code), - derive the...
kouko/monkey-skills
.claude/hooks/test_check_codex_manifest_drift.py
.py
0fb460d7d43d6ad8
7.92
6
"""Behavioral tests for the memory-store integrity PostToolUse hook. The hook (``check-memory-store-integrity.sh``) is a shift-left guard for the CI step that runs ``scripts/check_loom_memory_integrity.py``. It must: - fire for any edit under ``docs/loom/memory/``, including the store's own ``README.md`` (deleting ...
kouko/monkey-skills
.claude/hooks/test_check_memory_store_integrity.py
.py
73f8948012b443de
7.92
6
"""Tests for the ascii-graph-toolkit SessionStart trigger-card hook. Task 1 (this file, first test only): pins the hook's emitted JSON shape and content. Mirrors loom-design/scripts/pipeline/test_family_relay.py's style (mechanical marker-grep + subprocess execution over the real hook script, not a mock). test_descri...
kouko/monkey-skills
ascii-graph-toolkit/scripts/test_trigger_card.py
.py
10be401d27f9e73b
7.92
6
"""align.py — alignment oracle CLI for ASCII/Unicode diagrams. Verification-class scaffolding: the model draws the diagram, this measures display-width drift and reports it; the model fixes. It does NOT lay out and does NOT edit the diagram. Wires the three drift checks (vertical seam, table equal-width, kink + arrow...
kouko/monkey-skills
ascii-graph-toolkit/skills/ascii-graph/scripts/align.py
.py
b5eaa273bc4c70b5
7.42
6
"""checks_seam.py — vertical-seam connect check for ASCII/Unicode diagrams. Verification-class scaffolding: the model draws, this measures and reports drift, the model fixes. It does NOT lay out and does NOT edit the diagram. Check: every box vertical (│ ┃ ║ and other line styles) must connect to a structural glyph (...
kouko/monkey-skills
ascii-graph-toolkit/skills/ascii-graph/scripts/checks_seam.py
.py
b616e35b27943108
7.42
6
"""Table-block equal-width check. Detect table blocks and flag any row whose display_width differs from the block's reference width. This catches CJK tables sized by character count instead of terminal-cell width. A table block is a maximal run of consecutive lines that share the same LEFT frame column -- the display...
kouko/monkey-skills
ascii-graph-toolkit/skills/ascii-graph/scripts/checks_table.py
.py
4d7ef0c2d707d770
7.42
6
"""Linear flow-diagram generator. render_flow stacks labelled boxes vertically on a common trunk column, joined by a centered down-arrow: ┌──────────┐ │ 収到訂單 │ └──────────┘ │ ▼ ┌──────────┐ │ 驗證ユーザー │ └──────────┘ ... All boxes share one interior width (= max labe...
kouko/monkey-skills
ascii-graph-toolkit/skills/ascii-graph/scripts/gen_flow.py
.py
53953e140c2fdb6d
7.42
6
"""Sequence-diagram generator (participants + message rows). render_seq lays participant boxes side by side across the top, each with a lifeline stub `┬` centered under its box and vertical lifelines `│` running below, then renders each message as a label row + a directional arrow row: ┌──────┐ ┌──────────────┐...
kouko/monkey-skills
ascii-graph-toolkit/skills/ascii-graph/scripts/gen_seq.py
.py
985575b81ccf26f6
7.42
6
"""CJK-aligned ASCII/Unicode table generator. Column widths and cell padding are computed with display_width (terminal cells), not str len, so CJK/JP wide-character cells align in a monospace terminal. Unicode box-drawing characters are used by default; ascii_only falls back to +, -, | so the output survives ASCII-onl...
kouko/monkey-skills
ascii-graph-toolkit/skills/ascii-graph/scripts/gen_table.py
.py
9d0616cfc3e1033d
7.42
6
"""Classic Unicode tree / hierarchy renderer. A node is a dict {"label": str, "children": [node, ...]} (children optional / empty). The root label sits on line 1; each descendant is prefixed with branch glyphs that precede the label, so CJK labels do not affect the branch columns: 訂單系統 ├─ 訂單服務 └─ 庫存サービス ...
kouko/monkey-skills
ascii-graph-toolkit/skills/ascii-graph/scripts/gen_tree.py
.py
179b4a8638fd491f
7.42
6
"""Dispatch CLI for the four ASCII/Unicode diagram generators. Reads a JSON payload from stdin describing one shape's input, routes to the matching generator, prints the rendered diagram, returns 0. Shapes: table {"headers": [...], "rows": [[...]], "ascii_only": false} flow {"steps": [...]} tree {"no...
kouko/monkey-skills
ascii-graph-toolkit/skills/ascii-graph/scripts/generate.py
.py
0abdf41db583d00e
7.42
6
"""Shared display-width primitive for terminal-cell measurement. Width policy: - CJK Wide / Fullwidth characters -> 2 cells - Ambiguous-width characters -> 1 cell - Box-drawing characters (U+2500..257F) -> 1 cell - Control / zero-width characters -> 0 cells - Everything else (narrow AS...
kouko/monkey-skills
ascii-graph-toolkit/skills/ascii-graph/scripts/width.py
.py
1624430ac17b300a
7.42
6
"""Contract tests for the table-block equal-width check. A "table block" is a maximal run of consecutive lines that each start and end with a box vertical (│ as the first and last non-space glyph), optionally bracketed by ┌─┐ / ├─┤ / └─┘ border lines. find_issues flags any line in a block whose display_width differs f...
kouko/monkey-skills
ascii-graph-toolkit/skills/ascii-graph/tests/test_checks_table.py
.py
f709646f560b0eb4
7.92
6
"""End-to-end dogfood: oracle + generators wired together on mixed 中/日 input. These are integration smoke tests for the whole ascii-graph loop: 1. A real, display-width-aligned branching flowchart (mixed Traditional Chinese / Japanese) passes the oracle end-to-end with ZERO drift — the diagram below was c...
kouko/monkey-skills
ascii-graph-toolkit/skills/ascii-graph/tests/test_e2e.py
.py
b0d8e11f0a23bce1
7.92
6
"""Contract tests for the layered-architecture diagram generator. render_arch stacks one INDEPENDENT box per layer, all sharing one outer interior width. Correctness is verified by display_width, not len: every rendered line MUST occupy the same number of terminal cells, and the two layer boxes MUST share one outer wi...
kouko/monkey-skills
ascii-graph-toolkit/skills/ascii-graph/tests/test_gen_arch.py
.py
132ade78ab54e75f
7.92
6
"""Contract tests for the CJK-aligned horizontal bar chart generator. Label-column alignment is verified by display_width, not len: every row's label segment MUST occupy the same number of terminal cells so that CJK/JP/EN-mixed labels line up before the bar starts. Bar lengths are verified to scale proportionally to t...
kouko/monkey-skills
ascii-graph-toolkit/skills/ascii-graph/tests/test_gen_bar.py
.py
4f00d061e925d673
7.92
6
"""Contract tests for the linear-flow generator (render_flow). render_flow stacks each step as a box (┌─┐ │ label │ └─┘) on a common trunk column, joined by a centered down-arrow. The two invariants that make the diagram look right on a terminal are: (a) every box-border line shares the same display_width -- so the...
kouko/monkey-skills
ascii-graph-toolkit/skills/ascii-graph/tests/test_gen_flow.py
.py
60ccaeb471d8b185
7.92
6
"""Contract tests for the sequence-diagram generator (participant skeleton). render_seq lays participant boxes side by side across the top, each with a lifeline stub `┬` centered under its box and vertical lifelines `│` running below. Task 1 renders ONLY the participants-only skeleton (messages are accepted but not ye...
kouko/monkey-skills
ascii-graph-toolkit/skills/ascii-graph/tests/test_gen_seq.py
.py
557d27aa2f369795
7.92
6
"""Contract tests for the CJK-aligned table generator. Alignment correctness is verified by display_width, not len: every rendered line MUST occupy the same number of terminal cells so that CJK/JP/EN-mixed cells line up in a monospace terminal. """ import pathlib import sys sys.path.insert(0, str(pathlib.Path(__file...
kouko/monkey-skills
ascii-graph-toolkit/skills/ascii-graph/tests/test_gen_table.py
.py
a9584d2efffac869
7.92
6
"""Contract tests for the Unicode tree/hierarchy generator. Branch glyphs (├─ └─ │) precede the labels, so the columns at which those glyphs appear are constant regardless of CJK label width — that column-stability is the observable proof the tree was rendered with a correct per-ancestor continuation prefix. """ impo...
kouko/monkey-skills
ascii-graph-toolkit/skills/ascii-graph/tests/test_gen_tree.py
.py
dc03424e0a3b386d
7.92
6
"""Contract tests for the generate.py dispatch CLI. render(shape, payload) is the testable seam (no subprocess); it routes to the matching generator and returns the rendered diagram. Each shape is exercised with a CJK/JP fixture so we prove the dispatch preserves the underlying generator's CJK behavior, not just that ...
kouko/monkey-skills
ascii-graph-toolkit/skills/ascii-graph/tests/test_generate_cli.py
.py
ae82cad2b7851f53
7.92
6
"""Contract tests for the shared display-width primitive. Width policy (from the brief): CJK Wide/Fullwidth = 2, Ambiguous = 1, box-drawing = 1, control/zero-width = 0. Expectations verified against the wcwidth package before being asserted here. """ import pathlib import sys sys.path.insert(0, str(pathlib.Path(__fi...
kouko/monkey-skills
ascii-graph-toolkit/skills/ascii-graph/tests/test_width.py
.py
bd91705a445fd8c6
7.92
6
#!/usr/bin/env python3 """Lint copywriting-toolkit voice anchor library. Checks each `standards/anchor-{slug}.md` file against the v2 schema defined in `standards/voice-anchor-meta.md §Schema (v2 — single active schema)`, plus the machine-checkable portions of the 4-condition anchor selection rubric. Moved from Pass ...
kouko/monkey-skills
copywriting-toolkit/scripts/lint-anchor-library.py
.py
8dc9cab6ca1fac8c
7.42
6
"""Pins for copywriting-audit-stage's variant re-gating aggregation semantics (contract/craft convergence vocabulary, plan Task 6). Window discipline (docs/loom/memory/grep-tests-scope-to-measured-neighborhood.md): presence assertions are scoped to the "Variant re-gating loop — formal contract" section (unique anchor ...
kouko/monkey-skills
copywriting-toolkit/scripts/test_audit_gate_semantics.py
.py
ba55aefa99e04c5b
7.92
6
"""Pins for check_anchor_copies.py — verifies the two INLINE-duplicated Tier 1 standards files (copywriting-toolkit/CLAUDE.md §INLINE-duplicate clarification) stay byte-identical across their skill copies. No registered REQ-ids in this dispatch — @req tags intentionally omitted. """ import importlib.util import sys f...
kouko/monkey-skills
copywriting-toolkit/scripts/test_check_anchor_copies.py
.py
aed162ce59088fc3
7.92
6
"""Pins for copywriting-toolkit/CLAUDE.md §Envelope Validation (Task 9). Task 8 shipped `scripts/validate_envelope.py` as the file-borne enforcement medium for the handoff envelope; this task wires that contract into CLAUDE.md so the prose that used to only WARN about counters/immutability now POINTS at the mechanical...
kouko/monkey-skills
copywriting-toolkit/scripts/test_claude_md_validation_wiring.py
.py
e07cf38f792330bb
7.92
6
"""Pins for the canonical convergence vocabulary in copywriting-toolkit/CLAUDE.md. Window discipline (docs/loom/memory/grep-tests-scope-to-measured-neighborhood.md): every presence assertion is scoped to the vocabulary section extracted by its unique heading anchor — never whole-file — so generic terms elsewhere in CL...
kouko/monkey-skills
copywriting-toolkit/scripts/test_convergence_vocabulary.py
.py
4fb1dc2de572c1de
7.92
6
"""Pins for the copywriter-evaluator contract (contract/craft classes + prior_findings_check round-2 duty). Window discipline (docs/loom/memory/grep-tests-scope-to-measured-neighborhood.md): presence assertions are scoped to the evaluator section extracted by its unique heading anchor — never whole-file — so generic t...
kouko/monkey-skills
copywriting-toolkit/scripts/test_evaluator_contract.py
.py
60effd95b1e82402
7.92
6
"""Pins for copywriting-form-check-stage's 8b verdict rule (contract-class aggregation, pointer to CLAUDE.md — no local restatement) and the form-appropriate-gate rubric's dimension-row class annotations (contract = objective form-constraint; craft = qualitative, recorded). Window discipline (docs/loom/memory/grep-tes...
kouko/monkey-skills
copywriting-toolkit/scripts/test_form_check_gate_semantics.py
.py
01e0ce473987c20e
7.92
6
"""Pin: copywriting-intake's Q8 grill BLOCKED halt must be a verifiable mechanical condition (named still-empty required fields), not a judgment call ("user cannot decide"). WHY: docs/loom/memory/prose-only-enforcement-dies-on-weak-executors.md — weak executors preserve vocabulary but drop prose-only enforcement dutie...
kouko/monkey-skills
copywriting-toolkit/scripts/test_intake_blocked_verifiable.py
.py
d2cbbda3b5ebff9d
7.92
6
"""Guards the post-draft overlay-mode output-envelope example in copywriting-neta-injection/SKILL.md against passthrough-field drift. The canonical envelope shape (copywriting-toolkit/CLAUDE.md §Handoff Envelope) carries `express_mode_used`, `audit_trail`, and `retries` as immutable passthrough fields every mid-pipeli...
kouko/monkey-skills
copywriting-toolkit/scripts/test_neta_overlay_example.py
.py
011d6194fe6df310
7.92
6
"""Pins for copywriting-neta-injection/rubrics/neta-safety-gate.md's Verdict Rules section: contract-class-only aggregation (mirrors the sibling fix already landed on voice-consistency-gate.md, commits 50caf36a + e32498db) and copywriting-neta-injection/SKILL.md's verdict enum declaration. Window discipline (docs/loom...
kouko/monkey-skills
copywriting-toolkit/scripts/test_neta_rubric_semantics.py
.py
0d68862451789b6b
7.92
6
"""Pins for using-copywriting-toolkit/SKILL.md router validator wiring (Task 10). Task 9 landed CLAUDE.md's `## Envelope Validation` section (the mechanics: work-file convention, exit codes, `--prev` duty). This task wires the ACTING-MOMENT imperative into the router's own SKILL.md — the routing loop must instruct ser...
kouko/monkey-skills
copywriting-toolkit/scripts/test_router_validator_wiring.py
.py
8ebdd9e28c71fdb4
7.92
6
"""Pins for copywriting-voice-quadrant-stage's Gate passage: contract-class semantics applied to declared-voice-target (quadrant) mismatches, with positioning nuance carried as craft (recorded, never gates). Window discipline (docs/loom/memory/grep-tests-scope-to-measured-neighborhood.md): presence assertions are scop...
kouko/monkey-skills
copywriting-toolkit/scripts/test_voice_quadrant_gate_semantics.py
.py
bd484bb269256cb5
7.92
6
"""Pins for copywriting-voice-tone-stage/rubrics/voice-consistency-gate.md's Verdict Rules section: contract-class-only aggregation (mirrors the sibling fix already landed in the SKILL.md gate passage, commit 0ea45ea1). Window discipline (docs/loom/memory/grep-tests-scope-to-measured-neighborhood.md): presence asserti...
kouko/monkey-skills
copywriting-toolkit/scripts/test_voice_rubric_semantics.py
.py
9a54bbed0a54122e
7.92
6
"""Tier definitions and OnIt agent configuration for benchmarks. A *tier* is just a preset of (sample limit, concurrency). The benchmark task code is tier-agnostic; the tier is applied at run time by ``run.py``. The eval target (model/host) is resolved from environment variables so the same task code can run against ...
sibyl-oracles/onit
benchmarks/config.py
.py
cc5f236b593f304f
7.48
8
"""Inspect AI model provider that drives the real OnIt agent. Registers an ``onit`` provider so benchmarks can use ``model="onit/<label>"``. Each :meth:`OnItAPI.generate` call runs one task end-to-end through :meth:`OnIt.process_task`, exercising OnIt's real prompt engineering, MCP tool registry, and tool loop — not j...
sibyl-oracles/onit
benchmarks/onit_provider.py
.py
420cf5ce9ee8bd68
7.48
8
"""Aggregate Inspect ``.eval`` logs into a markdown + JSON summary. Reads every eval log under a directory, extracts the headline metric per benchmark, writes ``summary.json`` and ``summary.md`` alongside them, and (optionally) diffs against a committed baseline to flag regressions. The CI smoke gate uses ``--baseline...
sibyl-oracles/onit
benchmarks/report.py
.py
4fac8376afce371c
7.48
8
"""CLI entry point for the OnIt benchmark suite. Thin wrapper over ``inspect_ai.eval`` that: * registers the ``onit`` model provider, * resolves the eval target (host/model) from the environment, * applies a tier preset (sample limit + concurrency), * and runs one or more benchmark tasks. Examples: ...
sibyl-oracles/onit
benchmarks/run.py
.py
4dca08d021a79076
7.48
8
"""SWE-bench runner for the OnIt agent. SWE-bench is a *repo-editing agent* benchmark, not a code-generation one, so it does not fit the final-answer provider path used by the other coding tasks. This runner integrates it the way OnIt actually works: 1. **Edit (OnIt).** For each instance, the repo is checked out ...
sibyl-oracles/onit
benchmarks/swe_bench_runner.py
.py
fac3c010ad1f857c
7.48
8
"""Agentic / tool-use benchmarks (Phase 4 — scaffold). These are the benchmarks where OnIt's tool loop matters most: * GAIA — canonical general-assistant, multi-step tool tasks. Run in provider mode (OnIt drives its own tools); scored by exact match. Uses the gated ``gaia-benchmark/GAIA`` dataset (needs ``HF_TOKE...
sibyl-oracles/onit
benchmarks/tasks/agentic.py
.py
a607d9a70a4a38f0
7.48
8
"""Factuality benchmarks (Phase 3 — scaffold). Measures short-fact accuracy and hallucination rate. Web-search/fetch tools are left enabled so the score reflects the *agent*, not just the base model. Wired in Phase 3: SimpleQA, TruthfulQA, FRAMES. Not yet registered in ``run.py``; add to ``benchmarks/run.py`` TASKS w...
sibyl-oracles/onit
benchmarks/tasks/factuality.py
.py
8593afb476f6a9b4
7.48
8
"""Reasoning / problem-solving benchmarks. Phase 1 ships GSM8K as the smoke reasoning task. Later phases add GPQA-Diamond, MMLU-Pro, MATH/AIME, BBH, and DROP (see the suite plan). """ from __future__ import annotations import re from inspect_ai import Task, task from inspect_ai.dataset import Sample, hf_dataset fro...
sibyl-oracles/onit
benchmarks/tasks/reasoning.py
.py
d4a0c33406f89610
7.48
8
"""Unit tests for the OnIt Inspect provider — no model, network, or Docker. A stub agent stands in for the real ``OnIt`` so we can verify the provider's message flattening, the generate() path, and the full Inspect eval+scorer wiring deterministically. """ from __future__ import annotations import pytest from inspec...
sibyl-oracles/onit
benchmarks/test_provider.py
.py
4d4a1ddcdc176939
7.98
8
"""Offline tests for the SWE-bench runner — no Docker, no network, no git.""" from __future__ import annotations import json from pathlib import Path import pytest from benchmarks import config as bench_config from benchmarks.swe_bench_runner import ( DATASETS, _load_existing, _strip_test_hunks, _w...
sibyl-oracles/onit
benchmarks/test_swe_bench.py
.py
ca7207ef62648896
7.98
8
""" # Copyright 2025 Rowel Atienza. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
sibyl-oracles/onit
src/learn/config.py
.py
6c0e074a89ae5f04
7.48
8
""" # Copyright 2025 Rowel Atienza. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
sibyl-oracles/onit
src/learn/trajectory.py
.py
44ddcffa1bdbd10b
7.48
8
import os import shutil import logging logger = logging.getLogger(__name__) # File extensions that indicate code/project files (not session artifacts) _CODE_EXTENSIONS = { '.py', '.js', '.ts', '.jsx', '.tsx', '.java', '.c', '.cpp', '.h', '.hpp', '.cs', '.go', '.rs', '.rb', '.php', '.swift', '.kt', '.scala', '...
sibyl-oracles/onit
src/lib/files.py
.py
63a0a7d54499dc0f
7.48
8
''' # Copyright 2025 Rowel Atienza. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
sibyl-oracles/onit
src/lib/schema.py
.py
23258b93bd70224b
7.48
8
import re # Only spans that are actually tag-shaped. A bare "<" is ordinary prose in a # model answer — "mean 0.709 < 0.712", a generic in a sentence, a stray # comparison — and a pattern of <[^>]+> pairs that "<" with the next ">" it can # find, which may be a closing wrapper tag thousands of characters later. The ...
sibyl-oracles/onit
src/lib/text.py
.py
2f21f58c894bac72
7.48
8
"""Merge config defaults into a user config without overwriting user values.""" from __future__ import annotations import argparse import copy import os import shutil import sys import tempfile from collections.abc import MutableMapping from pathlib import Path from typing import Any from ruamel.yaml import YAML fro...
luuquangvu/ha-addons
gemini-fastapi/scripts/merge_config.py
.py
ae40f674364fd916
7.66
20
"""Translate Home Assistant add-on options into the server's environment variables.""" from __future__ import annotations import json import os import sys from pathlib import Path from typing import Any OPTIONS_PATH = Path("/data/options.json") PROGRAM_MODULE = "wyoming_vietnamese" # Add-on option name -> environme...
luuquangvu/ha-addons
wyoming-vietnamese/scripts/apply_options.py
.py
8914267c8f3809cd
7.66
20
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright (c) 2026 Hygon Information Technology Co., Ltd. """Lightweight global pytest configuration for vLLM-HCU tests. This module must stay safe to import without initializing an HCU context, installing runtime patches, loading models, or starting chi...
HYGON-AI/vllm-plugin-das
tests/conftest.py
.py
3db99a42a12807bb
8.02
10
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright (c) 2026 Hygon Information Technology Co., Ltd. """CPU-safe contracts for single-node distributed test declarations.""" from __future__ import annotations import pytest from tests.fixtures.distributed import DistributedTopology @pytest.mark....
HYGON-AI/vllm-plugin-das
tests/distributed/single_node/test_topology_contracts.py
.py
8bde9183624559b6
8.02
10
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright (c) 2026 Hygon Information Technology Co., Ltd. """Structured metadata shared by hardware and model-test reports.""" from __future__ import annotations import os import platform import sys from dataclasses import asdict, dataclass, field from ...
HYGON-AI/vllm-plugin-das
tests/fixtures/artifacts.py
.py
8bc5fe74bfca1478
8.02
10
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright (c) 2026 Hygon Information Technology Co., Ltd. """CPU-safe HCU resource declarations. Live torch/HCU probing belongs inside requested fixtures, not module import. """ from __future__ import annotations from dataclasses import dataclass @da...
HYGON-AI/vllm-plugin-das
tests/fixtures/device.py
.py
e2c268855882493c
8.02
10
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright (c) 2026 Hygon Information Technology Co., Ltd. """Single-node and reserved multi-node topology declarations.""" from __future__ import annotations from dataclasses import dataclass @dataclass(frozen=True) class DistributedTopology: tens...
HYGON-AI/vllm-plugin-das
tests/fixtures/distributed.py
.py
c622cc8f57bf1d7e
8.02
10
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright (c) 2026 Hygon Information Technology Co., Ltd. """KV-transfer topology and service contracts.""" from __future__ import annotations from dataclasses import dataclass from enum import Enum class TransferScope(str, Enum): LOCAL_PROCESS = ...
HYGON-AI/vllm-plugin-das
tests/fixtures/kv_transfer.py
.py
ee342126a0613104
8.02
10
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright (c) 2026 Hygon Information Technology Co., Ltd. """Stable public contracts for future vLLM-HCU model runners.""" from __future__ import annotations from dataclasses import dataclass from typing import Protocol, Sequence @dataclass(frozen=Tru...
HYGON-AI/vllm-plugin-das
tests/fixtures/model_runner.py
.py
c7de5eac9ec14822
8.02
10
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright (c) 2026 Hygon Information Technology Co., Ltd. """Reference-runner contracts for model output comparisons.""" from __future__ import annotations from typing import Protocol, Sequence from tests.fixtures.model_runner import GenerationResult ...
HYGON-AI/vllm-plugin-das
tests/fixtures/reference_runner.py
.py
3553faf2dbd38147
8.02
10
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright (c) 2026 Hygon Information Technology Co., Ltd. """Model and dataset resource declarations for integration tests.""" from __future__ import annotations from dataclasses import dataclass from pathlib import Path @dataclass(frozen=True) class ...
HYGON-AI/vllm-plugin-das
tests/fixtures/resources.py
.py
730e7f974de56b66
8.02
10
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright (c) 2026 Hygon Information Technology Co., Ltd. """Eager versus graph-enabled generation parity on a real small model.""" from __future__ import annotations import pytest from tests.fixtures.resources import TestResources as HcuTestResources f...
HYGON-AI/vllm-plugin-das
tests/integration/graph/test_qwen35_9b_graph_parity.py
.py
baf5f1c90eda026b
7.02
10
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright (c) 2026 Hygon Information Technology Co., Ltd. """Local KV-transfer connector startup and generation smoke test.""" from __future__ import annotations from pathlib import Path import pytest from tests.fixtures.resources import TestResources ...
HYGON-AI/vllm-plugin-das
tests/integration/kv_transfer/test_example_connector_smoke.py
.py
3b57117b42ee97c8
7.02
10
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright (c) 2026 Hygon Information Technology Co., Ltd. """Single-HCU real checkpoint smoke coverage for the integration layer.""" from __future__ import annotations import math from typing import Any import pytest from tests.fixtures.resources impor...
HYGON-AI/vllm-plugin-das
tests/integration/models/test_qwen35_9b_smoke.py
.py
834bb72244947f91
8.02
10
import time import random import datetime import os import sys import re import json import requests import pandas as pd from tkinter import messagebox class WeiboCommentSpider: """微博评论采集模块 负责: 1. 解析微博链接提取帖子ID 2. 采集一级和二级评论 3. CSV输出 """ def __init__(self, weibo_link_list, max_page, txt_ms...
mashukui/weibo_one_spider
src/weibo_comment.py
.py
021215f9fffd4787
7.45
7
import time import random import datetime import os import sys import re import json import requests import pandas as pd from bs4 import BeautifulSoup as BS from tkinter import messagebox class WeiboSearchSpider: """微博搜索采集模块 负责: 1. 关键词搜索微博帖子 2. HTML解析提取帖子信息 3. 图片下载 4. CSV输出 """ def _...
mashukui/weibo_one_spider
src/weibo_search.py
.py
9101f8955e345ae9
7.45
7
import time import random import datetime import os import sys import re import json import requests import pandas as pd from tkinter import messagebox class WeiboUserPosted: """微博用户主页帖子采集模块 负责: 1. 遍历用户链接列表 2. 分页获取用户发布的微博列表 3. 支持关键词/时间筛选 4. 长微博文本展开 5. CSV输出 """ def __init__(self,...
mashukui/weibo_one_spider
src/weibo_user_post.py
.py
a136553d56b65e30
7.45
7
import time import random import datetime import os import sys import csv import re import json import requests from tkinter import messagebox GENDER_MAP = {'m': '男', 'f': '女', 'n': '未知'} VERIFIED_TYPE_MAP = { 0: '未认证', 1: '个人认证', 2: '企业认证', 3: '媒体认证', 4: '政府认证', 5: '校园认证', 6: '机构认证', 7: '其他认证', } def _par...
mashukui/weibo_one_spider
src/weibo_userinfo.py
.py
376b299460c1f930
7.45
7
"""romp_colormap — the recency colormaps shared by every romp view. Single source of truth: romp-feed, the kernel, and the render bundle (and any future view / tmux segment) import age_rgb from here, so the look is ONE edit, not N. age_rgb(age_seconds, name) -> (r,g,b): recency on a LOG scale — most recent maps to th...
romp-on/romp
kernel/colormap.py
.py
0708626d126347f7
7.6
15
"""romp_palette — the selectable session-identity palettes (categorical). The identity palette is the set session tabs, feed cards, timeline lanes, and postal bubbles draw their per-session color from. It used to be ONE hardcoded 9-color list copied across three assigners (bin/romp, the kernel, the SDK backend); the S...
romp-on/romp
kernel/palette.py
.py
15dbc898628a1a93
7.6
15