Python Bytes is a weekly podcast hosted by Michael Kennedy and Brian Okken. The show is a short discussion on the headlines and noteworthy news in the Python, developer, and data science space.

Similar Podcasts

24H24L

24H24L
Evento en línea, de 24 horas de duración que consiste en la emisión de 24 audios de diversas temáticas sobre GNU/Linux. Estos son los audios del evento en formato podcast.

The Infinite Monkey Cage

The Infinite Monkey Cage
Brian Cox and Robin Ince host a witty, irreverent look at the world through scientists' eyes.

Talking Kotlin

Talking Kotlin
A bimonthly podcast that covers the Kotlin programming language by JetBrains, as well as related technologies. Hosted by Hadi Hariri

#315 Some Stickers!

December 20, 2022 00:29:56 25.28 MB Downloads: 0

Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Michael #1: Jupyter Server 2.0 is released! Jupyter Server provides the core web server that powers JupyterLab and Jupyter Notebook. New Identity API: As Jupyter continues to innovate its real-time collaboration experience, identity is an important component. New Authorization API: Enabling collaboration on a notebook shouldn’t mean “allow everyone with access to my Jupyter Server to edit my notebooks”. What if I want to share my notebook with e.g. a subset of my teammates? New Event System API: jupyter_events—a package that provides a JSON-schema-based event-driven system to Jupyter Server and server extensions. Terminals Service is now a Server Extension: Jupyter Server now ships the “Terminals Service” as an extension (installed and enabled by default) rather than a core Jupyter Service. pytest-jupyter: A pytest plugin for Jupyter Brian #2: Converting to pyproject.toml Last week, episode 314, we talked about “Tools for rewriting Python code” and I mentioned a desire to convert setup.py/setup.cfg to pyproject.toml Several of you, including Christian Clauss and Brian Skinn, let me know about a few tools to help in that area. Thank you. ini2toml - Automatically translates .ini/.cfg files into TOML “… can also be used to convert any compatible .ini/.cfg file to TOML.” “ini2toml comes in two flavours: “lite” and “full”. The “lite” flavour will create a TOML document that does not contain any of the comments from the original .ini/.cfg file. On the other hand, the “full” flavour will make an extra effort to translate these comments into a TOML-equivalent (please notice sometimes this translation is not perfect, so it is always good to check the TOML document afterwards).” pyproject-fmt - Apply a consistent format to pyproject.toml files Having a consistent ordering and such is actually quite nice. I agreed with most changes when I tried it, except one change. The faulty change: it modified the name of my project. Not cool. pytest plugins are traditionally named pytest-something. the tool replaced the - with _. Wrong. So, be careful with adding this to your tool chain if you have intentional dashes in the name. Otherwise, and still, cool project. validate-pyproject - Automated checks on pyproject.toml powered by JSON Schema definitions It’s a bit terse with errors, but still useful. $ validate-pyproject pyproject.toml Invalid file: pyproject.toml [ERROR] `project.authors[{data__authors_x}]` must be object $ validate-pyproject pyproject.toml Invalid file: pyproject.toml [ERROR] Invalid value (at line 3, column 12) I’d probably add tox Don’t forget to build and test your project after making changes to pyproject.toml You’ll catch things like missing dependencies that the other tools will miss. Michael #3: aws-lambda-powertools-python Via Mark Pender A suite of utilities for AWS Lambda Functions that makes distributed tracing, structured logging, custom metrics, idempotency, and many leading practices easier Looks kinda cool if you prefer to work almost entirely in python and avoid using any 3rd party tools like Terraform etc to manage the support functions of deploying, monitoring, debugging lambda functions - Tracing: Decorators and utilities to trace Lambda function handlers, and both synchronous and asynchronous functions Logging - Structured logging made easier, and decorator to enrich structured logging with key Lambda context details Metrics - Custom Metrics created asynchronously via CloudWatch Embedded Metric Format (EMF) Event handler: AppSync - AWS AppSync event handler for Lambda Direct Resolver and Amplify GraphQL Transformer function Event handler: API Gateway and ALB - Amazon API Gateway REST/HTTP API and ALB event handler for Lambda functions invoked using Proxy integration Bring your own middleware - Decorator factory to create your own middleware to run logic before, and after each Lambda invocation Parameters utility - Retrieve and cache parameter values from Parameter Store, Secrets Manager, or DynamoDB Batch processing - Handle partial failures for AWS SQS batch processing Typing - Static typing classes to speedup development in your IDE Validation - JSON Schema validator for inbound events and responses Event source data classes - Data classes describing the schema of common Lambda event triggers Parser - Data parsing and deep validation using Pydantic Idempotency - Convert your Lambda functions into idempotent operations which are safe to retry Feature Flags - A simple rule engine to evaluate when one or multiple features should be enabled depending on the input Streaming - Streams datasets larger than the available memory as streaming data. Brian #4: How to create a self updating GitHub Readme Bob Belderbos Bob’s GitHub profile is nice Includes latest Pybites articles, latest Python tips, and even latest Fosstodon toots And he includes a link to an article on how he did this. A Python script that pulls together all of the content, build-readme.py and fills in a TEMPLATE.md markdown file. It gets called through a GitHub action workflow, update.yml and automatically commits changes, currently daily at 8:45 This happens every day, and it looks like there are only commits if Note: We covered Simon Willison’s notes on self updating README on episode 192 in 2020 Extras Brian: GitHub can check your repos for leaked secrets. Julia Evans has released a new zine, The Pocket Guide to Debugging Python Easter Eggs Includes this fun one from 2009 from Barry Warsaw and Brett Cannon >>> from __future__ import barry_as_FLUFL >>> 1 <> 2 True >>> 1 != 2 File "[HTML_REMOVED]", line 1 1 != 2 ^ SyntaxError: invalid syntax Crontab Guru Michael: Canary Email AI 3.11 delivers First chance to try “iPad as the sole travel device.” Here’s a report. Follow up from 306 and 309 discussions. Maps be free New laptop design Joke: What are clouds made of?

#314 What are you, a wise guy? Sort it out!

