A home sensor with Arduino, InfluxDB and Grafana

A home sensor with Arduino, InfluxDB and Grafana

Leonardo Andrade
TL;DR: it was fun to build great graphs. But the battery did not last long, air quality is difficult to track. Above, the box with plywood. Because I do not have a 3d printer, and I like wood. Ingredients For the sensor box ESP 8826, WEMOS D1 LCD 20x16 Humidity sensor DHT11 Air quality sensor MQ9 Red and Green LEDs, corresponding resistors For the outside sensor Old pickes glass jar, and glue or silicon to seal it.
Recipe: Pastel de Nata

Recipe: Pastel de Nata

Leonardo Andrade
Pastel de nata is original from Lisbon, Portugal. In the last decades it became popular globaly, being found in cafes from cities all over the world. Health warning: some foods have too much sugar, others have too much fat, sometimes too much cholesterol. Pastel de nata has all of the above Some frugality is advised. Ingredients For the custard Ingredient Quantity Notes Egg yolks 4 units search for online videos on how to separate from the egg white, its great fun Sugar 150 grams refined, white, cheapest Flour 45 grams low gluten flour Milk 250 ml full fat milk, UHT is OK Water 75 ml tap water is ok Lemon skin 2 peels if you do not use lemons often Cinamon 1 stick cinamon powder is NOT OK.
Monte Carlo Method: Quasi vs. Pseudo-random

Monte Carlo Method: Quasi vs. Pseudo-random

Leonardo Andrade
Although neural networks is taking the stage of AI these days, other approaches such as monte carlo methods are still relevant. In some cases, such as Alphago Zero, where a playing agent learns without any prior knowledge, neural network approaches are complemented with monte carlo simulation. When is random random enough? Usually in day to day code, there is a random() function that gives us a single dimenstion random quantity. In some places, to achieve entropy even lava lamps and webcams are used.

Spelling corrector in Erlang

Leonardo Andrade
Spelling correction is one of the coolest practical challenges in Information Retrieval. Since the famous article from Peter Norvig was published, many implementations were done. This article gave an insight of how practical problems - such simple spelling correction - are solved in Information Retrieval. Here is my contribute, in Erlang. As improvement, the second expansion has to be optimized with some sort of pruning, as words with seven letters can generate more than one million of variations.

Fixing Shellshock on ubuntu 12.10

Leonardo Andrade
Took a while to fix the shellshock vulnerability (did not have the kind of services that makes my host vulnerable). As is ubuntu 12.10, a simple apt-get update does not work: leonardo@pike:~$ x=’() { :;}; echo ? VULNERABLE’ bash -c : VULNERABLE leonardo@pike:~$ wget http://security.ubuntu.com/ubuntu/pool/main/b/bash/bash_4.2-2ubuntu2.5_amd64.deb leonardo@pike:~$ sudo dpkg -i bash_4.2-2ubuntu2.5_amd64.deb leonardo@pike:~$ x=’() { :;}; echo VULNERABLE’ bash -c : leonardo@pike:~$