title

Python Bytes

Michael Kennedy and Brian Okken

46
Followers
57
Plays
Python Bytes
Python Bytes

Python Bytes

Michael Kennedy and Brian Okken

46
Followers
57
Plays
OVERVIEWEPISODESYOU MAY ALSO LIKE

Details

About Us

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.

Latest Episodes

f"Yes!" for the f-strings

Sponsored by DigitalOcean: pythonbytes.fm/digitalocean Special guest: Ines Montani Brian #1: Simplify Your Python Developer Environment Contributed by Nils de Bruin “Three tools (pyenv, pipx, pipenv) make for smooth, isolated, reproducible Python developer and production environments.” The tools: pyenv - install and manage multiple Python versions and flavors pipx - install a Python application with it’s own virtual environment for use globally pipenv - managing virtual environments, dependencies, on a per project basis Brian note: I’m not sold on any of these yet, but honestly haven’t given them a fair shake either, but also didn’t really know how to try them all out. This is a really good write up to get started. Ines #2: New fast.ai course: A Code-First Introduction to Natural Language Processing fast.ai is a really popular, free course for deep learning by Rachel Thomas and Jeremy Howard Also comes with a Python library and lots of notebooks Some influential research developed alongside the course, e.g. ULMFiT (popular algorithm for NLP tasks like text classification) New course on Natural Language Processing: Practical introduction to NLP covering both modern neural network approaches and traditional techniques Highlights: NLP background: topic modeling and linear models Rule-based approaches and real-world problem solving Focus on ethics – videos on bias and disinformation Michael #3: Cloning the human voice In 5 minutes, with Python via Brenden Clone a voice in 5 seconds to generate arbitrary speech in real-time An implementation of Transfer Learning from Speaker Verification to Multispeaker Text-To-Speech Synthesis (SV2TTS) with a vocoder that works in real-time. Watch the video: https://www.youtube.com/watch?v=-O_hYhToKoA Also: Fake voices 'help cyber-crooks steal cash’ Brian #4: Ab(using) pyproject.toml and stuffing pytest.ini and mypy.ini content into it Contributed by Andrew Spittlemeister My first reaction is horror, but this is kinda my thought process with this one toml is not ini (but they look close) neither pytest nor mypy support storing configuration in pyproject.toml they both do support using setup.cfg (but flit and poetry projects don’t use that file, or try not to) they both support passing in the config file as a command line argument you can be careful and write a pyproject.toml file that is both toml and ini compliant drat, this is a reasonable idea, if not a little wacky no guarantee that it will keep working one thing to note: use quotes for stuff you normally wouldn’t need to in ini file. Example ini: [pytest] addopts = -ra -v if stuffed in pyproject.toml [pytest] addopts = "-ra -v" to run: > mypy --config-file pyproject.toml module_name > pytest -c pyproject.toml Ines #5: *Polyaxon* A platform for reproducing and managing the whole life cycle of machine learning and deep learning applications. We talked to lots of research groups and everyone works with just their GPU on desktop. Super slow – you need to wait for results, schedule next job etc. Polyaxon is a free open source library built on Kubernetes. Really easy to set up, especially on Google Kubernetes Engine. Especially good for hyper-parameter search, where you might not need GPU experiments if you can run lots of experiments in parallel Release v0.5 just came today. Big improvements: Plugins system Local runs, for much easier debugging New workflow engine for chaining things together and run experiments with lots of steps Michael #6: Flynt for f-strings A tool to automatically convert old string literal formatting to f-strings F-Strings: Not only are they more readable, more concise, and less prone to error than other ways of formatting, but they are also faster! Converted over 500 lines / expressions in Talk Python Training and Python Bytes. Get started with a pipx install: pipx install flynt Then point it at A file: flynt somefile.py A directory (recursively): flynt ./ Converts code like this: print(``"``Greetings {}, you have

38 MIN1 days ago
Comments
f"Yes!" for the f-strings

Will PyOxidizer weld shut one of Python's major gaps?

