Pandas Styler: Improve the Presentation of your DataFrames

Posted on Thu 25 December 2025 in Programming • Tagged with pandas, python, data-science, visualization, style

Discover how the Pandas Styler object allows you to apply conditional formatting and CSS styles to your DataFrames for better data visualization and presentation.


Continue reading

Reduce Noise in Your Python Logs: A Smart Approach

Posted on Thu 25 December 2025 in Programming • Tagged with python, logging, logs, debugging, development

Learn how to configure Python's logging module to avoid message overload from third-party libraries, keeping your logs clean and useful.


Continue reading

Poe the Poet: Automating Tasks in Python Projects with uv

Posted on Thu 25 December 2025 in Programming • Tagged with python, uv, poethepoet, automation, pyproject.toml

Discover how Poe the Poet allows you to define and execute custom commands directly from your pyproject.toml, optimizing your workflow in uv environments.


Continue reading

How I Use Git Worktrees for Concurrent Work

Posted on Wed 23 July 2025 in Programming • Tagged with git, worktrees, workflow, productivity

A practical approach to using git worktrees and maximizing productivity with multiple simultaneous work contexts


Continue reading

Hybrid Search with SQLite: Vector + Full-Text

Posted on Sun 06 October 2024 in Programming • Tagged with sqlite, search, vectors, fts, sql

Combining vector search and full-text search in SQLite using Reciprocal Rank Fusion for better results


Continue reading

Geospatial Data Conflation with DuckDB and Embeddings

Posted on Tue 01 October 2024 in Programming • Tagged with duckdb, geospatial, embeddings, ollama, h3

Advanced techniques to integrate geospatial data sources using DuckDB, H3, Ollama, and embedding models


Continue reading

HTTPX: Modern HTTP Client for Python

Posted on Mon 23 September 2024 in Programming • Tagged with python, http, httpx, async, requests

HTTPX emerges as the natural successor to requests, offering async support, HTTP/2, and a modern API for contemporary Python applications.


Continue reading

Server-Sent Events: Simplified Real-Time Communication

Posted on Mon 23 September 2024 in Programming • Tagged with javascript, sse, real-time, web-apis

Server-Sent Events offer a simple and efficient alternative to WebSockets for unidirectional server-to-client communication in web applications


Continue reading

About Versions

Posted on Mon 01 May 2017 in Programming • Tagged with python


Continue reading

Repeating a function with threads

Posted on Sun 03 May 2015 in Programming • Tagged with python

Let's use threads in python to periodically execute a function


Continue reading

Google Code is Closing

Posted on Fri 13 March 2015 in Programming • Tagged with python

As I said, Google announced the closure of Google Code.

Today I received the email notifying me (I had a test project hosted there) that I could move my projects simply to github, the de facto repository for free software today (sorry for bitbucket and especially for mercurial).

Its interface …


Continue reading

pgcli the discovery of the day

Posted on Mon 02 March 2015 in Programming • Tagged with postgresql

postresql command line


Continue reading

Ajax view decorator

Posted on Fri 21 November 2014 in Programming • Tagged with python, django

To force a django view to be called only via AJAX calls.

def ajax_required(f):
    """
    AJAX request required decorator
    use it in your views:

    @ajax_required
    def my_view(request):
        ....

    """
    def wrap(request, *args, **kwargs):
        if not request.is_ajax():
            return HttpResponseBadRequest()
        return f(request, *args, **kwargs)
    wrap.__doc__ = f.__doc__
    wrap.__name__ …

Continue reading

Generic function to use as upload_to

Posted on Sat 11 October 2014 in Programming • Tagged with django, python

FileFields in Django need an upload_to function that determines where the file will be uploaded. I usually have a generic function in utils.py that leaves them in a subfolder with the model name.

import os

def generic_upload_to(instance, filename):
    """
    Generic `upload_to` function for models.FileField and models.ImageField
    which …

Continue reading

Django: links in object list

Posted on Wed 21 May 2014 in Programming • Tagged with django, python

In my projects I usually use links to related items in the admin change_list.

utils.py

I have this in utils.py

from django.contrib import admin
from django.contrib.contenttypes.models import ContentType
from django.core import urlresolvers
from django.utils.datastructures import SortedDict …

Continue reading

Settings vars processor

Posted on Wed 08 January 2014 in Programming • Tagged with python, django

I usually use this at the beginning of projects.

from django.conf import settings as django_settings
from django.core.exceptions import ImproperlyConfigured


def settings(request):
    """
    Adds the settings specified in settings.TEMPLATE_VISIBLE_SETTINGS to
    the request context.
    """
    new_settings = {}
    for attr in django_settings.TEMPLATE_VISIBLE_SETTINGS:
        try:
            new_settings[attr] = getattr(django_settings, attr)
        except AttributeError …

Continue reading