December 13, 2022 00:37:24 32.17 MB Downloads: 0

Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Brian #1: FAQtory Will McGugan “FAQtory is a tool to auto-generate a FAQ.md (Frequently Asked Questions) document for your project. FAQtory has a FAQ.md written by itself, so you can see an example of the project in the project. Builds a markdown FAQ.md that includes questions at the top that link to answers below. “Additionally, a ‘suggest’ feature uses fuzzy matching to reply to GitHub issues with suggestions from your FAQ.” I haven’t tried this part, but looking forward to it. May help to answer GH issues that are really questions. Michael #2: Kagi search "live with it” report Still enjoying it a lot Very fast LOVE blocking SEO-heavy, content-light sites Maps are rough around the edges Not obvious how to set as a private/incognito search engine (but can be done in settings) They have browser extensions - but I don't want to install extensions I only use 1password & zoom It could use some documentation however (e.g. supports !’s, but what are they?) Being tempted by Orion too, but sticking with Vivaldi. Brian #3: Tools for rewriting Python code Luke Plant A collection of tools change your code (hopefully for the better) Several categories formatting and coding style - black, isort, … upgrades - pyupgrade, flynt, … we need one to convert from setup.py/setup.cfg to pyproject.toml type hints - auto type hints? cool. maybe. I haven’t tried any of these, but they look interesting refactoring, editors, rope, jedi other - autoflake, shed, … write your own, with LibCST Michael #4: Socketify Bringing WebSockets, Http/Https High Performance servers for PyPy3 and Python3 A new record for Python no other Web Framework as able to reach 6.2 mi requests per second before in @TFBenchmarks 🥇 🏆 This puts Python in the same ballpark than #golang, #Rust and #C++. Extras Brian: watching mousebender from Brett Cannon BTW, releases watching is cool. Probably a decent reason to use GH releases feature. Python Developer’s Guide has a visual of the Python Versions and release cycle. Shows the stages of releases: end-of-life, security, bugfix, feature Next end-of-life is Python 3.7 on 27-June-2023 Great descriptions of what all these terms mean at the bottom Michael: Michael’s latest post: Sometimes, You Should Build It Yourself Trying all in on proton for personal stuff Bunny fonts AI Stand up Comedy Joke: Wise guy, eh?

#313 Programming Robots With a Marker

December 06, 2022 00:46:00 39.3 MB Downloads: 0

Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Special guest: Kelly Schuster-Paredes Special guest: Sean Tibor Michael #1: How do you say that number? Inflect: fosstodon.org/@linuxgal@techhub.social/109430499504962727 Num2Words: pypi.org/project/num2words/ # Inflect: import inflect inflector=inflect.engine() print(inflector.number_to_words(8675309)) # eight million, six hundred and seventy-five thousand, three hundred and nine # Num2Words from num2words import num2words print(num2words(8675309)) # eight million, six hundred and seventy-five thousand, three hundred and nine Num2Words also has a CLI: pipx install num2words $ num2words 2948475 two million, nine hundred and forty-eight thousand, four hundred and seventy-five Brian #2: The Origins of Python Lambert Meertens A wonderful tale starting with TELCOMP, traveling through ABC, and finally reaching Python. This is a long article, but a wonderful story. It includes a nice emphasis at all times to keep a language simple enough for the absolute beginner but powerful enough to not be annoying for experienced developers. A few quotes from the article: “Ease of learning and ease of use are both desirable attributes in any programming language. Nonetheless, I have often felt that this aspect of language design does not always receive the attention it deserves. And what may seem easy to a designer may not necessarily be easy for a language learner.” Regarding ABC: “To serve our intended users, absolute beginners, we sought to hide low-level implementation details and instead to provide powerful high-level, task-oriented features. Then Python: “The growth in popularity of Python, from its inception thirty years ago as a one-person effort flying under the radar, has been phenomenal, but not meteoric. Instead it has been a long, slow, and steady rise. Python’s ease of learning gave it a competitive advantage in a period when there was a perpetual need for more programmers. Its clean syntax and semantics make it easier to maintain a software base written in Python than other languages—an important consideration given that the cost of maintaining software dwarfs the cost of creating new software.” Kelly #3: Ozobot Evo Introduces a Python Beta Version. (August 17, 2022) The original Ozobot model – the Ozobot Bit – is no longer available for purchase . The New Evo Ozobit- has three Kit options. The Entry Kit (single robot), the Ozobot Evo 12-Pack, and the Ozobot Evo 18-Pack. https://beta.python.ozobot.com/doc-python-api/ozobot.html#module-0 Still has the updated OzoBlockly platform for Block Programming. This tiny bot comes with: Line following Color detection Sound proximity sensor bluetooth Crash detection Students can even code functions Ozobot simulator(block) https://games.ozoblockly.com/shapetracer-freeform Web beta app: beta.python.ozobot.com Michael #4: setproctitle A Python module to customize the process title Awesome for servers and anytime “python” is not enough Easy to use directly: from setproctitle import setproctitle setproctitle("tp-search daemon") Used automatically by servers like uwsgi and gunicorn I believe. ### # uWSGI server configuration ### [uwsgi] # uWSGI provides some functionality which can help identify the workers procname-prefix = training- auto-procname = true Some nice results, example from Talk Python Training Brian #5: Looking forward to Python 3.12 New features in 3.12a2 Improved Error Messages lots of other goodies, like pathlib.walk(). Release scheduled for Oct 2023 But why wait? Start testing your projects with it now: Testing with Python 3.12 Note that “During the alpha phase, features may be added up until the start of the beta phase (2023-05-08) and, if necessary, may be modified or deleted up until the release candidate phase (2023-07-31). Please keep in mind that this is a preview release and its use is not recommended for production environments.” Actually, with that note, you might want to wait. I don’t. I’ll deal with it when/if I get a failure. Sean #6: Re:Invent 2022 EF Education Breakout Presentation at AWS Re:Invent 2022 Complete redesign of online learning platform by one of the largest education companies in the world We’ve all seen Zoom classrooms with rows on rows of students A more immersive experience for learning with green screens, digital sets, and props Massive amount of analytics around student engagement and learning, including full transcription of every student, engagement tracking, and computer vision Extras Michael: You can support the PSF if you’re selling things on EBay. Check “Donate a portion to charity” and choose “Python Software Foundation” via Joe Riedley Textinator for Windows (the Windows version of TextSniper) Paperlike for iPad Kelly: A new Special Interest Group for the PSF launched 6 days ago. “Edu-sig, through its mailing list, provides an informal venue for comparing notes and discussing future possibilities for Python in education.” Led by Timothy Wilson. Sean: Dr. Werner Vogel’s keynote - everything is coming up async EventBridge Pipes Jokes: fosstodon.org/@kimvanwyk/109389398652030679 And a new mastodon user: fosstodon.org/@vruz@mastodon.social/109394538570819699

