Mostly you shouldn't subclass #Python built-in types. But if you do, dict subclasses can define missing: it's called when a key is missing. Instead of hiding a dict in a function as a cache, how about hiding a function in a dict!? A Fibonacci dictionary:
💜 We would love nothing more than to have you join our ever-growing community of volunteers! We're currently expanding our editorial board, and could use your help.
Volunteer editors:
🔍 find reviewers
👷♀️ oversee the review process
🌸 support submitters
✅ determine package acceptance
i wrote another blog post on my personal experiences with packaging as a teacher, a user and a maintainer. And how giving a tech talk on a big stage felt! (hint: scary!)
i'm curious if others have experienced imposter syndrome and/or challenges navigating our #python packaging ecosystem / data science ecosystem! let me know what you think. 💗
There are still a few days left to take advantage of the latest #HumbleBundle package from @nostarch: Dive into DevOps!
You can pick up 5 great titles for just $1, or go up to $35 for all 22 items in this "indispensable IT library".
Either way, be sure to use "Adjust Donation" to choose how much of your purchase goes to the PSF🐍❤️
Well, if you're trying to delete a block of code but you don't want to lose it, and you're using Git (or a similar version control system) I would commit that code to Git and then delete it.
Sometimes photo files are created with prefix "IMG_*", or saved in uppercase, or with suffix ".jpeg", or something else entirely. So I created a python script to rename photo(s) using the datetime_original attribute from EXIF metadata in format YYYYMMDD_HHMMSS.jpg.
Setting this up with a daily cronjob will automatically locate and rename new photos to the desired format:
🐍 On this Building SaaS with #Python and #Django, I started a new feature to add a PDF report bundle to my homeschool app. This will be useful when a user completes their school year and needs records of all the year's activities. https://www.youtube.com/watch?v=cM2sA1AP3fM
I still think it's nuts that #Python's best solutions for rendering #SVG are a bunch of wrappers around CairoSVG with the two next best solutions being use Inkscape from the command line and wand, a wrapper around ImageMagick.
Just reminded that #Python's considerations to anything packaging-related is a trashfire: deprecating distutils, including distutils.version, pointing to an external module that provides “Reusable core utilities for various Python Packaging interoperability specifications.”
There aren’t enough characters for us to tell you about all the incredible things that the sourmash package, a command-line tool and Python/Rust library for metagenome analysis and genome comparison using k-mers, does, but we promise that you’re going to want to check out this incredible package from Tessa Pierce-Ward, Titus Brown, and Luiz Irber!
You already know about 🐍 Snakes on a Plane, but how about Planes on a Serverless? At @pythonfrederick, @pierson_pat showed off the openly available plane data from 1090MHz and how he maps those flights on the web with a #Python lambda. https://www.youtube.com/watch?v=dMFWMTIyEgU