Plurrrr

week 16, 2020

Building Finite State Machines with Python Coroutines

Finite State Machine is a mathematical model of computation that models a sequential logic. FSM consists of a finite number of states, transition functions, input alphabets, a start state and end state(s). In the field of computer science, the FSMs are used in designing Compilers, Linguistics Processing, Step workflows, Game Design, Protocols Procedures (like TCP/IP), Event-driven programming, Conversational AI and many more.

Source: Building Finite State Machines with Python Coroutines, an article by Arpit Bhayani.

Elfeed with Tiny Tiny RSS

If you have multiple computers and you subscribe to RSS feeds - which you probably do, it would be great if you could read the feeds from all your computers and have the feeds’ read state synchronized.

Tiny Tiny RSS runs on a server, aggregates your feeds, shows them with a web interface and exposes API for clients - such as elfeed - to consume.

Source: Elfeed with Tiny Tiny RSS.

Masked Prey

The daughter of a U.S. Senator is monitoring her social media presence when she finds a picture of herself on a strange blog. And there are other pictures . . . of the children of other influential Washington politicians, walking or standing outside their schools, each identified by name. Surrounding the photos are texts of vicious political rants from a motley variety of radical groups.

It's obviously alarming--is there an unstable extremist tracking the loved ones of powerful politicians with deadly intent? But when the FBI is called in, there isn't much the feds can do. The anonymous photographer can't be pinned down to one location or IP address, and more importantly, at least to the paper-processing bureaucrats, no crime has actually been committed. With nowhere else to turn, influential Senators decide to call in someone who can operate outside the FBI's constraints: Lucas Davenport.

In the afternoon I started in Masked Prey, the 30th Prey novel by John Sandford. As I have enjoyed the other books in the series a lot I expect another great.

Raku vs. Perl – save 70%

Having hit rock bottom with an ‘I can’t understand my own code sufficiently enough to extend/maintain it’, I have been on a journey to review the perl5 Physics::Unit design and to use this to cut through my self made mess of raku Physics::Unit version 0.0.2.

Source: Raku vs. Perl – save 70%.

Real sysadmins don't sudo

A few months ago, I read a very interesting article that contained some good information about a Linux feature that I wanted to learn more about. I won’t tell you the name of the article, what it was about, or even the web site on which I read it, but the article just made me shudder.

The reason I found this article so cringe-worthy is that it prefaced every command with the sudo command. The issue I have with this is that the article is allegedly for sysadmins, and real sysadmins don’t use sudo in front of every command they issue. To do so is a gross misuse of the sudo command. I have written about this type of misuse in my book, “The Linux Philosophy for SysAdmins.” The following is an excerpt from Chapter 19 of that book.

Source: Real sysadmins don't sudo, an article by David Both.

dotfiles - Document and automate your Macbook setup

Then I learned that users share their configuration and setup commands in a Git repository which is called “dotfiles”. At first glance, a dotfile is a hidden file on a Linux/Unix system, containing tool specific settings. Common tools are Git, vim, bash storing their configuration in a dotfile in the user’s home directory. These dotfiles were enriched with scripts to install additional software via package managers, and to apply certain runtime configuration after the work environment was setup the first time

Source: dotfiles - Document and automate your Macbook setup, an article by Michael Friedrich.

Is Haskell a Bad Choice?

To save you some time I will give some reasons to immediately close this tab in your browser.

  • This post is about making a management decision to use Haskell
  • This post is not about any technical accomplishments with Haskell
  • This post does not actually conclude that Haskell is a bad choice

Otherwise, I hope what I have laid out below serves as a good view into a non-software company up in Alaska using Haskell to develop applications with.

Source: Is Haskell a Bad Choice?, an article by Brian Jones.

Psalmopoeus irminia feeding

Just after 5PM I handed a fresh mealworm pupa, Tenebrio molitor, to the Psalmopoeus irminia I keep since the 7th of April. Instead of grabbing the pupa and disappearing in a flash as on a previous occasion it stuck around long enough to take some photos.

Psalmopoeus irminia with mealworm pupa
Psalmopoeus irminia with mealworm pupa; Tenebrio molitor.

It currently has turned the end of a cork tube, which I closed with some dry moss, into its hiding place. While this makes for easy feeding it also makes for an easy escape, as its near the top of the terrarium. And in my experience, this specimen can move very fast; so I have to be careful.

Psalmopoeus irminia terrarium
Psalmopoeus irminia terrarium.

In the above photo you can see the end of the cork tube on the left. The plants are fake, but the dry moss is real. I like this set up a lot.

Pandas Pivot — The Ultimate Guide

Pandas pivot is an essential tool of every Data Scientist. Some use it daily and others avoid it because it seems complex. I was in the latter group for quite a while. After I took the time and did some research, I felt like I wasted a lot of time writing unnecessary code. To my surprise, I already knew the main building blocks of pandas. It is all simpler than it may seem.

Source: Pandas Pivot — The Ultimate Guide, an article by Roman Orac.

When to Mock

The use of mocks in unit testing is a controversial topic (maybe less so now than several years ago). I remember how, throughout my programming career, I went from mocking almost every dependency, to the "no-mocks" policy, and then to "only mock external dependencies".

None of this practices are good enough. In this article, I’ll show you which dependencies to mock, and which to use as is in your tests.

Source: When to Mock, an article by Vladimir Khorikov.

DIY Single Sign-On for SSH

In this post we're going to set up Google single sign-on for SSH. Behind the scenes, we'll use OpenID Connect (OIDC), short-lived SSH certificates, a couple of clever SSH configuration tweaks, and Smallstep's open-source step-ca and step packages. We will set up an SSH Certificate Authority, and use it to bootstrap a new host and a new user in our system. While this approach requires more up-front work than a typical SSH public/private key setup, it comes with a lot of benefits beyond single sign-on. It eliminates the need for gathering and shipping and managing authorized_keys files.

Source: DIY Single Sign-On for SSH, an article by Carl Tashian.

Debugging with Delve

I admit that I’d only used a debugger for Go a couple of times; up until now all my debugging involved writing a new test, or multiple fmt.Printf statements. This past weekend I decided to finally learn how to use Delve.

Source: Debugging with Delve, an article by Paschalis Tsilias.

Resample and Interpolate time series data

Resampling is a method of frequency conversion of time series data. You can use resample function to convert your data into the desired frequency.

Generally, the data is not always as good as we expect. For example: The data coming from a sensor is captured in irregular intervals because of latency or any other external factors

In order to work with a time series data the basic pre-requisite is that the data should be in a specific interval size like hourly, daily, monthly etc.

In this post we are going to explore the resample method and different ways to interpolate the missing values created by Downsampling or Upsampling of the data

Source: Resample and Interpolate time series data.

Pocket Guide to Writing SVG

Inline SVG refers to the embedded code written within HTML to generate these graphics in a browser, which will be the focus of this book.

There are many advantages to using SVG this way, including having access to all the graphic's individual parts for interactivity purposes, generating searchable text, DOM access for direct edits, and promoting user accessibility.

Source: Pocket Guide to Writing SVG by Joni Trythall.