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
"""Stage artifact cleanup engine. Prunes obsolete validation, review, and remediation artifacts from document folders while keeping the latest N versions per artifact type. """ from __future__ import annotations import logging import re from dataclasses import dataclass, field from pathlib import Path from mcp_serv...
vladm3105/aidoc-flow-framework
platforms/hermes/src/mcp_server/cleanup/runner.py
.py
367f95293e056fa2
7.63
17
"""Project .env file loader with mtime-based caching and security protections.""" from __future__ import annotations import logging import stat from pathlib import Path from typing import Any from dotenv import dotenv_values logger = logging.getLogger(__name__) BLOCKED_ENV_VARS: frozenset[str] = frozenset( { ...
vladm3105/aidoc-flow-framework
platforms/hermes/src/mcp_server/env_manager.py
.py
a1e994ad9c655672
7.63
17
"""API-based LLM execution via LiteLLM. Uses litellm.acompletion() as universal gateway supporting 100+ LLM providers including OpenAI, Anthropic, Google, and OpenRouter. """ from __future__ import annotations import contextlib import logging import os import threading from .contracts import ExecutorResult from .re...
vladm3105/aidoc-flow-framework
platforms/hermes/src/mcp_server/executor/api_runner.py
.py
ed50d12c468148c0
7.63
17
"""Typed values for the full-system RS-LoCoMo-Full-v16 protocol.""" from __future__ import annotations from datetime import datetime from decimal import Decimal import json from typing import Annotated from typing import Literal from uuid import UUID from pydantic import BaseModel from pydantic import ConfigDict fro...
writeitai/remember-stack
benchmarks/locomo/model.py
.py
f0991f2c4cb3dcb6
7.48
8
"""Balance LoCoMo conversations across independent benchmark hosts.""" from __future__ import annotations import argparse from collections.abc import Sequence from dataclasses import dataclass import json from pathlib import Path import re _SESSION_KEY = re.compile(r"session_[1-9][0-9]*") @dataclass(frozen=True) c...
writeitai/remember-stack
benchmarks/locomo/sharding/make_shards.py
.py
12e0c1b9c9dc7751
7.48
8
"""Optional Langfuse observer for LoCoMo answer and judge stages. This module is imported only after all three Langfuse environment bindings are non-empty. It never receives rendered prompts, source chunks, tool results, gold answers, or failure messages. """ from __future__ import annotations from collections.abc i...
writeitai/remember-stack
benchmarks/locomo/tracing.py
.py
bdc2e6b484bb6d6b
7.48
8
"""BEAM official-style scoring: rubric nugget LLM-as-judge (+ Kendall τ-b for event order). Faithful port of the evaluation logic in the upstream BEAM repository (``src/evaluation/compute_metrics.py`` / ``run_evaluation.py``) and paper §2.4: - For each probing question, gold rubrics are **atomic nuggets**. - An LLM j...
writeitai/remember-stack
benchmarks/rs_harness_beam/official_score.py
.py
3c0dcee134a1ad79
7.48
8
"""Validate the single version shared by RememberStack release artifacts.""" from __future__ import annotations import argparse from pathlib import Path import re import tomllib _SEMVER = re.compile(r"(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)") _IMAGE = "ghcr.io/writeitai/remember-stack" _POSTGRES_SOURCE_MARKER = re....
writeitai/remember-stack
scripts/check_release_contract.py
.py
24c2b2df1d28b57c
7.48
8
"""Shared bounded admission for interactive PostgreSQL retrieval reads.""" from collections.abc import Iterator from contextlib import contextmanager from contextvars import ContextVar from threading import BoundedSemaphore from time import monotonic from sqlalchemy.engine import Connection from sqlalchemy.engine imp...
writeitai/remember-stack
src/rememberstack/adapters/bounded_postgres_read.py
.py
022204f025c67a65
7.48
8
"""Sandboxed stock-Codex adapter for one declared-output Plane-K session.""" import json from pathlib import Path import subprocess from tempfile import TemporaryDirectory from pydantic import Field from pydantic_settings import BaseSettings from pydantic_settings import SettingsConfigDict from rememberstack.model i...
writeitai/remember-stack
src/rememberstack/adapters/codex_writer.py
.py
f62497d8d0f28a2f
7.48
8
"""The markitdown conversion route (D38): office/html/email formats → Markdown.""" import io from typing import Final from markitdown import MarkItDown from markitdown import StreamInfo from markitdown._exceptions import MarkItDownException from rememberstack.model import ConversionError from rememberstack.model imp...
writeitai/remember-stack
src/rememberstack/adapters/markitdown_converter.py
.py
bd6f90539e9dea0c
7.48
8
"""Control-plane metadata spend lease (D46). Never sends a memory payload.""" from __future__ import annotations from typing import Any from uuid import UUID import httpx from rememberstack.model import SpendLeaseRefused from rememberstack.model import SpendLeaseUnavailable class ControlPlaneSpendLease: """PO...
writeitai/remember-stack
src/rememberstack/adapters/selfhost/control_plane_spend_lease.py
.py
a6211e8ed52bc196
7.48
8
"""Dedicated append-only local store for portable D74 forget intent.""" import os from pathlib import Path from uuid import UUID from uuid import uuid4 from rememberstack.model import ForgetManifest from rememberstack.model import ForgetManifestConflictError class LocalFSForgetManifestStore: """Persist content-...
writeitai/remember-stack
src/rememberstack/adapters/selfhost/forget.py
.py
09e9dfd10e3d689c
7.48
8
"""SHA-256 Bearer adapter for the single-deployment auth perimeter. Verifier material is ``(issued_deployment_id, digest)``. The adapter returns that issued UUID as ``AuthenticatedContext.deployment_id`` — never the process UUID — so a bind for deployment A installed on process B is 403 at ``_perimeter``. """ from __...
writeitai/remember-stack
src/rememberstack/adapters/selfhost/hashed_bearer_auth.py
.py
abd33614c0740925
7.48
8
"""S3-compatible MinIO object storage for the self-host profile.""" from typing import cast from typing import NotRequired from typing import Protocol from typing import TypedDict import boto3 from botocore.client import Config from botocore.exceptions import ClientError from pydantic import SecretStr from pydantic_s...
writeitai/remember-stack
src/rememberstack/adapters/selfhost/minio.py
.py
ed3e4ed03440d3c3
7.48
8
"""Local-directory mount publisher: the four D51 read-only views (e0 §5). Agents read the memory on their filesystem: the **corpus filesystem** they browse first, the **artifacts** they drill into from a stub, the **raw** originals — deliberately *off the navigation path* — and the Plane-K checkout. Every view is read...
writeitai/remember-stack
src/rememberstack/adapters/selfhost/mounts.py
.py
2807e2588699bbbd
7.48
8
"""Local-filesystem object store adapter: immutable bytes under one root (D61/D62).""" from pathlib import Path from rememberstack.model import ObjectAlreadyExistsError from rememberstack.model import ObjectKey from rememberstack.model import ObjectKeyEscapesRootError class LocalFSObjectStore: """The self-host ...
writeitai/remember-stack
src/rememberstack/adapters/selfhost/object_store.py
.py
bffc5610e6438189
7.48
8
"""D74 purge acknowledgement for self-host projection bytes and caches.""" from pathlib import Path from pathlib import PurePosixPath import shutil from uuid import UUID from rememberstack.model import ObjectKey from rememberstack.ports import ObjectPurgePort from rememberstack.spine import ProjectionCatalog class ...
writeitai/remember-stack
src/rememberstack/adapters/selfhost/projection.py
.py
8ee65a62172d0ce7
7.48
8
"""AIWorkHub MCP server package. Coordinator credential scrubbing runs here, at package-init time, instead of inside a single submodule such as ``core.py``. Python always finishes executing a package's ``__init__.py`` before importing any of its submodules (``core``, ``dashboard``, ``server``, ``worker_workspace``, .....
shrec/AIWorkHub
src/aiworkhub/__init__.py
.py
b8c37de296c79c97
7.45
7
"""B821 CLI surface: safe, dry-run-first agent tool-instruction activation. Usage: python -m aiworkhub.agent_tool_instruction_cli preview [--repo ROOT] [--provider P] python -m aiworkhub.agent_tool_instruction_cli inspect [--repo ROOT] --provider P python -m aiworkhub.agent_tool_instruction_cli apply [--repo RO...
shrec/AIWorkHub
src/aiworkhub/agent_tool_instruction_cli.py
.py
7c2928b7925133eb
7.45
7
"""AuditSystem — a read-only, narrow-scope review layer. This is the layer that composes existing pieces (read-only review passes, narrow scoping, and a structured findings queue) into repeatable audit passes *without* going through the worker card lifecycle. It is, by contract: - **separate** from the worker card li...
shrec/AIWorkHub
src/aiworkhub/audit_system.py
.py
9afd9c16c3d3c7bf
7.45
7
"""CAAS enforcement — Continuous Audit as a Service, upheld by construction. CAAS stands for **Continuous Audit as a Service** (the owner-canonical expansion; ``docs/CAAS_PROTOCOL.md`` is the contract). This module checks the protocol's automatically-enforceable properties as part of the normal lifecycle: a transition...
shrec/AIWorkHub
src/aiworkhub/caas_enforcement.py
.py
5aad5bf9f1905769
7.45
7
"""Declarative catalog of Context Graph manager-chat capture adapters. The Context Graph records the manager conversation only. Each supported manager provider is described here in a single place so that the runtime status surface (:func:`aiworkhub.context_graph.status`) and the capture implementations agree on which...
shrec/AIWorkHub
src/aiworkhub/capture_adapters.py
.py
142f30e55002e9f9
7.45
7
"""Claude manager-chat capture for the repository Context Graph. The Codex manager transcript is projected by :mod:`aiworkhub.manager_transcript_capture`, which consumes completed ``item/completed`` messages from a verified Codex App Server mux. Claude Code has no such mux; it persists an append-only JSONL session tr...
shrec/AIWorkHub
src/aiworkhub/context_capture.py
.py
6b18a7e9a15f2f20
7.45
7
#!/usr/bin/env python3 """ Easing Functions - Timing functions for smooth animations. Provides various easing functions for natural motion and timing. All functions take a value t (0.0 to 1.0) and return eased value (0.0 to 1.0). """ import math def linear(t: float) -> float: """Linear interpolation (no easing)...
MasterofNull/NixOS-Dev-Quick-Deploy
.agent/skills/slack-gif-creator/core/easing.py
.py
60bc943449802541
7.42
6
#!/usr/bin/env python3 """ GIF Builder - Core module for assembling frames into GIFs optimized for Slack. This module provides the main interface for creating GIFs from programmatically generated frames, with automatic optimization for Slack's requirements. """ from pathlib import Path from typing import Optional im...
MasterofNull/NixOS-Dev-Quick-Deploy
.agent/skills/slack-gif-creator/core/gif_builder.py
.py
b6f50d738c491ee0
7.42
6
#!/usr/bin/env python3 """ Validators - Check if GIFs meet Slack's requirements. These validators help ensure your GIFs meet Slack's size and dimension constraints. """ from pathlib import Path def validate_gif( gif_path: str | Path, is_emoji: bool = True, verbose: bool = True ) -> tuple[bool, dict]: """ ...
MasterofNull/NixOS-Dev-Quick-Deploy
.agent/skills/slack-gif-creator/core/validators.py
.py
56bd19e3aae05f83
7.42
6
#!/usr/bin/env python3 """ Visual Effects - Particles, motion blur, impacts, and other effects for GIFs. This module provides high-impact visual effects that make animations feel professional and dynamic while keeping file sizes reasonable. """ from PIL import Image, ImageDraw, ImageFilter import numpy as np import m...
MasterofNull/NixOS-Dev-Quick-Deploy
.agent/skills/slack-gif-creator/core/visual_effects.py
.py
259b341762903b16
7.42
6
#!/usr/bin/env python3 """ Fade Animation - Fade in, fade out, and crossfade effects. Creates smooth opacity transitions for appearing, disappearing, and transitioning. """ import sys from pathlib import Path sys.path.append(str(Path(__file__).parent.parent)) from PIL import Image, ImageDraw import numpy as np from...
MasterofNull/NixOS-Dev-Quick-Deploy
.agent/skills/slack-gif-creator/templates/fade.py
.py
7ae3ed383e693ddf
7.42
6
#!/usr/bin/env python3 """ Flip Animation - 3D-style card flip and rotation effects. Creates horizontal and vertical flips with perspective. """ import sys from pathlib import Path import math sys.path.append(str(Path(__file__).parent.parent)) from PIL import Image from core.gif_builder import GIFBuilder from core....
MasterofNull/NixOS-Dev-Quick-Deploy
.agent/skills/slack-gif-creator/templates/flip.py
.py
37774e771eb4c7ca
7.42
6
#!/usr/bin/env python3 """ Kaleidoscope Effect - Create mirror/rotation effects. Apply kaleidoscope effects to frames or objects for psychedelic visuals. """ import sys from pathlib import Path import math sys.path.append(str(Path(__file__).parent.parent)) from PIL import Image, ImageOps, ImageDraw import numpy as ...
MasterofNull/NixOS-Dev-Quick-Deploy
.agent/skills/slack-gif-creator/templates/kaleidoscope.py
.py
d911d23fdea1130b
7.42
6
#!/usr/bin/env python3 """ Morph Animation - Transform between different emojis or shapes. Creates smooth transitions and transformations. """ import sys from pathlib import Path sys.path.append(str(Path(__file__).parent.parent)) from PIL import Image import numpy as np from core.gif_builder import GIFBuilder from ...
MasterofNull/NixOS-Dev-Quick-Deploy
.agent/skills/slack-gif-creator/templates/morph.py
.py
7d46e5b6abb09cd8
7.42
6
#!/usr/bin/env python3 """ Move Animation - Move objects along paths with various motion types. Provides flexible movement primitives for objects along linear, arc, or custom paths. """ import sys from pathlib import Path import math sys.path.append(str(Path(__file__).parent.parent)) from core.gif_builder import GI...
MasterofNull/NixOS-Dev-Quick-Deploy
.agent/skills/slack-gif-creator/templates/move.py
.py
94dcf4d913a471d1
7.42
6
#!/usr/bin/env python3 """ Pulse Animation - Scale objects rhythmically for emphasis. Creates pulsing, heartbeat, and throbbing effects. """ import sys from pathlib import Path import math sys.path.append(str(Path(__file__).parent.parent)) from PIL import Image from core.gif_builder import GIFBuilder from core.fram...
MasterofNull/NixOS-Dev-Quick-Deploy
.agent/skills/slack-gif-creator/templates/pulse.py
.py
512e3507c3eec167
7.42
6
#!/usr/bin/env python3 """ Slide Animation - Slide elements in from edges with overshoot/bounce. Creates smooth entrance and exit animations. """ import sys from pathlib import Path sys.path.append(str(Path(__file__).parent.parent)) from PIL import Image from core.gif_builder import GIFBuilder from core.frame_compo...
MasterofNull/NixOS-Dev-Quick-Deploy
.agent/skills/slack-gif-creator/templates/slide.py
.py
576fbfd2c70c58cd
7.42
6
#!/usr/bin/env python3 """ Spin Animation - Rotate objects continuously or with variation. Creates spinning, rotating, and wobbling effects. """ import sys from pathlib import Path import math sys.path.append(str(Path(__file__).parent.parent)) from PIL import Image from core.gif_builder import GIFBuilder from core....
MasterofNull/NixOS-Dev-Quick-Deploy
.agent/skills/slack-gif-creator/templates/spin.py
.py
6eff85e171fc060d
7.42
6
#!/usr/bin/env python3 """ Wiggle Animation - Smooth, organic wobbling and jiggling motions. Creates playful, elastic movements that are smoother than shake. """ import sys from pathlib import Path import math sys.path.append(str(Path(__file__).parent.parent)) from PIL import Image from core.gif_builder import GIFB...
MasterofNull/NixOS-Dev-Quick-Deploy
.agent/skills/slack-gif-creator/templates/wiggle.py
.py
356497711bf092c8
7.42
6
#!/usr/bin/env python3 """ Zoom Animation - Scale objects dramatically for emphasis. Creates zoom in, zoom out, and dramatic scaling effects. """ import sys from pathlib import Path import math sys.path.append(str(Path(__file__).parent.parent)) from PIL import Image, ImageFilter from core.gif_builder import GIFBuil...
MasterofNull/NixOS-Dev-Quick-Deploy
.agent/skills/slack-gif-creator/templates/zoom.py
.py
955facbb5983e752
7.42
6
#!/usr/bin/env python """Exercise the real local embedder — the one core dependency pytest cannot see. Every other heavy backend is optional and has a fake to degrade into, so a green suite says something about all of them. `sentence-transformers` is neither: her memory is built on it, it has no fake by design (§3 — "...
yuri-os/YuriOS
scripts/check_embedder.py
.py
4e816ae8971dae53
7.48
8
#!/usr/bin/env python3 """Populate web/live2d/vendor/ with the Live2D runtime + the Hiyori model. Adapted from the book's `fetch_avatar.py` (SPEC §6.6): the Live2D client lives under web/live2d/ here, next to the VRM frontend, so the destination and the closing hint differ. See web/live2d/README.md. None of this is c...
yuri-os/YuriOS
scripts/fetch_live2d.py
.py
47534efe7d84f763
7.48
8
#!/usr/bin/env python """Regenerate `docs/test-map.md` — module → the test files that exercise it. The naming convention gets you most of the way: `world/inbox.py` is covered by `tests/test_inbox.py`, and for 40-odd modules that is the whole answer. For the rest it is silently untrue. `world/brain.py`, `world/main.py`...
yuri-os/YuriOS
scripts/test_map.py
.py
9ad20f514968482f
7.98
8
"""Card-shaped test fixtures, shared by the importer, exporter and studio suites. Promoted out of `test_characters_importer.py` once the export side needed the same helpers. `st_reader` is deliberately *not* the repo's strict parser: it is a sketch of what a real client does — walk chunks, take `tEXt`, prefer `ccv3`, ...
yuri-os/YuriOS
tests/support/cards.py
.py
6a3916bee9cca399
7.98
8
"""BOOTSTRAP.md, consumed once (SPEC §5.4) — on the path she is actually greeted through. The cold open used to live only in Build #1's `GET /api/greeting`, a route the world server never mounts: every real greeting came from `BrainAdapter. stream_greeting`, which asked the model for a continuity opener and never look...
yuri-os/YuriOS
tests/test_bootstrap_greeting.py
.py
e433997a3cb37311
7.98
8
"""The brain contract is real, and the fakes still match it. `world/brain_protocol.py` replaced ten `hasattr` checks with two named shapes. That is only worth something if something checks that the classes are those shapes — otherwise the contract is a comment, and the failure it was written to prevent (rename a metho...
yuri-os/YuriOS
tests/test_brain_protocol.py
.py
e612f2ad46c60e4c
7.98
8
"""Export → import, on a vault that has actually been lived in. The load-bearing test for SPEC §28. Three properties, and the feature is a liability without all three: * what she grew travels — an approved self-edit is on the card; * what you are to her does not — nothing from `USER.md`, the memory tier, the ...
yuri-os/YuriOS
tests/test_card_roundtrip.py
.py
76db79bbcb82c95a
7.98
8
"""Config (SPEC §11 + §25) — Build #5's knobs on top of B4's on top of B2's.""" from __future__ import annotations import os from yurios.world.config import Config def test_defaults(): cfg = Config(_env_file=None) assert cfg.port == 8768 # +1 off Build #4 assert cfg.tools_backend =...
yuri-os/YuriOS
tests/test_config.py
.py
fea292414ddb111e
7.98
8
"""DREAM consolidation (SPEC §21) — oldest-first, resumable, budget-capped, never today's live journal. Build #1's consolidate() stub, finally implemented. """ from __future__ import annotations import pytest from yurios.app.memory.store import FileMemoryStore from yurios.mind.dream import DreamConsolidator from yuri...
yuri-os/YuriOS
tests/test_dream.py
.py
063995d4eb1558d7
7.98
8
# Copyright 2026 DataRobot, Inc. and its affiliates. # # 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 o...
datarobot-oss/datarobot-genai
e2e-tests/dragent/base/myagent.py
.py
4a2c6de1597ab6de
8.12
16
# Copyright 2026 DataRobot, Inc. and its affiliates. # # 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 o...
datarobot-oss/datarobot-genai
e2e-tests/dragent/base/register.py
.py
072abc2b06e07045
8.12
16
# Copyright 2026 DataRobot, Inc. and its affiliates. # # 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 o...
datarobot-oss/datarobot-genai
e2e-tests/dragent/crewai/register.py
.py
496b6cc14e18aca9
8.12
16
# Copyright 2026 DataRobot, Inc. and its affiliates. # # 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 o...
datarobot-oss/datarobot-genai
e2e-tests/dragent/langgraph/myagent.py
.py
e4e009a2300c15c8
8.12
16
# Copyright 2026 DataRobot, Inc. and its affiliates. # # 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 o...
datarobot-oss/datarobot-genai
e2e-tests/dragent/langgraph/register.py
.py
a735f2fbed312034
8.12
16
# Copyright 2026 DataRobot, Inc. and its affiliates. # # 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 o...
datarobot-oss/datarobot-genai
e2e-tests/dragent/llamaindex/register.py
.py
43da7a02f5fdd640
8.12
16
# Copyright 2026 DataRobot, Inc. and its affiliates. # # 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 o...
datarobot-oss/datarobot-genai
e2e-tests/dragent/run_agent.py
.py
4e875d0375f0c2d3
8.12
16
# Copyright 2026 DataRobot, Inc. and its affiliates. # # 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 o...
datarobot-oss/datarobot-genai
e2e-tests/dragent_tests/conftest.py
.py
d15635907d948f4c
8.12
16
# Copyright 2026 DataRobot, Inc. and its affiliates. # # 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 o...
datarobot-oss/datarobot-genai
e2e-tests/dragent_tests/helpers.py
.py
bf0e0268350ab302
8.12
16
# Copyright 2026 DataRobot, Inc. and its affiliates. # # 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 o...
datarobot-oss/datarobot-genai
e2e-tests/dragent_tests/test_a2a.py
.py
4cae7f606bb46bff
8.12
16
# Copyright 2026 DataRobot, Inc. and its affiliates. # # 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 o...
datarobot-oss/datarobot-genai
e2e-tests/dragent_tests/test_chat_completions.py
.py
f8c7d5d189758d29
7.12
16
# Copyright 2026 DataRobot, Inc. and its affiliates. # # 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 o...
datarobot-oss/datarobot-genai
e2e-tests/dragent_tests/test_cli_run.py
.py
9ef42ab65621bec1
8.12
16
# Copyright 2026 DataRobot, Inc. and its affiliates. # # 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 o...
datarobot-oss/datarobot-genai
e2e-tests/dragent_tests/test_history_multiturn.py
.py
497b9754691ff6be
8.12
16
# Copyright 2026 DataRobot, Inc. and its affiliates. # # 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 o...
datarobot-oss/datarobot-genai
e2e-tests/dragent_tests/test_interrupt_resume.py
.py
9d9c217c78489f01
7.12
16
# Copyright 2026 DataRobot, Inc. and its affiliates. # # 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 o...
datarobot-oss/datarobot-genai
e2e-tests/dragent_tests/test_mcp.py
.py
c2ac1598b5fd67b6
7.12
16
# Copyright 2026 DataRobot, Inc. and its affiliates. # # 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 o...
datarobot-oss/datarobot-genai
e2e-tests/dragent_tests/test_memory.py
.py
f728008fdc4a4731
8.12
16
#!/usr/bin/env python3 """Export health data snapshot for LLM analysis. Usage: python3 scripts/health_snapshot.py [--date YYYY-MM-DD] [--check] Outputs JSON to stdout for LLM consumption (OpenClaw / hermes-agent). """ import argparse import json import sys from datetime import date from pathlib import Path # Ad...
n0Pnyk/zepp-health-skill
scripts/health_snapshot.py
.py
62b003808efb7289
7.48
8
"""Configuration loading and authentication management. Supports multiple configuration sources, priority from high to low: 1. CLI arguments (--token, --user-id, --cookie) 2. File specified via --config or $ZEPP_CONFIG environment variable 3. ./config.json 4. ~/.config/zepp-health/config.json 5. Environment variables ...
n0Pnyk/zepp-health-skill
zepp_health/config.py
.py
367b2ddd8460c0c8
7.48
8
"""Output formatting. Supports three output formats: - JSON: for hermes-agent consumption - Terminal: rich-formatted terminal output - Morning Briefing: natural language morning report text """ from __future__ import annotations from zepp_health.models import HealthReport def to_json(report: HealthReport, indent: ...
n0Pnyk/zepp-health-skill
zepp_health/report.py
.py
9ba263fc1e826b41
7.48
8
"""In-memory realtime transport shared by WebSocket clients. The application deliberately keeps this layer independent from deployment topology. It only deals with small JSON events produced inside this FastAPI process; files and all request/response operations stay on HTTP. """ from __future__ import annotations im...
amenorira/lora-scripts-anima
backend/core/realtime.py
.py
993588aaf7f9133e
7.56
12
"""GUI 入口:`python -m backend.gui`。 启动顺序:解释器版本门禁 → 启动兼容性补丁 → 环境检查/依赖修复 → 端口探测 → TensorBoard 拉起 → uvicorn 托管 FastAPI。 """ import argparse import asyncio import atexit import os import platform import signal import subprocess import sys # 项目启动兼容性补丁必须先于 ML 依赖导入 if sys.platform == "win32": from tools.python_startup im...
amenorira/lora-scripts-anima
backend/gui.py
.py
19b54e7c30920f5f
7.56
12
import logging import os from logging.handlers import RotatingFileHandler class _ConsoleVisibilityFilter(logging.Filter): """Allow selected records to be kept in the file log without console noise.""" def filter(self, record): return getattr(record, "console", True) # TensorBoard is served through ...
amenorira/lora-scripts-anima
backend/log.py
.py
17a01dbb1fbc08df
7.56
12
""" 任务监控器:每秒采样进程内任务状态并发布实时事件。 功能: - 监控任务状态变化 - 收集训练进度 - 收集硬件信息 - 发布 WebSocket 实时事件 - 控制台单行训练进度条(rich Progress,含 loss/lr/epoch/已运行/剩余) """ from __future__ import annotations import asyncio import logging import time from pathlib import Path from typing import Any from backend.core.realtime import realtime_hub, realti...
amenorira/lora-scripts-anima
backend/monitor/monitor.py
.py
217d9bfa7343d992
7.56
12
"""训练任务快照与 task_id ↔ 内部 run_dir 映射。""" from __future__ import annotations from pathlib import Path from backend.monitor.run_registry import ( find_run_record_by_task_id, load_run_record, write_run_record, ) def _write_task_meta( run_dir: str | Path, task_id: str, extra_info: dict | None = Non...
amenorira/lora-scripts-anima
backend/monitor/snapshot.py
.py
c3224e35a88b90f0
7.56
12
"""Same-origin WebSocket endpoint and realtime bootstrap snapshot.""" from __future__ import annotations import asyncio import logging import time from typing import Any from fastapi import APIRouter, WebSocket, WebSocketDisconnect from backend.core.realtime import ( PROTOCOL_VERSION, SERVER_INSTANCE_ID, ...
amenorira/lora-scripts-anima
backend/server/routes/realtime.py
.py
b6551a1cd374bd89
7.56
12
"""打标图片预处理:纯 PIL 实现,替代旧版 cv2 工具函数。 约定: - 透明区域一律合成到白底(打标模型按白底训练) - 方形补齐用白边居中,缩放按方向选滤波器(放大 BICUBIC / 缩小 BOX 面积平均) ——面积平均对齐打标模型参考实现里的 INTER_AREA,缩采样抗锯齿且不振铃 """ from __future__ import annotations from PIL import Image def flatten_to_white(image: Image.Image) -> Image.Image: """任意模式 → 白底 RGB。RGBA/LA 的 alpha 通道作掩码贴...
amenorira/lora-scripts-anima
backend/tagger/image_prep.py
.py
6f5cf84501fc4122
7.56
12
"""打标器基类与标签后处理流水线。 Interrogator 子类约定:load() 惰性加载模型,interrogate(image) 返回 {分类: [(标签, 置信度), ...]};postprocess_tags 把原始结果按阈值/开关 收敛成 {最终标签文本: 置信度}。 """ from __future__ import annotations import re from pathlib import Path from typing import Dict, List, Optional, Tuple from PIL import Image from backend.log import log ...
amenorira/lora-scripts-anima
backend/tagger/interrogators/base.py
.py
d9c6a039318ecd70
7.56
12
"""CL Tagger(cella110n/cl_tagger) interrogator。 模型约定(依据模型仓库自带的 tag_mapping.json 与公开推理脚本): - 输入 448×448、白底补齐方形、BICUBIC 缩放、/255 后按 0.5 均值/方差归一化的 BGR float32 张量 - tag_mapping.json 是数据而非代码,支持两种布局: {"idx_to_tag": {...}, "tag_to_category": {...}} 或 {索引: {"tag": ..., "category": ...}} - rating / quality 分类只取置信度最高的一条,其余...
amenorira/lora-scripts-anima
backend/tagger/interrogators/cl.py
.py
9f0d53ab06b8a583
7.56
12
"""SmilingWolf WD 系列打标器(wd-eva02-large-tagger-v3 / wd-vit-large-tagger-v3 等)。 模型约定(来自作者公开的参考实现与模型卡): - 输入为 BGR float32、0-255 不归一化、白色补齐方形后缩放到模型要求边长 - 输出前 4 个神经元是 rating(general/sensitive/questionable/explicit), 其余按 selected_tags.csv 顺序对齐为一般标签 """ from __future__ import annotations from pathlib import Path from typin...
amenorira/lora-scripts-anima
backend/tagger/interrogators/wd14.py
.py
2ac74f5e14105d24
7.56
12
"""打标输出文件名模板引擎。 模板语法:`[name]`、`[extension]`、`[hash:algo]`、`[timestamp:fmt]`、 `[date:fmt]`、`[output_extension]`,未识别的占位符原样保留。 """ from __future__ import annotations import hashlib import re from dataclasses import dataclass from datetime import datetime from pathlib import Path from typing import Callable _TOKEN = re....
amenorira/lora-scripts-anima
backend/tagger/naming.py
.py
8224059a55a55295
7.56
12
"""子进程任务管理器。 线程安全的任务生命周期:创建(受并发上限约束)、执行、终止、查询、自动清理。 训练/打标等长任务统一经 `tm` 单例调度,保证 GPU 任务串行。 """ from __future__ import annotations import os import subprocess import threading import time import uuid from enum import Enum from typing import Dict, List, Optional import psutil from backend.log import log _FINISHED_KEEP_...
amenorira/lora-scripts-anima
backend/tasks.py
.py
959c33ff9eab17d8
7.56
12
#!/usr/bin/env python3 """ Build OpenClaw-compatible SKILL.md from Claude Code source. Usage: python3 scripts/build_openclaw.py # output to dist/openclaw/ python3 scripts/build_openclaw.py -o /tmp/oc # custom output dir """ import argparse import re import shutil from pathlib import Path REPO_...
arniepropagative708/wewrite
dist/openclaw/scripts/build_openclaw.py
.py
a2009449e0c42aeb
7.5
9
#!/usr/bin/env python3 """ Build a writing playbook from historical articles. Reads all .md files in corpus/, analyzes writing patterns in batches via LLM, and outputs a structured playbook.md. Usage: python3 build_playbook.py python3 build_playbook.py --batch-size 10 Requires: ANTHROPIC_API_KEY or ARK API k...
arniepropagative708/wewrite
dist/openclaw/scripts/build_playbook.py
.py
a22147cc76deace8
7.5
9
#!/usr/bin/env python3 """ Diagnose which anti-AI measures are active in this WeWrite installation. Checks: Python deps, config.yaml, style.yaml, enhancement files, dimension variance. Outputs a human-readable report or structured JSON. Usage: python3 scripts/diagnose.py # text report python3 scr...
arniepropagative708/wewrite
dist/openclaw/scripts/diagnose.py
.py
7d23273aa43c8861
7.5
9
#!/usr/bin/env python3 """ Fetch trending topics from multiple Chinese platforms. Sources (all attempted in parallel, results merged and deduplicated): 1. Weibo hot search (weibo.com/ajax/side/hotSearch) 2. Toutiao hot board (toutiao.com/hot-event/hot-board) 3. Baidu hot search (top.baidu.com/api/board) Usage: ...
arniepropagative708/wewrite
dist/openclaw/scripts/fetch_hotspots.py
.py
b27e66cd5240855f
7.5
9
#!/usr/bin/env python3 """ Fetch WeChat article statistics and update history.yaml. Uses WeChat Data Analytics API to pull article performance: - /datacube/getarticlesummary (daily summary) - /datacube/getarticletotal (cumulative) Usage: python3 fetch_stats.py python3 fetch_stats.py --days 7 Requires: we...
arniepropagative708/wewrite
dist/openclaw/scripts/fetch_stats.py
.py
ccd0d483dfeab205
7.5
9
#!/usr/bin/env python3 """ Learn from human edits by diffing AI draft vs published final. Compares the original AI-generated article with the human-edited version, computes structured diffs, and saves typed lessons to lessons/. Each lesson has: - type: word_sub / para_delete / para_add / structure / title / tone ...
arniepropagative708/wewrite
dist/openclaw/scripts/learn_edits.py
.py
bef0b6ea9241ffe0
7.5
9
#!/usr/bin/env python3 """ SEO keyword research tool. Queries real search data to evaluate keyword popularity: 1. Baidu search suggestions (autocomplete volume proxy) 2. Baidu related searches 3. WeChat sogou index (search volume proxy) Usage: python3 seo_keywords.py "AI大模型" python3 seo_keywords.py "AI大...
arniepropagative708/wewrite
dist/openclaw/scripts/seo_keywords.py
.py
afcb030435df87f7
7.5
9
#!/usr/bin/env python3 """ CLI entry point for WeWrite. Usage: python cli.py preview article.md --theme professional-clean python cli.py publish article.md --appid wx123 --secret abc123 python cli.py themes """ import argparse import sys import webbrowser from pathlib import Path import yaml from conver...
arniepropagative708/wewrite
dist/openclaw/toolkit/cli.py
.py
060ec986a92a9faf
7.5
9
import json import requests from dataclasses import dataclass from typing import Optional @dataclass class DraftResult: media_id: str @dataclass class ImagePostResult: media_id: str image_count: int def create_draft( access_token: str, title: str, html: str, digest: str, thumb_med...
arniepropagative708/wewrite
dist/openclaw/toolkit/publisher.py
.py
4849356c7c30ae59
7.5
9
""" Theme system for WeWrite. Loads YAML theme definitions and provides CSS parsing utilities for the inline style converter. """ import logging import os import re from dataclasses import dataclass, field from pathlib import Path from typing import Optional import cssutils import yaml # Suppress cssutils warnings ...
arniepropagative708/wewrite
dist/openclaw/toolkit/theme.py
.py
850913a0d12914e0
7.5
9
import time import mimetypes import requests from pathlib import Path from dataclasses import dataclass # Token cache _token_cache: dict = {} @dataclass class TokenResult: access_token: str expires_at: float # unix timestamp def get_access_token(appid: str, secret: str, force_refresh: bool = False) -> str...
arniepropagative708/wewrite
dist/openclaw/toolkit/wechat_api.py
.py
ec1f354c98f2cf52
7.5
9
#!/usr/bin/env python3 """audit_truth_daily.py — Daily truth audit for lambda-Section. Scans ~/Documents for all projects with .git, collects factual data, writes TRUTH_DAILY.md and optionally updates Epingle_Projets.md. Facts per project: - last commit (hash, date, message) - branch, dirty status - test files c...
Lemniscate-world/kuro-rules
scripts/audit_truth_daily.py
.py
7a7237a9b7dbe64e
7.45
7
#!/usr/bin/env python3 """clone_repos_for_truth.py — Clone les repos publics dans ~/Documents pour la vérité sur CI. Sur GitHub Actions, ~/Documents est vide: audit_truth_daily / compute_progress / truth_enrich / generate_blog dépendent de repos locaux. Ce script clone en shallow les repos listés dans Epingle depuis L...
Lemniscate-world/kuro-rules
scripts/clone_repos_for_truth.py
.py
4151ff1f8fc22b65
7.45
7
#!/usr/bin/env python3 """compute_progress.py — Calcule % réaliste factuel pour chaque projet (R3 pessimiste). Formule transparente, basée sur faits: base = 5 Nouveau, 10 Prototypage, 20 Validation, 25 Actif, 0 Archive + tests: test_funcs *0.4 (max 20) | 50 funcs = 20% + commits_30j *0.8 (max 15) | 15 commit...
Lemniscate-world/kuro-rules
scripts/compute_progress.py
.py
22d2825eb80f0b0a
7.45
7
#!/usr/bin/env python3 """gen_og_image.py — Génère assets/og.png (1200x630) style Ledger Brutal depuis les stats réelles. Usage: python gen_og_image.py [--out chemin/og.png] Appelé par generate_portfolio.py si Pillow disponible. Échoue silencieusement sans casser le build. """ import re, sys from pathlib import Path ...
Lemniscate-world/kuro-rules
scripts/gen_og_image.py
.py
a4d42d42e03f9b08
7.45
7
#!/usr/bin/env python3 """generate_blog.py — Génère des billets de blog factuels automatiques. Sources: git log, Epingle_Projets.md, TRUTH_DAILY.md, Discord (si export) Sortie: Lemniscate-world/blog/YYYY-MM-DD-slug.md + blog/index.html Usage: python scripts/generate_blog.py --dry-run python scripts/generate_blog....
Lemniscate-world/kuro-rules
scripts/generate_blog.py
.py
7b7528c18bdb83ca
7.45
7
#!/usr/bin/env python3 """kuro_doctor.py — vérification de santé complète de l'intelligence Kuro. Une seule commande qui teste tous les composants et dit la vérité : python scripts/kuro_doctor.py [--fix] --fix : tente les réparations sûres (démarrer l'API, lancer un scan daemon, backup DB). """ import json impor...
Lemniscate-world/kuro-rules
scripts/kuro_doctor.py
.py
c434021a3ffee941
7.45
7
#!/usr/bin/env python3 """post_session_check.py — Run at end of every session to verify everything is synced. Checks: 1. Epingle_Projets.md matches projects on disk 2. Portfolio HTML is up to date 3. Git repos are clean (no uncommitted changes) 4. Rules are consistent across repos Usage: python scripts/post_session_c...
Lemniscate-world/kuro-rules
scripts/post_session_check.py
.py
663d2070d681c50c
7.45
7
#!/usr/bin/env python3 """sync_discord_to_epingle.py — Importe tes messages Discord par projet vers Epingle_Projets.md. Usage: 1. Exporte ton serveur Discord avec DiscordChatExporter (GUI ou CLI): DiscordChatExporter.Cli.exe export --channel <id> --format Json --output discord_export.json Ou exporte manuel...
Lemniscate-world/kuro-rules
scripts/sync_discord_to_epingle.py
.py
797e39569bc6e808
7.45
7
"""Tests kuro_skills — logique pure, fichiers temporaires, zéro réseau.""" import json import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent / "scripts")) import kuro_skills as ks # noqa: E402 # ---------- barre de progression ---------- def test_barre_proportionnelle(): ...
Lemniscate-world/kuro-rules
tests/test_kuro_skills.py
.py
ab2e47f2e9fb085b
7.95
7
import cv2 class cvMatch: def __init__(self): pass def match_template(self, full_capture_image, need_match_image, threshold=0.4): """ 在全局图片上匹配局部图片的位置 Args: need_match_image: 局部图片(模板)路径 full_capture_image: 全局图片 threshold: 匹配置信度阈值,默认 0...
KenTsuCo/qq-farm-bot-vision
utils/cv_match.py
.py
b9c23eda01aae0d5
7.5
9
import ctypes import time from utils.window_session import WindowSession # Windows API 常量 WM_LBUTTONDOWN = 0x0201 WM_LBUTTONUP = 0x0202 MK_LBUTTON = 0x0001 class WindowControl: """Windows 窗口后台控制类,支持后台静默点击""" def __init__(self, window_title, window_session=None): """ 初始化窗口控制器 ...
KenTsuCo/qq-farm-bot-vision
utils/window_control.py
.py
5336e3c416d67bab
7.5
9