Coding horror, terminal magic and learning 馃摎

  • This blog serves no adds, support me with coffee 鈽曪笍
  • Follow me on Twitter to stay tuned 馃憞馃徎

Survival Analysis: Analyzing Churn and Improving Customer Retention as a SaaS Company

Notice: For best experience, you can duplicate my Deepnote notebook here and run the supporting code yourself. At Traction Tools we鈥檙e highly commmited to make our clients succeed. We run a platform for EOS, which is a system that facilitates entreprenuers to run their business, internal operations, and effective meetings on the cloud. However, as a SaaS company, it鈥檚 very common to deal with issues like churn and customer retention. Here we鈥檙e going to discuss how we analyze churn and what are some of the important factors that makes our customer stay or cancel their subscription....

December 5, 2020 路 11 min 路 Franccesco Orozco

Multiple Ways to Get the First Row for Each Group in Pandas

Use case Sometimes you just want to capture the first (or last) event of something. Let鈥檚 say, you have a list of clients and want to capture their first purchase. This is useful if you want a list of new paying customers. Dataset We鈥檙e thinking about customers here, so let鈥檚 get the Online Retail Dataset from the UCI Machine Learning Repository. We can download this dataset directly using Pandas. >>> import pandas as pd >>> customers = pd....

December 3, 2020 路 7 min 路 Franccesco Orozco

The 4 Hard Truths Data Science Blogs Don't Teach You About

The wrong path to data science Let me give you some context first. A few years ago, I was on the road to data science. I wanted to learn everything about this field, the sole idea of building something intelligent that can help someone predict something amazed me. Inspired by this idea, I decided I wanted to become a data scientist, and like many others, I jumped from engineering to this new landscape....

November 2, 2020 路 8 min 路 Franccesco Orozco

Monitoring Nginx with @sherlog/cli

Logs play a very important role throughout the entire life cycle of an application development as well as troubleshooting and replicating bugs on production that could lead to service interruption and harm our user鈥檚 experience. A few months ago, I went on a journey for finding a tool that will allow me to improve logs visibility and to take action as quickly as possible, and of course with a minimum amount of effort and server requirements....

October 7, 2020 路 3 min 路 Bruce Lampson
Image by @ingoschulz

Python Logging Basics: Why is it important and how to use it?

If you find yourself having troubles debugging your code, or wondering what went wrong, then you should start logging events in your python code. Using the logging library you can basically record what actions is your code doing, i.e making a web request, reading a file, monitoring something, etc. It can help you to narrow down your faulty code for debugging. Moreover, logging is not only helpful for debugging, but it is also helpful for collaboration, and many platforms use the logging module in your code so you navigate between events easily....

June 27, 2020 路 5 min 路 Franccesco Orozco

Save Python Objects with Pickle

Sometimes you just want to save a dictionary, a list, a string, or anything into a file so you can use it later. This can be easily achieved with the module Pickle. Warning: The pickle module is not secure against erroneous or maliciously constructed data. Never unpickle data received from an untrusted or unauthenticated source. 鈥 Pickle Documentation What is Pickle Pickle is a module in Python that can be implemented to serialize or de-serialize a Python object, meaning that it can be used to save an object into a file; Just have in mind that this is not the same as saving a configuration file, there are other data structures that we can use to achieve that task such as JSON, CSV, YAML/TOML, etc....

June 26, 2019 路 3 min 路 Franccesco Orozco

Develop and Publish Your Python Packages with Poetry

I鈥檝e been trying to publish my packages to PyPi so people can access my software more easily. But I have to be honest, Python鈥檚 publishing system is not the best out there and it has to improve quite a lot. Wandering around I stumbled upon Poetry, which is a python packager and dependency manager created by S茅bastien Eustace for people that doesn鈥檛 want to lose their head managing a Python project....

June 16, 2019 路 6 min 路 Franccesco Orozco

How to Easily Use a Progress Bar in Python

We鈥檝e all been there, your code is performing a job and it鈥檚 going to take a while. I鈥檓 an impatient guy, so it would be nice to have an ETA or a progress bar to show us. Fortunately, there are libraries out there than can help us to achieve this! There鈥檚 two ways in which we can integrate a progress bar into our loops, via a Context Manager or just wrapping up an iterable object into a method....

June 15, 2019 路 6 min 路 Franccesco Orozco

Create a Project Page for Your Repos Easily With Jekyll and GitHub Pages

I鈥檓 going to show you how to create a project page using the ever popular Jekyll and GitHub Pages so your projects can have a face, and of course, to show it of to your friends out there. So, without further ado, we should get to the point already, shall we? Building our site with Jekyll Let鈥檚 say that you have a project called chuck-says that acts like a fortune cookie + cowsay whenever you call it in the command line....

June 8, 2019 路 7 min 路 Franccesco Orozco

How to Create a Ruby Gem With Bundler

I鈥檝e been writing and focusing on Python lately and I鈥檝e been wanting to make more content about Ruby. Ruby was my very first language and the one that got me into this programming world. For this entry I鈥檓 going to write how to create, test and publish our gem to to make it available for everyone, and in future entries we鈥檙e going to see how to setup a CI/CD for automatic testing and deployment, Behavior Driven Testing with Cucumber/Aruba and Code Coverage with SimpleCov....

March 6, 2019 路 36 min 路 Franccesco Orozco