Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Activity for Patol75
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Answer | — |
A: Convert .npy files in a directory to images (.png) A possible parallel solution using `imageio`: ``` from imageio import imwrite from multiprocessing import Pool from numpy import load from pathlib import Path def npy2png(npyFile): imwrite(npyFile.stem + '.png', load(npyFile)) rootPath = Path('/path/to/Maindir') if name == 'main'... (more) |
— | about 3 years ago |
Answer | — |
A: Python Regex to parse multiple "word. word. word." As @ArtOfCode mentioned, it is not fully clear what you are trying to match. From the first line in your post, you are trying to extract `THIS. THAT.` out of `THIS. THAT..OTHER `. The following regex achieves it: ``` >>> re.search('([A-Z]+\.\s?)+', 'THIS. THAT..OTHER ') ``` However, from y... (more) |
— | about 3 years ago |