Docker is a modern technology for containerizing software. While packaging to a working version is relatively easy, creating a lightweight Docker image presents a challenge. In this note, I will briefly discuss an example from my university class on software engineering. The task was to containerize a card game web application, written by students as …
Category archives: Bez kategorii
Making SSH work by proxy
It is a popular misbelief that hiding encrypted connections (SSH) behind a proxy is a dark domain reserved to crime activities. You may need a Russian or Iranian proxy to get your coding job done, when firewalls of your favourite coffee place or wifi in travel forbid the use of SSH. As this happens to …
Free and robust Tweets extraction
As anticipated by many, Twitter stopped offering its (limited!) API for free 1. Now, what options do you have to programmatically access the public content for free?In this context, it is worth mentioning the library snscrape, a tool (well-maintained as of now) for extracting the content from social media services such as Facebook, Instagram or …
Expanding Inverse Functions
The problem of inverting the implicit function $$y=f(x)$$ in the form of power-series $$x = a + \sum_{k=1}^{\infty} b_k (y-f(a))^k$$ around a point of interest $x=a$, has a long history. Lagrange obtained a theoretical inversion formula [1]https://mathworld.wolfram.com/LagrangeInversionTheorem.html, yet efficient implementations are relatively recent [2]Brent, Richard P., and Hsiang T. Kung. “Fast algorithms for manipulating formal …
Iron logic defeats strawman
The straw man rhetorical technique is widely used: from scientific reviews (academia), through job interviews (industry) to the political discourse (international relations). The idea is simple: you distort arguments or opposing views to easier refute them. Not only is this trick popular, but proven successful statistically. The best weapon against it is logically strict reasoning. …
Can Russia defend its economy from sanctions?
While western leaders are proud of imposing largest sanctions ever, it seems that Russia can withstand the crisis longer than some expect. The following two points, underrepresented in popular media, support this claim: Historical AnalogyRussia’s went through 2014 financial crisis, where the currency significantly lost its value (from mid 30-s to around 80 for one …
Continue reading “Can Russia defend its economy from sanctions?”
On Subgaussian Concentration of Missing Mass
The problem of missing mass goes back to the cryptographic work of Good and Turing during WWII, but has been also studied in the context of linguistic, ecology, and by probability theoreticians. The missing mass is defined as the weight of elements not observed in a sample, due to pure chance: Such an event and …
Continue reading “On Subgaussian Concentration of Missing Mass”
Approximating Tails of Beta Distribution
Beta distribution is ubiquitous in statistics, but particularly popular in real-world modeling. The beta-binomial model is perhaps the most known example, given the recent interest in Bayesian inference. But it was in use nearly 50 years ago, for example in toxicology. Unfortunately, computing probabilities from the density depends on intractable incomplete beta integrals. This creates …
Improving State-of-Art on Sparse Random Projections
Random projections are widely used to reduce data dimension in various analyses. Provable guarantees were developed first in the important result of Johnson and Lindenstrauss on Lipschitz maps, but more recently there has been a lot of follow-up work in the context of machine-learning. Particularly attractive are sparse random projections, which share similar guarantees as …
Continue reading “Improving State-of-Art on Sparse Random Projections”