#312 AI Goes on Trial For Writing Code

November 29, 2022 00:35:26 38.67 MB Downloads: 0

Watch on YouTube About the show Sponsored by Complier Podcast from RedHat Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Brian #1: Coping strategies for the serial project hoarder Simon Willison Also a talk from DjangoCon2022 Massively increase your productivity on personal projects with comprehensive documentation and automated tests. I’m actually not sure what title would be best, but this is an incredible video that I’m encouraging every developer to watch, whether or not you work with open source projects. Covers The perfect commit Implementation, Tests, Documentation, and a link to an issue thread Tests Prove the implementation works, pass if it works, fails otherwise A discussion of how adding tests is way easier than starting testing a project, so get the framework in place early, and devs won’t be afraid to add to it. Cookiecutter repo templates for projects you will likely start super cool idea to have your own that you keep up to date with your preferred best practices A trick for using GitHub actions to use those templates to populate new repos Trying this out is on my todo list Documentation must live in the same repo as the code and be included in PRs for the PR to be accepted by code review maybe even test this using documentation unit tests Everything links to an issue thread Keep all of your thoughts in an issue thread Doesn’t have to be a dialog with anyone but yourself This allows you to NOT HAVE TO REMEMBER ANYTHING Tell people what you did This is just as important in work projects as it is in open source Blog about it Post on Twitter (or Mastodon, etc.) Avoid side projects with user accounts “If you build something that people can sign into, that’s not a side-project, it’s an unpaid job. It’s a very big responsibility, avoid at all costs!” - this is hilarious and something I’m probably not going to follow Michael #2: GitHub copilot lawsuit First, we aren’t lawyers Lawsuit filed on November 3, 2022 We’ve filed a lawsuit challenging GitHub Copilot, an AI product that relies on unprecedented open-source software piracy. GitHub copilot is trained on projects on GitHub, including GPL and other restrictive licenses This is the first class-action case in the US challenging the training and output of AI systems. Brian #3: Use Windows Dialog Boxes from Python with no extra libraries Actual title: Display a message box with Python without using a non-standard library or other dependency (Windows) By Matt Callahan / learned about from from PyCoders weekly When I need a simple pop up dialog box that’s cross platform, PySimpleGUI is awesome and so easy. But when I KNOW it’s only going to run on Windows, why not just use native dialog boxes? Matt’s article shows you how, using ctypes to call into a Windows dll. Small example from article: import ctypes def main(): WS_EX_TOPMOST = 0x40000 windowTitle = "Python Windows Message Box Test" message = "Hello, world!" # display a message box; execution will stop here until user acknowledges ctypes.windll.user32.MessageBoxExW(None, message, windowTitle, WS_EX_TOPMOST) print("User clicked OK.") if __name__ == "__main__": main() Notes: The uType (fourth) parameter is a multi-use value that can be or-ed for things like: Type of dialog box: Help, OK, OK/Cancel, Retry/Cancel, Yes/No, etc. The icon to use: Exclamation, Info, Question, etc. Modality, … Return value is used to understand how user reacted: 1 - OK, 2 - Cancel (or x), …, 6 - Yes, 7 - No, … Michael #4: Extra Extra Extra Python browser extensions takahe - Mastodon on Python - the right way Michael’s article in Black Friday perf We could scale down our server after what I’ve learned. But we’d pay 10x more in bandwidth overages ironically: Last month Talk Python broadly transferred 20.2 TB of data from our servers Moved our static traffic to Bunny CDN, highly recommended service RSS revival My blog: mkennedy.codes Reeder 5 app on iOS and macOS Rivers Cuomo (from Weezer) and Guido sit down for a talk together Also check out the Talk Python episode with Rivers: talkpython.fm/327 Kite is saying farewell

#311 Catching Memory Leaks with ... pytest?

November 24, 2022 00:49:50 42.0 MB Downloads: 0

Watch on YouTube About the show Python Bytes 311 Sponsored by Microsoft for Startups Founders Hub. Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Special guest: Murilo Cunha Michael #1: Latexify We are used to turning beautiful math into programming symbols. For example: amitness.com/2019/08/math-for-programmers/#sigma Take this code: def do_math(a, b, c): return (-b + math.sqrt(b ** 2 - 4 * a * c)) / (2 * a) Add @latexify.function decorator display do_math in a notebook Get this latex: \mathrm{do_math}(a, b, c) = \frac{-b + \sqrt{b^{{2}} - {4} a c}}{{2} a} Which renders as I could only get it to install with: pip install git+https://github.com/google/latexify_py Brian #2: prefixed From Avram Lubkin “Prefixed provides an alternative implementation of the built-in float which supports formatted output with SI (decimal) and IEC (binary) prefixes.” >>> from prefixed import Float >>> f'{Float(3250):.2h}' '3.25k' >>> '{:.2h}s'.format(Float(.00001534)) '15.34μs' >>> '{:.2k}B'.format(Float(42467328)) '40.50MiB' >>> f'{Float(2048):.2m}B' '2.00KB' Because prefixed.Float inherits from the built-in float, it behaves exactly the same in most cases. When a math operation is performed with another real number type (float, int), the result will be a prefixed.Float instance. also interesting First new SI prefixes for over 30 years new prefixes also show up here - Murilo #3: dbt Open source tool CLI tool Built with Python 🐍 Applies “best practices” to SQL projects Combines git + .sql files + jinja Support many data platforms Let’s you Template SQL queries Including loops Execute DAGs Data validation Easily build docs (data lineage, visualize DAGs, etc.) Now you can also run Python models Useful if there’s a convenient python function for your data transformation or some more complex logic (i.e.:fuzzy string matching, machine learning models, etc.) Available for Snowflake, Databricks, BigQuery dbt’s coalesce’s announcement https://www.youtube.com/watch?v=rVprdyxcGUo Michael #4: Memray pytest plugin pytest-memray is the pytest plugin for, well, memray. :) You can ensure that not too much memory is used with @pytest``**.**``mark``**.**``limit_memory``**(**``"24 MB"``**)** And you get an allocation report with pytest --memray file.py But coming soon, we’ll have memory leak checking too. @pytest.mark.check_leaks() def test_foobar(): # Do some stuff and ensure # it does not leak memory pass Brian #5: Stealing Open Source code from Textual Will McGugan Will reminds us of one of the great benefits of open source code, stealing code (when allowed by the license, of course) Goes as far as to point out some bits of textual that you might want to lift looping with indication of when you’ve hit the first or last item a LRUCache with more flexibility than lru_cache a Color class with conversions for css, hex, monochrome, hsl 2d geometry Murilo #6: Shed Superset of black "shed is the maximally opinionated autoformatting tool. It's all about convention over configuration, and designed to be a single opinionated tool that fully canonicalises my code - formatting, imports, updates, and every other fix I can possibly automate.” Also format code snippets in docstrings, markdown, restructured text No configuration options pre-commit hooks available Bundles together: black isort autoflake pyupgrade blacken-docs Extras Brian: pytest-check (version 1.1.3) changes now live New README, hopefully makes it clear how to use. Use check from from pytest_check import check or from the check fixture: def test_foo(check): … Either form returns the same object. From that check object, you can use helper functions like check.equal(a, b), etc. use it as a context manager, with check: assert a == b even grab the raises context manager: with check.raises(Exception): … Intended to be backwards compatible although some old use cases might be deprecated/removed in the future. Michael: New YouTube Video: Best Native App for Mastodon is ... Nearly 50% of macOS malware comes from one app — do you have it on your MacBook? PyCascades CfP A fresh take on blogging (for Michael): mkennedy.codes Based on Hugo - which is so good. Hosted on netlify.com Murilo: mastodon.py - a Python wrapper around Mastodon’s API Nice notebook diffs in Github PRs 🚀 flake8 is not on Gitlab anymore Who’s gonna win the world cup? lancer Joke: Messing with the algorithm Let’s start this one with some history Recusion joke