Sponsored by DigitalOcean: pythonbytes.fm/digitalocean Brian #1: flake8-comprehensions submitted by Florian Dahlitz I’m already using flake8, so adding this plugin is a nice idea. checks your code for some generator and comprehension questionable code. C400 Unnecessary generator - rewrite as a list comprehension. C401 Unnecessary generator - rewrite as a set comprehension. C402 Unnecessary generator - rewrite as a dict comprehension. C403 Unnecessary list comprehension - rewrite as a set comprehension. C404 Unnecessary list comprehension - rewrite as a dict comprehension. C405 Unnecessary (list/tuple) literal - rewrite as a set literal. C406 Unnecessary (list/tuple) literal - rewrite as a dict literal. C407 Unnecessary list comprehension - '[HTML_REMOVED]' can take a generator. C408 Unnecessary (dict/list/tuple) call - rewrite as a literal. C409 Unnecessary (list/tuple) passed to tuple() - (remove the outer call to tuple()/rewrite as a tuple literal). C410 Unnecessary (list/tuple) ...

29 MIN1 weeks ago
Comments
Will PyOxidizer weld shut one of Python's major gaps?

Advanced Python testing and big-time diffs

Sponsored by Rollbar: https://pythonbytes.fm/rollbar Brian #1: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml Tristan Hume, writing about a university project Teams of up to 3 people, multi month, write a Java to x86 compiler in language of choice Needed to pass both known and unknown tests. Secret tests to be run after submission encouraged teams to add more testing than provided. Nothing but standard libraries, and no parsing libraries, even if in standard. Lines of code Rust baseline Haskell: 1-1.6x C++: 1.4x Rust (another team): 3x Scala: 0.7 x OCaml: 1-1.6x Python: about half the size Python version one person used metaprogramming more extra features than any other team passed all public and secret tests Michael #2 : Pylustrator is a program to style your matplotlib plots via Len Wanger Pylustrator is a program to style your matplotlib plots for publication. Subplots can be resized and dragged around by the mouse, text and annotations can be added. Ch...

28 MIN2 weeks ago
Comments
Advanced Python testing and big-time diffs

Latest Episodes

f"Yes!" for the f-strings

Sponsored by DigitalOcean: pythonbytes.fm/digitalocean Special guest: Ines Montani Brian #1: Simplify Your Python Developer Environment Contributed by Nils de Bruin “Three tools (pyenv, pipx, pipenv) make for smooth, isolated, reproducible Python developer and production environments.” The tools: pyenv - install and manage multiple Python versions and flavors pipx - install a Python application with it’s own virtual environment for use globally pipenv - managing virtual environments, dependencies, on a per project basis Brian note: I’m not sold on any of these yet, but honestly haven’t given them a fair shake either, but also didn’t really know how to try them all out. This is a really good write up to get started. Ines #2: New fast.ai course: A Code-First Introduction to Natural Language Processing fast.ai is a really popular, free course for deep learning by Rachel Thomas and Jeremy Howard Also comes with a Python library and lots of notebooks Some influential research developed alongside the course, e.g. ULMFiT (popular algorithm for NLP tasks like text classification) New course on Natural Language Processing: Practical introduction to NLP covering both modern neural network approaches and traditional techniques Highlights: NLP background: topic modeling and linear models Rule-based approaches and real-world problem solving Focus on ethics – videos on bias and disinformation Michael #3: Cloning the human voice In 5 minutes, with Python via Brenden Clone a voice in 5 seconds to generate arbitrary speech in real-time An implementation of Transfer Learning from Speaker Verification to Multispeaker Text-To-Speech Synthesis (SV2TTS) with a vocoder that works in real-time. Watch the video: https://www.youtube.com/watch?v=-O_hYhToKoA Also: Fake voices 'help cyber-crooks steal cash’ Brian #4: Ab(using) pyproject.toml and stuffing pytest.ini and mypy.ini content into it Contributed by Andrew Spittlemeister My first reaction is horror, but this is kinda my thought process with this one toml is not ini (but they look close) neither pytest nor mypy support storing configuration in pyproject.toml they both do support using setup.cfg (but flit and poetry projects don’t use that file, or try not to) they both support passing in the config file as a command line argument you can be careful and write a pyproject.toml file that is both toml and ini compliant drat, this is a reasonable idea, if not a little wacky no guarantee that it will keep working one thing to note: use quotes for stuff you normally wouldn’t need to in ini file. Example ini: [pytest] addopts = -ra -v if stuffed in pyproject.toml [pytest] addopts = "-ra -v" to run: > mypy --config-file pyproject.toml module_name > pytest -c pyproject.toml Ines #5: *Polyaxon* A platform for reproducing and managing the whole life cycle of machine learning and deep learning applications. We talked to lots of research groups and everyone works with just their GPU on desktop. Super slow – you need to wait for results, schedule next job etc. Polyaxon is a free open source library built on Kubernetes. Really easy to set up, especially on Google Kubernetes Engine. Especially good for hyper-parameter search, where you might not need GPU experiments if you can run lots of experiments in parallel Release v0.5 just came today. Big improvements: Plugins system Local runs, for much easier debugging New workflow engine for chaining things together and run experiments with lots of steps Michael #6: Flynt for f-strings A tool to automatically convert old string literal formatting to f-strings F-Strings: Not only are they more readable, more concise, and less prone to error than other ways of formatting, but they are also faster! Converted over 500 lines / expressions in Talk Python Training and Python Bytes. Get started with a pipx install: pipx install flynt Then point it at A file: flynt somefile.py A directory (recursively): flynt ./ Converts code like this: print(``"``Greetings {}, you have

