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 |
|---|---|---|---|---|---|---|
class DiffFormatter:
"""Formats diff lines with ANSI colors"""
@staticmethod
def format_diff_lines(lines: list[str]) -> list[str]:
"""Add ANSI colors to diff lines"""
formatted: list[str] = []
for line in lines:
if line.startswith('+'):
formatted.append(f... | matthewhand/open-swarm | src/swarm/blueprints/common/output_formatters.py | .py | 0883c93a0d57a698 | 7.63 | 17 |
"""
Shared tool utilities for blueprints to reduce code duplication.
Provides PatchedFunctionTool (for wrapping plain funcs for Agent/tools compat and test access to .func),
DummyTool (for SWARM_TEST_MODE no-op placeholders),
and canonical implementations of common file/shell operations.
Prefer using @function_tool f... | matthewhand/open-swarm | src/swarm/blueprints/common/tool_utils.py | .py | 45d43e9620b7e9c3 | 7.63 | 17 |
from cmdbox.app.auth import signin
from fastapi import Request, Response
from typing import Any, Dict, Tuple, Union
from fastapi.responses import RedirectResponse
import requests
import copy
import logging
class AzureSigninProxy(signin.Signin):
def _check_authheader(self, req:Request, res:Response, signin_file_d... | hamacom2004jp/cmdbox | cmdbox/app/auth/azure_signin_proxy.py | .py | 86812b62ee9b83aa | 7.48 | 8 |
from cmdbox.app.auth.signin import Signin
from fastapi import Request, Response
from typing import Any, Dict, Tuple
import copy
import logging
class SigninSAML(Signin):
def jadge(self, data:Any, email:str) -> Tuple[bool, Dict[str, Any]]:
"""
サインインを成功させるかどうかを判定します。
返すユーザーデータには、uid, name, e... | hamacom2004jp/cmdbox | cmdbox/app/auth/signin_saml.py | .py | 31164065d0261c03 | 7.48 | 8 |
from cmdbox.app import feature
from typing import Any, Callable, Dict, List, Tuple, Union
import argparse
import logging
import time
def apprun_cache(func:Callable=None, args_key:str=None, exclude_fn:Callable=None) -> Callable:
"""
list系コマンドの実行結果をキャッシュするデコレーター。
list系コマンド実行関数に適用することで、コマンドの実行前にキャッシュを確認し、実行後... | hamacom2004jp/cmdbox | cmdbox/app/commons/cache.py | .py | 3d8ad97dfbeb0b22 | 7.48 | 8 |
from cmdbox.app import feature
from typing import List, Dict, Any
import importlib.util
import inspect
import logging
import pkgutil
def get_module_list(package_name) -> List[str]:
"""
パッケージ内のモジュール名のリストを取得します。
Args:
package_name (str): パッケージ名
Returns:
List[str]: モジュール名のリスト
"""
... | hamacom2004jp/cmdbox | cmdbox/app/commons/module.py | .py | a06d4b418c90b409 | 7.48 | 8 |
from pathlib import Path
from pydantic import BaseModel, ConfigDict, Field
from pydantic_core import PydanticUndefined
from typing import Dict, Any, Tuple, List, Union
class Base(BaseModel):
"""
コマンドの実行結果を表すクラス
"""
@classmethod
def get_model_info(cls) -> Dict[str, Any]:
"""
モデルの情報を... | hamacom2004jp/cmdbox | cmdbox/app/commons/resdata.py | .py | ff6b13efd1f27a8f | 7.48 | 8 |
from cmdbox.app import feature, options
from cmdbox.app.commons import resdata
from typing import Any, Callable, Dict, List, Tuple, Union
from unittest.mock import patch
import argparse
import logging
class TestCase(resdata.Base):
"""
テストケースを表すクラス
"""
model_config = resdata.ConfigDict(arbitrary_types_... | hamacom2004jp/cmdbox | cmdbox/app/commons/testable.py | .py | 35603b95e0170668 | 7.98 | 8 |
from cmdbox.app import common, feature
from cmdbox.app.commons import resdata, validator
from cmdbox.app.options import Options
from pathlib import Path
from typing import Dict, Any, Tuple, List, Union
import argparse
import logging
import os
import platform
import pydantic
import signal
import traceback
class A2asvS... | hamacom2004jp/cmdbox | cmdbox/app/features/cli/cmdbox_a2asv_stop.py | .py | c5e563263f3193f4 | 7.48 | 8 |
from cmdbox.app import common, feature
from cmdbox.app.commons import limiter, resdata, validator
from cmdbox.app.options import Options
from typing import Dict, Any, Tuple, List, Union
import argparse
import logging
import pydantic
class AgentMcpProxy(feature.UnsupportEdgeFeature, validator.Validator, limiter.Limite... | hamacom2004jp/cmdbox | cmdbox/app/features/cli/cmdbox_agent_mcp_proxy.py | .py | 4689adf8994c5eb4 | 7.48 | 8 |
import requests
from datetime import datetime
from pathlib import Path
import json
import os
# --- Configuration ---
COIN_IDS = ['bitcoin', 'ethereum', 'litecoin', 'solana', 'cardano']
README_FILE = 'README.md'
START_MARKER = '<!-- PRICE_TABLE_START -->'
END_MARKER = '<!-- PRICE_TABLE_END -->'
PRICE_HISTORY_FILE = 'pr... | nno-official/CryptoPriceList | update_prices.py | .py | c578c384be81a749 | 7.42 | 6 |
#!/usr/bin/env python3
"""Inject SPDX licenses into CycloneDX SBOM for packages GitLab marks as unknown.
GitLab's gemnasium-python analyzer does not populate component licenses in the
SBOM. Licenses are enriched server-side via GitLab's license DB after upload.
For packages the DB does not recognize, the UI shows "unk... | aria-ml/dataeval | .gitlab/scripts/fix_unknown_licenses.py | .py | de9d7886150c7839 | 7.64 | 18 |
#!/usr/bin/env python3
"""Push generated verification artifacts to the DataEval meta repo.
Reads markdown files from verification/reports/metarepo/ and commits them
to the meta repo (project 409) via the GitLab API.
Requires:
- DATAEVAL_BUILD_PAT environment variable (GitLab personal access token)
- Generated art... | aria-ml/dataeval | .gitlab/scripts/push_verification.py | .py | bd76c5ceb0638594 | 7.64 | 18 |
import re
from typing import Literal
from gitlab import Gitlab
from rest import verbose
# Pattern to match pre-release versions like v1.0.0-rc0
PRERELEASE_PATTERN = re.compile(r"v([0-9]+)\.([0-9]+)\.([0-9]+)-rc([0-9]+)")
# Pattern to match standard versions like v1.0.0
VERSION_PATTERN = re.compile(r"v([0-9]+)\.([0-9]... | aria-ml/dataeval | .gitlab/scripts/versiontag.py | .py | 52516220c1bc4ff7 | 7.64 | 18 |
#!/usr/bin/env python3
"""
Check if jupyter-cache is up to date for all notebooks in the documentation.
This script checks each notebook against the jupyter-cache to determine if it needs re-execution.
It computes a hash of each notebook (excluding outputs) and checks if a matching cached version exists.
Usage:
p... | aria-ml/dataeval | docs/check_notebook_cache.py | .py | cb71f0a0ff7bdd0a | 7.64 | 18 |
#!/usr/bin/env python3
"""
Generate interactive Plotly charts for stats performance documentation.
Run this script to create HTML files that can be embedded in Sphinx docs.
Usage:
python generate_stats_charts.py [--output-dir DIR] [--include-js CDN|INLINE|TRUE]
"""
import argparse
import json
from pathlib import ... | aria-ml/dataeval | docs/generate_charts.py | .py | 74266beeedd0c675 | 7.64 | 18 |
"""
Animation utilities for AI Media Studio CLI
"""
import time
import itertools
from typing import List, Optional
from rich.console import Console
from rich.text import Text
from rich.live import Live
from rich.panel import Panel
from rich.align import Align
console = Console()
class VideoGenerationAnimation:
... | boomking0808/ai-media-studio-cli | ai_media_studio_cli/animations.py | .py | 5ae37c57b7774f5d | 7.48 | 8 |
"""
Media download functionality for AI Media Studio CLI.
Supports downloading and organizing videos, images, and audio files.
"""
import os
import aiohttp
import asyncio
from pathlib import Path
from typing import List, Optional, Tuple, Dict, Set
from urllib.parse import urlparse, parse_qs
from rich.console import ... | boomking0808/ai-media-studio-cli | ai_media_studio_cli/download.py | .py | ab6f3182c7b04cad | 7.48 | 8 |
"""
Model manager for dynamic CLI option generation and validation.
This module provides the interface between model configurations and the CLI,
generating appropriate options and prompts based on the selected model.
"""
from typing import List, Tuple, Any, Dict, Optional, Union
from enum import Enum
import inquirer
... | boomking0808/ai-media-studio-cli | ai_media_studio_cli/model_manager.py | .py | f7250a2798f51c8c | 7.48 | 8 |
#!/usr/bin/env python3
"""Run `gb-qc` over the examples and check the flags came out as documented.
Reports are not committed - they are built here, from the committed data, by the
same commands the docs quote. Two uses:
python examples/build.py --out-folder build/examples
python examples/build.py --out-folde... | genomic-benchmarks/genomic-benchmarks-qc | examples/build.py | .py | c93d373ee3ef4fc0 | 7.54 | 11 |
"""The `gb-qc` command line interface.
Each command validates its options, reports the first problem as a message on
stderr with a non-zero exit code, and then hands over to the matching
`evaluate_*.run`. Nothing else lives here: the commands are thin wrappers, so
that the same evaluations can be called directly from ... | genomic-benchmarks/genomic-benchmarks-qc | src/genomic_benchmarks_qc/cli.py | .py | e6bbef24d1dc1b84 | 7.54 | 11 |
"""Detect data leakage between the train and test halves of a dataset split.
Stages both halves to FASTA, runs an MMseqs2 `easy-search` of test against
train, and reports how much of the test set has a near-identical counterpart in
training - sequences a model can score correctly by memorisation alone.
`run` is the e... | genomic-benchmarks/genomic-benchmarks-qc | src/genomic_benchmarks_qc/evaluate_splits.py | .py | 7b069ebad187757e | 7.54 | 11 |
"""Rendering one MMseqs2 hit as a text alignment for the HTML report.
The search reports an alignment of a region of the query against a region of
the target; this lays the two full sequences out against each other with that
region aligned, so a reader can see how much of each sequence the match covers.
"""
from iter... | genomic-benchmarks/genomic-benchmarks-qc | src/genomic_benchmarks_qc/report/alignment_rendering.py | .py | 52489b6e96f69095 | 7.54 | 11 |
"""The report's markup, CSS and JavaScript, and the loader that inlines them.
The page templates, the styling and the client-side behaviour live in real
.html/.css/.js files in this package rather than in Python string literals, so an
editor can highlight them, a linter can read them, `node --check` can be run over
th... | genomic-benchmarks/genomic-benchmarks-qc | src/genomic_benchmarks_qc/report/assets/__init__.py | .py | 9e42cf1429042258 | 7.54 | 11 |
"""The data behind the interactive per-position figure, and its markup.
The per-position panels used to go into the report as a PNG. They now go in as
the numbers they were drawn from, and the page draws them in a canvas, so a
reader can zoom into a flagged position instead of squinting at a 1px band in a
picture. The... | genomic-benchmarks/genomic-benchmarks-qc | src/genomic_benchmarks_qc/report/per_position_payload.py | .py | c6a7d66907eb0760 | 7.54 | 11 |
"""The HTML template for the train-test split report.
Self-contained in the same way as the class report: embedded plots, inlined
styling, and the top alignments rendered inline as text.
The page is built from the same components as the class report - the cards, the
key/value tables, and the collapsible findings pane... | genomic-benchmarks/genomic-benchmarks-qc | src/genomic_benchmarks_qc/report/split_html_report.py | .py | 80b694ccebbf5839 | 7.54 | 11 |
"""Reading sequence inputs, plus the logging and output-folder plumbing.
Everything here is shared by both commands: FASTA and CSV/TSV readers - eager
ones returning lists, streaming ones for inputs too large to hold in memory -
and the small amount of process setup (logger configuration, failure logging,
output direc... | genomic-benchmarks/genomic-benchmarks-qc | src/genomic_benchmarks_qc/utils/input_utils.py | .py | bb4081be64893f3a | 7.54 | 11 |
"""Summarising an MMseqs2 hit table without holding it in memory.
An all-vs-all search of a large split produces far more hits than the report
needs, so the table is read in chunks and reduced on the way past: the per-
sequence maximum similarity, the sets of sequences with hits and above the
threshold, and the top hi... | genomic-benchmarks/genomic-benchmarks-qc | src/genomic_benchmarks_qc/utils/mmseqs_summary.py | .py | a0300502098c1941 | 7.54 | 11 |
"""The report layout: directory and file names, and how they are derived.
Every name the tool writes below the caller-provided output folder is defined
here, so the layout can be read in one place instead of being reassembled from
string literals scattered over the command and report modules.
Two kinds of name live h... | genomic-benchmarks/genomic-benchmarks-qc | src/genomic_benchmarks_qc/utils/naming.py | .py | 4fffc0d11b9d03a6 | 7.54 | 11 |
"""Turning the raw search summary into the numbers the split report shows."""
import numpy as np
def _calculate_percentage(part, whole):
"""Return part as a percentage of whole, treating an empty whole as 0%."""
return (part / whole) * 100 if whole > 0 else 0.0
def flag_split_data_leakage(perc_queries_abov... | genomic-benchmarks/genomic-benchmarks-qc | src/genomic_benchmarks_qc/utils/split_stats.py | .py | 4378f0e10232a6e4 | 7.54 | 11 |
"""Shared fixtures for the test suite."""
import pytest
from typer.testing import CliRunner
from genomic_benchmarks_qc import cli
CSV_CONTENT = "sequence,label\nACGT,0\nTGCA,1\n"
TSV_CONTENT = "sequence\tlabel\nACGT\t0\nTGCA\t1\n"
FASTA_CONTENT = ">seq1\nACGT\n>seq2\nTGCA\n"
class RunRecorder:
"""Stand-in for ... | genomic-benchmarks/genomic-benchmarks-qc | tests/conftest.py | .py | 52ec2a4a0e351833 | 8.04 | 11 |
"""Builders for tests that drive the analysis pipelines end to end.
The CLI-level tests stub the pipelines out; these helpers are for the tests that
actually run them, and need real input files and realistic MMseqs2 output.
"""
import random
import pandas as pd
from genomic_benchmarks_qc.utils.mmseqs_summary import... | genomic-benchmarks/genomic-benchmarks-qc | tests/helpers.py | .py | 11490e6a9d9c31c2 | 8.04 | 11 |
"""Unit tests for the helper functions in genomic_benchmarks_qc.cli."""
import logging
import pytest
import typer
from genomic_benchmarks_qc.cli import (
SPLIT_MEMORY_LIMIT_RE,
_infer_format,
_infer_format_from_inputs,
_normalize_format,
_run_command,
)
class TestInferFormat:
@pytest.mark.p... | genomic-benchmarks/genomic-benchmarks-qc | tests/test_cli_helpers.py | .py | 1ff94d6870b7b388 | 8.04 | 11 |
"""Tests for the cross-references the docstrings carry.
The docstrings are written for mkdocstrings, so where a number comes from a
constant they link the constant instead of only repeating its value:
`[DEFAULT_MIN_COVERAGE][genomic_benchmarks_qc.utils.seq_stats.DEFAULT_MIN_COVERAGE]`.
Two things can rot there without... | genomic-benchmarks/genomic-benchmarks-qc | tests/test_docstring_references.py | .py | 761f0fe1201ad620 | 8.04 | 11 |
"""Tests for what a report says when a column name is wrong.
Mistyping a column is the ordinary way to get this command wrong: the defaults
are 'sequence' and 'label', and datasets in the wild call them 'seq', 'seqs',
'Sequence', 'x'. What came back before was pandas' own message, which names the
column that is missin... | genomic-benchmarks/genomic-benchmarks-qc | tests/test_input_columns.py | .py | 89615f97711a7bff | 8.04 | 11 |
"""Tests for reducing an MMseqs2 hit table to what the split report needs.
The summariser is the one place that sees every hit, so it is also the one place
that must not hold them. Sequences are carried through the search by number and
come back as positions in an array, which is what these check: that the join is
rig... | genomic-benchmarks/genomic-benchmarks-qc | tests/test_mmseqs_summary.py | .py | 68a0e3f91f0aacf6 | 8.04 | 11 |
"""Unit tests for genomic_benchmarks_qc.utils.naming."""
import pytest
from genomic_benchmarks_qc.utils.naming import (
DEFAULT_COLUMN_DIR,
FALLBACK_SLUG,
MAX_SEGMENT_LENGTH,
MERGED_COLUMN_DIR,
column_dirname,
comparison_dirname,
per_column_dirnames,
slugify,
strip_extensions,
... | genomic-benchmarks/genomic-benchmarks-qc | tests/test_naming.py | .py | afa8317a68df0f02 | 8.04 | 11 |
"""Tests for the per-position windows and the scoring inside them.
Three decisions are pinned here. A position is compared only on the sequences
that reach it, so that per-position flags answer a question about composition
rather than re-answering the one `Sequence lengths` already asks. A position is
compared only wh... | genomic-benchmarks/genomic-benchmarks-qc | tests/test_per_position.py | .py | fe1710f86d95b192 | 7.04 | 11 |
"""Tests for the shared plot furniture.
The plot functions themselves are exercised end to end by the pipeline tests;
what is pinned here is the styling that every plot shares, where a mistake is
invisible in the output and silently consistent across the whole report.
"""
import matplotlib
matplotlib.use('Agg')
impo... | genomic-benchmarks/genomic-benchmarks-qc | tests/test_plots.py | .py | 19aaca242daab9eb | 8.04 | 11 |
"""Tests that the README's option tables still describe the actual CLI.
The README documents every `gb-qc` option in a table, and the docs site
generates the same information from the Typer app. Two copies of a CLI reference
is exactly the kind of thing that drifts - an option gets added, or a default
changes, and the... | genomic-benchmarks/genomic-benchmarks-qc | tests/test_readme_cli_tables.py | .py | 16ad5fedf062c14e | 8.04 | 11 |
"""Tests that the README's links still work where the README is read.
The README is not only a file in this repository. setuptools puts it into the
package metadata as the long description, so it is also the PyPI project page -
and there a relative link resolves against `pypi.org`, not against the
repository, and 404s... | genomic-benchmarks/genomic-benchmarks-qc | tests/test_readme_links.py | .py | 687ecc3e2228122b | 8.04 | 11 |
"""Tests for the report's templates, stylesheets and scripts.
They live as files in `genomic_benchmarks_qc.report.assets` and are inlined into
every generated report, which puts three things at risk that nothing else would
catch: a file that is not declared as package data (works from a checkout,
missing from the whee... | genomic-benchmarks/genomic-benchmarks-qc | tests/test_report_assets.py | .py | a49d9d98b3942a37 | 8.04 | 11 |
import json
import re
import sys
import geoip2.database
import ipaddress
import socket
from typing import Tuple, Optional
import numbers
class GeoIPChecker:
def __init__(self, db_path: str):
"""初始化 GeoIPChecker,加载数据库一次"""
self.reader = geoip2.database.Reader(db_path)
self.cache = {} # 可选:缓... | wanghz/Honeybee | sing-box-sub/cfg_clean.py | .py | 1b5ab23093f981b2 | 7.56 | 12 |
#!/usr/bin/env python3
import re
import os
import yaml
import zipfile
import hashlib
from colorama import Fore, Style
import config
def bold(text: str) -> str:
"""
Apply bold formatting to the provided text.
Args:
text (str): The input text to be formatted in bold.
Returns:
str: The... | renode/zephyr-samples-builder | scripts/common.py | .py | e1fbecd65b425fba | 7.42 | 6 |
#!/usr/bin/env python3
import json
import requests
import config
from common import (
bold
)
def get_remote_json(version: str | None = None) -> dict:
"""
Retrieves a remote JSON from a specified version or latest version if none is specified.
Args:
version (str | None): The version of the JS... | renode/zephyr-samples-builder | scripts/generate_diff.py | .py | e7cb4c37de5451b0 | 7.42 | 6 |
#!/usr/bin/env python3
import csv
import os
import re
import json
import config
import jinja2
from argparse import ArgumentParser
from common import get_versions
# Setup Jinja2 environment
template_loader = jinja2.FileSystemLoader(searchpath="./")
template_env = jinja2.Environment(loader=template_loader)
summary_temp... | renode/zephyr-samples-builder | scripts/generate_summary.py | .py | 2d46924348f2d830 | 7.42 | 6 |
import json
import os
import random
from datetime import datetime
from pathlib import Path
# Load topic configuration
TOPICS_FILE = "config/topics.json"
DEFAULT_TOPICS = [
"AI",
"Machine Learning",
"Data Science",
"Web Development",
"Cloud Computing",
"DevOps",
"Security",
"Open Source"... | ramincsy/Auto | generate_content.py | .py | 1a7ba893d2fc53a0 | 7.48 | 8 |
#!/usr/bin/env python3
"""
Advanced code review for generated contribution PRs with detailed analysis.
Usage:
python scripts/advanced_code_review.py [count]
This script performs detailed code analysis and provides comprehensive reviews
for contribution PRs, including code quality checks and suggestions.
"""
impo... | ramincsy/Auto | scripts/advanced_code_review.py | .py | d33afbb7bca6478e | 7.48 | 8 |
#!/usr/bin/env python3
"""
Clean up merged contribution branches.
Usage:
python scripts/cleanup_branches.py [--dry-run]
This script removes remote contribution branches that have been merged.
Use --dry-run to see what would be deleted without actually deleting.
"""
import os
import sys
import subprocess
def ge... | ramincsy/Auto | scripts/cleanup_branches.py | .py | a3f424b32aad52ce | 7.48 | 8 |
#!/usr/bin/env python3
"""
Close all open pull requests in the configured repository.
"""
import os
import sys
import requests
def get_github_token():
"""Get GitHub token from environment variables."""
token = (
os.environ.get("GH_TOKEN3")
or os.environ.get("GITHUB_TOKEN")
or os.envi... | ramincsy/Auto | scripts/close_all_prs.py | .py | cb160ecda9992987 | 7.48 | 8 |
#!/usr/bin/env python3
"""
Close old contribution PRs that cannot be merged due to missing branches.
Usage:
python scripts/close_old_prs.py [--dry-run]
This script closes old contribution PRs where the branch has been deleted.
Use --dry-run to see what would be closed without actually closing.
"""
import os
impo... | ramincsy/Auto | scripts/close_old_prs.py | .py | e6ae36d868de2b8a | 7.48 | 8 |
#!/usr/bin/env python3
"""
Create contribution branches for manual bulk contribution runs.
Usage:
python scripts/create_contribution_branches.py [count]
Default:
Uses BULK_COUNT if set, otherwise 20 branch attempts
"""
import os
import subprocess
import sys
from datetime import datetime
from pathlib import P... | ramincsy/Auto | scripts/create_contribution_branches.py | .py | b93ffe2d168e332f | 7.48 | 8 |
#!/usr/bin/env python3
"""
Create multiple pull requests for manual bulk contribution runs.
Usage:
python scripts/create_multiple_prs.py [count]
Default:
Uses BULK_COUNT if set, otherwise 20 pull request attempts
"""
import os
import sys
import requests
from datetime import datetime
def get_github_token():... | ramincsy/Auto | scripts/create_multiple_prs.py | .py | 5dfaf6e17d1d5b0e | 7.48 | 8 |
#!/usr/bin/env python3
"""
Force delete all contribution branches.
Usage:
python scripts/force_cleanup_branches.py [--dry-run]
This script force deletes all remote contribution branches.
Use --dry-run to see what would be deleted without actually deleting.
"""
import os
import sys
import subprocess
def run_git... | ramincsy/Auto | scripts/force_cleanup_branches.py | .py | 51e265c207152894 | 7.48 | 8 |
#!/usr/bin/env python3
"""
Generate multiple contribution files for an optional manual bulk run.
Usage:
python scripts/generate_multiple_contributions.py [count]
Default:
Uses BULK_COUNT if set, otherwise 20 contributions per execution
"""
import os
import random
import json
from datetime import datetime
fro... | ramincsy/Auto | scripts/generate_multiple_contributions.py | .py | 00c8a74f64642d40 | 7.48 | 8 |
#!/usr/bin/env python3
"""
Generate a weekly quality activity plan.
This script creates a lightweight weekly planning file that complements the
high-frequency automation workflow with one meaningful, review-friendly update.
Usage:
python scripts/generate_weekly_focus.py
"""
import json
from datetime import datet... | ramincsy/Auto | scripts/generate_weekly_focus.py | .py | edc8c240d1637412 | 7.48 | 8 |
#!/usr/bin/env python3
"""
CLI tool for logging daily contributions and notes.
Usage:
python scripts/log_daily.py --note "Your daily note here"
python scripts/log_daily.py --topic "Custom Topic"
"""
import argparse
import json
from datetime import datetime
from pathlib import Path
def log_note(note: str):
"... | ramincsy/Auto | scripts/log_daily.py | .py | 5eb41652d767cf25 | 7.48 | 8 |
#!/usr/bin/env python3
"""
Legacy helper to merge open daily contribution PRs.
Prefer scripts/auto_merge_prs.py for the active merge flow.
"""
import os
import sys
import requests
from typing import List, Dict, Any
# GitHub API base URL
GITHUB_API_BASE = "https://api.github.com"
def get_github_token() -> str:
... | ramincsy/Auto | scripts/merge_daily_updates.py | .py | 6d47a0e1f2803be1 | 7.48 | 8 |
#!/usr/bin/env python3
"""
PR Merge System Status Report
Shows current health and status of the auto-merge system.
Helps identify issues and provides actionable recommendations.
Usage:
python scripts/pr_status_report.py
"""
import os
import sys
import requests
from typing import Dict, List
from datetime import d... | ramincsy/Auto | scripts/pr_status_report.py | .py | c8816ed051f9502e | 7.48 | 8 |
#!/usr/bin/env python3
"""
Review and Merge Pull Requests for GitHub Achievements
This script helps review daily contribution PRs and provides recommendations
for merging them to achieve GitHub achievements.
Usage:
python scripts/review_and_merge_prs.py [--auto-merge]
Environment Variables:
GH_TOKEN3, GITHUB... | ramincsy/Auto | scripts/review_and_merge_prs.py | .py | ce973c586393d6ce | 7.48 | 8 |
#!/usr/bin/env python3
"""
Add transparent automated reviews to generated contribution PRs.
Usage:
python scripts/review_contributions.py [--approve]
By default this script leaves a comment-style review.
Use --approve only when you explicitly want an approval review event.
"""
import os
import sys
import request... | ramincsy/Auto | scripts/review_contributions.py | .py | 515db178dc03ce6d | 7.48 | 8 |
#!/usr/bin/env python3
"""
Validation Script - Verify Auto-Merge System Installation
This script verifies that all components of the auto-merge system are
properly installed and configured.
Usage:
python scripts/validate_installation.py
Returns:
0 = All checks passed ✅
1 = Some checks failed ⚠️
2 = C... | ramincsy/Auto | scripts/validate_installation.py | .py | 69ea04f0fd230dec | 7.48 | 8 |
#!/usr/bin/env python3
"""
Validate the contribution system is working correctly.
Usage:
python scripts/validate_system.py
This script checks that the entire system is functioning properly.
"""
import sys
import subprocess
from pathlib import Path
def run_command(cmd):
"""Run a shell command and return suc... | ramincsy/Auto | scripts/validate_system.py | .py | 164385e5b0f25156 | 7.48 | 8 |
import { test, expect } from './test-helpers';
import { captureTrace, traceFileUpload } from './trace-capture';
test('capture-edit-roundtrip', async ({ page }) => {
test.setTimeout(60000);
try {
// Start at root, wait for page to load, then pick Santa Rosa
await page.goto('./');
const santaRosaBtn = p... | judell/community-calendar | cities/santarosa/traces/specs/capture-edit-roundtrip.spec.ts | .ts | f670501494f79005 | 7.06 | 12 |
import { test, expect } from './test-helpers';
import { captureTrace } from './trace-capture';
test('pick-roundtrip', async ({ page }) => {
test.setTimeout(120000);
try {
// Start at root, wait for page to load, then pick Santa Rosa
await page.goto('./');
const santaRosaBtn = page.getByText('Santa Ros... | judell/community-calendar | cities/santarosa/traces/specs/pick-roundtrip.spec.ts | .ts | 824a9e61356223d2 | 7.06 | 12 |
#!/usr/bin/env python3
"""
Scraper for Asheville Area Chamber of Commerce events via RSS.
ChamberMaster's RSS embeds event dates inside the title field rather than
using standard RSS date fields (pubDate is the listing date, not the event date).
Title format: "Event Name MM/DD/YYYY [HH:MM AM/PM/Noon] [- MM/DD/YYYY [H... | judell/community-calendar | scrapers/asheville_chamber.py | .py | 4eba84c927c66c54 | 7.56 | 12 |
#!/usr/bin/env python3
"""
Scraper for the Asheville Theater Alliance performance calendar.
ATA (ashevilletheateralliance.org) is THE regional theater aggregator for
the Asheville area — NC Stage, SART, HART, Attic Salt, improv companies,
etc. WordPress + Elementor + JetEngine. The REST API exposes the `events`
post t... | judell/community-calendar | scrapers/asheville_theater_alliance.py | .py | 363e96784e9e8254 | 7.56 | 12 |
#!/usr/bin/env python3
"""
Scraper for Congregation Beth HaTephila (43 N Liberty St, Asheville NC).
The site (bethhatephila.org) is Weebly-hosted and returns 406 to curl
and the requests library (TLS fingerprint mismatch). urllib.request with
a Chrome User-Agent succeeds. The calendar page server-renders an
"Upcoming ... | judell/community-calendar | scrapers/beth_hatephila.py | .py | 953cdd3e4cbe04d6 | 7.56 | 12 |
#!/usr/bin/env python3
"""Scraper for BloomingtonArts.Today — curated arts calendar."""
import re
import sys
from datetime import datetime, timedelta
from typing import Any, Optional
from zoneinfo import ZoneInfo
import requests
from bs4 import BeautifulSoup
sys.path.insert(0, str(__file__).rsplit('/', 2)[0])
from l... | judell/community-calendar | scrapers/bloomington_arts_today.py | .py | ad6f38e6a4e2a369 | 7.56 | 12 |
#!/usr/bin/env python3
"""
Scraper for Bloomington Brewing Co. (bloomingtonbrew.com) events.
The site is Squarespace. The events collection at /events?format=json
returns itemCount=73 but items=[] (Squarespace empty-collection quirk,
consistent with the discovery notes pattern). However:
1. The sitemap at /sitemap.xm... | judell/community-calendar | scrapers/bloomington_brewing.py | .py | 3d82bbb886349521 | 7.56 | 12 |
#!/usr/bin/env python3
"""
Scraper for the Bloomington Symphony Orchestra (Bloomington, INDIANA).
NOTE ON DOMAINS: the Indiana orchestra lives at bloomingtonsymphony.COM —
bloomingtonsymphony.ORG is the Bloomington MINNESOTA symphony. Discovery
notes pointing at bloomingtonsymphony.org/concert/ were the wrong state.
... | judell/community-calendar | scrapers/bloomington_symphony.py | .py | a885af4bed1e56c9 | 7.56 | 12 |
#!/usr/bin/env python3
"""
Scraper for Brown County, IN government calendar.
The county runs CivicEngage (CivicPlus) at browncounty-in.gov.
The CivicPlus GET-based iCalendar feed at:
/common/modules/iCalendar/iCalendar.aspx?catID=14&feed=calendar
returns a well-formed ICS file with government meeting events.
No form... | judell/community-calendar | scrapers/brown_county_gov.py | .py | dfb5d6acf1dcbdcb | 7.56 | 12 |
#!/usr/bin/env python3
"""Scraper for Buskirk-Chumley Theater events."""
import re
import sys
from datetime import datetime, timedelta
from typing import Any
from zoneinfo import ZoneInfo
import requests
from bs4 import BeautifulSoup
sys.path.insert(0, str(__file__).rsplit("/", 2)[0])
from lib.base import BaseScrape... | judell/community-calendar | scrapers/buskirk_chumley.py | .py | 3e93f1c0c5d5ae83 | 7.56 | 12 |
#!/usr/bin/env python3
"""
Scraper for California Theatre (Cal Theatre) Santa Rosa events
https://www.caltheatre.com/calendar
This is a Wix site. The DOM scrape (BeautifulSoup) is broken because Wix requires
JavaScript to render the calendar widget. However, Wix server-renders all event
data inside <script type="appli... | judell/community-calendar | scrapers/cal_theatre.py | .py | 8d8f28c9dc0769ba | 7.56 | 12 |
#!/usr/bin/env python3
"""
Scraper for Carolina Performing Arts events.
https://carolinaperformingarts.org/calendar/
CPA uses a custom WordPress REST API endpoint that returns JSON:
/wp-json/cpa/v1/performances/?start=YYYY-MM-DD&end=YYYY-MM-DD
Usage:
python scrapers/carolina_performing_arts.py --output cities/ral... | judell/community-calendar | scrapers/carolina_performing_arts.py | .py | ee807db0a6efe284 | 7.56 | 12 |
#!/usr/bin/env python3
"""
Scraper for Carolina Theatre (Durham) events.
https://carolinatheatre.org/events/
The Carolina Theatre uses a custom WordPress theme with an AJAX event filter.
Events are loaded via wp-admin/admin-ajax.php?action=event_filter&events=all&paged=1
and returned as HTML fragments with structured ... | judell/community-calendar | scrapers/carolina_theatre.py | .py | ac8fd5250315baca | 7.56 | 12 |
#!/usr/bin/env python3
"""
Scraper for Cat's Cradle events (covers multiple venues).
The Cat's Cradle WordPress site uses the RHP Events plugin and publishes an RSS feed
at https://catscradle.com/events/feed/ covering events at:
- Cat's Cradle (main room)
- Cat's Cradle Back Room
- Haw River Ballroom
- Motorco Music H... | judell/community-calendar | scrapers/catscradle.py | .py | 33c9621d76b8c822 | 7.56 | 12 |
#!/usr/bin/env python3
"""
Scraper for Cinnabar Theater (Petaluma, CA).
Usage:
python scrapers/cinnabar.py --output cities/santarosa/cinnabar.ics
"""
import sys
sys.path.insert(0, str(__file__).rsplit('/', 1)[0])
import re
from datetime import datetime
from typing import Any
import requests
from bs4 import Beau... | judell/community-calendar | scrapers/cinnabar.py | .py | 210f92df77b7d2ec | 7.56 | 12 |
#!/usr/bin/env python3
"""Scraper for The Comedy Attic events.
SeatEngine-hosted site. Listing page has date ranges but no times;
detail pages have JSON-LD Event schema with per-showtime startDate in UTC.
"""
import json
import re
import sys
import time
from datetime import datetime, timedelta
from typing import Any
... | judell/community-calendar | scrapers/comedy_attic.py | .py | 6772d5e513bb2718 | 7.56 | 12 |
#!/usr/bin/env python3
"""
Scraper for Copperfield's Books events
https://copperfieldsbooks.com/upcoming-events
Drupal site with clean HTML structure.
"""
import sys
sys.path.insert(0, str(__file__).rsplit('/', 1)[0])
import re
from datetime import datetime, timedelta
from typing import Any
import requests
from bs4... | judell/community-calendar | scrapers/copperfields.py | .py | 8f35a43eb4e0cea5 | 7.56 | 12 |
#!/usr/bin/env python3
"""
Scraper for Creative Sonoma (county arts agency) events.
https://creativesonoma.org/event/
Usage:
python scrapers/creative_sonoma.py --output cities/santarosa/creative_sonoma.ics
"""
import sys
sys.path.insert(0, str(__file__).rsplit('/', 1)[0])
import re
from datetime import datetime,... | judell/community-calendar | scrapers/creative_sonoma.py | .py | ef9f9d1324d7b8e0 | 7.56 | 12 |
#!/usr/bin/env python3
"""
Scraper for Davis Chamber of Commerce events
https://web.davischamber.com/events
Uses the MemberClicks XML API endpoint.
"""
import sys
sys.path.insert(0, str(__file__).rsplit('/', 1)[0])
import re
import html
from datetime import datetime, timedelta
from typing import Any
from zoneinfo im... | judell/community-calendar | scrapers/davis_chamber.py | .py | 594ada11fc63a533 | 7.56 | 12 |
# !/usr/bin/python
# coding=utf-8
"""Command-line entry to HelpMixin introspection.
python -m pythontk <dotted.path> [member] [options]
Resolve a class or object by dotted path and print its help, source, location,
or signature - the same introspection ``HelpMixin`` exposes in-process, made
reachable from a shell... | m3trik/pythontk | pythontk/__main__.py | .py | fe0bed4f5ae64914 | 7.59 | 14 |
# !/usr/bin/python
# coding=utf-8
class ClassProperty:
"""A descriptor for class-level properties (replaces @classmethod @property).
This decorator allows you to define a property that can be accessed directly on the class,
rather than on an instance of the class. This is useful for defining properties t... | m3trik/pythontk | pythontk/core_utils/class_property.py | .py | e84de5c98f234fc0 | 7.59 | 14 |
import argparse
import getpass
import os
from typing import Any, Dict, Optional
# Connection defaults are resolved at CALL time, in this order: an explicit
# argument, then the environment, then a neutral fallback. Machine identity (a
# host, an account, a credential-store target) is deployment state, not library
# da... | m3trik/pythontk | pythontk/core_utils/cli.py | .py | 25bf6cc7e5aa4412 | 7.59 | 14 |
# coding=utf-8
"""Schema for a *behavior* template file, defined as a dataclass.
:class:`BehaviorSpec` is the single source of truth for the shape of a behavior
``.json`` (the keying recipes applied to shot objects — fades, audio clips, …).
Like the CSV :class:`~...mapping._spec.MappingSpec`, it validates a loaded fil... | m3trik/pythontk | pythontk/core_utils/engines/shots/manifest/behaviors/_spec.py | .py | d4de98a420e456bc | 8.09 | 14 |
# coding=utf-8
"""Schema for a CSV *mapping* file, defined as a dataclass.
:class:`MappingSpec` is the single source of truth for the shape of a mapping
``.json``: it validates a loaded file, generates a copy-me skeleton, and powers
the generated ``MAPPING_FORMAT.md`` reference — all from one definition, so the
docs a... | m3trik/pythontk | pythontk/core_utils/engines/shots/manifest/mapping/_spec.py | .py | ec7bc6b5efc6c6aa | 8.09 | 14 |
# !/usr/bin/python
# coding=utf-8
"""Range resolution algorithm for the Shot Manifest.
Converts user-entered ranges + gap-detected boundaries into a fully resolved
``(step_id, start, end, is_user)`` list for every build step. Pure logic — no
Qt or DCC imports. Shot durations come from an injectable ``duration_fn`` s... | m3trik/pythontk | pythontk/core_utils/engines/shots/manifest/range_resolver.py | .py | f9719ca74ddf9652 | 7.59 | 14 |
# !/usr/bin/python
# coding=utf-8
"""Map-conversion registry primitives for the texture MapFactory.
``MapConversion`` describes one source->target conversion; ``ConversionRegistry``
collects them and resolves the best converter for a target map type. Split out
of the monolithic ``map_factory`` module so the registry p... | m3trik/pythontk | pythontk/core_utils/engines/textures/map_factory/conversions.py | .py | f328b7d9c7cbd635 | 7.59 | 14 |
# !/usr/bin/python
# coding=utf-8
"""
Subprocess-based dialog viewer for custom button labels.
This runs in a separate process to avoid blocking issues with the main application.
"""
from __future__ import annotations
import sys
import tkinter as tk
from tkinter import ttk
def run(title: str, message: str, force_lab... | m3trik/pythontk | pythontk/core_utils/execution_monitor/_dialog_viewer.py | .py | a3893da011a0bc51 | 7.59 | 14 |
# !/usr/bin/python
# coding=utf-8
import sys
import tkinter as tk
DEFAULT_SIZE = 128
def _load_frames_pil(gif_path, target_size):
"""Load GIF frames using PIL (Pillow) if available."""
try:
from PIL import Image, ImageTk, ImageSequence
im = Image.open(gif_path)
duration = im.info.get... | m3trik/pythontk | pythontk/core_utils/execution_monitor/_gif_viewer.py | .py | ea322a60d94cd6fb | 7.59 | 14 |
import traceback
from abc import ABC, abstractmethod
from collections.abc import Callable
from time import time
from typing import Any, Generic
from qcdata import (
CalcType,
Data,
DataType,
FileInput,
Files,
InputType,
ProgramOutput,
StructuredInputs,
)
from qcdata.helper_types import ... | atomsforhumanity/qccompute | src/qccompute/adapters/base.py | .py | e7b60e3efcc02a32 | 7.42 | 6 |
"""Adapter for CREST package. https://crest-lab.github.io/crest-docs/"""
from collections.abc import Callable
from pathlib import Path
import qccodec
from qccodec.parsers.crest import parse_version
from qcdata import (
CalcType,
ConformerSearchResults,
OptimizationResults,
ProgramInput,
SinglePoin... | atomsforhumanity/qccompute | src/qccompute/adapters/crest.py | .py | 6908a6c0bb73b22b | 7.42 | 6 |
from collections.abc import Callable
from qcdata import FileInput, Files
from qccompute.adapters.base import BaseAdapter
from .utils import execute_subprocess
class FileAdapter(BaseAdapter[FileInput, Files]):
"""adapter for running a program on files."""
def __init__(self, program: str) -> None:
s... | atomsforhumanity/qccompute | src/qccompute/adapters/file.py | .py | 9e31be94aa91fd45 | 7.42 | 6 |
"""Adapter for geomeTRIC program."""
from collections.abc import Callable
from pathlib import Path
import numpy as np
from qcdata import (
CalcType,
DualProgramInput,
OptimizationData,
ProgramArgs,
ProgramInput,
ProgramOutput,
SinglePointData,
Structure,
)
from qccompute.exceptions im... | atomsforhumanity/qccompute | src/qccompute/adapters/geometric.py | .py | ac72b3048f6c7b5e | 7.42 | 6 |
import shutil
from collections.abc import Callable
from pathlib import Path
import qccodec
from qccodec import exceptions as qccodec_exceptions
from qccodec.parsers.orca import parse_version
from qcdata import CalcType, ProgramInput, SinglePointData
from qccompute.exceptions import (
AdapterInputError,
Extern... | atomsforhumanity/qccompute | src/qccompute/adapters/orca.py | .py | c93e100200b8ff51 | 7.42 | 6 |
from pathlib import Path
from qcdata import CalcType, SinglePointData
from qcdata.qcel import from_qcel_output_results, to_qcel_input
from qccompute.exceptions import ExternalProgramError
from .base import ProgramAdapter
class QCEngineAdapter(ProgramAdapter):
"""Adapter for all programs supported by QCEngine."... | atomsforhumanity/qccompute | src/qccompute/adapters/qcengine.py | .py | 15c0035c8227c60d | 7.42 | 6 |
from collections.abc import Callable
from pathlib import Path
import qccodec
from qccodec import exceptions as qccodec_exceptions
from qccodec.parsers.terachem import parse_version
from qcdata import CalcType, ProgramInput, ProgramOutput, SinglePointData
from qccompute.exceptions import AdapterError, AdapterInputErro... | atomsforhumanity/qccompute | src/qccompute/adapters/terachem.py | .py | 58a021ee7e5d78a8 | 7.42 | 6 |
import importlib
from collections.abc import Callable
from qcdata import CalcType, ProgramInput, SinglePointData
from qccompute.exceptions import ExternalProgramError, ProgramNotFoundError
from .base import ProgramAdapter
class TeraChemFEAdapter(ProgramAdapter[ProgramInput, SinglePointData]):
"""Adapter for Te... | atomsforhumanity/qccompute | src/qccompute/adapters/terachem_fe.py | .py | b7d706ce58cfea19 | 7.42 | 6 |
"""
Utility functions for adapters. Avoids circular imports when these functions placed in
top-level utils.py module.
"""
import logging
import os
import platform
import shutil
import subprocess
import sys
import tempfile
import threading
from collections.abc import Callable
from contextlib import contextmanager
from ... | atomsforhumanity/qccompute | src/qccompute/adapters/utils.py | .py | b5d7ec11fef91247 | 7.42 | 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.