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

Function split_list

join/Deepjoin/dataprocess/process_table_tosentence.py:158–172  ·  view source on GitHub ↗
(lst, num_parts)

Source from the content-addressed store, hash-verified

156 return elelist[-2] + "-" + elelist[-1]
157
158def split_list(lst, num_parts):
159 avg = len(lst) // num_parts
160 remainder = len(lst) % num_parts
161
162 result = []
163 start = 0
164 for i in range(num_parts):
165 if i < remainder:
166 end = start + avg + 1
167 else:
168 end = start + avg
169 result.append(lst[start:end])
170 start = end
171
172 return result
173
174def process_table_sentense(filepathstore,datadir,data_pkl_name,tmppath= "/data/lijiajun/webtable_tmp",split_num=10):
175

Callers 1

process_table_sentenseFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected