Logs: Finding Structure in the Chaos

Did you ever get overwhelmed trying to understand all different log message of an application? In this post I’d like to share how to analyze application logs combining different open source projects to produce an appealing dashboard summarizing all information. We will use a github repository with a collection of algorithms to parse logs, logparser, plotly to create interactive plots, and pandas to transform data. For starters, we will by briefly explain the dependencies and datasets used, and later we show how to obtain a dashboard like the following....

July 18, 2023 6 min

Quick Setup for Git Credentials and Signed Commits

Nowadays, Git is an essential tool in software development. It allows developers to easily trace the history of all changes throughout the life of a code base with multiple contributors, and makes the development process a lot smoother. It also has many options that add both convenience and safety to the development process. However, it is often the case that developers struggle a bit seting up all git options they want on a new machine resulting in a series of google searches for the pages visited in the last time they were in the same situation....

June 2, 2023 3 min

Is Numpy really faster? - A second look

I recently came accross an interesting blog post by Bjorn Madsen, Is Numpy really faster. It is a short post displaying one example where a python snippet using Numpy is much slower than the version written in pure Python due to some overheads associated to Numpy. Building upon that example, I spent some time writing a function using Numpy that performs similar operations even faster than the pure Python version shown by Bjorn....

May 16, 2021 4 min

A Pandas read_csv crash course

Pandas is the most popular Python Library to analyze tabular data and, when it comes to loading data, the function read_csv is very convenient. Upon opening its documentation one may be startled by the long list of arguments and options, but these allow the user to load tabular data in many different formats. For that reason, reading a simple CSV file in Pandas can become a bit complex. In order to become better acquainted with the parameters in read_csv I’ll share a few examples using it....

March 28, 2021 4 min

Debugging an issue related with Java and Python interoperability

I have been using JEP (Java Embedded Python) to allow calling the code written, in Python, by a team of data scientists in some Java micro-services for quite a while now. In general, this solution has been very stable and fast. However, a while back and after some specific changes in the Python code, we started seeing some segfaults occurring when the code, that would run smoothly in Python, was executed through JEP....

March 8, 2021 5 min

Tuning the zsh shell using zinit and powerlevel10k

As a programmer, the command line terminal is one of the most important tools I use. By default, the appearance of this application is very plain, but there are ways to customize its looks and functionality. So, I’d like to share some of my favorite tools that can improve the experience while using it. In particular, I’m a big fan of zinit and powerlevel10k. You can also see my shell configuration in my dotfiles....

February 6, 2021 4 min

Lightweight alternatives to stream video on the browser

Like many others, I often enjoy having youtube or twitch videos playing on the brackground while doing other tasks on the computer, and like most people I would have them conveniently playing on a separate tab of Chrome. Despite the convenience, there are some downside to using Chrome for that purpose like the excessive memory used by the browser, the whole area of the webpage occupied by things other than the video and the lack of an option to keep the video, say, on the corner of the computer screen....

August 6, 2020 2 min

Debugging packages using R environments

Did you ever ask yourself what would happen if you tweaked some functions in an R package? Recently, I found myself in a situation where I would like to perform and test some changes to an R package and started looking for ways to easily and clearly register some findings. This pursuit eventually led me to learn more about R environment, after all, whenever you install a package in your system you also add a number of environments associated with that package....

June 1, 2020 2 min

Use R packages efficiently

I would like to use this opportunity to write about some useful patterns to organize your R code. These may be well know to advanced R users, but are left out of most tutorials. So, sit back, relax, and enjoy some useful simple tips for R! 1. Loading R packages The most famous way of loading packages in R is through the library() command. One disadvantage of this option is the fact that an error is thrown if the package is not found in the R environment....

March 22, 2020 4 min

Bend R functions to your will

In this post, I will mention a few R functions that are very useful to manipulate other functions or objects. If you are not acquainted with them, I hope that they open a whole world of possibilities in the R code you develop, as they did for me. 1. Ellipsis Ellipsis (...) may be placed in the definition of a function to substitute multiple values that are given as arguments to that function and are not captured by other argument variables....

February 22, 2020 3 min