#310 Calling All Tools for Readmes

November 15, 2022 00:53:44 45.62 MB Downloads: 0

Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Special guest: Adam Hopkins Python Web Development with Sanic Brian #1: Tips for clean code in Python Bob Belderbos Generally some great tips to think about to keep code maintainable: Smaller units. Break things up into single responsibility. SRP: Single Responsibility Principle Move magic numbers into constants or parameters. Avoid global scope. (even though it’s not really global) Use linters and auto-formatters. Use very narrow try/except blocks. Idiomatic Python. (Although I agree, this is a weird one as it’s hard for new people to follow). Pay attention to data structure choice and learn to utilize standard structures and those in collections. Use the standard libary. Use mappings Flat is better than nested. But I’m gonna focus on the “smaller units” because it applies to modules as well. Try to keep modules organized such that you can keep relevant and related code concepts in your head. Michael #2: Mastodon is picking up speed @pythonbytes@fosstodon.org @mkennedy@fosstodon.org @brianokken@fosstodon.org @admhpkns@fosstodon.org I’m calling this a “Mastodon First” strategy rather than “Let’s burn down Twitter and scatter” Just did a Talk Python about it Money in mouth: I became a patreon of Fosstodon and Mastodon’s company Mastodon is open source, find it here Twitter’s potential collapse could wipe out vast records of recent human history Python’s API for Mastodon: toot Download a proper Twitter archive with this Python script Integrated the API into stream deck You can install it as a PWA: Adam #3: Correction to Sanic Worker Manager in v22.9 Episode #308 covered a recent article published on a new feature in Sanic v22.9 Blog article: Pushing work to the background of your Sanic app The segment focused on the celery-like job queue in Sanic Clarification: Goal of the feature is to bring a consistent development experience from dev thru prod Enables usage of multiprocessing-safe shared objects Simple pattern for managing multiple long-running processes Release notes for Sanic v22.9 Sanic documentation on the Worker Manager Brian #4: Some FastAPI news, and some great READMEs. FastAPI 0.87.0 has some interesting notes Upgraded Starlette, which includes TestClient based on HTTPX instead of Requests Since that might break some peoples use of TestClient, someone named Kludex built bump-testclient to help automatically convert test code to the new interface. That’s so cool! Use Ruff for linting Add a Help Maintain FastAPI section to the docs that emphasizes that it’s super helpful to: Help others with issues Review PRs Both of those sections have other expanded sections to describe what that means. The FastAPI commitment to great documentation is amazing and worth emulating. It also has a really good README. Interesting sponsors section. Cool way for a popular project to get maintenance funding. Testimonials. It’s like a sales landing page, which really, a README kinda is. Other common good practices and cool items Images Some use of collapsable sections. Other notable READMEs pytest short example right away to show how simple it can be to use. textual and rich great use of images and short examples highlighting often missed features, such as pretty and inspect Utilizing expandable/collapsable sections for longer examples httpx like pytest, shows a small example quickly, redirects many other sections to more thorough docs. Michael #5: Closevember An annual event focused on sustainable open source development practices and maintainer well-being. Let's support open source maintainers by helping them close issues and pull requests throughout November. Over at closember.org Contributing to a project carries a number of responsibilities, in order to make it as easy as possible for a project to receive that contribution. For Maintainers: How to Get Ready (see site) If you only want assistance with closing some issues and PRs, then tag your repo with closember and you’re all set. One thing that we often find helpful is to declutter our physical and digital environment: tidying our desks a bit, decluttering our computers’ desktops, unsubscribing from some email lists ... that sort of thing. I did this this month actually. Spent 6 hours completely rebuilding my desk to have zero wires and look tidy and clean (hint: 3m of industrial velcro and things stuck upside down) and formatted my computer to a fresh OS after two years. For the Community: How to Participate (see site) If you’ve never used GitHub before, your first step is going to be signing up for a free account. Also, if you’re super new to git: talkpython.fm/git If you’ve opened issues or PRs on projects in the past, you can start by taking a look at your own GitHub issues and your own PRs to see if any of them are outdated or have already been fixed—if so, close them! After that, start browsing projects: take a look at your favorite projects and see if they’ve been tagged with closember, or browse the list of closember projects. Check out the close boards (on the site) Adam #6: Super simple “Cache with async power” using Cashews Recently popped up in my GitHub Explore Cashews: Async cache framework with simple API to build fast and reliable applications Super simple out-of-the-box API supports in memory, Redis, DiskCache (local sqlite) one-line setup then implemented as a decorator Human-friendly TTL values: example “3h” Client-side caching - For example, if you are using Redis backend you do not need to make a network call on every cache request Strategies for common cache issues cache hits, early recalculation, soft TTL, resource locking, rate limiting!, circuit breaker Has its own interface for middleware Extras Michael: Take the PSF survey Adam: Voting season is upon us: Python Steering Council nominations are open Joke: JavaScript has been Banned from Twitter

