Use os.walk to enumerate every file under a path.
All snippets
The latest code snippets.
Sort a list of dicts by a key with sorted() + itemgetter for speed.
Use named groups with the re stdlib and access them via groupdict().
Use hashlib to compute a SHA256 hex digest.
Round-trip JSON with the json stdlib module.
GET a URL with the requests library and raise on non-2xx.
Open a file for writing and emit a few lines.
Iterate a text file lazily with a context manager.
Declare commands and flags with yargs in a Node script.
Issue several HTTP requests in parallel with Promise.all.