Python IoT, PyTest 6, NLP Adversarial Attacks, and WebAssembly

·52m 33s
Shared point

Episode Overview

This episode of Python Bytes covers a diverse range of topics, from hardware-based Python development and testing frameworks to the evolving complexities of machine learning and language core development. The team discusses how to bridge the gap between Python and various platforms using new tools and standards.

Core Topics

IoT and Python Development

• The hosts discuss the potential and challenges of working with micro-devices for IoT.
• Featured: The Device Simulator Express extension for VS Code, which allows developers to simulate devices like the Micro:bit and Adafruit Clue without waiting for physical shipping or hardware availability.

Testing Improvements

PyTest 6 is highlighted as a major release. Key updates include:
- Support for pyproject.toml configuration.
- Full type annotation support for the public API, aiding in static analysis.
- A new --no-header flag for cleaner console output.
- Enhanced syntax highlighting and better recursive comparisons for dataclasses.

NLP & Adversarial Machine Learning

• Guest Enos introduces TextAttack, a framework for adversarial attacks and data augmentation in NLP.
• The group explores why models behave unexpectedly, such as the famous Google Translate hallucination examples.
• Discussion on DVC (Data Version Control) as the "Git for data" to manage reproducible machine learning experiments effectively.

Python Core & The Future

• A conversation regarding Brett Cannon's exploration of what constitutes the "core" of Python.
• Focus on potential WebAssembly integration to broaden Python's reach into mobile and front-end web development.

"The real dystopia is if we have models that kind of don't work and are really shit, but people believe that they work."

Practical Recommendations

Pathlib: The hosts advocate for switching from os.path to pathlib for more readable and object-oriented file path manipulations.
Modern Python: Discussion on leveraging Python 3.9 features like PEP 585, which allows built-in collections to be used as generic types instead of importing from typing.

Topics

Chapters

6 chapters
Python Bytes
AI chat — answers grounded in episodes