NNoghartt's garden
noghartt / til

Today I learned

I was running my Forester⁠ setup locally, found a specific way to expose an HTTP server easily in Python:

python3 -m http.server <port> -d <directory>

This command starts an HTTP server on the specified port and serves files from the specified directory.

The Bayes’ rule is a fundamental theorem in probability theory which describes the probability of a given event based on a prior knowledge of the conditions that might be related to the event.

P(A|B)=P(B|A)·P(A)P(B)

Where:

  • P(A|B) is the posterior probability of event A given event B.
  • P(B|A) is the likelihood of event B given event A.
  • P(A) is the prior probability of event A.
  • P(B) is the marginal probability of event B.

Skiplists

2025-04-20

Skiplist is a kind of probabilistic data structure that allows for fast search, insertion, and deletion operations. It’s basically a linked list with multiple levels of links, where each levels is a subset of the previous level.

It can be used to handle some operations at data level for databases, like handling LSM trees. Check more here⁠.