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 |
|---|---|---|---|---|---|---|
#!/usr/bin/env python3
"""Run a command with stdin connected to a pty slave (makes [[ -t 0 ]] true).
Usage: python3 pty_run.py <cmd> [args...]
Used by the kcov loop in lint.yml to instrument bash functions that have a
[[ ! -t 0 ]] TTY guard (e.g. aws_sso_ensure_login). kcov ptrace-attaches to
the child process it for... | Twodragon0/claudesec | scanner/tests/pty_run.py | .py | 9f5d22c594e95487 | 7.12 | 16 |
"""
Direct unit tests for the shared `_ci_guard_util` primitives.
The `test_ci_*.py` guards exercise these helpers only INDIRECTLY, through their
own assertions, so an edit to the shared module surfaces as a confusing failure
in some downstream guard — or, worse, as no failure at all where no consumer
happens to hit t... | Twodragon0/claudesec | scanner/tests/test__ci_guard_util.py | .py | 8f714ffe5b3b0212 | 7.12 | 16 |
"""
Regression guard: branch protection is codified as infrastructure-as-code in
`scripts/sync-repo-protection.sh`, and the nightly `protection-drift-watch.yml`
notifier stays wired to it correctly.
Background
----------
`main` branch protection is the outermost control: it is what forces every
change through the two ... | Twodragon0/claudesec | scanner/tests/test_ci_branch_protection_codified.py | .py | 899b58bf3347fd93 | 7.12 | 16 |
"""
Regression guard: every `scanner/tests/test_ci_*.py` guard must be DOCUMENTED in
the catalog `docs/devsecops/ci-config-regression-guards.md`.
The catalog is the single source of truth for ClaudeSec's CI config regression
guard inventory: it records what each guard protects, its key assertions, and the
PR that land... | Twodragon0/claudesec | scanner/tests/test_ci_catalog_completeness.py | .py | 45deeb9c83a340aa | 8.12 | 16 |
"""
Regression guard: every `scanner/tests/test_ci_*.py` path CITED in the catalog
`docs/devsecops/ci-config-regression-guards.md` must EXIST on disk.
This is the reverse of `test_ci_catalog_completeness.py`. That guard catches a
guard file added without a catalog row (under-documentation); this one catches
the opposi... | Twodragon0/claudesec | scanner/tests/test_ci_catalog_no_ghost_rows.py | .py | dacec19bb5674914 | 8.12 | 16 |
"""
Regression guard: EVERY `changes` (Detect changed paths) job that diffs a PR base
against its head must compute the changed files in a way that CANNOT hard-fail
with "fatal: no merge base".
Background
----------
The job path-gates the heavy downstream jobs (scanner/docker/coverage). For a
`pull_request` event it d... | Twodragon0/claudesec | scanner/tests/test_ci_changes_job_merge_base.py | .py | d04f4aecb0d0843a | 8.12 | 16 |
"""
Regression guard: `.github/CODEOWNERS` must keep every security-sensitive path
pattern owned by at least one code owner (`@...`).
Background
----------
`main` branch protection uses `require_code_owner_reviews=true`. If a future
edit accidentally removes a pattern line (e.g. drops `Dockerfile*` or
`scanner/`) or l... | Twodragon0/claudesec | scanner/tests/test_ci_codeowners_invariants.py | .py | 372b014c5ed252e6 | 8.12 | 16 |
"""
Regression guard: ClaudeSec keeps a SINGLE CodeQL model.
Project policy (CLAUDE.md / git-workflow rules): "Single CodeQL model:
repository default setup only — do not add a duplicate repo-level CodeQL
workflow file." GitHub's default setup runs CodeQL *analysis* without any
in-repo workflow; adding a workflow that... | Twodragon0/claudesec | scanner/tests/test_ci_codeql_single_model.py | .py | 6b6a7a8efddb41e8 | 8.12 | 16 |
# -*- coding: utf-8 -*-
"""Claude Code가 켜질 때 위젯을 함께 띄운다 (SessionStart 훅에서 호출).
이미 떠 있으면 아무것도 하지 않는다. install.ps1이 이 파일을 ~/.claude 에
복사하면서 아래 WIDGET 경로를 실제 설치 경로로 바꿔 넣는다.
수동 설치라면 WIDGET 을 ClaudeUsageWidget.pyw 의 절대 경로로 직접 고치면 된다.
"""
import os
import socket
import subprocess
import sys
WIDGET = r"__WIDGET_PATH__"
PORT... | KimJinWooDa/ai-taskbar-widget | hooks/start-usage-widget.py | .py | 07436f80e7c430eb | 7.54 | 11 |
#!/usr/bin/env python3
"""Turn a coverage.py JSON report into the shields.io endpoint badge the READMEs
point at — and fail the run when coverage drops below its floors.
Why a floor and not just a badge: a published number nobody gates on only ever
ratchets down, and the badge would then advertise the decay. The badge... | KCNyu/clawock | ops/ci/coverage_badge.py | .py | d18b7d32f24123d2 | 7.57 | 13 |
#!/usr/bin/env python3
"""Generate the command inventory in `docs/reference/commands.md`.
The document the README calls "the full command and provider catalog" was
hand-maintained, so nothing noticed when a command was added, renamed or
removed (#489). The inventory half is now derived from the two command
registries ... | KCNyu/clawock | ops/ci/generate_tool_reference.py | .py | b9a66d45a79fffc8 | 7.57 | 13 |
#!/usr/bin/env python3
"""Classify a change range into the CI lanes — the single source of truth.
Three gates in ci.yml (the validate detector, the lint scope, the CodeQL
push gate) used to carry three inline copies of overlapping
diff-classification bash. Copies drift: #750 and the config-directory lesson
both came f... | KCNyu/clawock | ops/ci/push_scope.py | .py | 3295614476364b9f | 7.57 | 13 |
#!/usr/bin/env python3
"""FX fallback-chain smoke probe.
Replaces the inline `clawock fx --json` + python one-liner that lived in
ci.yml's smoke-data-fetch job. The probe is advisory by construction — its
job carries `continue-on-error` because data sources can be flaky — but a
probe that cannot fail loudly is worth n... | KCNyu/clawock | ops/ci/smoke_fx.py | .py | 3b05db3ef4e88de3 | 7.57 | 13 |
#!/usr/bin/env python3
"""Snapshot an overwrite-in-place data sidecar into a date-keyed archive.
factor-snapshots/ gives the factor-research layer a point-in-time record
(#936): sentiment.json / macro.json are overwritten in place by their scan
workflows, so any backtest reading them after the fact sees TODAY's file,
... | KCNyu/clawock | ops/ci/snapshot_factor_sidecar.py | .py | fe3a5454c1c6e6e9 | 7.57 | 13 |
#!/usr/bin/env python3
"""Weekly Search Console pull — turn "are we getting indexed yet" into a number.
Before this existed the honest answer to that question was "we should wait for
data", which is not an answer: the data was already there, behind a service
account sitting on this box. One 30-second query replaced a ... | KCNyu/clawock | ops/growth/crawl_visibility.py | .py | c1c0cbeb66562dc3 | 7.57 | 13 |
#!/usr/bin/env python3
"""Submit clawock URLs to IndexNow (Bing / Yandex / Seznam — NOT Google).
Zero-touch indexing accelerator. Reads the IndexNow key from the site-owned
`site/<key>.txt` file (32-hex), pulls URLs from the live sitemap, and POSTs the ones
that are new or whose content actually changed.
Google does ... | KCNyu/clawock | ops/growth/indexnow_submit.py | .py | 2d3589d8280a5519 | 7.57 | 13 |
#!/usr/bin/env python3
"""Refresh the metrics placeholders in the READMEs from the live ledger.
Reads memory/decisions.jsonl, assets/data/shadow_portfolio.json and
assets/data/dashboard.json, recomputes every published figure, rewrites the
<!-- CW_M:key -->...<!-- /CW_M:key --> placeholders in README.zh.md (and
README... | KCNyu/clawock | ops/growth/refresh_readme_metrics.py | .py | a2e35de027257018 | 7.57 | 13 |
#!/usr/bin/env python3
"""rick_broadcast.py — turn the self-grading scorecard into a Rick-voiced post.
Reads the honest v2 decision ledger plus the quant/T+0 review sidecars
and emits a short, ready-to-post update in Rick's voice. Delivery is a separate
concern: this only prints text (and optional --json) to stdout, s... | KCNyu/clawock | ops/growth/rick_broadcast.py | .py | 5353aa60b8d20ed0 | 7.57 | 13 |
#!/usr/bin/env python3
"""
cron_runs.py — aggregate openclaw cron run history across ALL jobs.
`openclaw cron runs` requires --id, and there is no built-in cross-job view.
This script tails the per-job JSONL files under ~/.openclaw/cron/runs/ and
prints a single time-sorted feed of recent runs (auto-scheduled + manual... | KCNyu/clawock | ops/host/cron_runs.py | .py | f74ca0e7bf0af190 | 7.57 | 13 |
#!/usr/bin/env python3
"""
gc_sessions.py — clean up stale openclaw session/log artifacts.
All 11 cron jobs run with sessionTarget=isolated, so each invocation creates a
fresh session file + trajectory.jsonl that nothing ever deletes. At ~70 files
per day (~25 MB/day) the sessions/ dir grows ~9 GB/year unattended.
Th... | KCNyu/clawock | ops/host/gc_sessions.py | .py | f81938ad5fe30938 | 7.57 | 13 |
#!/usr/bin/env python3
"""Reconcile tracked OpenClaw jobs with the reviewed host cron contract.
The default mode is read-only and exits 1 when drift exists. ``--apply`` edits
only declared fields, one job at a time, and stops at the first failed edit.
Delivery destinations, accounts, failure alerts, and other runtime-... | KCNyu/clawock | ops/host/sync_cron_payloads.py | .py | ad7fa8922bd7478e | 7.57 | 13 |
#!/usr/bin/env python3
"""Reconcile host watchdog commands and US schedules with the cron contract.
The daemon's America/New_York cron parsing has regressed before, so the runtime
jobs stay in HKT. This tool derives the correct HKT expressions from the tracked
seasonal contract and applies them daily at 06:20 HKT, saf... | KCNyu/clawock | ops/host/sync_us_cron_dst.py | .py | 5ec4def8077cca62 | 7.57 | 13 |
"""
Custom build hook for hatchling that builds the C++ extension using CMake.
This replaces Poetry's custom build script (tools/build-libtorch-rbln.py).
The hook is invoked during wheel building to compile the native extension.
Usage:
This file should be placed in the project root alongside pyproject.toml.
I... | RBLN-SW/torch-rbln | hatch_build.py | .py | e918d69241050a0f | 7.59 | 14 |
#include <c10/core/Allocator.h>
#include <c10/core/CachingDeviceAllocator.h>
#include <c10/rbln/RBLNFunctions.h>
#include <c10/rbln/RBLNHooksInterface.h>
#include <gtest/gtest.h>
#include <cstdlib>
#include <string>
namespace {
// Forces TORCH_RBLN_EAGER_MALLOC for its scope and restores the prior value on exit (all
... | RBLN-SW/torch-rbln | test/cpp/core/RBLNAllocatorTest.cpp | .cpp | 54c3ebd2dc97c00f | 7.09 | 14 |
// Tests for the dummy device contract (RBLN_DUMMY_DEVICE=1).
//
// Dummy mode presents host-backed logical device(s) with no NPU, so a model can
// be constructed and compiled without hardware. Allocations and transfers are
// backed by rebel's v-memory (a host mirror) through a dummy runtime context —
// torch adds n... | RBLN-SW/torch-rbln | test/cpp/core/RBLNDummyDeviceTest.cpp | .cpp | dfc1a0abe68d09a6 | 7.09 | 14 |
#include <c10/rbln/RBLNPinnedAllocator.h>
#include <gtest/gtest.h>
#include <cstdint>
#include <cstring>
class RBLNPinnedAllocatorTest : public ::testing::Test {};
TEST_F(RBLNPinnedAllocatorTest, AllocateRegistersPinnedRange) {
auto* allocator = c10::rbln::get_pinned_memory_allocator();
ASSERT_NE(allocator, null... | RBLN-SW/torch-rbln | test/cpp/core/RBLNPinnedAllocatorTest.cpp | .cpp | 70f727be4cff9ed4 | 7.09 | 14 |
#include <c10/core/impl/VirtualGuardImpl.h>
#include <c10/rbln/RBLNFunctions.h>
#include <gtest/gtest.h>
#include <cstdint>
#include <set>
// Exercises the stream half of RBLNGuardImpl through VirtualGuardImpl (the same
// path torch.Stream takes). Stream creation needs the device initialized, so each
// test forces ... | RBLN-SW/torch-rbln | test/cpp/core/RBLNStreamTest.cpp | .cpp | 98c1456f84f1e3ff | 7.09 | 14 |
#include <c10/rbln/RBLNFunctions.h>
#include <c10/rbln/RBLNSupportedDtypes.h>
#include <gtest/gtest.h>
#include <algorithm>
class RBLNSupportedDtypesTest : public ::testing::Test {
protected:
static void SetUpTestSuite() {
c10::register_privateuse1_backend("rbln");
ASSERT_TRUE(c10::is_privateuse1_backend_r... | RBLN-SW/torch-rbln | test/cpp/core/RBLNSupportedDtypesTest.cpp | .cpp | 6835348e613c1bc9 | 7.09 | 14 |
#include <ATen/native/rbln/RBLNTensorUtils.h>
#include <c10/rbln/RBLNFunctions.h>
#include <gtest/gtest.h>
#include <torch/torch.h>
class RBLNTensorUtilsTest : public ::testing::Test {
protected:
static void SetUpTestSuite() {
c10::register_privateuse1_backend("rbln");
ASSERT_TRUE(c10::is_privateuse1_backen... | RBLN-SW/torch-rbln | test/cpp/core/RBLNTensorUtilsTest.cpp | .cpp | 75d22b323e2b88d5 | 7.09 | 14 |
# Owner(s): ["module: PrivateUse1"]
import os
import pytest
import torch
import torch.distributed as dist
import torch.multiprocessing as mp
from test.utils import configure_master_port_for_rccl_tests, requires_logical_devices, spawn_target_with_clean_exit
def _run_allreduce_with_unset_control_plane_ips(rank: int,... | RBLN-SW/torch-rbln | test/distributed/test_control_plane_ip_default.py | .py | 48ec6b5b9c25eba1 | 8.09 | 14 |
# Owner(s): ["module: PrivateUse1"]
"""Distributed / DTensor support with no RBLN device (``device_count() == 0``).
A sharded (tensor-parallel) model must be traceable / compilable on a host with
no NPU: the process group, the DTensor ``DeviceMesh`` built on it, and DTensors
placed on that mesh must all come up witho... | RBLN-SW/torch-rbln | test/distributed/test_no_device.py | .py | 586823110a087e28 | 8.09 | 14 |
"""B站官方 search API backend — free fallback for bilibili adapter (v0.9).
Used by omnireach/adapters/bilibili.py when EXA_API_KEY is absent or Exa
upstream is unavailable. Pure httpx + json; no cookie, no auth, but the
upstream requires a `Referer: https://search.bilibili.com/` header to
serve results.
"""
from __futur... | Daily-AC/omnireach | omnireach/adapters/_bilibili_api.py | .py | 9c742206d141d776 | 7.65 | 19 |
"""AdapterBase — every source adapter inherits this."""
from __future__ import annotations
from abc import ABC, abstractmethod
from typing import ClassVar
from omnireach.contract import SearchResult
class AdapterUnavailable(Exception):
"""Raised when an adapter's upstream binary / auth is missing."""
def ... | Daily-AC/omnireach | omnireach/adapters/base.py | .py | ecdb7cd8ede4883f | 7.65 | 19 |
"""B站 (Bilibili) adapter — Exa primary (paid), Bilibili API fallback (free, v0.9)."""
from __future__ import annotations
import logging
import os
import httpx
from omnireach.adapters.base import AdapterBase, AdapterUnavailable
from omnireach.adapters._bilibili_api import search_bilibili
from omnireach.contract impor... | Daily-AC/omnireach | omnireach/adapters/bilibili.py | .py | ed1ac3366e9e18a6 | 7.65 | 19 |
"""Exa Search API booster (paid)."""
from __future__ import annotations
import os
import httpx
from omnireach.adapters.base import AdapterBase, AdapterUnavailable
from omnireach.contract import SearchResult
EXA_URL = "https://api.exa.ai/search"
class ExaAdapter(AdapterBase):
name = "exa"
requires: list[s... | Daily-AC/omnireach | omnireach/adapters/exa.py | .py | e05168d065e80fb1 | 7.65 | 19 |
"""TikTok adapter backed by the native Chrome or OpenCLI bridge."""
from __future__ import annotations
import shutil
from omnireach.adapters.base import AdapterBase
from omnireach.bridge_install import bridge_configured
from omnireach.browser_transport import run_browser_json
from omnireach.contract import Engagemen... | Daily-AC/omnireach | omnireach/adapters/tiktok.py | .py | 915962a0b4b46b93 | 7.65 | 19 |
"""WeChat 公众号 adapter — Exa primary (paid), Sogou fallback (free, v0.9)."""
from __future__ import annotations
import logging
import os
import httpx
from omnireach.adapters.base import AdapterBase, AdapterUnavailable
from omnireach.adapters._wechat_sogou import search_sogou
from omnireach.contract import SearchResul... | Daily-AC/omnireach | omnireach/adapters/wechat.py | .py | d993bd57368e1ad6 | 7.65 | 19 |
"""Xiaohongshu adapter backed by the native Chrome or OpenCLI bridge."""
from __future__ import annotations
import re
import shutil
from decimal import Decimal, InvalidOperation
from omnireach.adapters.base import AdapterBase
from omnireach.bridge_install import bridge_configured
from omnireach.browser_transport imp... | Daily-AC/omnireach | omnireach/adapters/xiaohongshu.py | .py | aa3e6cae3c80062b | 7.65 | 19 |
"""omnireach init — write default preferences + show next-step guidance.
v0.5+ note: Agent-Reach is fully optional (runtime never invokes it).
v0.6.1: init no longer attempts to `pipx install agent-reach` — it's just config bootstrap.
"""
from __future__ import annotations
import click
from rich.console import Conso... | Daily-AC/omnireach | omnireach/commands/init.py | .py | f90cb8c69f0747de | 7.65 | 19 |
"""`omnireach preferences {show,edit,reset,path}`."""
from __future__ import annotations
import json
import os
import shutil
import subprocess
import click
from omnireach.preferences import (
load_preferences,
preferences_path,
write_default_preferences,
)
@click.group("preferences")
def preferences_c... | Daily-AC/omnireach | omnireach/commands/preferences.py | .py | 990fdc2cc3cc240b | 7.65 | 19 |
"""SearchResult JSON contract — the boundary between omnireach core and adapters."""
from __future__ import annotations
from typing import Any, Literal
from pydantic import BaseModel, ConfigDict, Field, field_validator
# v0.8: SERP-snippet rule enforced at the contract boundary. Full upstream
# payloads remain acce... | Daily-AC/omnireach | omnireach/contract.py | .py | 4715b144802ae644 | 7.65 | 19 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/attri_util.py | .py | 0e00bd71e4201791 | 7.54 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/conftest.py | .py | 90a7aca9f250503d | 8.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/consts.py | .py | 10e40550cf77b562 | 7.54 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_FLA/test_chunk_gated_delta_rule_fwd.py | .py | ca3dcfbed7a520ab | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_FLA/test_chunk_gated_delta_rule_perf.py | .py | c2baea0fd016d19f | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_FLA/test_chunk_gdn2.py | .py | 7bcfcbcad37654af | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_FLA/test_chunk_kda.py | .py | f52771f529cb44d8 | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_FLA/test_fused_recurrent_gated_delta_rule_perf.py | .py | a8cf17f3c6093007 | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_act_quant.py | .py | 1740765a2c3cd9e4 | 8.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_add_rms_norm.py | .py | abae5da0c1bade50 | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_apply_repetition_penalties.py | .py | 3b8c739c2b323b9a | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_apply_rotary_pos_emb.py | .py | 1a7aa42c73ba3c14 | 8.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_beam_search_score.py | .py | 9c9757a026771770 | 8.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_concat_and_cache_mla.py | .py | ec126947cd4c7ddd | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_cp_gather_indexer_k_quant_cache.py | .py | f5fbb330c2b3d3be | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_cross_entropy_loss.py | .py | 7e3be6d7f8e01129 | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_cutlass_scaled_mm.py | .py | 87bace69d8812e7d | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_deepseek_v4_attention_combine_topk_swa_indices.py | .py | 657cb207251e8931 | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_deepseek_v4_attention_compute_global_topk_indices_and_lens.py | .py | b450a28589db5361 | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_deepseek_v4_attention_dequantize_and_gather_k_cache.py | .py | 7e2202a931238dcd | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_deepseek_v4_attention_fused_q_kv_rmsnorm.py | .py | acd33260880ac983 | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_flash_attn_varlen_func.py | .py | 9ca2bb018edcae83 | 8.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_flash_attn_varlen_opt_init_func.py | .py | 885bf3a4ab71785c | 8.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_flash_mla.py | .py | 214d6fab383ffa7e | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_flash_mla_sparse_fwd.py | .py | 94d0b8149fc566cc | 8.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_flash_mla_with_kvcache.py | .py | 0c636d9dbca7f22d | 8.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_fp8_fp4_mqa_logits.py | .py | 3a416161b3bc4a96 | 8.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_fp8_fp4_paged_mqa_logits.py | .py | fe11c4f96fc07ba6 | 8.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_fused_add_rms_norm.py | .py | 510ac9c7992eedbb | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_fused_deepseek_v4_qnorm_rope_kv_rope_quant_insert.py | .py | 57f2ae369828fa57 | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_fused_indexer_q_rope_quant.py | .py | 784f6146d49aae39 | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_fused_inv_rope_fp8_quant.py | .py | e58a2944a82d10ed | 7.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_fused_marlin_moe_w4a16_int4.py | .py | 4d53f7eaee95d1be | 8.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_fused_marlin_moe_w8a16_int8.py | .py | 98b7ee5395532ff3 | 8.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_fused_moe.py | .py | 8cc632119512cb55 | 8.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_fused_moe_fp8.py | .py | 26784b9ce5c3c3d9 | 8.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_fused_moe_fp8_blockwise.py | .py | 0a67582095ed734a | 8.04 | 11 |
# Copyright 2026 FlagOS Contributors
#
# 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 law or agreed to in w... | flagos-ai/FlagGems-vllm | benchmark/test_fused_moe_int4_w4a16.py | .py | 86c55a9449e806bb | 8.04 | 11 |
"""Deterministic repro for OMN-12587 Finding 1 — verification evidence.
`StabilityDelegationBus.publish_and_wait` (src/pipeline/delegation_bus_stability.py)
wraps its async round-trip in `asyncio.run(...)`. That call raises
`RuntimeError: asyncio.run() cannot be called from a running event loop` whenever
publish_and_w... | OmniNode-ai/onex_change_control | evidence/OMN-11513/repros/OMN-12587-asyncio/test_publish_and_wait_in_running_loop.py | .py | 1f86102e4a6595cb | 7.92 | 6 |
# SPDX-FileCopyrightText: 2025 OmniNode.ai Inc.
# SPDX-License-Identifier: MIT
"""check_dod_evidence_present.py -- Pre-commit guard requiring a non-empty
``dod_evidence`` block on every newly-authored ``contracts/OMN-*.yaml`` file.
Background
----------
``ModelTicketContract.dod_evidence`` defaults to ``[]``, so a con... | OmniNode-ai/onex_change_control | scripts/check_dod_evidence_present.py | .py | 10f17b2f2b00999e | 7.42 | 6 |
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
"""check_unpinned_deps.py — Scan repos for unpinned dependencies in pyproject.toml.
Usage:
python3 scripts/check_unpinned_deps.py --root /path/to/omni_home
Checks every pyproject.toml found one level deep under --root for dependencies
that lack version constra... | OmniNode-ai/onex_change_control | scripts/check_unpinned_deps.py | .py | d215678b1412860c | 7.42 | 6 |
# SPDX-FileCopyrightText: 2026 OmniNode.ai Inc.
# SPDX-License-Identifier: MIT
"""Exact-allowlist predicate: is this PR's diff evidence-only?
OMN-16285. OCC absorbs an evidence-companion PR (append-only YAML under
``contracts/`` + ``drift/dod_receipts/``) for nearly every product PR in the
org, and every one of them ... | OmniNode-ai/onex_change_control | scripts/ci/evidence_only_predicate.py | .py | 4f7cff5b055ab9fc | 7.42 | 6 |
#!/usr/bin/env python3
# SPDX-FileCopyrightText: 2025 OmniNode.ai Inc.
# SPDX-License-Identifier: MIT
"""Regenerate the OMN-14436 DoD-runner grandfather ratchet.
The allowlist freezes the contract corpus that was authored while
``run_contract_compliance_check.py`` executed check_values against the
onex_change_control ... | OmniNode-ai/onex_change_control | scripts/ci/generate_dod_legacy_allowlist.py | .py | f98f430b553c9e4c | 7.42 | 6 |
# SPDX-FileCopyrightText: 2025 OmniNode.ai Inc.
# SPDX-License-Identifier: MIT
"""Load and validate the static module adjacency map."""
from __future__ import annotations
from typing import TYPE_CHECKING
import yaml
from pydantic import BaseModel, ConfigDict, Field, model_validator
if TYPE_CHECKING:
from pathli... | OmniNode-ai/onex_change_control | scripts/ci/test_selection_loader.py | .py | 110845b7750cc676 | 7.92 | 6 |
# SPDX-FileCopyrightText: 2025 OmniNode.ai Inc.
# SPDX-License-Identifier: MIT
"""Pydantic output contract for change-aware test selection."""
from __future__ import annotations
from enum import StrEnum
from typing import Annotated, Self
from pydantic import BaseModel, ConfigDict, Field, StringConstraints, model_val... | OmniNode-ai/onex_change_control | scripts/ci/test_selection_models.py | .py | db3190c993ed4bc8 | 7.92 | 6 |
# SPDX-FileCopyrightText: 2025 OmniNode.ai Inc.
# SPDX-License-Identifier: MIT
"""Generate doctrine coverage matrix from doctrine_clauses.yaml.
For each clause, checks whether the declared ci_gate job name exists in
.github/workflows/ and classifies coverage:
ENFORCED — ci_gate is declared and the job exists in a ... | OmniNode-ai/onex_change_control | scripts/generate_doctrine_coverage.py | .py | d321db041520790d | 7.42 | 6 |
# SPDX-FileCopyrightText: 2026 OmniNode.ai Inc.
# SPDX-License-Identifier: MIT
"""migrate_dod_contracts.py — backfill ``dod_evidence`` on ticket contracts.
Audits ``contracts/OMN-*.yaml`` against ``ModelTicketContract`` and emits a
ticket-type-aware ``dod_evidence`` block for any contract that lacks one.
Two ticket c... | OmniNode-ai/onex_change_control | scripts/migrate_dod_contracts.py | .py | a7a5d5d9b0ce2738 | 7.42 | 6 |
# SPDX-FileCopyrightText: 2026 OmniNode.ai Inc.
# SPDX-License-Identifier: MIT
"""migrate_file_exists_receipts.py — backfill OMN-9788 schema fields on stale receipts.
Walks ``drift/dod_receipts/`` and finds stale ``file_exists.yaml`` receipts that
have ``status: PASS`` but are missing any of the four adversarial field... | OmniNode-ai/onex_change_control | scripts/migrate_file_exists_receipts.py | .py | b17843faa09cdf8f | 7.42 | 6 |
# SPDX-FileCopyrightText: 2025 OmniNode.ai Inc.
# SPDX-License-Identifier: MIT
"""sync_version_matrix.py — Update version-matrix.yaml from actual git tags.
Scans each ONEX repo under --root for its latest semver tag (vX.Y.Z),
then updates the version-matrix.yaml so that expected_pins reflect the
actual published state... | OmniNode-ai/onex_change_control | scripts/sync_version_matrix.py | .py | ec275744462c419b | 7.42 | 6 |
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 OmniNode Team
"""check_contract_drift.py -- Detect contract/runtime topic mapping drift.
Computes a deterministic SHA-256 hash of all ``published_events`` and
``event_bus`` sections across all ``contract.yaml`` files under a root
directory. If... | OmniNode-ai/onex_change_control | scripts/validation/check_contract_drift.py | .py | 3004afdd37c57bc5 | 7.42 | 6 |
# SPDX-FileCopyrightText: 2025 OmniNode.ai Inc.
# SPDX-License-Identifier: MIT
"""OMN-15411: assert the contract corpus ratchets are wired into a REQUIRED context.
Why this exists
---------------
``tests/unit/scripts/test_lint_contract_check_values_corpus_baseline.py`` holds
the shrink-only Rule A/B/C/D/E ratchets, an... | OmniNode-ai/onex_change_control | scripts/validation/check_corpus_ratchet_wiring.py | .py | 4ae67abde92ef897 | 7.42 | 6 |
#!/usr/bin/env python3
# SPDX-FileCopyrightText: 2026 OmniNode.ai Inc.
# SPDX-License-Identifier: MIT
"""
Evidence-import guardrail (OMN-16429).
The `evidence-import.yml` workflow_dispatch workflow lets a maintainer pull a
named branch/ref of evidence-only commits into `onex_change_control` on
behalf of a contributor... | OmniNode-ai/onex_change_control | scripts/validation/check_evidence_import_allowed.py | .py | ac10fe401ec75174 | 7.42 | 6 |
#!/usr/bin/env python3
# SPDX-FileCopyrightText: 2025 OmniNode.ai Inc.
# SPDX-License-Identifier: MIT
"""Pre-commit hook: fail if metadata fields use dict[str, Any] without ONEX_EXCLUDE.
Usage: python scripts/check_no_untyped_metadata.py [files...]
check-no-untyped-metadata [files...] (via entry point... | OmniNode-ai/onex_change_control | scripts/validation/check_no_untyped_metadata.py | .py | 493adf1a3f6398af | 7.42 | 6 |
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 OmniNode Team
"""check_published_events_structure.py -- Validate published_events in contract.yaml.
Usage:
python3 scripts/validation/check_published_events_structure.py --root /path/to/nodes
Checks every contract.yaml found recursively un... | OmniNode-ai/onex_change_control | scripts/validation/check_published_events_structure.py | .py | 48862d1ed6ea8a0a | 7.42 | 6 |
# SPDX-FileCopyrightText: 2026 OmniNode.ai Inc.
# SPDX-License-Identifier: MIT
"""Validate fork-aware GitHub Actions runner selection and index-host policy."""
from __future__ import annotations
import re
from pathlib import Path
import yaml
PUBLIC_SELECTOR = "fromJSON(vars.OMNI_PUBLIC_PR_RUNS_ON_JSON || '[\"ubuntu... | OmniNode-ai/onex_change_control | scripts/validation/check_runner_routing.py | .py | 06193886294e647b | 7.42 | 6 |
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 OmniNode Team
"""check_seam_contract_coverage.py -- Enforce contract existence for seam tickets.
Detects when a branch modifies interface-surface files (Kafka emitters, Pydantic
models) without a corresponding contract YAML in contracts/<ticket... | OmniNode-ai/onex_change_control | scripts/validation/check_seam_contract_coverage.py | .py | 462a98e3d0fd6802 | 7.42 | 6 |
# SPDX-FileCopyrightText: 2025 OmniNode.ai Inc.
# SPDX-License-Identifier: MIT
"""Validate that no localhost/service-endpoint fallbacks exist in src/ Python files.
Scans src/**/*.py for patterns like:
- os.environ.get("...", "localhost...")
- os.environ.get("...", "http://localhost...")
- os.environ.get("...", "... | OmniNode-ai/onex_change_control | scripts/validation/validate_no_env_fallbacks.py | .py | da3cb62168041cfc | 7.42 | 6 |
"""
PeerRank - LLM Peer Evaluation System
4-phase evaluation where LLMs:
1. Generate questions
2. Answer all questions (with web search)
3. Cross-evaluate in 3 bias modes (shuffle, blind, both)
4. Generate ranked report with bias analysis
Usage:
python peerrank.py # Interactive menu
python pe... | caura-ai/caura-PeerRank | peerrank.py | .py | 16c9deef89c9ae30 | 7.52 | 10 |
"""
figure_utils.py - Shared helpers for the validation figure generators.
Centralizes the publication style config, model color palette, and the small
plotting/analysis helpers that were previously duplicated verbatim across
generate_figures_TFQ.py and generate_figures_GSM8K.py (and, for save_figure and
get_text_colo... | caura-ai/caura-PeerRank | peerrank/figure_utils.py | .py | ae6704a72fcfe8d3 | 7.52 | 10 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.