Power to the user (CSS)

Tweaking the world wide web, one CSS stylesheet at a time

You probably know that you can tweak appearance of websites with add-ons like Stylus. Ever since I figured out how to use Inspector and how to write "installable" CSS stylesheets myself, I cannot resist the urge to fix websites with a uneasy appearance. I try to fix it with a few lines of CSS and share it with others.

GitHub Retro

GitHub quickly rolled out a new wider interface, which could be done a bit better, IMHO.

Before After

Get it here.

Mastodon Relax

This is more advanced as it uses configurable parameters. The CSS rules are also less hacky, thanks to identifiable CSS classes in Mastodon's frontend.

Before After
mr-before mr-after

Get it here.

The stylesheets are CC-BY-SA licensed. Hope it is useful for you.

A dictionary of horrors

This post demonstrates a strange behaviour encountered while initializing a dictionary using the dict.fromkeys method. TLDR: be careful while passing mutable arguments such as lists.

Lightweight classes for scientific computing using "cached_property"

In the quest for optimization and fast computation, while using object-oriented programming, it is a typical technique to initialize the linear algebra array operators as class attributes. Especially in fluidfft we encounter pseudospectral operator classes that look like:

import numpy as np
          from fluiddyn.util import mpi

          class Operator:
              def __init__