The code below is now maintained as a Python package, see https://github.com/kogens/spmpy for a more up to date version.
Requires Python >= 3.9 with numpy and pint for units,
optionally matplotlib for plotting examples below
| # Creates a diffraction grating for the Falstad ripple tank simulator | |
| # http://www.falstad.com/ripple/ | |
| # Basic parameters | |
| brightness = 480 | |
| scale = 1.5625e-8 | |
| resolution = 1020 | |
| print('$ 3 {} 64 0 1 {} {}'.format(resolution, brightness, scale)) |
The code below is now maintained as a Python package, see https://github.com/kogens/spmpy for a more up to date version.
Requires Python >= 3.9 with numpy and pint for units,
optionally matplotlib for plotting examples below
| """ | |
| Extract images from PDF files and decode any QR codes found. | |
| Requirements: | |
| > sudo apt install zbar-tools | |
| > pip install pandas[xlsxwriter] opencv-python pymupdf qrdet qreader tqdm | |
| See also the docs for the QR part | |
| https://github.com/Eric-Canas/qrdet | |
| https://github.com/Eric-Canas/qreader |
| """ | |
| Extract images from PDF files and decode any QR codes found. | |
| Requirements: | |
| > pip install pandas opencv-python pymupdf qrdet==1.10 qreader==2.11 tqdm xlsxwriter | |
| See also the docs for the QR part | |
| https://github.com/Eric-Canas/qrdet | |
| https://github.com/Eric-Canas/qreader | |
| """ |
| # See also https://superfastpython.com/threadpoolexecutor-in-python/ | |
| import pathlib | |
| from concurrent.futures import ThreadPoolExecutor, as_completed | |
| # Make a list of all excel files in a directory | |
| path = pathlib.Path('path/to/excel/files') | |
| file_list = path.glob('*.xls*') | |