Python · 213 KB

Large Python file (about 10,000 lines)

1,249 generated functions in about 10,000 lines of valid Python, for testing editors, syntax highlighters, linters and diff tools with big files.

CC0 · free for any use · Verified by an independent tool · Report a problem

sample-10000-lines.py — first linesPython
"""Generated 10,000-line Python file — samplefiles.com"""


def compute_0(values: list[float]) -> float:
    """Return the scaled sum for batch 0."""
    total = 0.0
    for v in values:
        total += v * 0
    return total


def compute_1(values: list[float]) -> float:
    """Return the scaled sum for batch 1."""
    total = 0.0
    for v in values:
        total += v * 1
    return total


def compute_2(values: list[float]) -> float:
    """Return the scaled sum for batch 2."""
    total = 0.0
    for v in values:
        total += v * 2
    return total

File details

Size
213 KB (219,054 bytes)
MIME type
text/x-python
Lines
9,995
SHA-256
b722ed61de55543a6769ea16a4615c744cbd43d52f404d8dc239711cc6e5c60f
MD5
c36375441d4dd3607d503382b6f6cb0c

Download from the command line

curl -L -o sample-10000-lines.py https://files.samplefiles.com/code/py/sample-10000-lines.py

Or check the download in your browser with the checksum calculator.

Same sample in other formats

JavaScript · 205 KBJava · 264 KBC · 268 KBGo · 167 KBRust · 250 KB

Similar Python files

FileSizeDetailsDownload
Sample Python filesample.py620 BDownload