repo stringclasses 454
values | file_path stringlengths 5 201 | extension stringclasses 1
value | content stringlengths 8 509k | num_lines int64 3 16.9k | size_bytes int64 8 511k |
|---|---|---|---|---|---|
scientific-agent-skills | skills/exa-search/scripts/exa_search.py | .py | #!/usr/bin/env python3
# /// script
# requires-python = ">=3.11"
# dependencies = ["exa-py>=1.14.0"]
# ///
"""Run an Exa web search and write results to JSON.
Uses the Exa Python SDK. Auth via the EXA_API_KEY environment variable.
Example:
uv run exa_search.py "transformer architectures" \\
--category "re... | 180 | 5,979 |
scientific-agent-skills | skills/research-lookup/scripts/manuscript_packet.py | .py | """Pure helpers for building manuscript-ready research packets."""
from __future__ import annotations
import json
import re
from collections import Counter
from pathlib import Path
from typing import Any, Iterable
from urllib.parse import parse_qsl, urlencode, urlsplit, urlunsplit
DOI_PATTERN = re.compile(
r"(?... | 755 | 27,047 |
scientific-agent-skills | skills/research-lookup/scripts/research_lookup.py | .py | #!/usr/bin/env python3
"""Parallel-first research retrieval for manuscript evidence compilation.
The public ``ResearchLookup`` class and CLI remain backward compatible while
ordinary queries use Parallel Search. Parallel Chat and Research are explicit,
and Perplexity remains an optional explicit/failure fallback.
"""
... | 1,205 | 45,733 |
scientific-agent-skills | skills/pysam/scripts/variant_summary.py | .py | #!/usr/bin/env python3
"""Stream a local VCF/BCF and emit variant/genotype summary counts as JSON.
Normal iteration scans in file order without an index. --region is a 1-based
inclusive samtools region string and requires TBI/CSI. Sample identifiers are
omitted unless --include-sample-names is supplied.
"""
from __fu... | 363 | 11,119 |
scientific-agent-skills | skills/pysam/scripts/alignment_qc.py | .py | #!/usr/bin/env python3
"""Stream a local SAM/BAM/CRAM file and write aggregate QC counts as JSON.
Counts are alignment-record counts, not unique templates. A whole-file scan
uses fetch(until_eof=True) and needs no index. --region is a 1-based inclusive
samtools region string and requires an index. CRAM requires --refe... | 327 | 10,204 |
scientific-agent-skills | skills/pysam/scripts/filter_alignments.py | .py | #!/usr/bin/env python3
"""Filter a local SAM/BAM/CRAM into a new alignment file.
The script preserves record order and the input header; it does not sort.
Whole-file iteration includes unplaced unmapped records and needs no index.
--region is a 1-based inclusive samtools region and requires an input index.
CRAM input ... | 360 | 11,223 |
scientific-agent-skills | skills/pysam/scripts/inspect_hts.py | .py | #!/usr/bin/env python3
"""Inspect a local HTS/sequence file and emit a bounded JSON summary.
The default report reads headers and index metadata only. It does not emit
alignment query names, FASTX record names, VCF sample names, or full headers.
CRAM requires an explicit local --reference to avoid hidden reference loo... | 486 | 13,784 |
scientific-agent-skills | skills/qiskit/scripts/check_environment.py | .py | #!/usr/bin/env python3
"""Inspect a Qiskit environment without network or credential access."""
from __future__ import annotations
import argparse
import importlib
import json
import platform
import struct
import sys
from importlib import metadata
from typing import Any
VERIFIED_VERSIONS = {
"qiskit": "2.5.0",
... | 261 | 7,930 |
scientific-agent-skills | skills/qiskit/scripts/run_local_primitives.py | .py | #!/usr/bin/env python3
"""Run a parameterized circuit with Qiskit V2 local primitives."""
from __future__ import annotations
import argparse
import json
import math
from importlib.metadata import PackageNotFoundError, version
from typing import Any
MAX_SHOTS = 1_000_000
def positive_bounded_shots(value: str) -> i... | 201 | 5,622 |
scientific-agent-skills | skills/qiskit/scripts/inspect_runtime.py | .py | #!/usr/bin/env python3
"""Inspect one IBM Runtime backend without submitting a quantum job."""
from __future__ import annotations
import argparse
import json
import sys
from importlib.metadata import PackageNotFoundError, version
from typing import Any
def positive_qubits(value: str) -> int:
qubits = int(value)... | 225 | 6,425 |
scientific-agent-skills | skills/rdkit/scripts/substructure_filter.py | .py | #!/usr/bin/env python3
"""
Substructure Filter
Filter molecules based on substructure patterns using SMARTS.
Supports inclusion and exclusion filters, and custom pattern libraries.
Usage:
python substructure_filter.py molecules.smi --pattern "c1ccccc1" --output filtered.smi
python substructure_filter.py datab... | 387 | 12,337 |
scientific-agent-skills | skills/rdkit/scripts/similarity_search.py | .py | #!/usr/bin/env python3
"""
Molecular Similarity Search
Perform fingerprint-based similarity screening against a database of molecules.
Supports multiple fingerprint types and similarity metrics.
Usage:
python similarity_search.py "CCO" database.smi --threshold 0.7
python similarity_search.py query.smi databas... | 298 | 9,529 |
scientific-agent-skills | skills/rdkit/scripts/molecular_properties.py | .py | #!/usr/bin/env python3
"""
Molecular Properties Calculator
Calculate comprehensive molecular properties and descriptors for molecules.
Supports single molecules or batch processing from files.
Usage:
python molecular_properties.py "CCO"
python molecular_properties.py --file molecules.smi --output properties.c... | 244 | 7,344 |
scientific-agent-skills | skills/clinical-reports/scripts/consistency_checker.py | .py | #!/usr/bin/env python3
"""Check structured dates, units, denominators, percentages, and totals."""
from __future__ import annotations
import argparse
import math
import sys
from typing import Any
sys.dont_write_bytecode = True
from _common import ( # noqa: E402
ValidationError,
error_report,
load_json_... | 391 | 13,562 |
scientific-agent-skills | skills/clinical-reports/scripts/format_adverse_events.py | .py | #!/usr/bin/env python3
"""Format bounded aggregate adverse-event counts into a review-only Markdown table."""
from __future__ import annotations
import argparse
import csv
import re
import sys
from dataclasses import dataclass
from pathlib import Path
sys.dont_write_bytecode = True
from _common import ( # noqa: E4... | 456 | 16,080 |
scientific-agent-skills | skills/clinical-reports/scripts/_common.py | .py | #!/usr/bin/env python3
"""Bounded local-file and validation helpers for clinical-reports scripts."""
from __future__ import annotations
import json
import math
import re
from datetime import date, datetime
from pathlib import Path
from typing import Any, Iterable
MAX_JSON_BYTES = 1_000_000
MAX_CSV_BYTES = 5_000_000
... | 264 | 9,391 |
scientific-agent-skills | skills/clinical-reports/scripts/terminology_validator.py | .py | #!/usr/bin/env python3
"""Check terminology-manifest schema and optional caller-supplied local dictionary."""
from __future__ import annotations
import argparse
import re
import sys
from typing import Any
sys.dont_write_bytecode = True
from _common import ( # noqa: E402
ValidationError,
error_report,
l... | 278 | 10,255 |
scientific-agent-skills | skills/clinical-reports/scripts/check_deidentification.py | .py | #!/usr/bin/env python3
"""Validate de-identification process documentation without scanning patient text."""
from __future__ import annotations
import argparse
import sys
from typing import Any
sys.dont_write_bytecode = True
from _common import ( # noqa: E402
ValidationError,
error_report,
load_json_ob... | 299 | 10,755 |
scientific-agent-skills | skills/clinical-reports/scripts/validate_trial_report.py | .py | #!/usr/bin/env python3
"""Validate structured ICH E3, CONSORT 2025, or SPIRIT 2025 coverage."""
from __future__ import annotations
import argparse
import sys
from typing import Any
sys.dont_write_bytecode = True
from _common import ( # noqa: E402
ValidationError,
error_report,
load_json_object,
req... | 535 | 20,250 |
scientific-agent-skills | skills/clinical-reports/scripts/generate_report_template.py | .py | #!/usr/bin/env python3
"""Copy a fail-closed structured clinical-report template to a local path."""
from __future__ import annotations
import argparse
import sys
from pathlib import Path
sys.dont_write_bytecode = True
from _common import ( # noqa: E402
ValidationError,
load_json_object,
local_input_pa... | 116 | 4,005 |
scientific-agent-skills | skills/clinical-reports/scripts/provenance_validator.py | .py | #!/usr/bin/env python3
"""Validate source-fact-to-claim traceability without opening source records."""
from __future__ import annotations
import argparse
import re
import sys
from typing import Any
sys.dont_write_bytecode = True
from _common import ( # noqa: E402
SHA256_RE,
ValidationError,
error_repo... | 264 | 9,296 |
scientific-agent-skills | skills/clinical-reports/scripts/validate_case_report.py | .py | #!/usr/bin/env python3
"""Validate a structured CARE coverage manifest without reading patient narrative."""
from __future__ import annotations
import argparse
import sys
from typing import Any
sys.dont_write_bytecode = True
from _common import ( # noqa: E402
ValidationError,
error_report,
load_json_ob... | 279 | 9,592 |
scientific-agent-skills | skills/paper-lookup/scripts/_common.py | .py | #!/usr/bin/env python3
"""Shared helpers for the paper-lookup scripts. Standard library only.
Three concerns are factored out here because all four CLIs need them and getting
any of them subtly wrong is how a literature retrieval turns into a plausible
lie:
`read_input` / `emit`
Bounded stdin-or-path reading and ... | 228 | 8,377 |
scientific-agent-skills | skills/paper-lookup/scripts/openalex_abstract.py | .py | #!/usr/bin/env python3
"""Reconstruct OpenAlex abstracts from `abstract_inverted_index`.
OpenAlex never returns an abstract as a string. It returns
`{"word": [positions], ...}`, and the caller has to invert it. The naive
inversion loses words: building `{position: word}` and joining silently drops
every duplicate posi... | 164 | 6,033 |
scientific-agent-skills | skills/paper-lookup/scripts/paginate.py | .py | #!/usr/bin/env python3
"""Bounded, rate-limited, count-reconciling pagination for this skill's APIs.
Six of the ten databases here paginate differently -- absolute record offsets,
opaque cursors, continuation tokens, 1-based pages -- and each reports totals its
own way. Re-deriving the walk per query is how records ge... | 491 | 17,626 |
scientific-agent-skills | skills/paper-lookup/scripts/jats_to_text.py | .py | #!/usr/bin/env python3
"""Turn PMC / Europe PMC JATS XML into sectioned text, refusing metadata-only XML.
The failure this exists to stop: NCBI eFetch returns **HTTP 200** and a
well-formed `<pmc-articleset>` for articles whose publisher forbids XML
redistribution -- containing `<front>` metadata, no `<body>`, and the... | 325 | 11,305 |
scientific-agent-skills | skills/paper-lookup/scripts/arxiv_atom.py | .py | #!/usr/bin/env python3
"""Parse arXiv Atom XML into JSON records, catching arXiv's HTTP-200 failures.
arXiv has no JSON output, and its Atom feed has four traps that make hand-rolled
parsing quietly wrong (all documented in references/arxiv.md):
- The feed carries its own `<link>` before the first entry, so "the firs... | 201 | 7,993 |
scientific-agent-skills | skills/scholar-evaluation/scripts/calculate_scores.py | .py | #!/usr/bin/env python3
"""Calculate transparent bounded rubric math for one scholarly work."""
from __future__ import annotations
import argparse
from pathlib import Path
import _common
def calculate(rubric: dict, evaluation: dict) -> dict:
rubric_issues = _common.validate_rubric(rubric)
_common.require_va... | 58 | 1,885 |
scientific-agent-skills | skills/scholar-evaluation/scripts/generate_report_scaffold.py | .py | #!/usr/bin/env python3
"""Generate a minimized local JSON scaffold for qualified human review."""
from __future__ import annotations
import argparse
from pathlib import Path
from typing import Any
import _common
def _load_companion(
report: dict[str, Any] | None,
*,
report_type: str,
rubric_id: str... | 232 | 8,986 |
scientific-agent-skills | skills/scholar-evaluation/scripts/weight_sensitivity.py | .py | #!/usr/bin/env python3
"""Stress-test rubric weights and report scholarly-work order instability."""
from __future__ import annotations
import argparse
import itertools
from pathlib import Path
from typing import Any
import _common
def _normalized(weights: dict[str, float]) -> dict[str, float]:
total = sum(wei... | 252 | 9,231 |
scientific-agent-skills | skills/scholar-evaluation/scripts/validate_rubric.py | .py | #!/usr/bin/env python3
"""Validate a bounded scholar-evaluation rubric JSON file."""
from __future__ import annotations
import argparse
from pathlib import Path
import _common
def validate_file(path: Path) -> dict:
rubric = _common.read_json(path)
issues = _common.validate_rubric(rubric)
errors = _comm... | 55 | 1,729 |
scientific-agent-skills | skills/scholar-evaluation/scripts/_common.py | .py | #!/usr/bin/env python3
"""Bounded, dependency-free helpers for local scholar-evaluation records."""
from __future__ import annotations
import json
import math
import re
from dataclasses import dataclass
from datetime import date
from pathlib import Path
from typing import Any, Iterable
SCHEMA_VERSION = "2.0"
NOTICE ... | 987 | 35,590 |
scientific-agent-skills | skills/scholar-evaluation/scripts/check_process.py | .py | #!/usr/bin/env python3
"""Check low-stakes assessment governance and bias-process controls."""
from __future__ import annotations
import argparse
from pathlib import Path
from typing import Any
import _common
SECTION_FIELDS: dict[str, dict[str, tuple[str, ...]]] = {
"committee": {
"booleans": ("qualifie... | 232 | 8,289 |
scientific-agent-skills | skills/scholar-evaluation/scripts/check_traceability.py | .py | #!/usr/bin/env python3
"""Check criterion-to-evidence traceability without copying source content."""
from __future__ import annotations
import argparse
from pathlib import Path
from typing import Any
import _common
SOURCE_TYPES = {
"section",
"table",
"figure",
"dataset",
"code",
"protocol"... | 234 | 9,071 |
scientific-agent-skills | skills/scholar-evaluation/scripts/summarize_agreement.py | .py | #!/usr/bin/env python3
"""Summarize inter-rater agreement from pseudonymous local CSV ratings."""
from __future__ import annotations
import argparse
import csv
import io
import itertools
import math
from collections import defaultdict
from pathlib import Path
from typing import Any
import _common
CSV_FIELDS = [
... | 236 | 8,916 |
scientific-agent-skills | skills/bids/scripts/update_schema.py | .py | #!/usr/bin/env python3
"""Update BIDS schema JSON and BEPs list from upstream sources.
Downloads:
- bids_schema.json from bids-specification ReadTheDocs (stable release)
- beps.yml from bids-standard/bids-website (current BEP listing)
Usage:
python scripts/update_schema.py
# Fetch schema for a specific s... | 90 | 2,631 |
scientific-agent-skills | skills/timesfm-forecasting/scripts/forecast_csv.py | .py | #!/usr/bin/env python3
"""End-to-end CSV forecasting with TimesFM.
Loads a CSV, runs the system preflight check, loads TimesFM, forecasts
the requested columns, and writes results to a new CSV or JSON.
Usage:
python forecast_csv.py input.csv --horizon 24
python forecast_csv.py input.csv --horizon 12 --date-co... | 270 | 8,689 |
scientific-agent-skills | skills/timesfm-forecasting/scripts/check_system.py | .py | #!/usr/bin/env python3
"""TimesFM System Requirements Preflight Checker.
MANDATORY: Run this script before loading TimesFM for the first time.
It checks RAM, GPU/VRAM, disk space, Python version, and package
installation so the agent never crashes a user's machine.
Usage:
python check_system.py
python check_s... | 522 | 16,756 |
scientific-agent-skills | skills/timesfm-forecasting/examples/anomaly-detection/detect_anomalies.py | .py | #!/usr/bin/env python3
"""
TimesFM Anomaly Detection Example — Two-Phase Method
Phase 1 (context): Linear detrend + Z-score on 36 months of real NOAA
temperature anomaly data (2022-01 through 2024-12).
Sep 2023 (1.47 C) is a known critical outlier.
Phase 2 (forecast): TimesFM quantile prediction intervals on a 12... | 525 | 17,032 |
scientific-agent-skills | skills/timesfm-forecasting/examples/covariates-forecasting/demo_covariates.py | .py | #!/usr/bin/env python3
"""
TimesFM Covariates (XReg) Example
Demonstrates the TimesFM covariate API using synthetic retail sales data.
TimesFM 1.0 does NOT support forecast_with_covariates(); that requires
TimesFM 2.5 + `uv pip install timesfm[xreg]`.
This script:
1. Generates synthetic 3-store weekly retail data (... | 569 | 19,700 |
scientific-agent-skills | skills/timesfm-forecasting/examples/global-temperature/visualize_forecast.py | .py | #!/usr/bin/env python3
"""
Visualize TimesFM forecast results for global temperature anomaly.
Generates a publication-quality figure showing:
- Historical data (2022-2024)
- Point forecast (2025)
- 80% and 90% confidence intervals (fan chart)
Usage:
python visualize_forecast.py
"""
from __future__ import annotat... | 124 | 3,294 |
scientific-agent-skills | skills/timesfm-forecasting/examples/global-temperature/generate_animation_data.py | .py | #!/usr/bin/env python3
"""
Generate animation data for interactive forecast visualization.
This script runs TimesFM forecasts incrementally, starting with minimal data
and adding one point at a time. Each forecast extends to the final date (2025-12).
Output: animation_data.json with all forecast steps
"""
from __fut... | 148 | 5,008 |
scientific-agent-skills | skills/timesfm-forecasting/examples/global-temperature/generate_gif.py | .py | #!/usr/bin/env python3
"""
Generate animated GIF showing forecast evolution.
Creates a GIF animation showing how the TimesFM forecast changes
as more historical data points are added. Shows the full actual data as a background layer.
"""
from __future__ import annotations
import json
from pathlib import Path
import ... | 249 | 6,659 |
scientific-agent-skills | skills/timesfm-forecasting/examples/global-temperature/generate_html.py | .py | #!/usr/bin/env python3
"""
Generate a self-contained HTML file with embedded animation data.
This creates a single HTML file that can be opened directly in any browser
without needing a server or external JSON file (CORS-safe).
"""
from __future__ import annotations
import json
from pathlib import Path
EXAMPLE_DIR ... | 545 | 21,161 |
scientific-agent-skills | skills/timesfm-forecasting/examples/global-temperature/run_forecast.py | .py | #!/usr/bin/env python3
"""
Run TimesFM forecast on global temperature anomaly data.
Generates forecast output CSV and JSON for the example.
"""
from __future__ import annotations
import json
from pathlib import Path
import numpy as np
import pandas as pd
# Preflight check
print("=" * 60)
print(" TIMeSFM FORECAST -... | 168 | 5,499 |
scientific-agent-skills | skills/scientific-brainstorming/scripts/evaluate_matrix.py | .py | """Calculate a transparent weighted idea matrix with sensitivity analysis."""
from __future__ import annotations
import argparse
import csv
import io
import sys
from collections.abc import Mapping, Sequence
from dataclasses import dataclass
from typing import Any
from _common import (
CliError,
bounded_float... | 519 | 18,463 |
scientific-agent-skills | skills/scientific-brainstorming/scripts/validate_register.py | .py | """Validate brainstorming idea and assumption registers structurally."""
from __future__ import annotations
import argparse
import re
import sys
import unicodedata
from collections import defaultdict
from collections.abc import Sequence
from typing import Any
from _common import (
MAX_ITEMS,
CliError,
em... | 655 | 21,169 |
scientific-agent-skills | skills/scientific-brainstorming/scripts/_common.py | .py | """Shared standard-library safety helpers for brainstorming CLIs."""
from __future__ import annotations
import argparse
import json
import math
import os
import re
import stat
import tempfile
from collections.abc import Iterable
from datetime import date
from pathlib import Path
from typing import Any
MAX_INPUT_BYTE... | 308 | 9,560 |
scientific-agent-skills | skills/scientific-brainstorming/scripts/session_scaffold.py | .py | """Generate a deterministic JSON scaffold for a brainstorming session."""
from __future__ import annotations
import argparse
import sys
from collections.abc import Sequence
from typing import Any
from _common import (
CliError,
bounded_strings,
emit_json,
require_identifier,
require_iso_date,
... | 249 | 7,930 |
scientific-agent-skills | skills/pptx-posters/scripts/_manifest.py | .py | #!/usr/bin/env python3
"""Strict poster-manifest validation shared by generation and audit tools."""
from __future__ import annotations
import re
from pathlib import Path
from typing import Any
from _common import (
PPTX_MAX_INCHES,
PPTX_MIN_INCHES,
CliError,
canonical_json_hash,
contrast_ratio,
... | 1,319 | 46,535 |
scientific-agent-skills | skills/pptx-posters/scripts/validate_manifest.py | .py | #!/usr/bin/env python3
"""Validate a fail-closed, author-approved local poster manifest."""
from __future__ import annotations
import argparse
import sys
from _common import CliError, emit_json
from _manifest import load_and_validate_manifest
def build_parser() -> argparse.ArgumentParser:
parser = argparse.Arg... | 56 | 1,646 |
scientific-agent-skills | skills/pptx-posters/scripts/_common.py | .py | #!/usr/bin/env python3
"""Shared, dependency-free safety helpers for the poster command-line tools."""
from __future__ import annotations
import hashlib
import json
import math
import os
import re
import stat
import tempfile
from datetime import datetime
from pathlib import Path
from typing import Any, Iterable
MAX_... | 397 | 13,520 |
scientific-agent-skills | skills/pptx-posters/scripts/_pptx.py | .py | #!/usr/bin/env python3
"""Bounded, non-executing PPTX package inspection and layout analysis."""
from __future__ import annotations
import posixpath
import re
import shutil
import stat
import struct
import xml.etree.ElementTree as ET
import zipfile
from pathlib import Path, PurePosixPath
from typing import Any
from ... | 1,485 | 54,581 |
scientific-agent-skills | skills/pptx-posters/scripts/check_palette.py | .py | #!/usr/bin/env python3
"""Report declared WCAG contrast and heuristic palette separation."""
from __future__ import annotations
import argparse
import itertools
import sys
from typing import Any
from _common import CliError, contrast_ratio, emit_json, parse_hex_color, relative_luminance
from _manifest import load_an... | 143 | 4,856 |
scientific-agent-skills | skills/pptx-posters/scripts/inspect_pptx.py | .py | #!/usr/bin/env python3
"""Inspect a PPTX ZIP/XML package without opening or executing it."""
from __future__ import annotations
import argparse
import sys
from _common import CliError, emit_json
from _pptx import inspect_pptx
def build_parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(
... | 41 | 1,254 |
scientific-agent-skills | skills/pptx-posters/scripts/check_layout.py | .py | #!/usr/bin/env python3
"""Check PPTX shape bounds, overlap, reading order, and final font size."""
from __future__ import annotations
import argparse
import math
import sys
from typing import Any
from _common import CliError, emit_json
from _manifest import load_and_validate_manifest
from _pptx import analyze_layout... | 180 | 5,952 |
scientific-agent-skills | skills/pptx-posters/scripts/generate_poster.py | .py | #!/usr/bin/env python3
"""Generate one macro-free PPTX poster from approved, strictly local JSON."""
from __future__ import annotations
import argparse
import os
import sys
from datetime import datetime
from importlib.metadata import PackageNotFoundError, version
from pathlib import Path
from typing import Any
from ... | 428 | 15,234 |
scientific-agent-skills | skills/pptx-posters/scripts/plan_export.py | .py | #!/usr/bin/env python3
"""Create a requirement-bound PowerPoint export and print plan."""
from __future__ import annotations
import argparse
import sys
from typing import Any
from _common import CliError, emit_json
from _manifest import load_and_validate_manifest
def build_export_plan(
document: dict[str, Any]... | 202 | 8,314 |
scientific-agent-skills | skills/pptx-posters/scripts/inventory_images.py | .py | #!/usr/bin/env python3
"""Build a hashed local-image inventory with final effective DPI."""
from __future__ import annotations
import argparse
import sys
import warnings
from importlib.metadata import PackageNotFoundError, version
from pathlib import Path
from typing import Any
from _common import CliError, emit_jso... | 253 | 9,603 |
scientific-agent-skills | skills/citation-management/scripts/search_pubmed.py | .py | #!/usr/bin/env python3
"""
PubMed Search Tool
Search PubMed using E-utilities API and export results.
"""
import sys
import os
import re
import requests
import argparse
import json
import time
import xml.etree.ElementTree as ET
from typing import List, Dict, Optional
from datetime import datetime
sys.path.insert(0, s... | 420 | 13,779 |
scientific-agent-skills | skills/citation-management/scripts/format_bibtex.py | .py | #!/usr/bin/env python3
"""
BibTeX Formatter and Cleaner
Format, clean, sort, and deduplicate BibTeX files.
Writing is opt-in: pass --output to write elsewhere, or --in-place to
overwrite the input. Neither flag prints the result to stdout and leaves the
input untouched.
"""
from __future__ import annotations
import ... | 357 | 11,075 |
scientific-agent-skills | skills/citation-management/scripts/search_openalex.py | .py | #!/usr/bin/env python3
"""
OpenAlex Search Tool
Search OpenAlex and export results as JSON or BibTeX.
OpenAlex indexes ~250 million scholarly works across every discipline, needs no
API key, and has a documented REST API rather than a scraped HTML surface. It
is the third leg of this skill's coverage: PubMed is author... | 298 | 10,599 |
scientific-agent-skills | skills/citation-management/scripts/extract_metadata.py | .py | #!/usr/bin/env python3
"""
Metadata Extraction Tool
Extract citation metadata from DOI, PMID, arXiv ID, or URL using various APIs.
"""
import sys
import os
import requests
import argparse
import time
import re
import json
import xml.etree.ElementTree as ET
from typing import Optional, Dict, List, Tuple
from urllib.par... | 691 | 26,503 |
scientific-agent-skills | skills/citation-management/scripts/_common.py | .py | #!/usr/bin/env python3
"""Shared BibTeX parsing and rendering for the citation-management scripts.
Standard library only.
The parser here is brace-depth aware. That matters more than it sounds: a
regular expression of the form ``\\{([^}]*)\\}`` stops at the first closing
brace, so it truncates every title that protec... | 332 | 10,912 |
scientific-agent-skills | skills/citation-management/scripts/validate_citations.py | .py | #!/usr/bin/env python3
"""
Citation Validation Tool
Validate BibTeX files for accuracy, completeness, and format compliance.
"""
import sys
import re
import requests
import argparse
import json
from typing import Dict, List, Tuple, Optional
from collections import defaultdict
from urllib.parse import quote
sys.path.i... | 689 | 26,708 |
scientific-agent-skills | skills/citation-management/scripts/search_google_scholar.py | .py | #!/usr/bin/env python3
"""
Google Scholar Search Tool
Search Google Scholar and export results.
Note: This script requires the 'scholarly' library.
Install with: uv pip install scholarly
"""
import sys
import argparse
import json
import time
import random
from typing import List, Dict, Optional
sys.path.insert(0, st... | 269 | 8,609 |
scientific-agent-skills | skills/citation-management/scripts/doi_to_bibtex.py | .py | #!/usr/bin/env python3
"""
DOI to BibTeX Converter
Quick utility to convert DOIs to BibTeX format using CrossRef API.
"""
import sys
import requests
import argparse
import time
import json
from typing import Optional, List
class DOIConverter:
"""Convert DOIs to BibTeX entries using CrossRef API."""
def _... | 205 | 6,299 |
scientific-agent-skills | skills/iso-standards-readiness/scripts/check_supplier_controls.py | .py | #!/usr/bin/env python3
"""Check supplier and outsourced-process control evidence."""
from __future__ import annotations
from typing import Any
from _common import (
Review,
finish,
guarded_main,
load_json,
require_root_object,
standard_parser,
)
SUPPLIER_STATUSES = {"candidate", "approved", ... | 167 | 5,746 |
scientific-agent-skills | skills/iso-standards-readiness/scripts/validate_evidence_manifest.py | .py | #!/usr/bin/env python3
"""Validate a bounded audit/readiness evidence manifest and optional local files."""
from __future__ import annotations
import argparse
import hashlib
from pathlib import Path
from typing import Any
from _catalog import StandardProfile
from _common import (
ALLOWED_STATUSES,
MAX_INPUT_... | 247 | 8,446 |
scientific-agent-skills | skills/iso-standards-readiness/scripts/_catalog.py | .py | #!/usr/bin/env python3
"""Per-standard process labels and scope vocabulary used by the local checks.
The labels are workflow topics. They are not clause text from any standard, not a
clause map, and not a substitute for an authorized copy. Listing a standard here
does not decide that the standard applies to an organiz... | 249 | 7,732 |
scientific-agent-skills | skills/iso-standards-readiness/scripts/_common.py | .py | #!/usr/bin/env python3
"""Shared, bounded helpers for local standards-readiness evidence checks.
These helpers validate structure and evidence metadata only. They never determine
regulatory applicability, conformity, compliance, certification, accreditation, or
audit outcome.
"""
from __future__ import annotations
i... | 559 | 16,379 |
scientific-agent-skills | skills/iso-standards-readiness/scripts/check_qmsr_transition.py | .py | #!/usr/bin/env python3
"""Check documented evidence for the post-effective-date FDA QMSR transition."""
from __future__ import annotations
from typing import Any
from _catalog import QMSR_TRANSITION_ITEMS
from _common import (
Review,
finish,
guarded_main,
load_json,
require_root_object,
stan... | 165 | 5,719 |
scientific-agent-skills | skills/iso-standards-readiness/scripts/check_capa.py | .py | #!/usr/bin/env python3
"""Check CAPA record structure, evidence, and effectiveness gates."""
from __future__ import annotations
from typing import Any
from _common import (
Review,
finish,
guarded_main,
load_json,
require_root_object,
standard_parser,
)
CAPA_STATUSES = {
"open",
"inv... | 241 | 8,909 |
scientific-agent-skills | skills/iso-standards-readiness/scripts/validate_scope_intake.py | .py | #!/usr/bin/env python3
"""Validate a declared applicability and scope intake for one standard profile.
The script checks whether accountable humans documented decisions and evidence. It
does not decide whether a law, regulation, standard, conformity route, or
accreditation scheme applies.
"""
from __future__ import a... | 210 | 7,268 |
scientific-agent-skills | skills/iso-standards-readiness/scripts/gap_analyzer.py | .py | #!/usr/bin/env python3
"""Create a fail-closed QMS evidence gap report from a local manifest.
The analyzer uses explicit, human-authored domain labels. It does not infer
conformity from filenames or keywords and never reports a compliance percentage.
"""
from __future__ import annotations
import argparse
from collec... | 168 | 5,243 |
scientific-agent-skills | skills/iso-standards-readiness/scripts/check_traceability.py | .py | #!/usr/bin/env python3
"""Check risk/design/production/postmarket traceability references."""
from __future__ import annotations
from typing import Any
from _catalog import TRACEABILITY_LINKS
from _common import (
ALLOWED_STATUSES,
Review,
finish,
guarded_main,
load_json,
require_root_object,... | 172 | 5,646 |
scientific-agent-skills | skills/iso-standards-readiness/scripts/audit_document_records.py | .py | #!/usr/bin/env python3
"""Audit local document/record register metadata without opening evidence files."""
from __future__ import annotations
from typing import Any
from _common import (
Review,
finish,
guarded_main,
load_json,
require_root_object,
standard_parser,
)
DOCUMENT_STATUSES = {"dr... | 149 | 5,518 |
scientific-agent-skills | skills/latchbio-integration/scripts/inspect_latch_sdk.py | .py | #!/usr/bin/env python3
"""Inspect the installed Latch SDK without authentication or network access."""
from __future__ import annotations
import argparse
import importlib
import inspect
import json
import platform
import re
import sys
from importlib.metadata import PackageNotFoundError, version
from typing import Any... | 291 | 9,155 |
scientific-agent-skills | skills/literature-review/scripts/verify_citations.py | .py | #!/usr/bin/env python3
"""
Citation Verification Script
Verifies DOIs, URLs, and citation metadata for accuracy.
"""
import re
import requests
import json
from typing import Dict, List, Tuple
from urllib.parse import urlparse
import time
class CitationVerifier:
def __init__(self):
self.session = requests.... | 223 | 7,050 |
scientific-agent-skills | skills/literature-review/scripts/search_databases.py | .py | #!/usr/bin/env python3
"""
Literature Database Search Script
Searches multiple literature databases and aggregates results.
"""
import json
import sys
from typing import Dict, List
from datetime import datetime
def format_search_results(results: List[Dict], output_format: str = 'json') -> str:
"""
Format sear... | 304 | 9,036 |
scientific-agent-skills | skills/literature-review/scripts/generate_pdf.py | .py | #!/usr/bin/env python3
"""
PDF Generation Script for Literature Reviews
Converts markdown files to professionally formatted PDFs with proper styling.
"""
import subprocess
import sys
import os
from pathlib import Path
def generate_pdf(
markdown_file: str,
output_pdf: str = None,
citation_style: str = "apa... | 177 | 5,410 |
scientific-agent-skills | skills/matchms/scripts/library_search.py | .py | #!/usr/bin/env python3
"""Search query MS/MS spectra against a reference library with matchms.
Examples:
uv run python library_search.py queries.mgf library.msp hits.csv
uv run python library_search.py queries.mgf library.msp hits.csv \
--metric modified --tolerance 0.02 --top-k 10 \
--min-scor... | 594 | 19,504 |
scientific-agent-skills | skills/deepchem/scripts/transfer_learning.py | .py | #!/usr/bin/env python3
"""
Transfer Learning Script for DeepChem
Use pretrained models (ChemBERTa, GROVER, MolFormer) for molecular property prediction
with transfer learning. Particularly useful for small datasets.
Usage:
python transfer_learning.py --model chemberta --data my_data.csv --target activity
pyth... | 444 | 13,631 |
scientific-agent-skills | skills/deepchem/scripts/predict_solubility.py | .py | #!/usr/bin/env python3
"""
Molecular Solubility Prediction Script
This script trains a model to predict aqueous solubility from SMILES strings
using the Delaney (ESOL) dataset as an example. Can be adapted for custom datasets.
Usage:
python predict_solubility.py --data custom_data.csv --smiles-col smiles --target... | 224 | 6,785 |
scientific-agent-skills | skills/deepchem/scripts/graph_neural_network.py | .py | #!/usr/bin/env python3
"""
Graph Neural Network Training Script
This script demonstrates training Graph Convolutional Networks (GCNs) and other
graph-based models for molecular property prediction.
Usage:
python graph_neural_network.py --dataset tox21 --model gcn
python graph_neural_network.py --dataset bbbp ... | 351 | 10,215 |
scientific-agent-skills | skills/pathogen-variant-surveillance/scripts/reporting_lag.py | .py | #!/usr/bin/env python3
# /// script
# requires-python = ">=3.11"
# dependencies = []
# ///
"""Measure how long sequences take to appear, and how far back to trust the data.
The single most common way to get variant surveillance wrong is to compute
prevalence over the last few weeks. Those weeks are not a sample of wha... | 218 | 8,605 |
scientific-agent-skills | skills/pathogen-variant-surveillance/scripts/lineage_prevalence.py | .py | #!/usr/bin/env python3
# /// script
# requires-python = ">=3.11"
# dependencies = []
# ///
"""Weekly prevalence of one or more lineages, with intervals and a coverage flag.
Answers "what is circulating, and is it growing" from live sequence counts
rather than from memory. Every number is a count returned by the instan... | 311 | 13,003 |
scientific-agent-skills | skills/pathogen-variant-surveillance/scripts/lapis_client.py | .py | #!/usr/bin/env python3
# /// script
# requires-python = ">=3.11"
# dependencies = []
# ///
"""Minimal LAPIS client plus the pure helpers the four CLIs share.
Standard library only. Network access to the GenSpectrum family of LAPIS
instances (cov-spectrum.org, genspectrum.org, pathoplexus.org) is required for
the reque... | 777 | 30,496 |
scientific-agent-skills | skills/pathogen-variant-surveillance/scripts/mutation_profile.py | .py | #!/usr/bin/env python3
# /// script
# requires-python = ">=3.11"
# dependencies = []
# ///
"""Mutations carried by a lineage, or the difference between two lineages.
Use this to answer "what distinguishes this lineage" and "does my assay target
still match" from current sequences, instead of from a lineage's founding
... | 216 | 9,403 |
scientific-agent-skills | skills/pathogen-variant-surveillance/scripts/resolve_lineage.py | .py | #!/usr/bin/env python3
# /// script
# requires-python = ">=3.11"
# dependencies = []
# ///
"""Resolve a lineage name against the live nomenclature before trusting it.
Pango names are not stable identifiers. They are minted continuously, aliased
through a key that must be fetched to be read, and **withdrawn or redesign... | 199 | 7,198 |
scientific-agent-skills | skills/liteparse/scripts/batch_parse_dir.py | .py | #!/usr/bin/env python3
"""
Batch-parse documents in a directory with LiteParse (local only, no network).
Usage:
python batch_parse_dir.py INPUT_DIR OUTPUT_DIR [--format json|text] [--no-ocr] [--recursive] [--extension .pdf]
"""
from __future__ import annotations
import argparse
import json
import sys
from pathli... | 164 | 4,342 |
scientific-agent-skills | skills/pkpd-modeling/scripts/allometry_and_fih.py | .py | #!/usr/bin/env python3
"""Allometric scaling, maturation, and first-in-human starting dose.
Two different jobs share this script because they share a failure mode: taking
a number derived for one purpose and using it for another. An HED is not a
starting dose. A NOAEL-derived MRSD is not appropriate for an agonist
imm... | 347 | 16,477 |
scientific-agent-skills | skills/pkpd-modeling/scripts/bioequivalence.py | .py | #!/usr/bin/env python3
"""Bioequivalence assessment: average BE, reference-scaled BE, and sample size.
Three separate criteria live under the word "bioequivalence" and they are not
interchangeable. Average BE puts a 90% confidence interval for the geometric
mean ratio inside 80.00-125.00%. EMA's ABEL widens those limi... | 481 | 20,490 |
scientific-agent-skills | skills/pkpd-modeling/scripts/check_popk_dataset.py | .py | #!/usr/bin/env python3
"""Validate a NONMEM/nlmixr2-ready population PK dataset before it costs you a run.
Most population analyses lose more time to dataset defects than to modelling.
The defects that hurt are the silent ones: NONMEM reads a non-numeric DV as
zero rather than refusing it, a missing II turns ADDL into... | 401 | 17,238 |
scientific-agent-skills | skills/pkpd-modeling/scripts/fit_compartmental.py | .py | #!/usr/bin/env python3
"""Fit compartmental PK models to concentration-time data, with identifiability diagnostics.
The fit itself is the easy part. What decides whether the result means anything
is: was the residual error model right, is the extra compartment actually
supported, and are the parameters identifiable fr... | 559 | 21,624 |
scientific-agent-skills | skills/pkpd-modeling/scripts/tdm_bayes.py | .py | #!/usr/bin/env python3
"""Maximum a posteriori Bayesian forecasting for therapeutic drug monitoring.
Given a published population model and one or two measured concentrations,
MAP estimation produces individual parameters that shrink towards the
population when the data are uninformative and follow the data when they ... | 313 | 13,050 |
scientific-agent-skills | skills/pkpd-modeling/scripts/exposure_response.py | .py | #!/usr/bin/env python3
"""Exposure-response analysis: Emax, logistic, concentration-QTc, and exposure quartiles.
Exposure-response is where dose selection is actually decided, and where the
most consequential statistical mistakes are made. Two dominate. The first is
fitting Emax to data that never approached the plate... | 329 | 14,669 |
scientific-agent-skills | skills/pkpd-modeling/scripts/_common.py | .py | """Shared I/O, formatting, and reporting helpers for the pkpd-modeling scripts.
Every script in this skill follows the same contract:
* data goes to **stdout**, provenance and findings go to **stderr**, so
``script.py ... > out.tsv`` keeps them apart;
* ``--format table|tsv|json`` selects the stdout rendering, and ... | 328 | 10,899 |
scientific-agent-skills | skills/pkpd-modeling/scripts/_models.py | .py | """Structural PK and PD model library.
Linear mammillary models are solved **analytically**, not numerically. The
disposition of any 1-, 2-, or 3-compartment model is reduced once to a sum of
exponentials by eigendecomposition of the rate matrix, and every input type
(bolus, zero-order infusion, first-order absorption... | 674 | 25,521 |
scientific-agent-skills | skills/pkpd-modeling/scripts/simulate_regimen.py | .py | #!/usr/bin/env python3
"""Simulate dosing regimens, with or without between-subject variability.
Deterministic simulation answers "what does the typical patient look like".
That is almost never the question. The question is what fraction of patients
stay inside the therapeutic window, and the two answers differ by a l... | 324 | 15,790 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.