download
raw
390 Bytes
from itertools import *
# Python 3.12:
if "batched" not in globals():
# https://docs.python.org/3/library/itertools.html#itertools.batched
def batched(iterable, n):
# batched('ABCDEFG', 3) --> ABC DEF G
if n < 1:
raise ValueError("n must be at least one")
it = iter(iterable)
while batch := tuple(islice(it, n)):
yield batch

Xet Storage Details

Size:
390 Bytes
·
Xet hash:
549d9e7d865c9714c61771b12c87c4f319f9494c9c5376d315597bbafcc5d597

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.