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 …
Added
- new parameters
new_x
andnew_y
forcell()
andmulti_cell()
, replacingln=0
, thanks to @gmischler - new
add_highlight()
method to insert highlight annotations: documentation - new
offset_rendering()
method: documentation - new
.text_mode
property: documentation - the page structure of the documentation has been revised, with a new page about adding text, thanks to @gmischler
- a warning is now raised if a context manager is used inside an
unbreakable()
section, which is not supported
Changed
local_context()
can now "scope" even more properties, likeblend_mode
: documentation
Fixed
- No font properties should be leaked anymore after using markdown or in any other situations (cf. #359), thanks to @gmischler
- If
multi_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,
instead of just the very last line (cf. #364), thanks to @gmischler - a regression: now again
multi_cell()
always renders a cell, even iftxt
is an empty string - cf. #349 - a bug with string width calculation when Markdown is enabled - cf. #351
- a few bugs when parsing some SVG files - cf. #356, #358 & #376
- a bug when using
multi_cell(..., split_only=True)
inside anunbreakable
section - cf. #359
Deprecated
- The parameter
ln
tocell()
andmulti_cell()
is now deprecated, usenew_x
andnew_y
instead. - The parameter
center
tocell()
is now deprecated, usealign="C"
instead.
Displaying deprecation warnings
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.
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 :
Contexte
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/