Transmodel is the basis for defining exchange standards that enable the sharing and provision of accurate and interoperable public transport information across organisation- and system-boundaries.
Pylint is a great static code analyser for Python code. I have been using it for several years, in various projects, and it's simple to use yet very powerful.
I even contributed to Pylint by submitting a new rule a few years ago : implicit-str-concat.
For an introduction to Pylint, you …
open-source non-profit search engine for shadow libraries, like Sci-Hub, Library Genesis, and Z-Library
🔍 Moteur de recherche des bibliothèques clandestines : livres, journaux, BD, magazines. ⭐️ Bibliothèque Z-Library, Bibliothèque Genesis, Sci-Hub. ⚙️ Entièrement résilient grâce à un code et à des données open source. ❤️ Faites passer le mot : tout le monde est le bienvenu ici !
Technical write-up on how they setup this: https://annas-blog.org/how-to-run-a-shadow-library.html
Let’s start with our tech stack. It is deliberately boring. We use Flask, MariaDB, and ElasticSearch. That is literally it. Search is largely a solved problem, and we don’t intend to reinvent it.
Source: @sebsauvage
Another set articles covers the code in more depths:
Source: @ebsauvage
I wrote my latest post on fpdf2
almost a year ago.
As we just released a new version, v2.7,
this is the time to mention some recent additions to this library! 😊
This article will present some of the major features introduced between v2.5.3 & v2.7.3 of …
The other day, while working on fpdf2,
I used @dataclass
,
a nice decorator that came in the standard library with Python 3.7,
to quickly define a class
that mostly stored data.
Then a question came to my mind: is the __slots__
memory optimization compatible with …
This describes tools and techniques that can identify memory leaks in Long running Python programs:
- Is it a Leak?
- Sources of Leaks
- A Bit About (C)Python Memory Management
- Reference Counts
- Garbage Collection
- The Big Picture
- CPython’s Object Allocator (pymalloc)
Here is a visualisation of memory allocators from top to bottom (from the Python source Objects/obmalloc.c):
_____ ______ ______ ________
[ int ] [ dict ] [ list ] ... [ string ] Python core |
+3 | <----- Object-specific memory -----> | <-- Non-object memory --> |
_______________________________ | |
[ Python's object allocator ] | |
+2 | ####### Object memory ####### | <------ Internal buffers ------> |
______________________________________________________________ |
[ Python's raw memory allocator (PyMem_ API) ] |
+1 | <----- Python memory (under PyMem manager's control) ------> | |
__________________________________________________________________
[ Underlying general-purpose allocator (ex: C library malloc) ]
0 | <------ Virtual memory allocated for the python process -------> |
=========================================================================
_______________________________________________________________________
[ OS-specific Virtual Memory Manager (VMM) ]
-1 | <--- Kernel dynamic storage allocation & management (page-based) ---> |
__________________________________ __________________________________
[ ] [ ]
-2 | <-- Physical memory: ROM/RAM --> | | <-- Secondary storage (swap) --> |
This repository list a maximum of tech conferences's date and CFP in order to help conferences organizers, speakers & attendees
Très sympathique jeu de piste en 15 étapes, à destinations de développeurs.
Peut se résoudre en moins de 30min.
Following last week animated PDF adventure, I have been reading a series of one page dungeons... And yesterday I had the opportunity to play the best one in my opinion: The Sky-Blind Spire by Michael Prescott.
It has everythng I love on one page: a maze to explore, mysteries to …
Last week, while translating John Harper's micro-TTRPG World of Dungeons: Turbo Breakers, I discovered the wonderful world of one page dungeons, starting with Michael Prescott splendid production at trilemma.com and also the yearly One Page Dungeon Context.
While crawling through the OPDC 2021 entries, I discovered a great map …
Join us in sending a token of appreciation to your favorite open source developers and projects.
Here’s how:
- Choose a card
- Log in with GitHub
- Choose recipient
- Send your card
Any gif that claims to be showing
60fps
is simply untrue due to the fact that no web browser out there right now supports displaying gifs higher than50fps
. If you try to set your frame rate any higher than what the browser supports (or if you set the frame delay to zero) then most browsers will default to a playback of10fps
(over 5 times slower than you probably intended).
FROM: https://sebsauvage.net/links/?ZYOVJA
À savoir : les navigateurs ne supportent pas les GIF animés à plus de 50 images par seconde (50 fps).
Initiation ludique, pédagogique & gratuite à la programmation en Python !
Ce projet est issu d'une thèse en didactique de l'informatique de Matthieu Branthom portant sur l'enseignement-apprentissage de la programmation informatique dans l'enseignement secondaire
Découvert via @sebsauvage : https://sebsauvage.net/links/?EiFcHg
Un site pédagogique pour apprendre les bases de Python sous forme de jeu: notion de variables, exécution conditionnelle, boucles.
Et les équivalents Scratch sont même indiqués.
Recently at work, at SNCF Connect & Tech,
we needed to expose some static documents as HTTP endpoints:
a GET /version
that would provide some information about the application version as JSON,
and a GET /openapi/yaml
that would return the OpenAPI 3 specification of our HTTP API as YAML.
We …
Today I made a small addition to a Javascript library I sometimes use to generate nonograms.
This tool can now build a solvable grid in the form of a valid QR Code that, once decoded, reveals some text:
To find more about it: Nonogram JS demo page.
Note that I've …
fpdf2
is a simple & fast PDF creation library for Python that I have been maintaining since mid-2020.
In this article, I'm going to present some of the new features that landed since my last post on the subject. Hence, this will cover versions 2.5.0, 2.5.1 & 2 …
new_x
and new_y
for cell()
and multi_cell()
, replacing ln=0
, thanks to @gmischleradd_highlight()
method to insert highlight annotations: documentationoffset_rendering()
method: documentation.text_mode
property: documentationunbreakable()
section, which is not supportedlocal_context()
can now "scope" even more properties, like blend_mode
: documentationmulti_cell(align="J")
is given text with multiple paragraphs (text followed by an empty line) at once, it now renders the last line of each paragraph left-aligned,multi_cell()
always renders a cell, even if txt
is an empty string - cf. #349multi_cell(..., split_only=True)
inside an unbreakable
section - cf. #359ln
to cell()
and multi_cell()
is now deprecated, use new_x
and new_y
instead.center
to cell()
is now deprecated, use align="C"
instead.DeprecationWarning
s are not displayed by Python by default.
Hence, every time you use a newer version of fpdf2
, we strongly encourage you to execute your scripts
with the -Wd
option (cf. documentation)
in order to get warned about deprecated features used in your code.
This can also be enabled programmatically with warnings.simplefilter('default', DeprecationWarning)
.
TL;DR: There are three options to fix an NPM dependency:
- Open a bug ticket on the repository of the maintainer
- Fork & Fix
- Create a patch and fix it
J'avais tendance à privilégier la 2e solution, mais elle a l’inconvénient de créer une dépendance à github.com
au moment du build, ce qui n'est pas toujours pratique dans un contexte d'entreprise... patch-package
peut donc s'avérer bien pratique dans ce cas
I recently discovered some really beautiful pieces of generative art on r/generative.
In the same spirit as a precedent article on glitch art, I want to share some of my favorites:
Dwarf Fortress is one of those oddball passion projects that’s broken into Internet consciousness. It’s a free game where you play either an adventurer or a fortress full of dwarves in a randomly generated fantasy world. The simulation runs deep, with new games creating multiple civilizations with histories, mythologies, and artifacts. I reached out to him to see how he’s managed a single, growing codebase over 15+ years, the perils of pathing, and debugging dead cats. Our conversation below has been edited for clarity.
I reached out to Tarn Adams to see how he’s managed a single, growing codebase over 15+ years, the perils of pathing, and debugging dead cats. Our conversation below has been edited for clarity. If you want more, we also spoke with Tarn on the podcast.
For example, there are three eggs. The left egg is the largest and the front egg is leaning on its side. And from front to back, they are colored purple, yellow, and blue.
What? You do see purple, yellow, and blue, right? Uh... you don't? What colors do you see? Let's make sure that we are talking about the right file...The result is pretty clear: I have one picture (a PNG) that yields NINE different color sets! (Ten if you convert it to JPEG and use LCMS to render it.) The colors that you see are strictly dependent on the specific program that you use to view the image. Even something as minor as calibrating your video driver or patching your software could alter how the image is displayed.
This person should be funded in a level that is appropriate for how critical log4j2 is used in the ecosystem. There is no excuse for this. This person's spare time passion project is responsible for half of the internet working the way it should.
TL;DR: If you want me to make you useful software, pay me. If you use software made by others in their spare time and find it useful, pay them. This should not be a controversial opinion. This should not be a new thing. This should already be the state of the world and it is amazingly horrible for us to have the people that make the things that make our software work at all starve and beg for donations.
One things that annoys me a little though, is that I often get matches for people too far away from where I live, even with the distance filter set in my Settings:
Hence I wrote some simple Javascript code that auto-pass matches for a list of given cities …
Cette année, grâce à @kleph qui m'en a parlé, je participe au Advent of Code :
Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. People use them as a speed contest, interview prep, company training, university coursework, practice problems, or to challenge each other.
You don't need a computer science background to participate - just a little programming knowledge and some problem solving skills will get you pretty far. Nor do you need a fancy computer; every problem has a solution that completes in at most 15 seconds on ten-year-old hardware.
Un court article pour partager une méthode bien pratique pour mettre à jour la page d'acceuil d'un forum ForumActif :
Une association de jeux de rôle a mis en place un site ForumActif. Cet hébergeur inclus dans ses forums phpBB la possibilité de créer des pages HTML statiques, et de …
Ce cours a pour but de t’apprendre à parler le Python. Il s’agit d’un langage particulier — un langage de programmation — pour communiquer avec ton ordinateur afin de lui demander de réaliser des tâches précises (comme exécuter un calcul, récupérer des événements du clavier, afficher une image à l’écran, etc.), c’est-à-dire exécuter un programme informatique (un logiciel).
Last month, I realized late that October was hacktoberfest month!
This online event is a month-long celebration (October 1-31) of open source software run in partnership with different software companies, with a focus on encouraging contributions to open source projects.
While I participated in the 2019 edition as a contributor …
Learning the best way of combining your love for math and programming
GitHub repo: https://github.com/ManimCommunity/manim
Examples: https://docs.manim.community/en/latest/examples.html
The other day, while watching La Carte aux trésors at my elderly neighbor's house, I casually played peg solitaire on a board she has.
After many failures at trying to get rid of all pawns but one, I started to wonder about the mathematics & algorithmics behind that game...
Back home …
À oui.sncf
, je travaille au sein d'une équipe en charge de l'usine logicielle,
qui administre depuis des années une instance Gitlab self-hosted.
Cet article contient quelques-unes de nos recommandations à l'intention des utilisateurs de notre Gitlab, ayant pour but à la fois améliorer les performances de leurs pipelines …
The idea for SQLite actually came out of his frustrations with an existing database called Informix that was installed on a literal battleship
they said, “Well, do you have any pricing information?” “Well, look, I tell you what, let’s have a call tomorrow and I’ll get back to you on that.”
Of course, inside, I was like, “What? You can make money with open source software? How does this work? How do I price this? I have no idea how to do this.”Somehow or another, and I don’t know how this happened, Mitchell Baker, she’s the woman who runs the Mozilla Foundation, she got wind of this and called me up, says, “Richard, you’re doing this all wrong. Let me tell you how to set up a consortium.” She laid down the law, says, “Look, the developers have to be in control. Their decision is final. No voting rights on what gets to go into it. The companies that are using, they get the honor of contributing money, but you make all the decisions.” She was very adamant about this and she laid out everything. She’s a lawyer.
I actually started following some of their processes, and one of the key things that they push is, they want 100% MCDC test coverage.
That’s modified condition decision coverage of the code. Your tests have to cause each branch operation in the resulting binary code to be taken and to fall through at least once.I looked at Git, I looked at Mercurial, and I looked at my requirements and I thought, “You know what? I’m just going to write my own,” so I wrote my own version control system (fossil), which is now a project unto itself, and that worked out very, very well
Source : https://sebsauvage.net/links/
I have been amazed recently at the diversity of contributors on the fpdf2 project, coming from all around the world!
Then I thought it would be nice to visualize this diversity by building a world map of all contributors locations. There it is:
Click on the image to access an …
Today I finally took the time to put up a live demo website for Hesperides!
https://hesperides.herokuapp.com
Hesperides is an open source tool dedicated to configuration management: it stores applications properties and mustache templates for configurations files. It is strongly hierarchized based on few main concepts: modules, applications …
fpdf2
is a minimalist PDF creation library for Python that I am maintaining.
With the release yesterday of its v2.4.0
, I'm going to present some of its notable new features since the latest minor version.
https://github.com/pyfpdf/fpdf2/ Doc: https://pyfpdf.github.io/fpdf2/
Undying Dusk is a video game in a PDF format, with a gameplay based on exploration and logic puzzles, in the tradition of dungeon crawlers.
A curse set by the Empress keeps the world in an eternal dusk. You are have recently found shelter in an eerie monastery.
Featuring:
Today, I am happy to announce version 2.3.0 of fpdf2, code name: Unbreakable!
https://github.com/pyfpdf/fpdf2/ Doc: https://pyfpdf.github.io/fpdf2/
Why Unbreakable?
fpdf2
, your Python code can never break!
fpdf2
, the library I mentioned in my previous post, cannot parse existing PDF files.
However, other Python libraries can be combined with fpdf2
in order to add new content to existing PDF files.
This page provides several examples of doing so using pdfrw
,
a great zero-dependency pure Python library dedicated …
Today, I am happy to announce a new version 2.2.0 of fpdf2 !
https://github.com/alexanderankin/pyfpdf/ Doc: https://alexanderankin.github.io/pyfpdf/
During the last few months, I contributed a few improvements to fpdf2
,
David Ankin fork of PyFPDF
,
the user-friendly Python library to generate PDFs:
from …
For a given test software project and a random group of developpers,
a single sentence in the specs estimating that it should take 2 or 20 months to complete,
is the main statistical drive explaining why it took, in the end, 5 or 15 months to produce it,
regardless of how much experience the developpers have in the domain,
how much experience they have in software development in general,
what techniques they're using or how familiar they are with the tools.
This is known as the Anchoring effect bias
Source: Greg Wilson - What We Actually Know About Software Development, and Why We Believe It's True @ 15:55
Linkback protocols are an old breed. They were born in a time where MySpace, Wikipedia & WordPress had just been born, and Friendster was more popular than this new website called Facebook.
The latest linkback protocol, Webmention, is relatively recent though, as it became a W3C …
The source code for these demos is freely available at http://github.com/jamis/csmazes
Source: https://sebsauvage.net/links/?Wgr4pg
<link rel="stylesheet" type="text/css" href="images/enigmes/topoloku.css">
Depuis le 24 mars, avec ma compagne, nous avons décidé de partager un petit puzzle logique par jour à nos amis & familles, pour les distraire un peu en cette période difficile.
J'avais même bricolé un petit système de score, et j'en profite d'ailleurs pour féliciter ici les gagnants !
Comme aujourd'hui …
The Software may not be used in applications and services that are used for or aid in the exploration, extraction, refinement, processing, or transportation of fossil fuels. The Software may not be used by companies that rely on fossil fuel extraction as their primary means of revenue. This includes but is not limited to the companies listed at https://climatestrike.software/blacklist
FROM: http://taint.org/2020/01/28/235803a.html
It made me think about Tobie Langel idea to forbid the use of software for activities against human rights:
https://chezsoi.org/lucas/blog/minutes-of-the-fosdem-2020-conference.html#sunday-1255-bringing-back-ethics-to-open-source---tobie-langel
The FOSDEM'20 (Free & Open Source Developers’ European Meeting) conference is:
a free event for software developers to meet, share ideas and collaborate
It took place last week-end at the Université Libre de Bruxelles, and I had the chance to attend it.
Sincere thanks to my employer, oui.sncf, for financing …
Issue #2 is out !
Paged Out! is a new experimental (one article == one page) free magazine about programming (especially programming tricks!), hacking, security hacking, retro computers, modern computers, electronics, demoscene, and other similar topics.
Include a crazy prime Python quine ! (page 35) O.O
At work, we needed to retrieve the full list of jobs a given Jenkins instance was hosting.
Our first solution was to use the jenkinsapi Python package:
import xml.etree.ElementTree as XmlElementTree
from jenkinsapi.jenkins import Jenkins
def get_all_jenkins_jobs(server_url):
jenkins = Jenkins(server_url, lazy=True, timeout=30,
username=os …
The iframe
above displays some graphs I've built last week,
in order to get some insight on some GitHub projects issues & pull requests evolution.
They are directly inspired by nf-core project activity statistics.