def n_line(file):
    """ Return the number of lines for a file

    Args:
        file (str): File path

    Returns:
        int: number of lines
    """
    count = 0
    buffer = 16 * 1024 * 1024  # buffer=16MB
    with open(file, "rb") as inf:
        while True:
            block = inf.read(buffer)
            if not block:
                break
            count += block.count(b"\n")
    return count