Python Bytes

  • Autor: Vários
  • Narrador: Vários
  • Editor: Podcast
  • Duración: 213:34:54
  • 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

  • #302 The Blue Shirt Episode

    20/09/2022 Duración: 33min

    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. Rel

  • #301 PyTorch Grows Up and Moves Out

    15/09/2022 Duración: 31min

    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/

  • #300 A Jupyter merge driver for git

    06/09/2022 Duración: 55min

    Watch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Special guest: Seth Larson Brian #1: Test your packages and wheels I’ve been building some wheels the last couple of weeks with various tools: flit, flit-core, and flit build hatch, hatchling, and hatch build setuptools, build_meta, and python -m build There are a few projects I’ve used to make sure my projects are in good shape wheel-inspect - you can inspect within Python code through inspect_wheel() function that converts to json. Or use on the command line with wheel2json check-wheel-contents - a linter for wheels tox - easily test the building, installation, and running of a package locally I actually start here, then utilize the other two tools Should have been obvious, but it wasn’t to me Projects saved on git (such as gitHub) don’t keep wheels in git. (this was obvious) When installing from git using pip install git+https://path/to/git/repo.git Your local pip will run the packaging

  • #299 Will McGugan drops by

    03/09/2022 Duración: 46min

    Watch the live stream: Watch on YouTube About the show Sponsored by the IRL Podcast from Mozilla Michael #1: Careful with that PyPI email via John Hagen There is a widespread Phishing attack going on against PyPI users. The PyPA is currently tweeting about it: https://twitter.com/pypi/status/1562442188285308929 Brian #2: IEEE Top Programming Languages 2022 : Python’s still No. 1, but employers love to see SQL skills by Stephen Cass Related: The Rise of SQL It’s become the second programming language everyone needs to know by Rina Diane Caballar Good to see Python on top for Spectrum and Trending But interesting to see growth and strength in SQL SQL is actually top for Jobs SQL is a skill you can’t ignore. Not only are relational databases just as important for large systems, they’re increasingly more important for small and even local systems, and are ever growing the responsibility of developers, not left to database specialists. Will #3: Using Mypy in production at Spring by Charlie Marsh

  • #298 "Unstoppable" Python

    24/08/2022 Duración: 32min

    Watch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Brian #1: Uncommon Uses of Python in Commonly Used Libraries by Eugene Yan Specifically, Using relative imports Example from sklearn’s base.py from .utils.validation import check_X_y from .utils.validation import check_array “Relative imports ensure we search the current package (and import from it) before searching the rest of the PYTHONPATH. “ For relative imports, we have to use the from .something import thing form. We cannot use import .something since later on in the code .something isn’t valid. There’s a good discussion of relative imports in pep 328 Michael #2: Skyplane Cloud Transfers Skyplane is a tool for blazingly fast bulk data transfers in the cloud. Skyplane manages parallelism, data partitioning, and network paths to optimize data transfers, and can also spin up VM instances to increase transfer throughput. You can use Skyplane to transfer data: Between buckets within a clou

  • #297 I AM the documentation

    16/08/2022 Duración: 22min

    Watch the live stream: Watch on YouTube About the show Sponsored by the IRL Podcast from Mozilla Michael #1: SQLCodeGen via Josh Thurston This is a tool that reads the structure of an existing database and generates the appropriate SQLAlchemy model code, using the declarative style if possible. This tool was written as a replacement for sqlautocode, which was suffering from several issues (including, but not limited to, incompatibility with Python 3 and the latest SQLAlchemy version). Features: Supports SQLAlchemy 1.4.x Produces declarative code that almost looks like it was hand written Produces PEP 8 compliant code Accurately determines relationships, including many-to-many, one-to-one Automatically detects joined table inheritance Excellent test coverage Brian #2: The death of setup.py*, long live pyproject.toml for Python-only projects Juan Luis Cano Rodriguez tweet pip install --``editable . now works with setuptools, as of version 64.0.0 To be clear, setup.cfg also not required. So everyth

  • #296 pip: Constrain your excitement

    09/08/2022 Duración: 32min

    Watch the live stream: Watch on YouTube About the show Sponsored by the IRL Podcast from Mozilla Brian #1: Pip constraints files by luminousmen You can put some constraints on your dependencies with a constraints file. “Constraints files are requirements files that only control which version of a requirement is installed, not whether it is installed or not. “ Syntax is a subset of requirements.txt syntax but all the restrictions seem reasonable, considering must have a name can’t be editable can’t specify extras (that one is maybe slightly weird) You can put --constraint constraints.txt right at the top of your requirements.txt file or specify it on command line, pip install --constraint constraints.txt -r requirements.txt Or, my favorite, stick it at the top of requirements.in file. yes. pip-compile correctly handles constraints when generating requirements.txt. Example requirements.in --constraint constraints.txt typer constraints.txt click<8.1.3 Output from pip-compile requirements.in #

  • #295 Flutter + Python GUI Apps?

    04/08/2022 Duración: 36min

    Watch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Michael #1: Faster routing for Flask & Quart Flask and Quart both utilise Werkzeug's HTTP route With the upcoming 2.2 release of Werkzeug this router will be significantly faster, with up to a factor of 5. Better for large sets of routes Micro-benchmarks are unaffected and are unlikely to show a speedup. Started with tree-based radix algorithm Moved to state machine algorithm because of wild cards Brian #2: Quarto: an open-source scientific and technical publishing system built on Pandoc suggested by Paul Mackenzie Power of Pandoc and Jupyter Build documents - html, pdf, word presentations - Revealjs, PowerPoint, Beemer websites books - html, pdf, word, epub journal articles - acm, plos, elsevier, acs, jss Publish GitHub pages, Netlify, … kinda related - Kindle to support ePub Michael #3: Flet UI via Mikael Honkala New and upcoming UI framework by Feodor Fitzner: flet. It has a very

  • #294 Specializing Adaptive Interpreters in Full Color

    26/07/2022 Duración: 35min

    Watch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Michael #1: Specialist: Python 3.11 perf highlighter via Alex Waygood Visualize CPython 3.11's specializing, adaptive interpreter.

  • #293 And if I pull this open source Jenga block...

    20/07/2022 Duración: 47min

    Watch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Special guest: Ashley Anderson Ashley #1: PSF security key giveaway for critical package maintainers Giving away 4000 2FA hardware keys Surely a team effort but I found it via @di_codes twitter (Dustin Ingram) links to previous talks on PyPI/supply chain security Interesting idea for helping with supply-chain vulnerabilities At least one dev pulled a critical package in response Previously: <add some links to prior discussions> I don’t have any critical projects Armin Ronacher has an interesting take Michael #2: PyLeft-Pad via Dan Bader Markus Unterwaditzer was maintaining atomicwrites More on how this relates to a project (Home Assistant) I wonder if PyPI will become immutable once an item is published Brian #3: FastAPI Filter Suggested and created by Arthur Rio “I loved using django-filter with DRF and wanted an equivalent for FastAPI.” - Arthur Add query string filters to your api

  • #292 Thursday, it's always a Thursday

    11/07/2022 Duración: 28min

    Watch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Brian #1: rich-codex by Phil Ewels suggested by Will McGugan “A GitHub Action / command-line tool which generates screen grab images of a terminal window, containing command outputs or code snippets.” Generate images from commands embedded in markdown files, like README.md, for example. Searches through markdown files for stuff like: ![cat cat.txt | lolcat -S 1](img/cat.svg) then runs the command, and generates the image. Can be done within a GitHub action Can also send code snippets or json to rich-cli, then generate an image. You can also have commands in a config file, Very easy to use, makes very professional looking images for documentation, that’s always up to date. Michael #2: Pydastic via Roman Right, by Rami Awar Pydastic is an elasticsearch python ORM based on Pydantic. Core Features Simple CRUD operations supported Sessions for simplifying bulk operations (a la SQLAlchemy) Dynamic

  • #291 Wait, you have how many licenses?!?

    06/07/2022 Duración: 32min

    Watch the live stream: Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training Test & Code Podcast Patreon Supporters Michael #1: Python License tracker by Tom Nijhof/Nyhof Every package depends on other package with sometimes different licenses. Tom made a tool to find out what licenses you all need for a project: PyTest alone needs 4 different licenses for itself and its dependencies. Tensorflow is even worst Brian #2: undataclass Trey Hunner As a teaching aid, and to show how much dataclasses do for you, this is a module and an application that converts dataclasses to normal classes, and fills in all of the dunder methods you need. Example in app: from dataclasses import dataclass @dataclass() class Point: x: float y: float z: float Converts to class Point: __match_args__ = ('x', 'y', 'z') def __init__(self, x: float, y: float, z: float) -> None: self.x = x

  • #290 Sentient AI? If so, then what?

    28/06/2022 Duración: 49min

    Watch the live stream: Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training Test & Code Podcast Patreon Supporters Special guest: Nick Muoh Brian #1: picologging From a tweet by Anthony Shaw From README.md “early-alpha” stage project with some incomplete features. (cool to be so up front about that) “Picologging is a high-performance logging library for Python. picologging is 4-10x faster than the logging module in the standard library.” “Picologging is designed to be used as a drop-in replacement for applications which already use logging, and supports the same API as the logging module.” Now you’ve definitely got my attention. For many common use cases, it’s just way faster. Sounds great, why not use it? A few limitations listed: process and thread name not captured. Some logging globals not observed: logging.logThreads, logging.logMultiprocessing, logging.logProcesses Logger will always default to the Sys.stderr and not observe

  • #289 Textinator is coming for your text, wherever it is

    21/06/2022 Duración: 46min

    Watch the live stream: Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training Test & Code Podcast Patreon Supporters Special guest: Gina Häußge, creator & maintainer of OctoPrint Michael #1: beanita Local MongoDB-like database prepared to work with Beanie ODM So, you know Beanie - Pydantic + async + MongoDB And you know Mongita - Mongita is to MongoDB as SQLite is to SQL Beanita lets you use Beanie, but against Mongita rather than a server-based MongoDB server Brian #2: The Good Research Code Handbook Patrick J Mineault “for grad students, postdocs and PIs (principle investigator) who do a lot of programming as part of their research.” lessons setup git, virtual environments, project layout, packaging, cookie cutter style style guides, keeping things clean coding separating concerns, separating pure functions and those with side effects, pythonic-ness testing unit testing, testing with side effects, … (incorrect definition

  • #288 Performance benchmarks for Python 3.11 are amazing

    14/06/2022 Duración: 33min

    Watch the live stream: Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training Test & Code Podcast Patreon Supporters Brian #1: Polars: Lightning-fast DataFrame library for Rust and Python Suggested by a several listeners “Polars is a blazingly fast DataFrames library implemented in Rust using Apache Arrow Columnar Format as memory model. Lazy | eager execution Multi-threaded SIMD (Single Instruction/Multiple Data) Query optimization Powerful expression API Rust | Python | ...” Python API syntax set up to allow parallel and execution while sidestepping GIL issues, for both lazy and eager use cases. From the docs: Do not kill parallelization The syntax is very functional and pipeline-esque: import polars as pl q = ( pl.scan_csv("iris.csv") .filter(pl.col("sepal_length") > 5) .groupby("species") .agg(pl.all().sum()) ) df = q.collect() Polars User Guide is excellent and looks like it’s entirely

  • #287 Surprising ways to use Jupyter Notebooks

    07/06/2022 Duración: 27min

    Watch the live stream: Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training Test & Code Podcast Patreon Supporters Michael #1: auto-py-to-exe Converts .py to .exe using a simple graphical interface A good candidate to install via pipx For me, just point it at the top level app.py file and click go Can add icons, etc. Got a .app version and CLI version (I think

  • #286 Unreasonable f-strings

    03/06/2022 Duración: 26min

    Watch the live stream: Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training Test & Code Podcast Patreon Supporters Brian #1: The Python GIL: Past, Present, and Future Bary Warsaw and Paweł Polewicz Michael #2: Announcing the PyOxy Python Runner PyOxy is all of the following: An executable program used for running Python interpreters. A single file and highly portable (C)Python distribution. An alternative python driver providing more control over the interpreter than what python itself provides. A way to make some of PyOxidizer's technology more broadly available without using PyOxidizer. PyOxidizer is often used to generate binaries embedding a Python interpreter and a custom Python application. However, its configuration files support additional functionality, such as the ability to produce Windows MSI installers, macOS application bundles, and more. The pyoxy executable also embeds a copy of the Python standard library and import

  • #285 Where we talk about UIs and Python

    25/05/2022 Duración: 50min

    Watch the live stream: Watch on YouTube About the show Sponsored: RedHat: Compiler Podcast Special guests Mark Little Ben Cosby Michael #1: libgravatar A library that provides a Python 3 interface to the Gravatar APIs. If you have users and want to show some sort of an image, Gravatar is OK PyPI uses this for example (gravatar, not necessarily this lib) Usage: >>> g = Gravatar('myemailaddress@example.com') >>> g.get_image() 'https://www.gravatar.com/avatar/0bc83cb571cd1c50ba6f3e8a78ef1346' Brian #2: JSON to Pydantic Converter Suggested by Chun Ly, “this awesome JSON to @samuel_colvin's pydantic is so useful. It literally saved me days of work with a complex nested JSON schema.“ “JSON to Pydantic is a tool that lets you convert JSON objects into Pydantic models.” It’s a live site, where you can plop JSON on one the left, and Pydantic models show up on the right. There’s a couple options: Specify every field as Optional Alias camelCase fields as snake_case It’s

  • #284 Spicy git for Engineers

    18/05/2022 Duración: 41min

    Watch the live stream: Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training Test & Code Podcast Patreon Supporters Brian #1:distinctipy “distinctipy is a lightweight python package providing functions to generate colours that are visually distinct from one another.” Small, focused tool, but really cool. Say you need to plot a dynamic number of lines. Why not let distinctipy pick colors for you that will be distinct? Also can display the color swatches. Some example palettes here: https://github.com/alan-turing-institute/distinctipy/tree/main/examples from distinctipy import distinctipy # number of colours to generate N = 36 # generate N visually distinct colours colors = distinctipy.get_colors(N) # display the colours distinctipy.color_swatch(colors) Michael #2: Soda SQL Soda SQL is a free, open-source command-line tool. It utilizes user-defined input to prepare SQL queries that run tests on dataset in a data source to find invali

  • #283 The sports episode

    12/05/2022 Duración: 32min

    Watch the live stream: Watch on YouTube About the show Sponsored: RedHat: Compiler Podcast Special guest: Tonya Sims Michael #1: Pathy: a Path interface for local and cloud bucket storage via Spencer Pathy is a python package (with type annotations) for working with Cloud Bucket storage providers using a pathlib interface. It provides an easy-to-use API bundled with a CLI app for basic file operations between local files and remote buckets. It enables a smooth developer experience by letting developers work against the local file system during development and only switch over to live APIs for deployment. Also has optional local file caching. From Spenser The really cool function is "Pathy.fluid" which can take any type of local, GCS, or S3 path string and then just give you back a Path object that you can interact with agnostic of what platform it was. So this has worked amazingly for me in local testing since i can just change the file path from the "s3://bucket/path" that i use in prod to a local "

página 6 de 21