MCPcopy Index your code
hub / github.com/1Panel-dev/MaxKB / sub_array

Function sub_array

apps/common/utils/common.py:192–202  ·  view source on GitHub ↗
(array: List, item_num=10)

Source from the content-addressed store, hash-verified

190
191
192def sub_array(array: List, item_num=10):
193 result = []
194 temp = []
195 for item in array:
196 temp.append(item)
197 if len(temp) >= item_num:
198 result.append(temp)
199 temp = []
200 if len(temp) > 0:
201 result.append(temp)
202 return result
203
204
205def bytes_to_uploaded_file(file_bytes, file_name="file.txt"):

Callers 2

saveMethod · 0.90
batch_saveMethod · 0.90

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected