Move files

This commit is contained in:
Andras Schmelczer 2022-07-04 19:31:15 +02:00
parent 3cf28379e8
commit 00cc8225c5
159 changed files with 31 additions and 49 deletions

View file

@ -0,0 +1,17 @@
from typing import Iterable, List, TypeVar
T = TypeVar("T")
def chunk(values: Iterable[T], chunk_size: int) -> Iterable[T]:
assert chunk_size >= 1
result: List[T] = []
for v in values:
result.append(v)
if len(result) == chunk_size:
yield result
result = []
if len(result) > 0:
yield result