Skip to content

certbot and tinydns

Let's Encrypt now supports wildcard certificates. To confirm DNS control, they support several different DNS providers and dynamic DNS protocols, but they don't yet have a plugin for tinydns by DJ Bernstein.

Luckily, the excellent designs of both certbot and tinydns make it very easy to support on your own.

Continue reading "certbot and tinydns"

von Neumann's 4-player {1/3, 1/3, -1/3, -1/3} imputation

In Theory of Games and Economic Behavior, von Neumann discusses solutions to some kinds of zero-sum four-person games. See section 37.4.2, page 317. There, he finds that one set of imputations is incomplete, and must have at least another imputation added to it. He writes that [it] seems very difficult to find a heuristic motivation for the steps which are now necessary before giving the imputation as:

\begin{equation} \vec a^{IV} = \left\{1/3, 1/3, -1/3, -1/3\right\} \end{equation}

The situation is unusual in that the first three players have formed a coalition against the fourth. So, why does the third player have the same loss as the fourth? This is the heuristic that von Neumann didn’t provide, and he concludes by saying only that [if] a common-sense interpretation of this solution… is wanted, … it seems to be some kind of compromise between a part (two members) of a possible victorious coalition and the other two players.

However, there’s an intriguing possibility.

Continue reading "von Neumann's 4-player {1/3, 1/3, -1/3, -1/3} imputation"

Exponential Moving Average (EMA) Rates, part 2

In the last post, we simulated some Poisson data and then verified it by looking at its histogram and some descriptive statistics. We also built a basic sliding-window implementation and graphed its output.

To continue on, we’ll need to build a more realistic implementation, along with a method to feed it the simulated events. With that in hand, we’ll build an EMA function specialized for Poisson events.

Continue reading "Exponential Moving Average (EMA) Rates, part 2"

Exponential Moving Average (EMA) Rates, part 1

I had been thinking about determining the average rate of occurrences over time of some observation. For example, you might like to measure how much traffic flows through a street throughout the day. Reporting the time that every single car goes by is very accurate, but not very useful. You might bin traffic into hours starting on every hour, but if there is a spike or sudden increase in the middle of an hour you might miss its significance. So, you'd like to see a graph that's smooth like an average but with more detail in time.

One approach is similar to the binning approach, but slide the hour-long window across the data by minutes. Doing this requires keeping the data around, and using each data point repeatedly. If you have a surge of one million cars in a few minutes, you need to use those million points in your calculations 60 times.

This behavior is similar to the Simple Moving Average (SMA). A SMA can easily be transformed into an Exponential Moving Average, which requires only the previous EMA and the new data point to calculate the new EMA. So, I decided to create an Exponential Moving Average Rate (EMAR).

Continue reading "Exponential Moving Average (EMA) Rates, part 1"