We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runs in 3.3077sec, but I also train a CV model, so my machine is a bit busy.
import glob import time from multiprocessing import Pool start = time.time() files = glob.glob("./data/*.csv") out = open("out.csv", "w") def process(idx, src): with open(src, 'r') as in_file: if idx > 0: # Skip the header next(in_file) for line in in_file: out.write(line) pool = Pool(processes=20) for idx, f in enumerate(files): pool.apply_async( process, args=(idx, f) ) pool.close() pool.join() out.close() end = time.time() print(end - start)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Runs in 3.3077sec, but I also train a CV model, so my machine is a bit busy.
The text was updated successfully, but these errors were encountered: