mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-24 13:24:05 -06:00
391 B
391 B
#code
import multiprocessing, tqdm # for loading bar-
collect_results = []
def replicate(input): # do the thing return thing
for x in tqdm(pool.imap(replicate, enumerate(vector)), total=len(vector)): collect_results.append(x)
pool.close() pool.join()
-
- this also shows a nice loading bar showing your progress, and maintains the order of the original input.