#309 When Malware PoC's are Themselves Malware

November 09, 2022 00:35:01 30.09 MB Downloads: 0

Watch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Michael: #0: Python Bytes is 6 years old this week. Thank you! 🎉 Michael #1: Malicious proof-of-concepts are exposing GitHub users to malware and more The paper They found that of the 47,313 GitHub repositories they had downloaded and checked, 4,893 (10.3%) were malicious. In some the attackers were trying to plant malware on users’ machines, while in others, they tried to open backdoors using CobaltStrike, for example Ignoring this problem can cause damage that ranges from infecting yourself as [a] user, to infecting your company and likely your customers as well if it’s a more sophisticated attack,” El Yadmani warned. Languages Ruby 379 Go 400 JavaScript 548 Shell 652 C++ 962 Java 1071 C 1686 Python 8305 Undetected 31858 Example Python exfile script included in the paper Brian #2: The great Mastodon experiment Context should be obvious re Twitter news. A lot of Python people have kept in touch via Twitter. A lot are now experimenting with Mastadon, What I did asked Twitter people which server to use, then just picked fosstodon.org, but there are many servers This is me: @brianokken@fosstodon.org Michael got in too: https://fosstodon.org/@mkennedy just started using it, following people, trying iOS clients, etc. Now I’m ready for some tutorials, and here’s a list that looks decent: An Increasingly Less-Brief Guide to Mastodon Everything I know about Mastodon A hastily written guide for data science folks trying to navigate the fediverse. Mastodon is just blogs - Simon Willison is running his own server. Eight Mastodon apps for iPhone - I’m currently trying like 4, but you can also just log into your sever and do everything there. Fedi.Tips and their Beginners Start Here page Michael #3: Gitpod and the traveling dev Gitpod is an open-source Kubernetes application for ready-to-code developer environments that spins up fresh, automated dev environments for each task, in the cloud, in seconds. Gitpod is paid, but there are decent free tiers Features Run a desktop or browser based version of VS Code or any JetBrains IDE and customise it to your individual needs - from themes to extensions, you have full control. Brian #4: Color in the terminal pytest-check currently doesn’t use color but a little red for failures would be good (and was requested via an issue) I could use rich, but maybe that’s a slightly larger hammer than I need for this job Maybe raw escape sequences like print('\033[31m' + 'some red text') kinda gross won’t work out of the box on Windows. But colorama can fix Windows. It just recently added just_fix_windows_console(), which apparently works better than init() in that it can be called multiple times without blowing up. Includes easier to read codes for some basic colors, so this works: from colorama import just_fix_windows_console from colorama import Fore, Style just_fix_windows_console() print(Fore.RED + 'some red text') print(Style.RESET_ALL) print('back to normal now') Extras Brian: Simon Willison wrote What to blog about, which includes TIL (today I learned) posts that don’t need to be full tutorials Projects you’ve built I’d like to include Projects in progress Bug fixes or feature additions where you needed to learn a bit of something beforehand Example: I should write up “Adding red to pytest-check” Michael: Beanie reorg: There is no sync version here more. Please use Bunnet instead https://twitter.com/nicholdav/status/1589643652598759424 ? PyCon Days Breakdown Been playing with GeForce now, really impressive. Meanwhile, why is google still selling stadia? New video: A Walrus Meets a Python - What is the := Walrus Operator? New video: Python GC Settings - Change This and Go 20% Faster! Joke: Relaxation Relax to it on YouTube: youtube.com

#308 Conference season is heating up

November 01, 2022 00:34:37 29.64 MB Downloads: 0

Watch the live stream: Watch on YouTube About the show Sponsored by Complier Podcast from RedHat Michael #0: New livestream time - 11am PT on Tuesdays. Also, subscribe to the youtube channel and “hit the bell” to get notified of all the live streams. Brian #1: It’s PyCon US 2023 CFP time Will be held in Salt Lake City, Salt Palace Convention Center Talks are Friday - Sunday, April 19-23 PyCon US 2023 launch announcement PyCon 2023 site features images taken from past PyCon artwork Call for proposals open until Dec 9, but please don’t wait that long. Michael #2: Any.io AnyIO is an asynchronous networking and concurrency library that works on top of either asyncio or trio. It implements trio-like structured concurrency (SC) on top of asyncio. Cool interpretability between native threads and asyncio Using subprocesses: AnyIO allows you to run arbitrary executables in subprocesses, either as a one-shot call or by opening a process handle for you that gives you more control over the subprocess. Async file I/O: AnyIO provides asynchronous wrappers for blocking file operations. These wrappers run blocking operations in worker threads. Cool synchronization primitives too. Catch the Talk Python episode with Alex: talkpython.fm/385 Brian #3: How to propose a winning conference talk Reuven Lerner Some nice tips and advice Build a list of topics If you train, teach, mentor, lead, or coach already: what questions to people always ask you? what knowledge would help people to have? where do people seem to just “not get it”? If you don’t train or teach, then maybe hit up Stack Overflow… From Brian: I think you can imagine yourself a year or two ago and think about stuff you know now you wish you knew then and could learn faster. Build an outline with times This part often seems scary, but Reuven’s example is 10 bullets with (x min) notes. Write up a summary. One short, one longer. Indicate who will benefit, what they will come out knowing, and how it will help them. Propose to multiple conferences. Why not? Practice (from Brian: Even if you get rejected, you’ve gained. Turn it into a youTube video or blog post or both.) - Michael #4: Sanic release adds background workers via Felix In v22.9 (go cal-ver!), the main new feature is the worker process management - the main Sanic process handles a pool of workers. They are normally used for handling requests but you can also use them to handle background jobs and similar things. You could probably use it for a lot of the reasons people turn to something like Celery. The lead developer (Adam Hopkins) has written a blog post about this feature. MK: Sanic has been flying a bit under my radar. Maybe time to dive into it a bit more. Extras Brian: Create Presentation from Jupyter Notebook Cool walkthrough of how to use the built in slideshow features of Jupyter Notebooks. pytest 7.2.0 is out No longer depends on the py library. So if you do, you need to add it to your dependencies. nose officially deprecated, which includes setup() and teardown(). Really glad I dropped the “x unit” section on the 2nd edition of the pytest book. testpaths now supports shell-style wildcards Lots of other improvements. check out the change log Michael: Rich on pyscript (via Matt Kramer) Python 3.11 in 100 seconds video from Michael Joke: Deep questions & Relationship advice from geeks

