Python Bytes

  • Autor: Vários
  • Narrador: Vários
  • Editor: Podcast
  • Duración: 216:54:00
  • Mas informaciones

Informações:

Sinopsis

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.

Episodios

  • #269 Get Rich and replace your cat

    03/02/2022 Duración: 40min

    Watch the live stream: Watch on YouTube About the show Sponsored by Datadog: pythonbytes.fm/datadog Special guest: Luciana Brian #1:rich-cli suggested by Lance Reinsmith rich on the command line. why? syntax highlighting rich example.py rich -m README.md use -m for markdown why Will? .md seems clear enough to me. comes with themes. ex: --theme monokai formats json, --json or -j and a bunch of other features I probably won’t use, but you might. alignment, maybe width, yeah, I’ll probably use -w a bunch more In my .zshrc: alias cat='rich --theme monokai' after pipx install rich-cli feel free to tell me that I shouldn’t used cat for looking at file contents. (although, why not?) I’m not, I’m using rich. :) Luciana #2: debugpy - a debugger for Python The debugger we use in the Python extension for VS Code Super heplful features that can save up a lot of time and a lot of folks don’t seem to know about: Conditional breakpoints Helpful when you want the code to break only on a specific co

  • #268 Wait, you can Google that?

    27/01/2022 Duración: 45min

    Watch the live stream: Watch on YouTube About the show Sponsored by us: Check out the courses over at Talk Python And Brian’s book too! Brian #1: (draft) PEP 679 -- Allow parentheses in assert statements Pablo Galindo Salgado This is in draft, not approved, and not scheduled for any release But it seems like a really good idea to me. assert(1 == 2, "seems like it should fail") will always pass currently since the tuple (False,"seems like it should fail") is a non-empty tuple. Current Python will emit a warning >>> assert(1 == 2, "seems like it should fail") [stdin]:1: SyntaxWarning: assertion is always true, perhaps remove parentheses? But really, why not just change the language to allow assert with or without parens. Also would allow multi-line assert statements more easily: assert ( very very long expression, "very very long " "message", ) I hope this is a slam dunk and gets in ASAP. Michael #2: Everything I googled as a dev

  • #267 Python on the beach

    21/01/2022 Duración: 32min

    Watch the live stream: Watch on YouTube About the show Sponsored by us: Check out the courses over at Talk Python And Brian’s book too! Michael #1: Box: Python dictionaries with advanced dot notation access Want to treat dictionaries like classes? Box. small_box = Box({'data': 2, 'count': 5}) small_box.data == \ small_box['data'] == \ getattr(small_box, 'data') == \ small_box.get('data') There are over a half dozen ways to customize your Box and make it work for you: Check out the new Box github wiki for more details and examples! Superset of dict See Types of Boxes as well Brian #2: Reading tracebacks in Python Trey Hunner “When Python encounters an error in your code, it will print out a traceback. Let's talk about how to use tracebacks to fix our code.” Brian’s commentary Tracebacks can feel like brick wall of error telling you “you suck”. But they are really meant to help you, and do, once you know how to read them. Probably should be one of the earlies

  • #266 Python has a glossary?

    13/01/2022 Duración: 26min

    Watch the live stream: Watch on YouTube About the show Sponsored by Datadog: pythonbytes.fm/datadog Brian #1: Python glossary and FAQ Inspired by a tweet by Trey Hunner that referenced the glossary glossary All the Python and programming terms in one place Often refers to other parts of the documentation. Forget what an “abstract base class” is? Just look it up FAQ Has sections on General Python Programming Design and History Library and Extension Extending/Embedding Python on Windows Graphic User Interface “Why is Python Installed on my Computer?” Some decent reading here, actually. Example What is the difference between arguments and parameters? - that’s under Programming Michael #2: Any.io Learned about it via asyncer 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 Works in harmony with the native SC of trio itself Check out the features AnyIO also comes with i

  • #265 Get asizeof pympler and muppy

    05/01/2022 Duración: 47min

    Watch the live stream: Watch on YouTube About the show Sponsored by us: Check out the courses over at Talk Python And Brian’s book too! Special guest: Matt Kramer (@__matt_kramer__) Michael #1: Survey results Question 1: Question 2: In terms of too long, the “extras” section has started at these times in the last 4 episodes: 39m, 32m, 35m, and 33m ~= 34m on average Brian #2: Modern attrs API attrs overview now focus on using @define History of attrs article: import attrs, by Hynek predecessor was called characteristic. A discussion between Glyph and Hynek in 2015 about where to take the idea. attrs popularity takes off in 2016 after a post by Glyph: ‌The One Python Library Everyone Needs In 2017 people started wanting something like attrs in std library. Thus PEP 557 and dataclasses. Hynek, Eric Smith, and Guido discuss it at PyCon US 2017. dataclasses, with a subset of attrs functionality, was introduced in Python 3.7. Types take off. attrs starts supporting type hints as well,

  • #264 We're just playing games with Jupyter at this point

    22/12/2021 Duración: 53min

    Watch the live stream: Watch on YouTube About the show Sponsored by us: Check out the courses over at Talk Python And Brian’s book too! Special guest: Kim van Wyk Michael #0: Take our survey: Should we try to shorten the episodes? Please fill out the 3 question Google Form here We’ll be taking a break so see you in two weeks. Also feedback / rate us in your podcast player app Brian #1: Jupyter Games Thorsten Beier “Making their own tiny video games can be a great way for kids to learn programming in a playful matter.” For 2D physics-based games, Box2D, (written in C++), is a 2D rigid body simulation library One Python binding, pyb2d, is from Thorsten Game examples use Ipycanvas, Ipywidgets, and Ipyevents for a place to draw and input events. There are Box2D examples for physics simulations, like internal combustion and a wind tunnel. Game examples, with code, and not that much code billiards Angry Shapes (like Angry birds) World of Goo homage Rocket Color Mixing (it’s oddly satisfying to play

  • #263 It’s time to stop using Python 3.6

    15/12/2021 Duración: 50min

    Watch the live stream: Watch on YouTube About the show Sponsored by us: Check out the courses over at Talk Python And Brian’s book too! Special guest: Laís Carvalho Michael #1: Django 4.0 released Django is picking up speed: 4.0 Dec 2021 (+1) 3.0 Dec 2020 (+3) 2.0 Dec 2017 (+7) 1.0.1 May 2010 Feature highlights: The new RedisCache backend provides built-in support for caching with Redis. To ease customization of Forms, Formsets, and ErrorList they are now rendered using the template engine. The Python standard library’s zoneinfo is now the default timezone implementation in Django. scrypt password hasher: The new scrypt password hasher is more secure and recommended over PBKDF2. However, it’s not the default as it requires OpenSSL 1.1+ and more memory. Django 3.2 has reached the end of mainstream support. The final minor bug fix release, 3.2.10, was issued today. Django 3.2 is an LTS release and will receive security and data loss fixes until April 2024. Some backwards incompatible changes you’ll

  • #262 So many bots up in your documentation

    09/12/2021 Duración: 43min

    Watch the live stream: Watch on YouTube About the show Sponsored by us: Check out the courses over at Talk Python And Brian’s book too! Special guest: Leah Cole Brian #1: pytest 7.0.0rc1 Question: Does the new pytest book work with pytest 7? Answer: Yes! I’ve been working with pytest 7 during final review of all code, and many pytest core developers have been technical reviewers of the book. A few changes in pytest 7 are also the result of me writing the 2nd edition and suggesting (and in one case implementing) improvements. Florian Bruhin’s announcement on Twitter “I'm happy to announce that I just released #pytest 7.0.0rc1! After many tricky deprecations, some internal changes, and months of delay due to various issues, it looks like we could finally get a new non-bugfix release this year! (6.2.0 was released in December 2020).” “We invite everyone to test the #pytest prerelease and report any issues - there is a lot that happened, and chances are we broke something we didn't find yet (we bro

  • #261 Please re-enable spacebar heating

    03/12/2021 Duración: 42min

    Watch the live stream: Watch on YouTube About the show Sponsored by us: Check out the courses over at Talk Python And Brian’s book too! Special guest: Dr. Chelle Gentemann Michael #1: rClone via Mark Pender Not much Python but useful for Python people :) Rclone is a command line program to manage files on cloud storage. Over 40 cloud storage products support rclone including S3 object stores Rclone has powerful cloud equivalents to the unix commands rsync, cp, mv, mount, ls, ncdu, tree, rm, and cat. Brian #2: check-wheel-contents Suggested by several listeners, thank you. “Getting the right files into your wheel is tricky, and sometimes we mess up and publish a wheel containing __pycache__ directories or tests/” usage: check-wheel-contents [[HTML_REMOVED]] [HTML_REMOVED] ex: (venv) $ pwd /Users/okken/projects/cards (venv) $ check-wheel-contents dist dist/cards-1.0.0-py3-none-any.whl: OK Checks - W001 - Wheel contains .pyc/.pyo files - W002 - Wheel contains duplic

  • #260 It's brutally simple: made just from pickle and zip

    23/11/2021 Duración: 48min

    See the full show notes for this episode on the website at pythonbytes.fm/260.

  • #259 That argument is a little late-bound

    17/11/2021 Duración: 47min

    Watch the live stream: Watch on YouTube About the show Sponsored by Shortcut - Get started at shortcut.com/pythonbytes Special guest: Renee Teate Michael #1: pypi-changes via Brian Skinn, created by Bernát Gábor Visually show you which dependencies in an environment are out of date. See the age of everything you depend upon. Also, shoutout again to pipdeptree Brian #2: Late-bound argument defaults for Python Default values for arguments to functions are evaluated at function definition time. If a value is a short expression that uses a variable, that variable is in the scope of the function definition. The expression cannot use other arguments. Example of what you cannot do: def foo(a, b = None, c = len(a)): ... There’s a proposal by Chris Angelico to add a =: operator for late default evaluation. syntax still up in the air. => and ?= also discussed However, it’s non-trivial to add syntax to an established language, and this article notes: At first blush, Angelico's idea to

  • #258 Python built us an anime dog!

    11/11/2021 Duración: 43min

    Watch the live stream: Watch on YouTube About the show Sponsored by Shortcut - Get started at shortcut.com/pythonbytes Special guest: Karen Dalton Brian #1: stale : github bot to “Close Stale Issues and PRs” Was one response to a question by Will McGugan Something like “An issue filed on an open source project, I’ve asked a followup question about the issue, and filer doesn’t respond. Is there an easy way to close the issue after a set time period of inactivity.” Just trying to get a reference to Will out of the way early in the episode. stale does this: Warns and then closes issues and PRs that have had no activity for a specified amount of time. The configuration must be on the default branch and the default values will: Add a label "Stale" on issues and pull requests after 60 days of inactivity and comment on them Close the stale issues and pull requests after 7 days of inactivity If an update/comment occur on stale issues or pull requests, the stale label will be removed and the timer will re

  • #257 Python Launcher - Launching Python Everywhere

    04/11/2021 Duración: 40min

    Watch the live stream: Watch on YouTube About the show Sponsored by Shortcut Special guest: Morleh So-kargbo Michael #1: Django 4.0 beta 1 released Django 4.0 beta 1 is now available. Django 4.0 has an abundance of new features The new *expressions positional argument of UniqueConstraint() enables creating functional unique constraints on expressions and database functions. The new scrypt password hasher is more secure and recommended over PBKDF2. The new django.core.cache.backends.redis.RedisCache cache backend provides built-in support for caching with Redis. To enhance customization of Forms, Formsets, and ErrorList they are now rendered using the template engine. Brian #2: py - The Python launcher py has been bundled with Python for Windows only since Python 3.3, as py.exe See Python Launcher for Windows I’ve mostly ignored it since I use Python on Windows, MacOS, and Linux and don’t want to have different workflows on different systems. But now Brett Cannon has developed python-launcher

  • #256 And the best open source project prize goes to ...

    29/10/2021 Duración: 59min

    See the full show notes for this episode on the website at pythonbytes.fm/256.

  • #255 Closember eve, the cure for Hacktoberfest?

    20/10/2021 Duración: 46min

    Watch the live stream: Watch on YouTube About the show Sponsored by us: Check out the courses over at Talk Python And Brian’s book too! Special guest: Will McGugan Michael #1: Wrapping C++ with Cython By Anton Zhdan-Pushkin A small series showcasing the implementation of a Cython wrapper over a C++ library. C library: yaacrl - Yet Another Audio Recognition Library is a small Shazam-like library, which can recognize songs using a small recorded fragment. For Cython to consume yaacrl correctly, we need to “teach” it about the API using `cdef extern It is convenient to put such declarations in *.pxd files. One of the first features of Cython that I find extremely useful — aliasing. With aliasing, we can use names like Storage or Fingerprint for Python classes without shadowing original C++ classes. Implementing a wrapper: pyaacrl - The most common way to wrap a C++ class is to use Extension types. As an extension type a just a C struct, it can have an underlying C++ class as a field and act as a prox

  • #254 Do Excel things, get notebook Python code with Mito

    13/10/2021 Duración: 31min

    Watch the live stream: Watch on YouTube About the show Sponsored by us: Check out the courses over at Talk Python And Brian’s book too! Special guest: Muhammad Raza Brian #1: yaml, GH Actions, and Python 3.10 Anthony Shaw (and others) Old: python: [3.7, 3.8, 3.9, 3.10-dev] New: python: ["3.7", "3.8", "3.9", "3.10"] Reasons: Github Actions use yaml. yaml treats 3.10-dev as a string, since it’s got non-numbers in it. yaml treats 3.10 as a number, and is the same as 3.1 hence, we have to use quotes for “3.10” using them on “3.7”, etc is not necessary, but is a nice consistency Michael #2: Beating C and Java, Python Becomes the #1 Most Popular Programming Language, Says TIOBE via Brian Skin "For the first time in more than 20 years we have a new leader of the pack..." the TIOBE Index announced this month. "The long-standing hegemony of Java and C is over.” For Tiobe, its enterprise focus, has seen Java and C dominate in recent years, but Python has been snapping at the heels of Java, and has n

  • #253 A new Python for you, and for everyone!

    07/10/2021 Duración: 44min

    Watch the live stream: Watch on YouTube About the show Special guest: Yael Mintz Sponsored by us: Check out the courses over at Talk Python And Brian’s book too! Michael #1: awesome-htmx An awesome list of resources about htmx such as articles, posts, videos, talks and more. Good for all sorts of examples and multiple languages We get a few nice shoutouts, thanks Brian #2: Python 3.10 is here !!!! As of Monday. Of course I have it installed on Mac and Windows. Running like a charm. You can watch the Release Party recording. It’s like 3 hours. And starts with hats. Pablo’s is my fav. Also a What’s New video which aired before that with Brandt Bucher, Lukasz Llanga ,and Sebastian Ramirez (33 min) Includes a deep dive into structural pattern matching that I highly recommend. Reminder of new features: PEP 623 -- Deprecate and prepare for the removal of the wstr member in PyUnicodeObject. PEP 604 -- Allow writing union types as X | Y PEP 612 -- Parameter Specification Variables PEP 626 -- Precis

  • #252 Jupyter is now a desktop app!

    29/09/2021 Duración: 44min

    Watch the live stream: Watch on YouTube About the show Sponsored by us: Check out the courses over at Talk Python And Brian’s book too! Special guest: Ethan Swan Michael #0: Changing themes to DIY Brian #1: SQLFluff Suggested by Dave Kotchessa. A SQL Linter, written in Python, tested with pytest Configurable, and configuration can live in many places including tox.ini and pyproject.toml. Great docs Rule reference with anti-pattern/best practice format Includes dialects for ANSI, PostgreSQL, MySQL, Teradata, BigQuery, Snoflake Note in docs: “SQLFluff is still in an open alpha phase - expect the tool to change significantly over the coming months, and expect potentially non-backward compatible api changes to happen at any point.” Michael #2: JupyterLab Desktop JupyterLab App is the cross-platform standalone application distribution of JupyterLab. Bundles a Python environment with several popular Python libraries ready to use in scientific computing and data science workflows. JupyterLab App wor

  • #251 A 95% complete episode (wait for it)

    22/09/2021 Duración: 55min

    Watch the live stream: Watch on YouTube About the show Sponsored by us: Check out the courses over at Talk Python And Brian’s book too! Special guest: Brett Cannon Michael #1: auto-optional by Daan Luttik Did you know that concrete types cannot be None in Python typing? This is wrong: def do_a_thing(extra_info: str = None): ... auto-optional will fix it: def do_a_thing(extra_info: Optional[str] = None): ... Why would you want this? Easily modify external libraries that didn't pay attention to proper use of optional to improve mypy linting. Force consistency in your own code-base: Enforcing that None parameter implies an Optional type. Run via the CLI: auto-optional [path] Brian #2: Making World-Class Docs Takes Effort Daniel Stenberg Six requirements for a project to get a gold star docs in the code repo NOT extracted from the code examples, lots of examples, more than you think you need document every API call you provide easily accessible and browsable and hopefully offline

  • #250 skorch your scikit-learn together with PyTorch

    15/09/2021 Duración: 41min

    Watch the live stream: Watch on YouTube About the show Sponsored by us: Check out the courses over at Talk Python And Brian’s book too! Special guest: Prayson Daniel Brian #1: Exciting New Ways To Be Told That Your Python Code is Bad Two new pylint errors consider-ternary-expression if condition(): x = 4 else: x = 5 x = 4 if condition() else 5 while-used it unconditionally flags every use of while expressions. generally, while should be avoided. Michael #2: GitHub Readme Stats via Роман Великий Dynamically generated stats for your github readmes This are for your repo or your stats (others too I suppose) posted somewhere outside of github Card for a project: https://github-readme-stats.vercel.app/api/pin/?username=mikeckennedy&repo=python-switch Card for a user: https://github-readme-stats.vercel.app/api?username=mikeckennedy&show_icons=true&theme=radical Card for your languages: https://github-readme-stats.vercel.app/api/top-langs/?username=mi

página 8 de 21