I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
Similar to mpipe, this short module lets you string together tasks so that they are executed in parallel.
The difference is that it lets you use generators, functions which yield results instead of returning them. Each yielded item gets passed to the next stage.
You can specify that one or more copies of the workers operate on the input queue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Helper script to properly merge two one-sided scans of a PDF, | |
# where the odd-numbered pages are scanned in order but the | |
# even-numbered pages are scanned in reverse order. | |
# | |
# Requires PyPDF2 ('pip install PyPDF2') | |
# | |
# Input PDFs should be named the same thing, with _odd and _even as | |
# suffixes to the filename (e.g., doc_odd.pdf and doc_even.pdf). | |
# Pass the base filename into the script, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.