#307 Your Python just got faster (3.11 is out!)

October 26, 2022 00:44:54 38.27 MB Downloads: 0

Watch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Michael #1: Python 3.11 is released Live stream of the actual release procedure Talk Python episode coming next week (live stream on Friday) Major new features of the 3.11 series, compared to 3.10 General changes PEP 657 -- Include Fine-Grained Error Locations in Tracebacks PEP 654 -- Exception Groups and except* PEP 680 -- tomllib: Support for Parsing TOML in the Standard Library gh-90908 -- Introduce task groups to asyncio gh-34627 -- Atomic grouping ((?>...)) and possessive quantifiers (*+, ++, ?+, {m,n}+) are now supported in regular expressions. The Faster CPython Project is already yielding some exciting results. Python 3.11 is up to 10-60% faster than Python 3.10. On average, we measured a 1.22x speedup on the standard benchmark suite. See Faster CPython for details. Typing and typing language changes PEP 673 -- Self Type PEP 646 -- Variadic Generics PEP 675 -- Arbitrary Literal String Type PEP 655 -- Marking individual TypedDict items as required or potentially-missing PEP 681 -- Data Class Transforms Brian #2: Installing Python 3.11 on Mac or Windows pythontest.com I wrote this up because there are lots tutorials with weird instructions. For most people, I think the right answer is to use the python.org installer. It just works. One change, for Windows: Use “Advanced Options” and select “Add Python to environment variables”. The default process: allows multiple versions, like 3.7, 3.10, 3.11, to all live side by side. allows tox to use all of these allows you to specify which one if you want python3.10, for example, on mac py -3.10 on windows allows you to update versions in place. Say 3.10.7 to 3.10.8, or 3.11.0 to 3.11.1 when it comes out. Please, blog writers, stop recommending pyenv to novices. It’s a cool project, but it is not a project for casual users. And homebrew lovers, go for it, you are not going to read my article anyway. Michael #4: Bossie 2022 Awards Notable winners Wasmtime: Similar to what Node.js does for the JavaScript runtime, Wasmtime allows developers to leverage all of the advantages that WebAssembly provides inside the browser-including safe sandboxed execution, near-native performance, and support across multiple programming languages and platforms -outside the browser. (Python’s integration) PyScript: One of the long-gestating promises of WebAssembly is enabling the use of languages other than JavaScript in the web browser. PyScript delivers a full Python runtime in the browser, allowing you to use Python in webpages as a full-blown scripting language. Sentry: Alongside security, error and performance tracing are among the most frustratingly inevitable requirements for many apps. Cue a sigh of relief. Sentry offers an entire ecosystem of open source tools for monitoring the health of applications, services, and APIs, from the server-side API for collecting data, to a dashboard for making it manageable, to a comprehensive slew of application-side integrations. nbdev: One of the dirty secrets of notebook programming, using environments like Jupyter or Google Colab, is that it produces some of the worst spaghetti code you've ever seen, with data scientists hopping from cell to cell and creating an unmaintainable mess. Some even go so far as to say that notebook programming might be as harmful as GOTO was back in the day. Brian #5: Textual 0.2.0 All the cool things Will has been showing off on Twitter recently are part of the css branch. This has been merged, and released as 0.2.0 They also held off this release until they were happy with the documentation, which includes: A new tutorial that walks through a stopwatch application and everything that goes into it. An in depth reference guide with fully working examples, all of which are also in github, so you can play with it directly without retyping everything. Extras Michael: Video I created: 17x Faster Page Load in 30 minutes using Python, PyCharm, and MongoDB Pandas Markets Calendar (by Ryan Sheftel) Beanie adds a sync API DuckDuckGo browser, exciting and disappointing int() isn’t done yet via Will Shanks Ubuntu has decided to patch out the int limit and preserve the previous behavior on the basis that the risk factor is low and not worth breaking compatibility for. Joke: i heard you like getters

#306 Some Fun pytesting Tools

October 19, 2022 00:46:22 39.21 MB Downloads: 0

Watch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Brian #1: Awesome pytest speedup Neyts Zupan A checklist of best practices to speed up your pytest suite. as a talk at Plone NAMUR 2022 Measure first Then make sure (all items have explanations) Hardware is fast use a faster computer also try a self-hosted runner seriously, a dedicated computer (or a few) for making test runs faster might be worth it. CI resources are usually slower in cloud than local, and even expensive VM farms are often slower. Try local Collection is fast utilize norecursedirs and specifying the location of the tests, either on the command line or with testpaths PYTHONDONTWRITEBYTECODE=1 is set might help Built-in pytest plugins are disabled try -p no:pastebin -p no:nose -p no:doctest Only a subset of tests are executed Especially when developing or debugging, run a subset and skip the slow tests. Network access is disabled pytest-socket can make sure of that Disk access is disabled interesting idea Database access is optimized great discussion here, including using truncate and rollback. Tests run in parallel pytest-xdist or similar Then keep them fast monitor test speed Michael #2: Strive to travel without a laptop Prompt from Panic for SSH on iThings github.dev for an editor on iPad Push to branch for continuous deployment BTW, Apple could just make M1 iPads boot to macOS rather than chase silly multi windowing systems (stage manager, etc, etc) Brian #3: Some fun tools from the previous testing article hyperfine for timing the whole suite pytest --``durations 10 for finding test times of slowest 10 tests leave the 10 off to find times of everything, sorted pyinstrument for profiling with nice tree structures and how to use it with pytest pytest-socket disables network calls with --disable-socket, helping to find tests that use network calls. pyfakefs, a fake file system that mocks the Python file system modules. “Using pyfakefs, your tests operate on a fake file system in memory without touching the real disk.” BlueRacer.io Michael #4: Refurb A tool for refurbishing and modernizing Python codebases Think of it as suggesting the pythonic line of code. A little sampling of what I got on Talk Python Training file.py:186:25 [FURB106]: Replace x.replace("\t", " ") with x.expandtabs(1) file.py:128:17 [FURB131]: Replace del x[y] with x.pop(y) file.py:103:17 [FURB131]: Replace del x[y] with x.pop(y) file.py:112:39 [FURB109]: Replace not in [x, y, z] with not in (x, y, z) file.py:45:5 [FURB131]: Replace del x[y] with x.pop(y) file.py:81:21 [FURB131]: Replace del x[y] with x.pop(y) file.py:143:9 [FURB131]: Replace del x[y] with x.pop(y) file.py:8:50 [FURB123]: Replace list(x) with x.copy() You don’t always want the change, can suppress the recommendation with either a CLI flag or comment. Extras Michael: Back on episode 54 in 2017 we discussed python apps in systemd daemons. Multiprocessing allows for a cool way to save on server memory Do the scheduled work a multiprocessing.Process Here’s an example from Talk Python Training Completely rewrote search UI for Talk Python courses Google analytics is now illegal? Fleet is finally in public preview I’ll be on a JetBrains/PyCharm webcast Thursday. Joke: Tests pass