38 MIN1 days ago
Comments
f"Yes!" for the f-strings

Will PyOxidizer weld shut one of Python's major gaps?

Sponsored by DigitalOcean: pythonbytes.fm/digitalocean Brian #1: flake8-comprehensions submitted by Florian Dahlitz I’m already using flake8, so adding this plugin is a nice idea. checks your code for some generator and comprehension questionable code. C400 Unnecessary generator - rewrite as a list comprehension. C401 Unnecessary generator - rewrite as a set comprehension. C402 Unnecessary generator - rewrite as a dict comprehension. C403 Unnecessary list comprehension - rewrite as a set comprehension. C404 Unnecessary list comprehension - rewrite as a dict comprehension. C405 Unnecessary (list/tuple) literal - rewrite as a set literal. C406 Unnecessary (list/tuple) literal - rewrite as a dict literal. C407 Unnecessary list comprehension - '[HTML_REMOVED]' can take a generator. C408 Unnecessary (dict/list/tuple) call - rewrite as a literal. C409 Unnecessary (list/tuple) passed to tuple() - (remove the outer call to tuple()/rewrite as a tuple literal). C410 Unnecessary (list/tuple) ...

29 MIN1 weeks ago
Comments
Will PyOxidizer weld shut one of Python's major gaps?

Advanced Python testing and big-time diffs

Sponsored by Rollbar: https://pythonbytes.fm/rollbar Brian #1: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml Tristan Hume, writing about a university project Teams of up to 3 people, multi month, write a Java to x86 compiler in language of choice Needed to pass both known and unknown tests. Secret tests to be run after submission encouraged teams to add more testing than provided. Nothing but standard libraries, and no parsing libraries, even if in standard. Lines of code Rust baseline Haskell: 1-1.6x C++: 1.4x Rust (another team): 3x Scala: 0.7 x OCaml: 1-1.6x Python: about half the size Python version one person used metaprogramming more extra features than any other team passed all public and secret tests Michael #2 : Pylustrator is a program to style your matplotlib plots via Len Wanger Pylustrator is a program to style your matplotlib plots for publication. Subplots can be resized and dragged around by the mouse, text and annotations can be added. Ch...

28 MIN2 weeks ago
Comments
Advanced Python testing and big-time diffs

Listen Now On Himalaya