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/analytical-method-validation/scripts/_common.py
.py
#!/usr/bin/env python3 """Shared statistics and I/O for analytical method validation checks. Standard library only. Every distribution function here is implemented from the regularised incomplete beta and gamma functions so the scripts run in any Python 3.11+ interpreter without numpy or scipy. These helpers compute ...
956
32,420
scientific-agent-skills
skills/analytical-method-validation/scripts/check_bioanalytical_run.py
.py
#!/usr/bin/env python3 """Apply ICH M10 acceptance criteria to a bioanalytical run or an ISR dataset. Chromatographic assays and ligand binding assays carry DIFFERENT numeric criteria in ICH M10, and conflating them is the most common error in this area. --modality is therefore mandatory: nothing here has a default. ...
294
11,344
scientific-agent-skills
skills/analytical-method-validation/scripts/compare_methods.py
.py
#!/usr/bin/env python3 """Compare two analytical procedures for a transfer, bridging, or bias study. Uses the regressions that belong to method comparison -- Deming and Passing-Bablok, which allow error in both measurements -- rather than ordinary least squares, which assumes the comparative procedure is error-free an...
216
9,105
scientific-agent-skills
skills/analytical-method-validation/scripts/plan_validation.py
.py
#!/usr/bin/env python3 """Design a validation study: which framework, which tests, what study layout. Answers the first question of any validation exercise -- what am I required to demonstrate, and with how much data -- before any sample is injected. python3 plan_validation.py --framework ich-q2r2 --attribute ass...
382
15,414
scientific-agent-skills
skills/analytical-method-validation/scripts/check_response.py
.py
#!/usr/bin/env python3 """Evaluate a calibration response (linearity) the way ICH Q2(R2) 3.2.2 asks. Reports what the guideline asks to be reported -- slope, intercept, coefficient of determination, and an analysis of the deviation of points from the line -- and adds the diagnostics that actually detect an unsuitable ...
244
9,858
scientific-agent-skills
skills/analytical-method-validation/scripts/check_accuracy_precision.py
.py
#!/usr/bin/env python3 """Evaluate accuracy and precision per ICH Q2(R2) 3.3. Accuracy is reported as mean recovery with a confidence interval, which is what Q2(R2) 3.3.1.4 asks for -- a bare mean is not sufficient. Precision is decomposed into repeatability and intermediate precision by a one-way random-effects model...
329
14,263
scientific-agent-skills
skills/pathml/scripts/image_qc.py
.py
#!/usr/bin/env python3 """Compute bounded synthetic/local image QC and a coarse tissue-like mask.""" from __future__ import annotations import argparse import math from pathlib import Path from typing import Any from _common import ( CliError, MAX_IMAGE_BYTES, MAX_PIXELS, atomic_write_bytes, chec...
326
11,127
scientific-agent-skills
skills/pathml/scripts/validate_spatial_schema.py
.py
#!/usr/bin/env python3 """Validate bounded graph JSON and multiplex cell-table CSV schemas.""" from __future__ import annotations import argparse import csv import math import re from collections import Counter from pathlib import Path from typing import Any from _common import ( CliError, MAX_CSV_BYTES, ...
421
16,044
scientific-agent-skills
skills/pathml/scripts/plan_pipeline.py
.py
#!/usr/bin/env python3 """Plan bounded PathML tiling and pipeline work without opening a slide.""" from __future__ import annotations import argparse import math from typing import Any from _common import CliError, emit_json, parse_name_list, run_cli TRANSFORM_KINDS = { "AdaptiveHistogramEqualization": "image"...
240
9,054
scientific-agent-skills
skills/pathml/scripts/_common.py
.py
#!/usr/bin/env python3 """Shared bounded-I/O helpers for the PathML skill CLIs.""" from __future__ import annotations import hashlib import json import math import os import stat import tempfile from collections.abc import Iterable, Mapping from pathlib import Path from typing import Any PATHML_VERSION = "3.0.5" PI...
386
12,105
scientific-agent-skills
skills/pathml/scripts/plan_inference.py
.py
#!/usr/bin/env python3 """Plan bounded inference batches from numbers or a JSON model card only.""" from __future__ import annotations import argparse import math import re from pathlib import Path from typing import Any from _common import ( CliError, MAX_JSON_BYTES, emit_json, finite_float, loa...
283
9,691
scientific-agent-skills
skills/pathml/scripts/slide_manifest.py
.py
#!/usr/bin/env python3 """Validate local slide manifests and inspect allowlisted technical metadata.""" from __future__ import annotations import argparse import csv import math import re from collections import Counter from pathlib import Path from typing import Any from _common import ( CliError, MAX_CSV_B...
406
14,065
scientific-agent-skills
skills/gget/scripts/gene_analysis.py
.py
#!/usr/bin/env python3 """ Gene Analysis Script Quick analysis of a gene: search, info, sequences, expression, and enrichment """ import argparse import sys import gget def fasta_text(sequences): """Render what gget.seq returned as FASTA text. gget.seq returns a list of FASTA lines (header, sequence, ...); ...
176
6,297
scientific-agent-skills
skills/gget/scripts/batch_sequence_analysis.py
.py
#!/usr/bin/env python3 """ Batch Sequence Analysis Script Analyze multiple sequences: BLAST, alignment, and structure prediction """ import argparse import sys from pathlib import Path import gget def read_fasta(fasta_file): """Read sequences from FASTA file.""" sequences = [] current_id = None curre...
193
6,119
scientific-agent-skills
skills/gget/scripts/enrichment_pipeline.py
.py
#!/usr/bin/env python3 """ Enrichment Analysis Pipeline Perform comprehensive enrichment analysis on a gene list """ import argparse import sys from pathlib import Path import gget import pandas as pd def read_gene_list(file_path): """Read gene list from file (one gene per line or CSV).""" file_path = Path(f...
236
7,201
scientific-agent-skills
skills/scikit-learn/scripts/clustering_analysis.py
.py
""" Clustering analysis example with multiple algorithms, evaluation, and visualization. """ import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.preprocessing import StandardScaler from sklearn.decomposition import PCA from sklearn.cluster import KMeans, DBSCAN, AgglomerativeClustering ...
387
11,396
scientific-agent-skills
skills/scikit-learn/scripts/classification_pipeline.py
.py
""" Complete classification pipeline example with preprocessing, model training, hyperparameter tuning, and evaluation. """ import numpy as np import pandas as pd from sklearn.model_selection import train_test_split, GridSearchCV, cross_val_score from sklearn.preprocessing import StandardScaler, OneHotEncoder from skl...
258
8,044
scientific-agent-skills
skills/medchem/scripts/filter_molecules.py
.py
#!/usr/bin/env python3 """ Batch molecular filtering using the medchem library. Usage: uv run python filter_molecules.py input.csv --rules rule_of_five,rule_of_cns --pains --output filtered.csv uv run python filter_molecules.py input.sdf --rules rule_of_veber --nibr --complexity 99 --output results.csv uv ...
303
12,336
scientific-agent-skills
skills/infographics/scripts/generate_infographic_ai.py
.py
#!/usr/bin/env python3 """ AI-powered infographic generation using Nano Banana Pro. This script uses a smart iterative refinement approach: 1. (Optional) Research phase - gather facts and data using Perplexity Sonar 2. Generate initial infographic with Nano Banana Pro 3. AI quality review using Gemini 3.6 Flash for in...
1,447
57,598
scientific-agent-skills
skills/infographics/scripts/generate_infographic.py
.py
#!/usr/bin/env python3 """ Generate professional infographics using Nano Banana Pro. This script generates infographics with smart iterative refinement: - Uses Nano Banana Pro (Gemini 3.1 Flash Image) for generation - Uses Gemini 3.6 Flash for quality review - Only regenerates if quality is below threshold - Supports ...
292
12,643
scientific-agent-skills
skills/pymoo/scripts/many_objective_example.py
.py
""" Many-objective optimization example using pymoo. This script demonstrates many-objective optimization (4+ objectives) using NSGA-III on the DTLZ2 benchmark problem. """ from pymoo.algorithms.moo.nsga3 import NSGA3 from pymoo.problems import get_problem from pymoo.optimize import minimize from pymoo.util.ref_dirs ...
75
2,227
scientific-agent-skills
skills/pymoo/scripts/decision_making_example.py
.py
""" Multi-criteria decision making example using pymoo. This script demonstrates how to select preferred solutions from a Pareto front using various MCDM methods. """ from pymoo.algorithms.moo.nsga2 import NSGA2 from pymoo.problems import get_problem from pymoo.optimize import minimize from pymoo.mcdm.pseudo_weights ...
162
4,588
scientific-agent-skills
skills/pymoo/scripts/custom_problem_example.py
.py
""" Custom problem definition example using pymoo. This script demonstrates how to define a custom optimization problem and solve it using pymoo. """ from pymoo.core.problem import ElementwiseProblem from pymoo.algorithms.moo.nsga2 import NSGA2 from pymoo.optimize import minimize from pymoo.visualization.scatter impo...
182
4,770
scientific-agent-skills
skills/pymoo/scripts/multi_objective_example.py
.py
""" Multi-objective optimization example using pymoo. This script demonstrates multi-objective optimization using NSGA-II on the ZDT1 benchmark problem. """ from pymoo.algorithms.moo.nsga2 import NSGA2 from pymoo.problems import get_problem from pymoo.optimize import minimize from pymoo.visualization.scatter import S...
64
1,731
scientific-agent-skills
skills/pymoo/scripts/single_objective_example.py
.py
""" Single-objective optimization example using pymoo. This script demonstrates basic single-objective optimization using the Genetic Algorithm on the Sphere function. """ from pymoo.algorithms.soo.nonconvex.ga import GA from pymoo.problems import get_problem from pymoo.optimize import minimize from pymoo.operators.c...
60
1,620
scientific-agent-skills
skills/market-research-reports/scripts/generate_report_scaffold.py
.py
#!/usr/bin/env python3 """Generate a bounded local evidence-first market-report workspace.""" from __future__ import annotations import argparse import csv import json import re from pathlib import Path from typing import Any from _common import ( ValidationError, error_exit, parse_currency, parse_is...
445
14,779
scientific-agent-skills
skills/market-research-reports/scripts/calculate_market_sizing.py
.py
#!/usr/bin/env python3 """Calculate bounded TAM/SAM/SOM scenarios and reconcile two sizing methods.""" from __future__ import annotations import argparse from pathlib import Path from typing import Any from _common import ( ValidationError, error_exit, parse_currency, parse_fraction, parse_iso_da...
390
13,738
scientific-agent-skills
skills/market-research-reports/scripts/check_unit_consistency.py
.py
#!/usr/bin/env python3 """Check units, currency, base year, taxonomy, and denominator consistency.""" from __future__ import annotations import argparse import re from typing import Any from _common import ( ValidationError, error_exit, parse_currency, parse_number, parse_year, read_csv_recor...
218
6,943
scientific-agent-skills
skills/market-research-reports/scripts/_common.py
.py
#!/usr/bin/env python3 """Shared, dependency-free validation helpers for local market-research CLIs.""" from __future__ import annotations import csv import json import math import os import re import tempfile from datetime import date from pathlib import Path from typing import Any, Iterable MAX_FILE_BYTES = 5 * 10...
313
11,093
scientific-agent-skills
skills/market-research-reports/scripts/validate_evidence_ledger.py
.py
#!/usr/bin/env python3 """Validate a local market-research source/evidence ledger.""" from __future__ import annotations import argparse from datetime import date from pathlib import Path, PurePosixPath from typing import Any from urllib.parse import urlsplit from _common import ( MAX_ROWS, ValidationError, ...
292
9,202
scientific-agent-skills
skills/market-research-reports/scripts/forecast_sensitivity.py
.py
#!/usr/bin/env python3 """Generate deterministic scenario forecasts and one-way growth sensitivity.""" from __future__ import annotations import argparse from typing import Any from _common import ( ValidationError, error_exit, parse_currency, parse_iso_date, parse_number, parse_year, rea...
327
11,102
scientific-agent-skills
skills/market-research-reports/scripts/validate_competitor_matrix.py
.py
#!/usr/bin/env python3 """Validate a complete, evidence-linked competitor-feature matrix CSV.""" from __future__ import annotations import argparse from pathlib import Path from typing import Any from _common import ( MAX_ROWS, ValidationError, error_exit, parse_iso_date, read_csv_records, re...
224
7,807
scientific-agent-skills
skills/market-research-reports/scripts/audit_claim_citations.py
.py
#!/usr/bin/env python3 """Audit claim-to-source mappings in local CSV ledgers.""" from __future__ import annotations import argparse from pathlib import Path from typing import Any from _common import ( MAX_ROWS, ValidationError, error_exit, parse_currency, parse_iso_date, parse_year, rea...
327
11,051
scientific-agent-skills
skills/markitdown/scripts/convert_literature.py
.py
#!/usr/bin/env python3 """Convert a trusted local PDF collection into provenance-rich Markdown.""" from __future__ import annotations import argparse import json import re from dataclasses import asdict, dataclass from datetime import datetime, timezone from hashlib import sha256 from importlib.metadata import versio...
406
12,069
scientific-agent-skills
skills/markitdown/scripts/inspect_installation.py
.py
#!/usr/bin/env python3 """Inspect a MarkItDown installation without loading plugins or using network.""" from __future__ import annotations import argparse import json import platform import shutil from importlib.metadata import ( PackageNotFoundError, entry_points, metadata, version, ) from typing im...
163
4,889
scientific-agent-skills
skills/markitdown/scripts/batch_convert.py
.py
#!/usr/bin/env python3 """Batch-convert trusted local files with Microsoft MarkItDown 0.1.6. The script deliberately uses convert_local(), skips symlinks, preserves relative directories, and keeps plugins disabled unless explicitly requested. """ from __future__ import annotations import argparse import json import ...
355
10,522
scientific-agent-skills
skills/scvelo/scripts/rna_velocity_workflow.py
.py
""" RNA Velocity Analysis Workflow using scVelo =========================================== Complete pipeline from raw data to velocity visualization. Usage: python rna_velocity_workflow.py Or import and use run_velocity_analysis() with your AnnData object. """ import scvelo as scv import scanpy as sc import num...
241
8,440
scientific-agent-skills
skills/peer-review/scripts/select_reporting_guidelines.py
.py
#!/usr/bin/env python3 """Select bundled reporting guidance and audit checklist coverage locally.""" from __future__ import annotations import argparse import re from collections import Counter from pathlib import Path from typing import Any from _common import ( ValidationError, error_exit, issue, r...
384
13,594
scientific-agent-skills
skills/peer-review/scripts/_common.py
.py
#!/usr/bin/env python3 """Shared, dependency-free safety helpers for local peer-review CLIs.""" from __future__ import annotations import csv import json import os import re import tempfile from datetime import date from pathlib import Path from typing import Any, Iterable MAX_INPUT_BYTES = 4 * 1024 * 1024 MAX_ROWS ...
399
13,896
scientific-agent-skills
skills/peer-review/scripts/audit_statistics_reproducibility.py
.py
#!/usr/bin/env python3 """Audit a structured statistics and reproducibility checklist locally.""" from __future__ import annotations import argparse from collections import Counter from typing import Any from _common import ( ValidationError, error_exit, issue, read_json, require_bool, requir...
306
10,455
scientific-agent-skills
skills/peer-review/scripts/validate_claim_evidence.py
.py
#!/usr/bin/env python3 """Validate a bounded claim-evidence alignment matrix without echoing prose.""" from __future__ import annotations import argparse from collections import Counter from typing import Any from _common import ( ValidationError, error_exit, issue, read_csv_records, require_enum...
222
7,083
scientific-agent-skills
skills/peer-review/scripts/audit_citations.py
.py
#!/usr/bin/env python3 """Audit Markdown citation keys against a local reference CSV without network use.""" from __future__ import annotations import argparse import re from collections import Counter from typing import Any from _common import ( ValidationError, error_exit, issue, read_csv_records, ...
208
7,097
scientific-agent-skills
skills/peer-review/scripts/generate_review_scaffold.py
.py
#!/usr/bin/env python3 """Generate a local structured peer-review draft scaffold from validated intake.""" from __future__ import annotations import argparse import re from pathlib import Path from typing import Any from _common import ( ValidationError, error_exit, read_markdown, write_markdown, ) f...
82
2,634
scientific-agent-skills
skills/peer-review/scripts/validate_review_intake.py
.py
#!/usr/bin/env python3 """Validate peer-review scope, authorization, conflicts, and handling controls.""" from __future__ import annotations import argparse from typing import Any from _common import ( ValidationError, error_exit, issue, read_json, require_bool, require_enum, require_exac...
453
14,466
scientific-agent-skills
skills/peer-review/scripts/lint_review.py
.py
#!/usr/bin/env python3 """Lint a structured review for channel separation, tone, and actionability.""" from __future__ import annotations import argparse import re from typing import Any from _common import ( ValidationError, error_exit, issue, read_markdown, write_json_report, ) AUTHOR_HEADING ...
255
9,085
scientific-agent-skills
skills/onekgpd/scripts/onekgpd_meta.py
.py
# /// script # requires-python = ">=3.11" # dependencies = [] # /// """OneKGPd — sample & population metadata (offline) over the 1000 Genomes Project. Six commands answering population/pedigree questions from a data file bundled in the skill (``onekgpd/assets/kgpe.json``): no network, no credentials, and no third-part...
486
19,389
scientific-agent-skills
skills/onekgpd/scripts/onekgpd_api.py
.py
# /// script # requires-python = ">=3.11" # dependencies = ["dnaerys>=0.2.1,<0.3.0"] # /// """OneKGPd — individual-level queries over the 1000 Genomes Project. A single command-line wrapper exposing ten subcommands over the 1000 Genomes Project cohort (3,202 whole-genome-sequenced individuals, GRCh38): selecting and c...
795
30,403
scientific-agent-skills
skills/autoskill/scripts/backends.py
.py
import ipaddress import os import sys from urllib.parse import urlparse import httpx def _is_loopback(host): if host in ("localhost", ""): return True try: return ipaddress.ip_address(host).is_loopback except ValueError: return False def check_remote_endpoint(endpoint, label): ...
117
3,936
scientific-agent-skills
skills/autoskill/scripts/autoskill.py
.py
"""Unified CLI for the autoskill skill. Subcommands: run — detect workflows and draft proposed skills doctor — verify screenpipe + LM Studio + config + skills dir promote — move an approved proposal into skills/ """ import argparse import sys def main(argv=None): parser = argparse.ArgumentParser(p...
36
1,158
scientific-agent-skills
skills/autoskill/scripts/cluster.py
.py
from collections import defaultdict def segment_sessions(events, idle_gap_seconds, min_session_seconds): if not events: return [] events = sorted(events, key=lambda e: e["ts"]) groups = [[events[0]]] for prev, curr in zip(events, events[1:]): if curr["ts"] - prev["ts"] > idle_gap_secon...
55
1,723
scientific-agent-skills
skills/autoskill/scripts/promote.py
.py
import argparse import shutil import sys from pathlib import Path class PromoteError(Exception): pass _KINDS = ("new-skills", "composition-recipes") def promote(proposed_path, skills_dir, name): proposed_path = Path(proposed_path) skills_dir = Path(skills_dir) source = None for kind in _KINDS...
59
1,559
scientific-agent-skills
skills/autoskill/scripts/run.py
.py
import datetime as _dt from pathlib import Path import httpx from cluster import cluster_sessions, segment_sessions from fetch_window import fetch_window from match_skills import load_skill_descriptions, top_k_matches from redact import redact from synthesize import synthesize class ScreenpipeUnreachable(RuntimeErr...
195
7,370
scientific-agent-skills
skills/autoskill/scripts/fetch_window.py
.py
_MAX_PAGES = 10_000 # bounded exit: hard ceiling so the loop cannot spin forever def fetch_window(client, start_time, end_time, page_size=50, token=None): events = [] offset = 0 headers = {"Authorization": f"Bearer {token}"} if token else {} for _page in range(_MAX_PAGES): response = client.g...
34
1,172
scientific-agent-skills
skills/autoskill/scripts/match_skills.py
.py
import math from pathlib import Path def _parse_frontmatter(content: str) -> dict: if not content.startswith("---"): return {} _, _, rest = content.partition("---\n") block, _, _ = rest.partition("\n---") out = {} for line in block.splitlines(): if ":" not in line: cont...
47
1,316
scientific-agent-skills
skills/autoskill/scripts/synthesize.py
.py
import json import re VALID_VERDICTS = {"reuse", "compose", "novel"} class SynthesisError(Exception): pass def _build_prompt(cluster, top_k_skills): apps = ", ".join(cluster["apps"]) titles = "; ".join(cluster.get("example_titles", [])) candidates = "\n".join( f"- {s['name']} (score={s['sco...
73
2,378
scientific-agent-skills
skills/autoskill/scripts/doctor.py
.py
import argparse import os import sys from pathlib import Path import httpx _VALID_BACKENDS = {"local", "claude", "foundry"} def default_screenpipe_probe(config): sp = config.get("screenpipe", {}) url = sp.get("url", "http://localhost:3030") token = sp.get("token") or os.environ.get("SCREENPIPE_TOKEN") ...
109
3,501
scientific-agent-skills
skills/autoskill/scripts/redact.py
.py
import re # Order matters: multi-line and prefixed patterns run before narrower ones. _PATTERNS = [ (re.compile(r"-----BEGIN [A-Z ]+PRIVATE KEY-----[\s\S]*?-----END [A-Z ]+PRIVATE KEY-----"), "[REDACTED:private_key]"), # Known-env-var secret assignments: NAME=value (catches long values only) (re.com...
41
1,634
scientific-agent-skills
skills/geniml/scripts/bed_validator.py
.py
#!/usr/bin/env python3 """Validate one local BED file and emit a non-mutating normalization plan.""" from __future__ import annotations import argparse import re import sys from collections import Counter from pathlib import Path from _common import ( HARD_MAX_BYTES, HARD_MAX_RECORDS, MAX_COORDINATE, ...
364
11,186
scientific-agent-skills
skills/geniml/scripts/_common.py
.py
#!/usr/bin/env python3 """Shared, dependency-free safety helpers for local Geniml skill CLIs.""" from __future__ import annotations import csv import gzip import hashlib import io import json import os import re import stat import sys from pathlib import Path from typing import Any, Iterator HARD_MAX_FILES = 100_00...
400
13,387
scientific-agent-skills
skills/geniml/scripts/corpus_auditor.py
.py
#!/usr/bin/env python3 """Audit a local interval manifest without exposing sample metadata values.""" from __future__ import annotations import argparse import sys from collections import Counter, defaultdict from pathlib import Path from _common import ( HARD_MAX_BYTES, HARD_MAX_FILES, SafetyError, ...
305
10,637
scientific-agent-skills
skills/geniml/scripts/tokenizer_compatibility.py
.py
#!/usr/bin/env python3 """Plan local tokenizer/universe/model compatibility checks without imports.""" from __future__ import annotations import argparse import os import stat import sys from collections import Counter from pathlib import Path from _common import ( HARD_MAX_BYTES, HARD_MAX_RECORDS, MAX_C...
322
10,994
scientific-agent-skills
skills/geniml/scripts/embedding_plan.py
.py
#!/usr/bin/env python3 """Plan a bounded local Geniml embedding run without importing ML packages.""" from __future__ import annotations import argparse import os import stat import sys from collections import Counter from pathlib import Path from _common import ( HARD_MAX_BYTES, HARD_MAX_EPOCHS, HARD_MA...
477
17,044
scientific-agent-skills
skills/geniml/scripts/model_artifact_inspector.py
.py
#!/usr/bin/env python3 """Inspect local model artifacts and checksums without deserialization.""" from __future__ import annotations import argparse import json import os import re import sys from collections import Counter from pathlib import Path from _common import ( HARD_MAX_BYTES, HARD_MAX_FILES, Sa...
359
12,111
scientific-agent-skills
skills/geniml/scripts/consensus_plan.py
.py
#!/usr/bin/env python3 """Create a bounded, local-only Geniml consensus-universe execution plan.""" from __future__ import annotations import argparse import re import sys from collections import Counter from pathlib import Path from _common import ( HARD_MAX_BYTES, HARD_MAX_FILES, SafetyError, add_p...
417
14,245
scientific-agent-skills
skills/arboreto/scripts/basic_grn_inference.py
.py
#!/usr/bin/env python3 """ Basic GRN inference example using Arboreto. This script demonstrates the standard workflow for inferring gene regulatory networks from expression data using GRNBoost2. Usage: python basic_grn_inference.py <expression_file> <output_file> [--tf-file TF_FILE] [--seed SEED] [--limit LIMIT] ...
108
3,318
scientific-agent-skills
skills/labarchive-integration/scripts/setup_config.py
.py
#!/usr/bin/env python3 """Validate LabArchives regional endpoints and named environment variables. This utility never reads .env files, writes configuration, authenticates, or prints credential values. """ from __future__ import annotations import argparse import getpass import json import os import sys from collect...
259
8,570
scientific-agent-skills
skills/labarchive-integration/scripts/entry_operations.py
.py
#!/usr/bin/env python3 """Offline LabArchives request-signing helpers and redacted request plans. The CLI performs no network requests and never prints credentials or reusable signatures. Import the functions into institution-reviewed HTTP code when needed, and pass returned authentication material directly to the cli...
382
12,784
scientific-agent-skills
skills/labarchive-integration/scripts/notebook_operations.py
.py
#!/usr/bin/env python3 """Safely inspect a local LabArchives LA container ZIP without extracting it. An LA container is an attachment packaging format with lamanifest.xml. It is not a notebook backup. This script performs no network or remote write. """ from __future__ import annotations import argparse import json ...
452
15,659
scientific-agent-skills
skills/hugging-science/scripts/fetch_catalog.py
.py
#!/usr/bin/env python3 """ Fetch and parse content from the Hugging Science catalog (huggingscience.co). The catalog ships LLM-friendly markdown at three endpoints: - https://huggingscience.co/llms.txt (compact index) - https://huggingscience.co/llms-full.txt (every entry, every domain) - https://huggin...
359
13,350
scientific-agent-skills
skills/pufferlib/scripts/benchmark_vectorization.py
.py
#!/usr/bin/env python3 """Bounded synthetic vectorization benchmark with no PufferLib import.""" from __future__ import annotations import argparse import multiprocessing as mp import os import platform import statistics import time from typing import Any try: from ._common import UserInputError, bounded_int, em...
245
8,332
scientific-agent-skills
skills/pufferlib/scripts/validate_plan.py
.py
#!/usr/bin/env python3 """Strict, dependency-free validator for PufferLib training plans.""" from __future__ import annotations import argparse import copy import re from typing import Any try: from ._common import ( LOGGER_CREDENTIAL_ENV, MAX_ENVS, MAX_EVAL_EPISODES, MAX_STEPS, ...
571
18,466
scientific-agent-skills
skills/pufferlib/scripts/_common.py
.py
#!/usr/bin/env python3 """Shared safety and strict-JSON helpers for bundled PufferLib CLIs.""" from __future__ import annotations import json import math import re from pathlib import Path from typing import Any MAX_JSON_BYTES = 1_048_576 MAX_STEPS = 1_000_000_000 MAX_ENVS = 65_536 MAX_WORKERS = 256 MAX_EVAL_EPISODE...
200
6,668
scientific-agent-skills
skills/pufferlib/scripts/env_contract_validator.py
.py
#!/usr/bin/env python3 """Validate a built-in synthetic environment without importing plug-ins.""" from __future__ import annotations import argparse import math import random from typing import Any try: from ._common import UserInputError, bounded_int, emit_json from .env_template import SyntheticGymEnv exc...
199
6,892
scientific-agent-skills
skills/pufferlib/scripts/inspect_checkpoint.py
.py
#!/usr/bin/env python3 """Inspect checkpoint file metadata without deserializing checkpoint contents.""" from __future__ import annotations import argparse import hashlib import os import stat from pathlib import Path from typing import Any, BinaryIO try: from ._common import ( UserInputError, bo...
226
6,832
scientific-agent-skills
skills/pufferlib/scripts/train_template.py
.py
#!/usr/bin/env python3 """Safe PufferLib training-plan template. This script never imports PufferLib, starts training, loads checkpoints, uses a GPU, or contacts an external logger. It emits a validated argv preview for a human to review in an appropriately sandboxed, pinned environment. """ from __future__ import an...
283
9,975
scientific-agent-skills
skills/pufferlib/scripts/repro_plan.py
.py
#!/usr/bin/env python3 """Generate a bounded reproducibility and held-out evaluation plan.""" from __future__ import annotations import argparse from typing import Any try: from ._common import ( SOURCE_4_COMMIT, STABLE_SDIST_SHA256, UserInputError, bounded_int, emit_json,...
178
6,027
scientific-agent-skills
skills/pufferlib/scripts/env_template.py
.py
#!/usr/bin/env python3 """Dependency-free synthetic Gymnasium-style environment template. This module is intentionally local and synthetic. It does not import PufferLib, Gymnasium, environment plug-ins, native extensions, or ROMs. Port the contract to a separately reviewed Gymnasium or PufferLib environment only after...
211
7,251
scientific-agent-skills
skills/genomic-coordinates/scripts/check_contigs.py
.py
#!/usr/bin/env python3 """Identify the assembly behind a file, and check that two files can be joined. The two ways a genomics pipeline produces confident nonsense are a chr-prefix mismatch (the join returns nothing, or worse, returns only the contigs that happen to agree) and an assembly mismatch (the join succeeds a...
383
16,049
scientific-agent-skills
skills/genomic-coordinates/scripts/normalize_variant.py
.py
#!/usr/bin/env python3 """Normalise VCF-style variants: check REF, trim, and left-align. Two variant records can describe exactly the same change to the genome and share no field values at all. Comparing, joining, or deduplicating variants without normalising first silently loses real matches. This implements the pars...
291
9,962
scientific-agent-skills
skills/genomic-coordinates/scripts/_common.py
.py
"""Shared helpers for the genomic-coordinates scripts. Everything here is standard library only. The single organising idea is that all intervals are converted to one canonical form on the way in and back out again on the way out, so no script ever has to reason about two conventions at once. Canonical form: ``(start...
336
13,550
scientific-agent-skills
skills/genomic-coordinates/scripts/audit_intervals.py
.py
#!/usr/bin/env python3 """Check an interval or variant file against its own format's conventions. A BED file holding 1-based coordinates parses cleanly, sorts cleanly, and intersects cleanly. Nothing downstream complains; every result is shifted by one base. These checks look for the evidence that survives that kind o...
512
19,077
scientific-agent-skills
skills/genomic-coordinates/scripts/convert_coords.py
.py
#!/usr/bin/env python3 """Convert intervals between genomic coordinate conventions. Every conversion goes through one canonical form (0-based half-open), so the answer never depends on remembering which pair of formats is involved. python3 convert_coords.py --from bed --to gff chr1 999 1000 python3 convert_co...
181
6,618
scientific-agent-skills
skills/neuropixels-analysis/scripts/compute_metrics.py
.py
#!/usr/bin/env python """ Compute quality metrics and curate units. Usage: python compute_metrics.py sorting/ preprocessed/ --output metrics/ """ import argparse from pathlib import Path import json import pandas as pd import spikeinterface.full as si # Curation criteria presets. snr and presence_ratio are min...
183
5,588
scientific-agent-skills
skills/neuropixels-analysis/scripts/neuropixels_pipeline.py
.py
#!/usr/bin/env python3 """ Neuropixels Data Analysis Pipeline (Best Practices Version) Based on SpikeInterface, Allen Institute, and IBL recommendations. Usage: python neuropixels_pipeline.py /path/to/spikeglx/data /path/to/output References: - https://spikeinterface.readthedocs.io/en/stable/how_to/analyze_n...
443
13,808
scientific-agent-skills
skills/neuropixels-analysis/scripts/preprocess_recording.py
.py
#!/usr/bin/env python """ Preprocess Neuropixels recording. Usage: python preprocess_recording.py /path/to/data --output preprocessed/ --format spikeglx """ import argparse from pathlib import Path import spikeinterface.full as si def preprocess_recording( input_path: str, output_dir: str, format: ...
123
4,279
scientific-agent-skills
skills/neuropixels-analysis/scripts/run_sorting.py
.py
#!/usr/bin/env python """ Run spike sorting on preprocessed recording. Usage: python run_sorting.py preprocessed/ --sorter kilosort4 --output sorting/ """ import argparse from pathlib import Path import spikeinterface.full as si # Default parameters for each sorter SORTER_DEFAULTS = { 'kilosort4': { ...
99
2,573
scientific-agent-skills
skills/neuropixels-analysis/scripts/export_to_phy.py
.py
#!/usr/bin/env python """ Export sorting results to Phy for manual curation. Usage: python export_to_phy.py metrics/analyzer --output phy_export/ """ import argparse from pathlib import Path import spikeinterface.full as si from spikeinterface.exporters import export_to_phy def export_phy( analyzer_path: s...
80
2,477
scientific-agent-skills
skills/neuropixels-analysis/scripts/explore_recording.py
.py
#!/usr/bin/env python3 """ Quick exploration of Neuropixels recording. Usage: python explore_recording.py /path/to/spikeglx/data """ import argparse import spikeinterface.full as si import matplotlib.pyplot as plt import numpy as np def explore_recording(data_path: str, stream_name: str = 'imec0.ap'): """Ex...
169
5,553
scientific-agent-skills
skills/neuropixels-analysis/assets/analysis_template.py
.py
#!/usr/bin/env python """ Neuropixels Analysis Template Complete analysis workflow from raw data to curated units. Copy and customize this template for your analysis. Usage: 1. Copy this file to your analysis directory 2. Update the PARAMETERS section 3. Run: python analysis_template.py """ # ===========...
272
9,009
scientific-agent-skills
skills/imaging-data-commons/scripts/check_version.py
.py
#!/usr/bin/env python3 """Check the idc-index package and this skill for required/available updates. Run FIRST at the start of an IDC session: python scripts/check_version.py - Verifies that idc-index is installed and at least MIN_VERSION. It never installs or upgrades anything itself: if the requirement is not me...
133
5,381
scientific-agent-skills
skills/scientific-writing/scripts/select_reporting_guidelines.py
.py
"""Select reporting guidance and check non-scoring coverage metadata.""" from __future__ import annotations import argparse from pathlib import Path from typing import Any from _common import ( InputError, Issue, emit_report, is_nonempty_string, issue, read_json, require_list, require...
215
7,580
scientific-agent-skills
skills/scientific-writing/scripts/validate_manifest.py
.py
"""Validate bounded manuscript and source manifests without network access.""" from __future__ import annotations import argparse import re from typing import Any from _common import ( InputError, Issue, emit_report, is_nonempty_string, is_placeholder, issue, read_json, require_list, ...
461
14,514
scientific-agent-skills
skills/scientific-writing/scripts/check_consistency.py
.py
"""Check numeric and methods-results consistency in a bounded JSON registry.""" from __future__ import annotations import argparse import math import re from typing import Any from _common import ( InputError, Issue, emit_report, is_nonempty_string, is_placeholder, issue, read_json, r...
409
14,209
scientific-agent-skills
skills/scientific-writing/scripts/_common.py
.py
"""Shared, dependency-free safety helpers for scientific-writing CLIs.""" from __future__ import annotations import csv import io import json import sys from collections.abc import Iterable from dataclasses import asdict, dataclass from pathlib import Path from typing import Any MAX_FILE_BYTES = 5_000_000 MAX_RECORD...
241
7,670
scientific-agent-skills
skills/scientific-writing/scripts/lint_manuscript.py
.py
"""Lint manuscript Markdown for placeholders, language risks, and sensitive content.""" from __future__ import annotations import argparse import re from typing import Any from _common import ( Issue, emit_report, issue, read_json, read_text, require_object, run, ) TOOL = "lint_manuscrip...
172
5,881
scientific-agent-skills
skills/scientific-writing/scripts/validate_authorship.py
.py
"""Validate human authorship, CRediT roles, accountability, and AI disclosure.""" from __future__ import annotations import argparse import re from typing import Any from _common import ( InputError, Issue, emit_report, is_nonempty_string, is_placeholder, issue, read_json, require_lis...
323
11,498
scientific-agent-skills
skills/scientific-writing/scripts/scaffold_manuscript.py
.py
"""Generate a local, explicitly incomplete manuscript workspace.""" from __future__ import annotations import argparse import json import re from pathlib import Path from typing import Any from _common import ( InputError, emit_report, read_json, read_text, require_object, run, write_new_...
144
4,328
scientific-agent-skills
skills/scientific-writing/scripts/audit_claims.py
.py
"""Audit claim-to-evidence mappings and local citation markers.""" from __future__ import annotations import argparse import re from typing import Any from _common import ( InputError, Issue, emit_report, is_nonempty_string, issue, read_csv, read_json, read_text, require_list, ...
242
8,834
scientific-agent-skills
skills/scientific-writing/scripts/check_references.py
.py
"""Check local reference identifiers and duplicates without resolving them.""" from __future__ import annotations import argparse import re import unicodedata from typing import Any from _common import ( InputError, Issue, emit_report, is_nonempty_string, issue, read_json, require_list, ...
220
7,075
scientific-agent-skills
skills/exa-search/scripts/exa_extract.py
.py
#!/usr/bin/env python3 # /// script # requires-python = ">=3.11" # dependencies = ["exa-py>=1.14.0"] # /// """Fetch and extract content from URLs using Exa's /contents endpoint. Example: uv run exa_extract.py \\ https://arxiv.org/abs/2401.04088 \\ https://www.nature.com/articles/s41586-024-07566-y ...
118
3,529