Chapter 12 Alternate Example - Normalization and Decorators

In the forthcoming Functional Python Programming (https://www.packtpub.com/application-development/functional-python-programming) I was pressured by one of the technical reviewers to create a better example of composite function creation with decorators.

This was a difficult request. First, of course, "better" is poorly defined. More importantly, the example in the …

more ...





Apache Log Parsing

How much do I love Python? Consider this little snippet that parses Apache logs.

import re
from collections import defaultdict, named tuple

format_pat= re.compile(
   r"(?P<host>[\d\.]+)\s"
   r"(?P<identity>\S*)\s"
   r"(?P<user>\S*)\s"
   r"\[(?P<time>.*?)\]\s"
   r'"(?P<request>.*?)"\s'
   r"(?P …
more ...


Transformation Pipelines

My laptop chartplotter software (GPSNavX) is marvelous for visualizing a route. But, there are elements to route planning that it doesn't handle gracefully.

Specifically, it doesn't provide useful elapsed time calculation at all. While the TTG and ETA (Time to Go and Estimated Time of Arrival) for the next waypoint …

more ...