INNER CODE UNIT · Python

fng_global_pct

rfc-st/humble · humble.py:369

        fng_global_pct = round(count / fng_incl * 100, 2)
        fng_padding = " " * (max_ln_len - len(content))
        print(f" [{content}]: {fng_padding}{fng_global_pct:.2f}% ({count})")


def fng_statistics_term(fng_term):
    """Count fingerprint headers per provided term.

    Exit if no results are found, related to `-f` option.
    """
    print(
        f"\n{STYLE[0]}{get_detail('[fng_stats]', replace=True)}"
        f"{STYLE[4]}{get_detail('[fng_source]', replace=True)}\n",
    )
    fng_incl = PATHS["fingerprint_term"].read_text(encoding="utf8").splitlines(
        keepends=True,
    )[SLICE_INT[0]:]
    fng_groups, term_cnt = fng_statistics_term_groups(fng_incl, fng_term)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…