I operate from the Netherlands and that makes my time zone Central European Summer Time (CEST). The data I handle is usually stored in UTC time. Whenever I need to crunch some data with Spark I struggle to do the right date conversion, especially around summer or winter time (do I need to add 1 or 2 hours?). In this blog, I’ll show how to handle these time zones properly in PySpark.
At Wehkamp, we use Google Analytics extensively to measure how many users are active. It is hard to correlate active users with your other statistics that “live” in Prometheus. In this blog I’ll show how you can use the Google Real Time API to produce statistics for active users, page views and screen views.
Sometimes you just need to record the original message that was submitted to your API. My colleague Onno Pierik and I encountered such an event. We needed to record the original submitted SOAP message (body) and submit it (under certain conditions) to another service. To be honest: most of the scenarios I’ve seen so far end up with memory problems, so use with caution!
To make a setup more resilient we could allow for actions to be retried when they fail. We should not “hammer” our underlaying systems, so it is wise to wait a bit before retrying (exponential backoff). Let’s see how something like this could be done in Python. Note: this only works if actions are idempotent and you can afford to wait.
A Table of Contents helps users navigate (long) blog posts. I use them on both posts and post. The desktop version always shows the table on the right side in the sidebar (using a text-widget with a shortcode). On mobile, I’ll only show it on long articles, using a shortcode under the first paragraph.
Recently, I worked on my theme for KeesTalksTech. To gain performance, I need to rely less on plugins, that’s why I needed a simple way to show small lists of posts in my sidebar.
I’ve created 2 short codes: one that shows recent posts, used in the new section and one that shows specific posts, used in the highlights section.