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

Function split_list

union/TUS/query.py:105–119  ·  view source on GitHub ↗
(lst, num_parts)

Source from the content-addressed store, hash-verified

103
104
105def split_list(lst, num_parts):
106 avg = len(lst) // num_parts
107 remainder = len(lst) % num_parts
108
109 result = []
110 start = 0
111 for i in range(num_parts):
112 if i < remainder:
113 end = start + avg + 1
114 else:
115 end = start + avg
116 result.append(lst[start:end])
117 start = end
118
119 return result
120
121def minhash_multi_process(folder_path, file_list, q, spl, id, n, type, t):
122 # print("{} start".format(id))

Callers 1

minhash_LshFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected