Skip to Content
0 likes
Audit Rejected CSV Rows and Reconcile Every Input Record Level: Intermediate

Validate a defined spreadsheet-export contract, record rejected rows with reasons and line ranges, and reconcile accepted and rejected outputs without changing the source.

0 likes
Running Many Requests at Once With asyncio.gather Level: Advanced

asyncio.gather runs many waiting tasks at once in one thread and returns results in order. Avoid await in a loop and blocking calls, keep failures with return_exceptions=True, and limit concurrency with a Semaphore.

0 likes
Finding Files in Python With pathlib glob and rglob Level: Intermediate

glob() searches one folder, rglob() searches every folder below it. Neither sorts the results, skips folders like .venv, or matches .CSV on Linux. Add those yourself, and always do a dry run before deleting anything.

0 likes
Reading a Large Text File in Python Line by Line Level: Intermediate

for line in file reads one line at a time, so a 10 GB file uses almost no memory. read() and readlines() load everything. Count, filter and stop early without building a list, and read in blocks when there are no lines.

0 likes
Speeding Up Many Downloads in Python With ThreadPoolExecutor Level: Advanced

Downloads spend most of their time waiting. ThreadPoolExecutor lets many waits overlap: 20 half-second downloads in 2 seconds instead of 10. Handle failures with as_completed, pick a sensible worker count and respect the server.

0 likes
Process a Large CSV in Node.js With Streams Level: Advanced

Read a CSV too big for memory line by line with readline, total a column, and write a filtered copy with pipeline. Memory stays flat no matter how big the file is.