#305 Decorators need love too

October 13, 2022 00:32:58 27.87 MB Downloads: 0

Watch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Michael #0: Scorpions concert Check out this short video if you're interested. Michael #1: Pyscript 2022.09.1 is out Beware of the breaking changes Brian #2: Decorator shortcuts by Ned Batchelder Michael #3: Panel (of Holoviz) on Pyscript via Marc Skov Madsen Panel can now run on pyodide and pyscript with no backend server. Brian #4: auto-walrus Marco Gorelli Also, a reminder about pyupgrade, mentioned on the show back in 2018 Especially, look at the --py38-plus through --py39-plus flags. There are flags for 3.10 and 3.11, but limited testing for them. Joke: I need a new shirt

#304 Build your own text adventure language in Python

October 05, 2022 00:38:24 32.93 MB Downloads: 0

Watch the live stream: Watch on YouTube About the show Sponsored by Compiler Podcast from RedHat Brian #1: Ten tasty ingredients for a delicious pull request on wagtail blog, from LB Great tips for helping out with open source projects. But even for closed source, there’s good stuff there to know for people transitioning to single person projects to working on a team. The tips Read the [development] instructions. The contributing guide, etc. Read the issue and comments Create a fresh branch for your contribution Keep the changes focused Write unit tests also, extending tests for untested or under-tested features are a great way to contributes Give your pull request a name with context Reference the issue being fixed or resolved in the pull request Review & fix the CI failures Push to the same branch with fixes and do not open a new pull request Be patient. (Article lists this as “Eagerness balanced with patience”). Michael #2: textX via Rhet Turnbull textX is a meta-language for building Domain-Specific Languages (DSLs) in Python. It is inspired by Xtext. In a nutshell, textX will help you build your textual language in an easy way. You can invent your own language or build a support for already existing textual language or file format. From a single language description (grammar), textX will build a parser and a meta-model (a.k.a. abstract syntax) for the language Brian #3: Reasoning about asyncio.Semaphore Guido van Rossum Article uses a fast food restaurant analogy to reason about concurrency, asyncio, locks, and semaphores. A lock is like a single table restaurant with buzzers handed out to people waiting. A semaphore is like the same thing but with more than one table. Great discussion of the complexities of the Semaphore implementation. Also of concurrency. But almost as important, it’s an excellent example of utilizing a fairly easy to visualize analogy to reason about a complex problem. It also hits parts of the problem difficult to fit into the analogy, and pragmatically abandons the analogy when necessary. Michael #4: Turnstile A user-friendly, privacy-preserving alternative to CAPTCHA I created a Python library based on Pydantic to validate the forms: turnstile.py (should I make this proper package and GitHub repo?) Extras Brian: Choosing a place to host your Python application. aka Heroku Alternatives for Python-based Applications Kicking around the idea of starting cohort based pytest training, possibly starting mid Dec. Please let me know if you think this is a good idea and you might be interested. message me @brianokken Michael: Cppfront project aims to modernize C++ New pyscript (will cover in more depth soon) NextDNS follow up https://nextdns.io/ Yes, it’s basically PiHole in the Cloud with tons of options Currently outdoing my NordVPN protections Try with https://adblock-tester.com Had to manually set DNS-over-HTTPS in Vivaldi to work with VPN Add additional blocking lists Got a Feather ESP32-S2 and put CircuitPython on it Joke: Getting help with code

#303 This title is required or is it optional?

September 29, 2022 00:37:56 32.28 MB Downloads: 0

Watch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Michael #1: Human regular expressions revisited via Mikael Honkala We mentioned of Al Sweigart's humre in Python Bytes… Mikael went on a little search and compiled my findings into this repo. A lot of people feel that re needs some help. At least 3 of the "serious" packages I found came out in the last few months. Since a package like this is not overly complex to make, all the ways to approach the problem are clearly being explored. Unfortunately these seem to be mostly single-person efforts, and many have fallen to the wayside before long. Hopefully there's some consolidation on the horizon, to share some of the maintenance effort and establish some of the packages as here for the long haul. The list could be useful to you if you are: Looking for a tool: Check the list to get a quick idea of the "look and feel" of each package. Thinking about building a tool: Check the list for alternative approaches, and maybe consider if contributing to an existing package might be a better way to get what you need. Building a tool, or already have one: Use the list to clarify and communicate what the main differences and strengths of your solution are. Brian #2: Implicit Optional Types Will Be Disabled by Default … in a future mypy feature release (possibly the next one after 0.98x) … Thanks Adam Johnson for spotting this and letting us know Stop doing this: s: str = None Do one of these: s: str | None = None s: Union[str, None] = None s: Optional[str] = None ← but this has problems Optional != optional From python docs: ”Optional[X] is equivalent to X | None (or Union[X, None]).” “Note that this is not the same concept as an optional argument, which is one that has a default. An optional argument with a default does not require the Optional qualifier on its type annotation just because it is optional. “ Best described in FastAPI docs, Python Types Intro, starting at “Possibly None" Recommendation is to use: s: str | None = None for Python 3.10+ s: Union[str, None] = None for Python 3.9+ For 3.7, 3.8, you still have Optional as an option, I think. Why haven’t you upgraded to 3.9? We’re almost to 3.11, what’s the problem?! Michael #3: cython-lint by Marco Gorelli A tool (and pre-commit hook) to lint Cython files, similar to how flake8 lints Python files, and works by parsing Cython's own AST (abstract syntax tree). Found quite a few nice clean-ups which could be applied on: pandas numpy scikit-learn cupy Brian #4: difftastic - structural diff “Difftastic is a structural diff tool that understands syntax.” “Difftastic detects the language, parses the code, and then compares the syntax trees.” Interesting story about building difftastic For one off git diff replacement use GIT_EXTERNAL_DIFF=difft git diff or GIT_EXTERNAL_DIFF="difft --syntax-highlight=off" git diff To always use difft with git, see https://difftastic.wilfred.me.uk/git.html Extras Brian: Oh My Git! - An open source game about learning Git! Python 3.11.0 is up to rc2 Michael: NextDNS Joke: I mean, who’s wrong?

