MCPcopy Create free account
hub / github.com/BIT-DataLab/LakeBench / split_list

Function split_list

join/LSH/LSH_benchmark_os.py:92–106  ·  view source on GitHub ↗
(lst, num_parts)

Source from the content-addressed store, hash-verified

90
91
92def split_list(lst, num_parts):
93 avg = len(lst) // num_parts
94 remainder = len(lst) % num_parts
95
96 result = []
97 start = 0
98 for i in range(num_parts):
99 if i < remainder:
100 end = start + avg + 1
101 else:
102 end = start + avg
103 result.append(lst[start:end])
104 start = end
105
106 return result
107
108
109def _hash_32(d):

Callers 2

bootstrap_index_setsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected