Programming

Type-Safe Pipelines and Compose

Article Header Image

When dealing with multiple transformations that run sequentially, one could leverage the compose function to create pipelines. This article shows different way to implement them in a type-safe way. All the code was written using pure Python 3.11 and MyPy 1.5.1 and PyLance v2023.9.20

ANGEL - An Oppinionated Guide on how to Learn Programming (focusing on Python)

Article Header Image

Courses and pieces of training claiming to deliver rapid results have become increasingly popular these days. Nonetheless, amidst the abundance of online resources, it can be challenging to distinguish valuable ones from the noise. Enter ANGEL, which stands for "ANGEL's Not a Guide to Effortlessly Learning." This guide presents readers with a practical approach to the programming learning experience. While the examples will be specific to Python, the reader can apply the core content to any programming language or framework.

Python Recursion: a Trampoline from the Mutual Head to the Memoized Nested Tail

Article Header Image

Recursion is a key concept of programming. However, it is usually only superficially explored. There are different ways of having recursion, this post will illustrate them using Python examples, call graphs and step-by-step runs. Including cases of head, tail, nested and mutual recursion. For each case, the call graph will be shown.

Add Google Analytics (or any custom HTML) to Streamlit with Github Pages

Article Header Image

Streamlit is one of the most popular libraries for creating web apps using Python, and they also provide a service to freely host and share your apps. One of the issues with this free sharing capability is that one losses control over the app, for instance, it is no longer possible to control how the precise HTML will look like or add custom Open Graph or analytics. This post shows a simple and easy way to add all of this by using Github Pages.

Lessons learnt After Developing Finance Web Tools with Streamlit and Altair (No HTML/CSS/JS)

Article Header Image

There are a lot of resources available online about personal finances, stocks, markets, cryptos, and many more economy-related topics. However the decisions one has to make should be informed in order to be good enough. This post covers the lessons learnt after developing similar tools using Streamlit and Altair. No HTML/CSS/JS were needed. This post will make the reader aware of some pros and cons of this libraries and also show an example app.

Multipage, State-Persistent Apps with Streamlit

Article Header Image

Converting a Python script to a web app has never been easier thanks to libraries such as Streamlit. This library allows to create simple and responsive web apps with minimal effort but there is one potential limitation: No multipage support. In this post, a potential solution to this problem is presented with examples and demos.

Secure Live Collaboration in Jupyter Lab

Article Header Image

The single most requested feature for Jupyter Notebooks/Lab was live collaboration á la Google Docs. Today, this is possible but should be done with caution, since it gives access to the whole internet to run any (including malicious) code on our local PC. This is a quick guide to prevent this by implementing several layers of security.

Jupyter Publishing Guide: From Embedded to Book

Article Header Image

Jupyter Notebooks are the lingua franca for Data Science. There is hardly any data scientist that has never used this IDE. However, in contrast to its popularity and usefulness, the process of sharing a Jupyter Notebook is not straightforward. This article presents a brief survey of the different publishing solutions available for personal and/or commercial projects.

Embed Interactive Jupyter Notebooks in Static Websites for Free

Article Header Image

After a lot of research on the internet, I found no practical tutorial explaining how to embed Jupyter Notebooks in Static Websites using only free technologies. I found a way to do it using Github Gists, MyBinder and NBInteract along with IPython Widgets and I want to share it so no one has to reinvent the wheel.

Step by Step Fractals with Python

Also Translated in: Español
Article Header Image

Fractals are awesome, they are built with very complex pattern and they allow you to zoom in forever! In this post we will see how easily it is to plot several kinds of fractals using a tool called L-Systems and the Python Turtle module for the step to step plotting.

To see every post check the Archive