#302 The Blue Shirt Episode

September 20, 2022 00:33:02 28.83 MB Downloads: 0

Watch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Brian #1: Can Amazon’s CodeWhisperer write better Python than you? Brian Tarbox “Despite the clickbait-y title, whether CW’s code is better or worse than mine is at the margins and not really important. What is significant is that it has the potential to save me a ton of time and mental space to focus on improving, refactoring and testing. It’s making me a better programmer by taking on some of the undifferentiated heavy lifting.” Some decent code generation, starting with Amazon API examples. The generated dataclass method was neat, but really, the comment “prompt” probably took as much time to write as the code would have. The generated test case is workable, but I would not consider that a good test. Perhaps don’t lump together construction, attribute access, and tests for all methods in one test function. That said, I’ve seen way worse test methods in my career. So, decent starting point. Related and worth listening to: Changelog #506: Stable Diffusion breaks the internet w/ Simon Willison Mostly an episode about AI generated art. There is a bit of a tie in to AI code generation, the ethics around it, and making sure you walk up the value chain. I’m planning on playing with GitHub CoPilot. I’ve been reluctant in the past, but Simon’s interview is compelling to combine experienced engineering skill with AI code generation to possibly improve productivity. Simon does warn against possible abuse by Junior devs and the “just believe the code” problem that we also see with “copy from StackOverflow” situations. Michael #2: Apache Superset Apache Superset is a modern data exploration and visualization platform An intuitive interface for visualizing datasets and crafting interactive dashboards A wide array of beautiful visualizations to showcase your data Code-free visualization builder to extract and present datasets A world-class SQL IDE for preparing data for visualization, including a rich metadata browser A lightweight semantic layer which empowers data analysts to quickly define custom dimensions and metrics Out-of-the-box support for most SQL-speaking databases Seamless, in-memory asynchronous caching and queries An extensible security model that allows configuration of very intricate rules on who can access which product features and datasets. Integration with major authentication backends (database, OpenID, LDAP, OAuth, REMOTE_USER, etc) The ability to add custom visualization plugins An API for programmatic customization Brian #3: Recipes from Python SQLite docs Redowan Delowar Expanding on sqlite3 Python docs with more examples, including Executing individual and batch statements Applying user-defined callbacks: scalar and aggregate scalar example shows using a sha256 function to hash passwords as their inserted into the database Enabling tracebacks when callbacks raise an error Transforming types between SQLite and Python Implementing authorization control … much more … This is great for not only learning SQLite, but also, since these kinds of topics exist in other databases, learning about databases. AND a great example of learning a subsystem by creating little code snippets to check your understanding of something. One mod I would do in practice is to write these examples as pytest functions, because I can then run them individually while keeping a bunch in the same file. 🙂 Michael #4: -ffast-math and indirect changes Brendan Dolan-Gavitt downloaded 4 TB of Python packages containing native x86-64 libraries and see how many of them use -ffast-math, potentially altering floating point behavior in any program unlucky enough to load them! Python packages built with an appealing-sounding but dangerous compiler option, -ffast-math, could end up causing any program that uses them to compute incorrect numerical results. When -ffast-math is enabled, the compiler will link in a constructor that sets the FTZ/DAZ flags whenever the library is loaded — even on shared libraries, which means that any application that loads that library will have its floating point behavior changed for the whole process. A total of 2,514 packages eventually depend on a package that uses -ffast-math. Because of highly connected nature of the modern software supply chain, even though a mere 49 packages were actually built with -ffast-math, thousands of other packages, with a total of at least 9.7 million downloads over the past 30 days, are affected. Extras Brian: Thinking about changelogs Focusing on helping teams with specific goals Working on an experiment in consulting with some lead engineers before the training to altering the content of a pytest course so the examples better match what the team will need. Sharing packages through internal system, as that’s usually different than the PyPI process. Altering the database and API example of the TalkPython pytest course content to match a teams external resources and responsibility scope. It takes extra time and thought, but in the end might increase engagement and excitement about testing and keeping up on Python’s evolving common practices. Michael: New course: Python Data Visualization pytest course going strong Joke: They all use it State of emergency

#301 PyTorch Grows Up and Moves Out

September 15, 2022 00:31:10 26.47 MB Downloads: 0

Watch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Michael #1: PythonAnywhere: Our Commitment to Providing Free Accounts via Matthew Kramer In light of Heroku’s cancelling their free tiers… They believe free tiers are important for beginners Two part solution: Limit outbound internet access for free accounts “Proof of life” to keep running - 3 months for apps, 1 yr for accounts BTW, they were acquired by Anaconda Inc. Brian #2: ruff: An extremely fast Python linter, written in Rust. Announcement article: Python tooling could be much, much faster Charlie Marsh Quite the star history, as it’s a new repo as of Aug 30. Now at 1.8k. It is extremely fast. I installed it and tried it on a small project. It ran so fast I thought it didn’t do anything. I went and added some errors to convince myself it was running. $ time flake8 src tests ... flake8 src tests 0.29s user 0.02s system 98% cpu 0.311 total $ time ruff src/ tests/ ... ruff src/ tests/ 0.01s user 0.01s system 162% cpu 0.011 total Michael #3: Meta spins off PyTorch Foundation to make AI framework vendor neutral PyTorch, which powers Tesla Autopilot and 150K other projects, will join the Linux Foundation. Its governing board includes representatives from Nvidia, Meta, Google, Microsoft, Amazon, and AMD. The PyTorch Foundation will strive to adhere to four principles, Remaining open Maintaining neutral branding Staying fair Forging a strong technical identity According to Meta, the transition to the PyTorch Foundation will not affect any existing PyTorch code Brian #4: Two string resources Python String Methods to Know Trey Hunner F-Strings Number Formatting Cheat Sheet Brian Allan Extras Brian: In Feb, on episode 271, we talked about Seaborn’s new object interface Well, it’s out now in seaborn 0.12 Interesting discussion about lazy imports. Other than that, I’m good with your extra. 🙂 Michael: pytest course is out! Joke: If a developer had to build a horse…