← Về thư mục
skills/neurokit2/scripts/_common.py
- CliError · class · L30-L31 — class CliError(ValueError)
- _reject_constant · function · L34-L35 — def _reject_constant(value: str) -> None
- _unique_object · function · L38-L44 — def _unique_object(pairs: list[tuple[str, Any]]) -> dict[str, Any]
- _reject_url · function · L47-L54 — def _reject_url(value: str) -> None
- _absolute_lexical · function · L57-L58 — def _absolute_lexical(path: Path) -> Path
- _reject_symlink_components · function · L61-L72 — def _reject_symlink_components(path: Path) -> None
- checked_root · function · L75-L91 — def checked_root(value: str | os.PathLike[str]) -> Path
- _within_root · function · L94-L98 — def _within_root(candidate: Path, root: Path) -> None
- _suffix_matches · function · L101-L103 — def _suffix_matches(path: Path, suffixes: Iterable[str]) -> bool
- checked_input_file · function · L106-L140 — def checked_input_file( value: str | os.PathLike[str], *, root: str | os.PathLike[str] = ".", suffixes: Iterable[str], max_bytes: int, ) -> Path
- checked_output_file · function · L143-L181 — def checked_output_file( value: str | os.PathLike[str], *, root: str | os.PathLike[str] = ".", suffixes: Iterable[str], force: bool = False, ) -> Path
- atomic_write_bytes · function · L184-L218 — def atomic_write_bytes( destination: str | os.PathLike[str], payload: bytes, *, root: str | os.PathLike[str] = ".", suffixes: Iterable[str], force: bool = False, ) -> Path
- strict_json_bytes · function · L221-L239 — def strict_json_bytes(document: Any) -> bytes
- emit_json · function · L242-L261 — def emit_json( document: Any, *, output: str | os.PathLike[str] | None = None, root: str | os.PathLike[str] = ".", force: bool = False, ) -> None
- load_json_object · function · L264-L291 — def load_json_object( value: str | os.PathLike[str], *, root: str | os.PathLike[str] = ".", max_bytes: int = MAX_JSON_BYTES, ) -> dict[str, Any]
- validate_keys · function · L294-L308 — def validate_keys( value: Mapping[str, Any], *, allowed: Iterable[str], required: Iterable[str] = (), context: str, ) -> None
- bounded_int · function · L311-L322 — def bounded_int( value: Any, *, name: str, minimum: int, maximum: int, ) -> int
- finite_float · function · L325-L341 — def finite_float( value: Any, *, name: str, minimum: float | None = None, maximum: float | None = None, ) -> float
- parse_name_list · function · L344-L352 — def parse_name_list(value: str | None, *, name: str) -> list[str]
- require_deidentified · function · L355-L360 — def require_deidentified(confirmed: bool) -> None
- _read_header · function · L363-L375 — def _read_header(reader: Any) -> list[str]
- read_numeric_columns · function · L378-L446 — def read_numeric_columns( path: Path, columns: Sequence[str], *, max_rows: int = MAX_ROWS, allow_missing: bool = False, ) -> tuple[dict[str, list[float | None]], list[str], int]
- _format_csv_value · function · L449-L468 — def _format_csv_value(value: Any) -> str
- csv_bytes · function · L471-L496 — def csv_bytes(columns: Sequence[str], rows: Iterable[Sequence[Any]]) -> bytes
- write_csv · function · L499-L515 — def write_csv( destination: str | os.PathLike[str], columns: Sequence[str], rows: Iterable[Sequence[Any]], *, root: str | os.PathLike[str] = ".", force: bool = False, ) -> bytes
- sha256_bytes · function · L518-L519 — def sha256_bytes(payload: bytes) -> str
- json_number · function · L522-L536 — def json_number(value: Any) -> float | int | None
- dataframe_rows · function · L539-L542 — def dataframe_rows(frame: Any) -> Iterable[Sequence[Any]]
- run_cli · function · L545-L567 — def run_cli(function: Any) -> int