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
"""Core settings management for application configuration.""" import json import logging import shutil import sys from pathlib import Path from typing import Any, ClassVar logger = logging.getLogger(__name__) class SettingsManager: """Manages application settings and presets persistence.""" APP_NAME = "df_...
GamerTuruu/DF-Metadata-Customizer
df_metadata_customizer/core/settings_manager.py
.py
008c87b12195ea9f
7.52
10
"""Core utilities for reading/writing Song ID3 tags and embedded JSON metadata.""" import contextlib import hashlib import json import logging import os import platform import shutil import subprocess from io import BytesIO from pathlib import Path from mutagen.id3 import APIC, COMM, ID3, TALB, TDRC, TIT2, TPE1, TPOS...
GamerTuruu/DF-Metadata-Customizer
df_metadata_customizer/core/song_utils.py
.py
f892721181cb7df5
7.52
10
"""Shared data models used across API, CLI, and UI.""" from dataclasses import dataclass from pathlib import Path from typing import Optional, Any from enum import Enum class RuleOperator(str, Enum): """Rule operators for conditional logic.""" IS = "is" CONTAINS = "contains" STARTS_WITH = "starts wi...
GamerTuruu/DF-Metadata-Customizer
df_metadata_customizer/shared/models.py
.py
86426ee731730416
7.52
10
"""Preset management component for handling preset operations.""" import json import logging from pathlib import Path from typing import Callable from PySide6.QtWidgets import ( QFrame, QHBoxLayout, QLabel, QPushButton, QMessageBox, QInputDialog ) from PySide6.QtCore import Qt from df_metadata_customizer.core imp...
GamerTuruu/DF-Metadata-Customizer
df_metadata_customizer/ui/preset_manager.py
.py
1f54eefc20411dc7
7.52
10
"""Progress Dialog for long-running operations.""" from PySide6.QtWidgets import ( QDialog, QVBoxLayout, QLabel, QProgressBar, QPushButton, QFrame ) from PySide6.QtCore import Qt from df_metadata_customizer.core import SettingsManager from df_metadata_customizer.ui.styles import get_theme_colors class ProgressDi...
GamerTuruu/DF-Metadata-Customizer
df_metadata_customizer/ui/progress_dialog.py
.py
6a23b53c39cfcf21
7.52
10
"""Rule Builder Widgets for PySide6.""" from PySide6.QtWidgets import ( QWidget, QHBoxLayout, QVBoxLayout, QLabel, QComboBox, QLineEdit, QPushButton, QFrame ) from PySide6.QtCore import Qt, Signal, QEvent, QPoint from PySide6.QtGui import QPainter, QPolygon, QColor from df_metadata_customizer.core.metadata im...
GamerTuruu/DF-Metadata-Customizer
df_metadata_customizer/ui/rule_widgets.py
.py
4fcb75992623bd77
7.52
10
"""UI Styling constants and utilities.""" # Color scheme BACKGROUND_PRIMARY = "#1e1e1e" BACKGROUND_SECONDARY = "#2b2b2b" BACKGROUND_TERTIARY = "#2d2d2d" TEXT_PRIMARY = "#ffffff" TEXT_SECONDARY = "#aaaaaa" TEXT_TERTIARY = "#888" BORDER_COLOR = "#3d3d3d" BORDER_LIGHT = "#555555" BORDER_DARK = "#444" BUTTON_PRIMARY = "#0...
GamerTuruu/DF-Metadata-Customizer
df_metadata_customizer/ui/styles.py
.py
33fc077849704083
7.52
10
"""Tree view component for displaying song metadata.""" import json import logging from pathlib import Path from typing import List, Callable from PySide6.QtWidgets import ( QTreeWidget, QMenu, QMessageBox, QApplication, QAbstractItemView ) from PySide6.QtCore import Qt from PySide6.QtGui import QCursor from df_m...
GamerTuruu/DF-Metadata-Customizer
df_metadata_customizer/ui/tree_view.py
.py
53f564d1d0ce3499
7.52
10
"""Window management, lifecycle, and preferences.""" import logging from typing import Optional from PySide6.QtWidgets import ( QMessageBox, QDialog, QVBoxLayout, QHBoxLayout, QLabel, QCheckBox, QDoubleSpinBox, QPushButton, QScrollArea, QFrame, QInputDialog ) from PySide6.QtCore import Qt from PySide6.Qt...
GamerTuruu/DF-Metadata-Customizer
df_metadata_customizer/ui/window_manager.py
.py
c9dc866cb975ee0e
7.52
10
import os import shutil from datetime import datetime from fastapi import APIRouter, Query, HTTPException router = APIRouter() def create_database_snapshot(data_dir: str = "data") -> str: """Creates a timestamped snapshot backup of the data directory before clearing.""" backup_dir = os.path.join(data_dir, "ba...
Ganesh-403/semantic-plagiarism-detector
app/api/v1/endpoints/database.py
.py
97fe54e3842f9bc9
7.6
15
""" Plagiarism Anomaly Detection UI Component. Streamlit-based interface for anomaly detection with pattern analysis and visualization. """ import streamlit as st import pandas as pd import plotly.express as px import plotly.graph_objects as go import numpy as np from typing import Dict, Any from src.core.anomaly_de...
Ganesh-403/semantic-plagiarism-detector
app/components/anomaly_detection_ui.py
.py
1982dd6318001452
7.6
15
""" Batch Processing Dashboard Component for Streamlit. Provides a comprehensive UI for managing and monitoring batch plagiarism detection jobs with real-time progress tracking. """ from datetime import datetime import pandas as pd import plotly.express as px import streamlit as st from src.core.batch_history impor...
Ganesh-403/semantic-plagiarism-detector
app/components/batch_dashboard.py
.py
f3b8e8933e58238e
7.6
15
""" Batch Processor UI Components. Provides UI elements for batch processing with progress tracking. """ import time # noqa: F401 from datetime import datetime from typing import Any, Dict, List # noqa: F401 import pandas as pd import streamlit as st from src.core.batch_processor import ( BatchConfig, # noqa...
Ganesh-403/semantic-plagiarism-detector
app/components/batch_processor_ui.py
.py
403b8cf337d3d923
7.6
15
""" Calibration Report UI Component (Issue #2267). Renders a "calibration report" section that shows where the currently configured plagiarism threshold sits on the precision / recall curve produced by the automated threshold calibration & backtest harness (``scripts/calibrate_thresholds.py``). The report reads the `...
Ganesh-403/semantic-plagiarism-detector
app/components/calibration_report.py
.py
e88783cabbb40417
7.6
15
import difflib import streamlit as st def render_chunk_alignment_inspector(chunk_a: str, chunk_b: str, score: float): """ Renders a side-by-side chunk alignment inspector with highlighted matching words. """ st.markdown("### Chunk Alignment Inspector") # Display similarity score badge badge_...
Ganesh-403/semantic-plagiarism-detector
app/components/chunk_alignment_inspector.py
.py
0ba7b208d03a515c
7.1
15
""" Offline Mode UI Components. Provides UI elements for configuring and monitoring offline mode. """ import time from pathlib import Path # noqa: F401 from typing import Any, Dict # noqa: F401 import streamlit as st from src.core.offline_mode import ( OfflineConfig, # noqa: F401 get_offline_manager, ...
Ganesh-403/semantic-plagiarism-detector
app/components/offline_mode_ui.py
.py
2ef7379f6cf7b316
7.6
15
""" Plagiarism Report Generator UI Component. Streamlit-based interface for generating and exporting comprehensive plagiarism detection reports. """ from typing import Any, Dict import plotly.express as px import streamlit as st from src.core.report_generator import ( ReportConfig, ReportFormat, ReportG...
Ganesh-403/semantic-plagiarism-detector
app/components/report_generator_ui.py
.py
f5e60b63649e1c58
7.6
15
"""Round-trip editor for the user-scoped models/providers configuration. The editor owns only the ``models`` and ``providers`` subtrees. It keeps the round-trip YAML document in memory so comments, ordering, unknown fields, and unrelated top-level configuration survive a save. Credential values are queued as transie...
assle/scientific-figure
scientific-figure-builder/figure_tools/config_editor.py
.py
0392b547f8d98cdd
7.45
7
"""Background removal for AI image assets (plan section 9 transparency workflow). When the image model returns an opaque image (no alpha), the background is removed so the asset becomes genuinely transparent. This is a lightweight, deterministic corner-seeded chroma key - no model download, reproducible. """ from __f...
assle/scientific-figure
scientific-figure-builder/figure_tools/imaging/background_removal.py
.py
feb4d8e74dea3274
7.45
7
"""Figure-plan builder (plan sections 4, 7, 15). Consumes a structured request (the OpenCode planning model turns natural language into this structure) and emits a figure_plan.json that conforms to the v1 schema. """ from __future__ import annotations from typing import Any from figure_tools.planning.router import ...
assle/scientific-figure
scientific-figure-builder/figure_tools/planning/planner.py
.py
616d0f25493ebdbe
7.45
7
"""Provider credential resolution and secret-safe error handling. This module is the only place that knows how a configured Provider obtains a credential. HTTP transports receive the resolved value explicitly; they do not inspect ``os.environ`` themselves. The interfaces are also injectable for headless tests and the ...
assle/scientific-figure
scientific-figure-builder/figure_tools/providers/auth.py
.py
f170e0099ac3f42c
7.45
7
"""Deterministic image-asset checks (plan section 11). These never rely on visual judgment; they inspect pixels directly. """ from __future__ import annotations from pathlib import Path from PIL import Image def _check_id(level: str, status: str, detail: str = "") -> dict: return {"level": level, "status": st...
assle/scientific-figure
scientific-figure-builder/figure_tools/validation/image_checks.py
.py
ba28ac60cf462f44
7.45
7
#!/usr/bin/env python3 """ E0 unified-CSV harvester. Reads per-run JSON files written by wayline/run.sh and minio/run.sh and emits a single CSV with columns: system, colocation, payload_label, bytes, run_name, producer_pod, consumer_pod, producer_node, consumer_node, t0, t1, t1p, t2, t3, t4, e2e, compute, sen...
ANRGUSC/wayline
eval/e0-microbench/harvest.py
.py
c86e275d5c7e3225
7.52
10
#!/usr/bin/env python3 """E3 risk-aware replication policy (external). Reads a risk signal written by an independent observer and revises the object's realization through the same interface E1/E2 use. It never touches the DAG, pods, or compute placements. risk -> add a replica on the backup node (durability only) ...
ANRGUSC/wayline
eval/experiments/E3/policy.py
.py
6b18bac6c36cb7cb
7.52
10
#!/usr/bin/env python3 """E4 analysis: per-arm payloads/makespans, paired block comparisons, and the pilot acceptance criteria. Usage: analyze_e4.py <results-dir> """ import csv import json import os import statistics as st import sys from collections import defaultdict RES = sys.argv[1] if len(sys.argv) > 1 else "res...
ANRGUSC/wayline
eval/experiments/E4/analyze_e4.py
.py
ca9743270187d0b2
7.52
10
#!/usr/bin/env python3 """Is OLB's schedule a property of the algorithm, or of tie ordering? Pinning PYTHONHASHSEED makes scheduling reproducible, but it also locks in ONE arbitrary tie-breaking order. If that order happens to be unfavourable to a baseline, every block reproduces it exactly and the baseline looks bad ...
ANRGUSC/wayline
eval/experiments/E5/olb_seed_sensitivity.py
.py
61a7c71d6b8b6170
7.52
10
#!/usr/bin/env python3 """E5 workload: a seven-task DAG whose every edge is a separately declared named object, with node-dependent execution time. runtime(t, n) = work[t] / speed[n], implemented in the container so the real execution matches the separable cost model SAGA is given (the bridge should therefore fit it w...
ANRGUSC/wayline
eval/experiments/E5/tasks/task.py
.py
c4049f1535afc0b7
7.52
10
#!/usr/bin/env python3 """Freeze the E6 MCMT reference schedule from the controller's OWN call. Freezing from an independently constructed request is brittle: two requests that differ only in irrelevant detail can break ties between symmetric nodes differently, producing isomorphic schedules with different hashes. The...
ANRGUSC/wayline
eval/experiments/E6/freeze_e6.py
.py
4df24d6369194869
7.52
10
#!/usr/bin/env python3 """ Render a concrete Argo WorkflowTemplate YAML for mcmt. Mirrors wayline/render.py: same tier pinning, same per-camera fan-out, same fan-in. Artifact passing goes through the bound artifact repository (the e0-bench MinIO on anrg-9 by default). """ from __future__ import annotations import ar...
ANRGUSC/wayline
eval/mcmt/argo/render.py
.py
cc978837eb068fc9
7.52
10
#!/usr/bin/env python3 """ Aether Client Library ===================== Read live audio analysis from Aether daemon via shared memory. Uses the existing AetherSharedMemory protocol for compatibility. Usage: from aether_client import AetherClient client = AetherClient() bands = client.get_bands() prin...
kareemsasa3/aether
aether_client.py
.py
693d455774432bb3
7.52
10
#!/usr/bin/env python3 # aether_rgb.py - Traveling wave RGB effect with multi-band audio analysis import time import sys import signal from openrgb import OpenRGBClient from openrgb.utils import RGBColor from aether_shm import AetherSharedMemory, read_event_legacy import aether_config as config class AetherRGB: "...
kareemsasa3/aether
aether_rgb.py
.py
e0928baa6a5cce13
7.52
10
"""Configuration model for the Aether terminal visualizer. Phase 2 of the TUI refactor (see REFACTOR.md): the tunable-settings schema, the presets, and the get/set/apply behavior that previously lived as class attributes and helper methods on `UltimateOscilloscope` move here behind a small `VizConfig` object. This is...
kareemsasa3/aether
config_model.py
.py
fdf9df2e03d1a228
7.52
10
"""Signal-processing state for the Aether visualizer. Phase 4a of the TUI refactor (see REFACTOR.md): the pure ingestion / decay / smoothing logic — the waveform deques, spectrum bars, RGB levels, and the scalars driving them — moves out of `UltimateOscilloscope` into `VisualizerState`. This object is deliberately de...
kareemsasa3/aether
engine.py
.py
d261693cac829ae8
7.52
10
#!/usr/bin/env python3 """ Aether Discord Rich Presence Show live audio analysis in Discord status """ import time import sys try: from pypresence import Presence except ImportError: print("Error: pypresence not installed", file=sys.stderr) print("Install with: pip install pypresence", file=sys.stderr) ...
kareemsasa3/aether
integrations/discord/aether-discord-rpc.py
.py
2aac4c8cb1d193db
7.52
10
#!/usr/bin/env python3 """ Aether Philips Hue Sync Sync smart lights to system audio in real-time """ import time import sys try: from phue import Bridge except ImportError: print("Error: phue not installed", file=sys.stderr) print("Install with: pip install phue", file=sys.stderr) sys.exit(1) try: ...
kareemsasa3/aether
integrations/hue/aether-hue-sync.py
.py
8cbe2665daa74268
7.52
10
#!/usr/bin/env python3 """ Aether OBS Auto-Ducking Automatically adjust microphone volume when music plays """ import time import sys try: import obsws_python as obs except ImportError: print("Error: obs-websocket-py not installed", file=sys.stderr) print("Install with: pip install obs-websocket-py", file...
kareemsasa3/aether
integrations/obs/aether-obs-ducking.py
.py
76b03136fed937bc
7.52
10
#!/usr/bin/env python3 """Polybar module - live frequency spectrum bars""" from aether_client import AetherClient def main(): client = AetherClient() if not client.connect(): print("-------") return bands = client.get_bands() if not bands: print("-------") return ...
kareemsasa3/aether
integrations/polybar/aether-spectrum.py
.py
9d68adfe2d44806f
7.02
10
"""Terminal rendering primitives for the Aether visualizer. Phase 3 of the TUI refactor (see REFACTOR.md): generic, domain-free terminal/curses helpers move here. They are pure functions of their explicit arguments and own no visualizer state, so the bounds-clipping and background-character logic is unit-testable with...
kareemsasa3/aether
render.py
.py
1977f701c9821441
7.52
10
"""Style discovery and loading for the Aether visualizer. Phase 5 of the TUI refactor (see REFACTOR.md): the style catalog logic that was duplicated between `aether.py` (CLI selection) and `ui/overlays.py` (the in-app picker) lives here. This module is pure discovery/loading — no printing, no input(), no sys.exit — so...
kareemsasa3/aether
style_catalog.py
.py
b57024f03be1180e
7.52
10
"""Aurora - full-height northern-lights curtains that dance to the music""" import curses import math import random STYLE_NAME = "Aurora" STYLE_DESCRIPTION = "Flowing full-height light curtains with drifting colors" def _curtain_height(x, frame, energy, h): """Layered sines give each column a slowly drifting cu...
kareemsasa3/aether
styles/aurora.py
.py
2b7763b87babe773
7.52
10
"""Classic Wave - a real oscilloscope: connected trace, phosphor, graticule""" import curses STYLE_NAME = "Classic Wave" STYLE_DESCRIPTION = "CRT oscilloscope: continuous trace with phosphor decay" # Phosphor persistence grid of per-cell intensities (1.0 = just traced), # keyed by canvas size. Fades every frame, lea...
kareemsasa3/aether
styles/classic_wave.py
.py
05c9b87238f9325a
7.52
10
"""Cyberpunk - neon signal over a living city skyline with glitch bursts""" import curses import random STYLE_NAME = "Cyberpunk" STYLE_DESCRIPTION = "Neon signal over a city skyline with glitches and data rain" _GLITCH_GLYPHS = "▚▞░#$%&<>/\\|=+*" _PARTICLE_GLYPHS = "$@#¥€₿" # Persistent scene: skyline heights (fixe...
kareemsasa3/aether
styles/cyberpunk.py
.py
7124601ebb0c1753
7.52
10
"""Matrix Rain - real cascading digital rain driven by the music""" import curses import random STYLE_NAME = "Matrix Rain" STYLE_DESCRIPTION = "Cascading digital rain: energy spawns drops, bass speeds them" # Mostly binary with occasional halfwidth katakana/symbols for texture. _GLYPHS = "010101010101ハミヒーウシナモニサワ<>*+...
kareemsasa3/aether
styles/matrix_rain.py
.py
7a82a513ca8c8811
7.52
10
"""Minimalist - high-resolution braille curve, nothing else""" import curses import math STYLE_NAME = "Minimalist" STYLE_DESCRIPTION = "Ultra-clean high-resolution braille curve with peak marks" # Braille cell = 2x4 sub-pixels; standard Unicode dot bit layout. _BIT = { (0, 0): 0x01, (0, 1): 0x02, (0, 2): 0x04, (...
kareemsasa3/aether
styles/minimalist.py
.py
6e699a1e6345f79a
7.52
10
"""Neon Wave - flagship mirrored neon wave with beat flash and peak trails""" import curses import math STYLE_NAME = "Neon Wave" STYLE_DESCRIPTION = "Mirrored neon glow wave with beat flashes and peak trails" # Bottom-up partial blocks for smooth column tips above the center line. _TIP_BLOCKS = [" ", "▁", "▂", "▃", ...
kareemsasa3/aether
styles/neon_wave.py
.py
d8cad287f6d43871
7.52
10
"""Phosphor - X-Y oscilloscope Lissajous trace with green phosphor decay""" import curses import math STYLE_NAME = "Phosphor" STYLE_DESCRIPTION = "X-Y scope Lissajous figure traced in decaying green phosphor" # Brightness ramp for the persistence grid, hottest first. With the 0.70 # decay only the freshest trace is ...
kareemsasa3/aether
styles/phosphor.py
.py
6c9048e3af39fc78
7.52
10
"""Rain Drops - rainfall onto a living water surface shaped by the music""" import curses import random STYLE_NAME = "Rain Drops" STYLE_DESCRIPTION = "Rain falling onto a rippling water surface with splashes" # Persistent scene state, keyed by canvas size: falling drops [x, y, speed] # and surface ripples [x, age]. ...
kareemsasa3/aether
styles/rain_drops.py
.py
b56f2fe25d8363c8
7.52
10
"""Spectra - full-width mirrored spectrum bars with falling peak caps""" import curses STYLE_NAME = "Spectra" STYLE_DESCRIPTION = "Full-width mirrored spectrum bars with falling peak caps" # Rainbow ramp across the frequency axis, low to high. _RAMP = [10, 4, 5, 3, 1, 6, 7] # Bottom-up partial blocks for smooth bar...
kareemsasa3/aether
styles/spectra.py
.py
bfe2815fd1f85e90
8.02
10
"""Starfield - parallax starfield that warps outward on the bass""" import curses import math import random STYLE_NAME = "Starfield" STYLE_DESCRIPTION = "Parallax stars: treble twinkles, bass jumps to warp speed" # Per-layer drift speed (cells/frame at rest) and resting glyph, near to far. _LAYERS = [ (0.05, "·"...
kareemsasa3/aether
styles/starfield.py
.py
fd8a00a5f5a19b81
7.52
10
#!/usr/bin/env python3 """Behavioral tests for the aether_shm seqlock protocol. `test_config_wiring.py` covers plumbing (constants resolve to config); this file covers the thing that is actually hard to get right: the seqlock in `aether_shm.AetherSharedMemory`. The protocol's correctness rests on a handful of reader d...
kareemsasa3/aether
test_aether_shm_seqlock.py
.py
ff9f7b4fb669fb4d
8.02
10
#!/usr/bin/env python3 """Unit tests for config_model.VizConfig. Phase 2 of the TUI refactor moved the visualizer's tunable settings out of `UltimateOscilloscope` into `VizConfig`. These tests pin the behavior that was previously embedded in the `_init_config` / `_get_config_value` / `_set_config_value` / `_load_prese...
kareemsasa3/aether
test_config_model.py
.py
0e36fcdf3f4a71ab
8.02
10
#!/usr/bin/env python3 """Smoke test: components source their tunable constants from aether_config. Three things are checked: 1. `aether_daemon` imports cleanly. systemd runs it as `python3 /path/aether_daemon.py`, which puts the script's own directory on sys.path[0] — the same mechanism that resolves `import ae...
kareemsasa3/aether
test_config_wiring.py
.py
64a1ef76426cc8e4
8.02
10
#!/usr/bin/env python3 """Unit tests for engine.VisualizerState. Phase 4a of the TUI refactor moved the visualizer's signal pipeline — waveform buffers, spectrum bars, RGB levels, and the smoothing scalars — out of `UltimateOscilloscope` into `VisualizerState`. These tests pin that behavior: - default initializatio...
kareemsasa3/aether
test_engine.py
.py
23c614cb1aba11c8
8.02
10
#!/usr/bin/env python3 """Unit tests for render.py terminal primitives. Phase 3 of the TUI refactor moved generic terminal helpers out of `UltimateOscilloscope` into `render.py`. These tests pin the behavior that was previously embedded in `safe_addstr` and `get_bg_char`: - safe_addstr writes only when (y, x) is on...
kareemsasa3/aether
test_render.py
.py
81fd8d9638533041
8.02
10
#!/usr/bin/env python3 """Unit tests for style_catalog.py. Phase 5 of the TUI refactor moved style discovery/loading out of `aether.py` and `ui/overlays.py` into `style_catalog.py`. These tests pin the shared behavior both call sites rely on: - list_style_names(): sorted slugs of every style file - load_style_mod...
kareemsasa3/aether
test_style_catalog.py
.py
1800896fbe5a18c1
8.02
10
#!/usr/bin/env python3 """Characterization tests for the styles/ plugin contract. The style plugins are the one stable seam of the TUI (see REFACTOR.md): each file in styles/ exposes STYLE_NAME, STYLE_DESCRIPTION, and render_waveform(i, amp, age, max_width, colors, sample_id) returning either None or a (char, attr) tu...
kareemsasa3/aether
test_styles.py
.py
96c1722889f12aba
8.02
10
#!/usr/bin/env python3 """Headless frame tests for the UltimateOscilloscope TUI. Phase 5 of the TUI refactor made the oscilloscope constructible without a real terminal: global curses setup moved from the constructor to main(), the SHM reader became injectable, and the frame loop split into tick() (one frame of dynami...
kareemsasa3/aether
test_visualizer_frame.py
.py
6eb84092f6649b81
8.02
10
"""Modal overlays for the Aether terminal visualizer. Phase 1 of the TUI refactor (see REFACTOR.md): the style-picker and config menu are lifted verbatim out of `UltimateOscilloscope` so the main file stops carrying ~435 lines of self-contained modal UI. These functions currently take the visualizer instance (`viz`) ...
kareemsasa3/aether
ui/overlays.py
.py
169260a75503546e
7.52
10
#!/usr/bin/env python3 """Validate every SKILL.md in the repository. Exit 0 on success, 1 on any failure.""" from __future__ import annotations import argparse import json import re import sys from pathlib import Path import yaml SCRIPT_DIR = Path(__file__).resolve().parent SOURCE_ROOT = SCRIPT_DIR.parents[1] / "src...
paulnsorensen/easy-cheese
.github/scripts/validate_skills.py
.py
1da01cd58acc1a4d
7.64
18
#!/usr/bin/env python3 """Validate wiki page conventions under .hallouminate/wiki/. Exit 0 on success, 1 on any failure. Checks (per .hallouminate/wiki/wiki-conventions.md): - first non-blank line of every page is a single `# ` H1 - file stem is a kebab-case slug - every directory with pages carries an index.md with H...
paulnsorensen/easy-cheese
.github/scripts/validate_wiki.py
.py
068d7bb2b637ecd9
7.64
18
#!/usr/bin/env python3 """Generate categorized release notes from main's git history. `gh release create --generate-notes` is useless here: the release workflow force-retargets each version tag onto a single-commit orphan `release`-branch snapshot (so `gh skill install` can read the built .pyz from the tag tree). That...
paulnsorensen/easy-cheese
scripts/release_notes.py
.py
3442295bf8a2c8b5
7.64
18
#!/usr/bin/env python3 """Assemble the shippable release tree: SKILL.md + one built <skill>.pyz per skill, plus top-level project metadata. Everything a consumer does NOT need — raw script sources (src/, shared/), build/test tooling, docs, CI config — is left behind. The release workflow commits this tree to the `rele...
paulnsorensen/easy-cheese
scripts/stage_release.py
.py
ebfb7e44ecdf2dd2
7.64
18
"""CLI helper for shared/scripts: argparse + --full/--json injection + emit. Public API: CliError -- one-line message; cli.run reports 'ERROR: <msg>' and returns 2. cli.run -- dispatch and return integer statuses for normal, missing-handler, and CliError paths; argparse help/errors retain Syst...
paulnsorensen/easy-cheese
src/easy_cheese/shared/cli.py
.py
80237e0732f44059
7.64
18
"""Shared public types for the Cut red-gate helper. The receipt records themselves live in :mod:`easy_cheese_schemas.gates`. This module only re-exports that phase-neutral surface and provides the result type returned by the read-only validator. """ from __future__ import annotations from dataclasses import datacla...
paulnsorensen/easy-cheese
src/easy_cheese/shared/cut/gate_receipts.py
.py
da39dd5b00218bfd
7.64
18
"""Pure age/affinage sizing router. Spec: deterministic-fanout-sizing.md `### 2. Reviewer ladder` and `### 3. Overrides promote`. Replaces the raw diff-stat N in {1,4,10} ladder with a single git-derived `score` (see review_surface.py), a reviewer ladder capped at 5 via a strict refinement tree, and turns OVERRIDE_FLA...
paulnsorensen/easy-cheese
src/easy_cheese/shared/fanout/age_route.py
.py
529af121d57e40fa
7.64
18
#!/usr/bin/env python3 """Classify a current test-failure list against a stored baseline. Deterministic classifier for /ultracook's baseline-aware quality gate (#298): prose agents never eyeball failure diffs (ADR-003) -- this module is the sole place failure signatures are compared. A `FailureRecord`'s `signature` fi...
paulnsorensen/easy-cheese
src/easy_cheese/shared/fanout/baseline.py
.py
289c9c6ecb94ca57
7.64
18
"""Curd entity — the single home for all curd validation rules. Two layered functions: behaviour_errors — content rules, checked at every pipeline stage. lifecycle_errors — run-manifest-only: id, status, retry_count. disjoint_files_errors — cross-curd file collision, checked at every stage. """ from __future__...
paulnsorensen/easy-cheese
src/easy_cheese/shared/fanout/curd.py
.py
0f93a182503c3ca4
7.64
18
#!/usr/bin/env python3 """Probe the milknado engine seam for /ultracook parallel mode. Three roles, keyed on which milknado MCP tools are present in the agent's toolset: - ``engine`` — ``todo_claim`` + ``node_verify`` present: milknado owns the DAG, per-node worktrees, and verify-until-green; /ultracook spawns the...
paulnsorensen/easy-cheese
src/easy_cheese/shared/fanout/milknado.py
.py
cf4881089232fb8b
7.64
18
#!/usr/bin/env python3 """Canonical thresholds and the two mode selectors for /cook's fan-out gate. Two selectors, chosen by whether a curd block exists: - A curd block exists: `select_mode(curds)` reads `PARALLEL_THRESHOLD` (2) -- "parallel" at `len(curds) >= PARALLEL_THRESHOLD`, else "linear". Both the fan-out ...
paulnsorensen/easy-cheese
src/easy_cheese/shared/fanout/mode.py
.py
23cbfde9267701ef
7.64
18
#!/usr/bin/env python3 """Decide what /ultracook should do after a phase sub-agent returns. Replaces the LLM-judged "did this phase finish, halt, or early-stop?" branch at the top of each /ultracook chain step. The orchestrator passes a 0-indexed phase index plus the parsed handoff slug (`status`, `next`) and gets bac...
paulnsorensen/easy-cheese
src/easy_cheese/shared/fanout/phase_decision.py
.py
fc77b2d79d5fbd58
7.64
18
"""Validated boundary router for the Press adversarial gate.""" from __future__ import annotations from dataclasses import dataclass from enum import Enum from pathlib import Path from typing import TypeAlias from easy_cheese.shared.cut.red_gate import GateValidationError, consume_press_boundary class Outcome(str,...
paulnsorensen/easy-cheese
src/easy_cheese/shared/fanout/press_route.py
.py
56e47e9e9c6a5080
7.64
18
"""Pure git-derived, code-weighted review-surface scorer. Spec: deterministic-fanout-sizing.md `### 1. review_surface` and `## Validation evidence`. Replaces raw diff-stat sizing (age_route.py's files_changed/insertions/deletions) with one monotone score that weighs non-review surface (lockfiles, fixtures, vendored co...
paulnsorensen/easy-cheese
src/easy_cheese/shared/fanout/review_surface.py
.py
bdab56e650d3f02e
7.64
18
"""CLI entry point for review_surface.score -- runs git, prints JSON. Split from review_surface.py so that module stays a pure function with zero I/O imports (see review_surface.py's module docstring); all git I/O and the optional [review_surface] TOML override live here instead. Mirrors baseline.py's argparse + cli.r...
paulnsorensen/easy-cheese
src/easy_cheese/shared/fanout/review_surface_cli.py
.py
60c48407d5f1fadd
7.64
18
#!/usr/bin/env python3 """Validate an /ultracook fan-out PR plan document. The plan's canonical on-disk format is YAML (see ``manifest_io``), but this validator accepts either YAML or JSON — both are read into the same Python mapping before shape checks run. """ from __future__ import annotations import re import sy...
paulnsorensen/easy-cheese
src/easy_cheese/shared/fanout/validate_pr_plan.py
.py
a5d55cd3753fa6e5
7.64
18
"""Wiring node entity — the single home for all wiring validation rules. Two layered functions: graph_errors — DAG invariants, checked at every pipeline stage. lifecycle_errors — run-manifest-only: id format, type, file, depends_on, status. """ from __future__ import annotations import re from easy_cheese.sh...
paulnsorensen/easy-cheese
src/easy_cheese/shared/fanout/wiring.py
.py
d0cd350df0db0ed1
7.64
18
"""Press readiness verdict (see skills/press/SKILL.md § Rules): ready for /age hard floor met, level-1/3 gaps closed follow-up recommended hard floor met, only level-4/5 gaps remain blocked level-1/2 unfixable or spinning wheels """ from __future__ import annotations from enum ...
paulnsorensen/easy-cheese
src/easy_cheese/shared/gates.py
.py
e432a96cc3ee1d8a
7.64
18
#!/usr/bin/env python3 """Git subprocess wrappers and conflict-marker helpers.""" from __future__ import annotations import subprocess from pathlib import Path # Conflict-marker prefixes (diff3 adds the ||||||| base marker). Single source # for marker checks here and in importers (conflict-pick). MARKER_OURS = "<<<<...
paulnsorensen/easy-cheese
src/easy_cheese/shared/git_utils.py
.py
687ae18202c49f9c
7.64
18
"""Selector for drawing a private custom cleaning area on the local map.""" from __future__ import annotations import math from typing import Any, NotRequired, TypedDict import voluptuous as vol from homeassistant.helpers.selector import ( SELECTORS, Selector, make_selector_config_schema, ) class Matic...
ProspectOre/matic-home-assistant
custom_components/matic_robot/area_selector.py
.py
13d384426760d8bb
7.54
11
"""Bluetooth credential issuance for a Matic robot pairing window.""" from __future__ import annotations import asyncio import errno import logging import re import sys from collections.abc import AsyncIterator, Callable, Iterable from contextlib import asynccontextmanager from dataclasses import dataclass from typin...
ProspectOre/matic-home-assistant
custom_components/matic_robot/bluetooth_pairing.py
.py
ae5e2edfbd6d58c1
7.54
11
"""Scoped BlueZ pairing agent for headless Matic authorization.""" import asyncio import logging from collections.abc import AsyncIterator from contextlib import asynccontextmanager from typing import TYPE_CHECKING, Annotated from bleak.backends.bluezdbus import defs from bleak.backends.bluezdbus.utils import assert_...
ProspectOre/matic-home-assistant
custom_components/matic_robot/bluez_agent.py
.py
ca981387debb0d22
7.54
11
"""Saved cleaning-plan controls for Matic robots.""" from __future__ import annotations from homeassistant.components.button import ButtonEntity from homeassistant.const import ATTR_ENTITY_ID from homeassistant.core import HomeAssistant, callback from homeassistant.exceptions import HomeAssistantError from homeassist...
ProspectOre/matic-home-assistant
custom_components/matic_robot/button.py
.py
6ecfa84d99784e94
7.54
11
"""Encode and validate Hermes credentials.""" from __future__ import annotations from base64 import b64decode, b64encode from binascii import Error as Base64Error from dataclasses import dataclass from typing import cast from uuid import UUID, uuid4 from google.protobuf.message import DecodeError from .proto.hermes...
ProspectOre/matic-home-assistant
custom_components/matic_robot/client/auth.py
.py
b2fb3512131eb9d9
7.54
11
"""Encode verified Hermes commands.""" from __future__ import annotations import math import struct from collections.abc import Callable, Sequence from enum import StrEnum from uuid import UUID, uuid4 class UserCommand(StrEnum): """Commands whose protobuf payloads were verified against a real robot.""" STO...
ProspectOre/matic-home-assistant
custom_components/matic_robot/client/commands.py
.py
952a247128ded237
7.54
11
"""Authoritative Hermes endpoint metadata for reads and firmware checks.""" from __future__ import annotations from dataclasses import dataclass from enum import StrEnum class HermesEndpointKind(StrEnum): """How a Hermes endpoint must be read.""" PROPERTY = "property" COLLECTION = "collection" class ...
ProspectOre/matic-home-assistant
custom_components/matic_robot/client/endpoints.py
.py
aec056567f313dc0
7.54
11
"""Typed client models.""" from __future__ import annotations from dataclasses import dataclass, field from enum import StrEnum @dataclass(frozen=True, slots=True) class RobotInfo: """Identity and connection metadata returned by a Matic robot.""" serial_number: str name: str hostname: str port:...
ProspectOre/matic-home-assistant
custom_components/matic_robot/client/models.py
.py
6ea3520b3af9bf38
7.54
11
"""Validate the robot's TLS identity and certificate pin.""" from __future__ import annotations import asyncio import hashlib import ssl from contextlib import suppress from dataclasses import dataclass from pathlib import Path from typing import cast from cryptography import x509 from cryptography.x509.oid import N...
ProspectOre/matic-home-assistant
custom_components/matic_robot/client/tls.py
.py
c974ad28e487d5f3
7.54
11
"""Decode bounded protobuf wire payloads.""" from __future__ import annotations import struct from dataclasses import dataclass from uuid import UUID from google.protobuf.message import DecodeError MAX_WIRE_SHAPE_BYTES = 64 * 1024 MAX_WIRE_SHAPE_FIELDS = 256 MAX_WIRE_SHAPE_DEPTH = 4 type WireShapePath = tuple[tupl...
ProspectOre/matic-home-assistant
custom_components/matic_robot/client/wire.py
.py
7e7e965010a03132
7.54
11
"""Base entity for Matic Hermes.""" from __future__ import annotations from homeassistant.helpers.device_registry import DeviceInfo from homeassistant.helpers.update_coordinator import CoordinatorEntity from homeassistant.util import slugify from . import MaticConfigEntry from .const import DOMAIN from .coordinator ...
ProspectOre/matic-home-assistant
custom_components/matic_robot/entity.py
.py
0630068f2c36f6f7
7.54
11
"""Privacy-safe Matic Cues events.""" from __future__ import annotations from homeassistant.components.event import EventEntity, EventEntityDescription from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback from . import MaticConfigEntr...
ProspectOre/matic-home-assistant
custom_components/matic_robot/event.py
.py
ab40902f0efc7850
7.54
11
"""Register the cleaning-plan editor and optional local map workspace.""" from __future__ import annotations import json from hashlib import sha256 from pathlib import Path from homeassistant.components import frontend from homeassistant.components.http import ( # type: ignore[attr-defined,unused-ignore] Static...
ProspectOre/matic-home-assistant
custom_components/matic_robot/frontend.py
.py
29009996b538d5ed
7.54
11
"""Pre-1.0 migrations to the integration's canonical data model.""" from __future__ import annotations import logging from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers import device_registry as dr from homeassistant.helpers import entity_regi...
ProspectOre/matic-home-assistant
custom_components/matic_robot/migrations.py
.py
46b052710d5d965f
7.54
11
"""Verified numeric settings for Matic robots.""" from __future__ import annotations from homeassistant.components.number import NumberEntity, NumberEntityDescription from homeassistant.const import EntityCategory from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddConfig...
ProspectOre/matic-home-assistant
custom_components/matic_robot/number.py
.py
a6cff2e1b82d0b79
7.54
11
"""Selector for the guided, ordered cleaning-plan room editor.""" from __future__ import annotations from typing import Any, TypedDict import voluptuous as vol from homeassistant.helpers.selector import ( SELECTORS, Selector, make_selector_config_schema, ) from .client.commands import CleaningMode, Cove...
ProspectOre/matic-home-assistant
custom_components/matic_robot/room_plan_selector.py
.py
5cbd765509d43d89
7.54
11
"""Home Assistant-side cleaning session tracking. The robot's local ``coverage_session_history`` collection is not updated on all firmware builds. Track the verified cleaning/current-area state locally so room statistics remain useful without relying on that stale collection. """ from __future__ import annotations ...
ProspectOre/matic-home-assistant
custom_components/matic_robot/session_tracking.py
.py
015b68ba3c87a9f0
7.54
11
"""Aplicacao FastAPI. API somente leitura sobre os dados que o scraper produz. Nao ha endpoints de escrita: as vagas entram pelo pipeline de raspagem e pelo script de importacao (`scripts/import_csv.py`), nunca por HTTP. """ from __future__ import annotations import logging from contextlib import asynccontextmanager...
diasgarcia/tech-skills-br
api/app.py
.py
2b5fe7fda3be8c7e
7.42
6
"""Consultas ao banco. `/areas` e `/tecnologias` sao sempre calculados a partir da tabela de vagas -- nunca lidos dos CSVs de ranking. Os CSVs `ranking_areas` e `skills_por_area` sao recortes ja agregados (o de skills e truncado no top-15 por area), entao serviriam numeros errados e desatualizados assim que o banco mu...
diasgarcia/tech-skills-br
api/crud.py
.py
c899f783b2872ba9
7.42
6
"""Conexao e sessao do SQLAlchemy. Funciona com SQLite e com PostgreSQL sem mudar o resto do codigo. A escolha e so de configuracao, nesta ordem de precedencia: 1. o destino passado no argumento (usado pelo importador e pelos testes) 2. a variavel de ambiente DATABASE_URL -- e o que o docker-compose usa ...
diasgarcia/tech-skills-br
api/database.py
.py
6f109312a62569bb
7.42
6
"""Normalizacao das datas de publicacao para um unico tipo DATE. Os portais escrevem a data de tres jeitos diferentes: Gupy 2026-06-26 (ISO) Vagas.com 09/07/2026 (dd/mm/aaaa) Vagas.com "Ontem", "Há 3 dias", "Há mais de 30 dias" (relativo) As datas relativas so significam alguma co...
diasgarcia/tech-skills-br
api/dates.py
.py
c9b1d30cacde0353
7.42
6
"""Schemas Pydantic (respostas da API). A API e somente leitura: os dados vem do pipeline de raspagem, entao nao ha schema de escrita. """ from __future__ import annotations from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, field_validator class _TecnologiasComoNomes(BaseModel...
diasgarcia/tech-skills-br
api/schemas.py
.py
0fe54b002e1633d3
7.42
6
"""Vocabulario controlado da API, lido dos mesmos YAMLs que o scraper usa. As areas e as tecnologias validas nao sao redigitadas aqui: vem de `scraper/rules/areas.yml` e `scraper/rules/skills.yml`. Editar o YAML muda o scraper e a API juntos, que e a premissa do projeto. """ from __future__ import annotations from e...
diasgarcia/tech-skills-br
api/vocabulary.py
.py
38d86534cee8daff
7.42
6