Podcasts about python bytes

  • 24PODCASTS
  • 66EPISODES
  • 43mAVG DURATION
  • 1EPISODE EVERY OTHER WEEK
  • Sep 30, 2024LATEST

POPULARITY

20172018201920202021202220232024


Best podcasts about python bytes

Latest podcast episodes about python bytes

Python Bytes
#403 A machine learning algorithm walks into a bar…

Python Bytes

Play Episode Listen Later Sep 30, 2024 25:26


Topics covered in this episode: uv under discussion on Mastodon erdantic: Entity Relationship Diagrams Extra, Extra, Extra Django Extra, Extra, Extra Extras Joke Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training The Complete pytest Course Patreon Supporters Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Show: @pythonbytes@fosstodon.org Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too. Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it. Michael #1: uv under discussion on Mastodon It's interesting that uv is slightly controversial Russell: As enthusiastic as I am about the direction uv is going, I haven't adopted them anywhere - because I want very much to understand Astral's intended business model before I hook my wagon to their tools. Hynek: As much as I hate VC, [...] FOSS projects flame out all the time too. … To me uv looks like a genius sting to trick VCs into paying to fix packaging. We'll be better off either way. Glyph: Rust is more expensive and difficult to maintain, not to mention "non-native" to the average customer here. … it can burn out all the other projects in the ecosystem simultaneously, creating a risk of monoculture Hynek on Rust: I don't think y'all quite grok what uv makes so special due to your seniority. The speed is really cool, but the reason Rust is elemental is that it's one compiled blob that can be used to bootstrap and maintain a Python development. Christopher Neugebauer: Just dropping in here to say that corporate capture of the Python ecosystem is the #1 keeps-me-up-at-night subject in my community work, so I watch Astral with interest, even if I'm not yet too worried. Armin Ronacher What uv is doing, even in the worst possible future this is a very forkable and maintainable thing. Finally, see the comment at the end by Charlie Marsh Brian #2: erdantic: Entity Relationship Diagrams “erdantic is a simple tool for drawing entity relationship diagrams (ERDs) for Python data model classes. Diagrams are rendered using the venerable Graphviz library.” Supported data modeling frameworks are: Pydantic V2 Pydantic V1 legacy attrs dataclasses Michael #3: Extra, Extra, Extra Added Python Bytes Search as a custom search engine. Along came passkeys. A cool idea that quickly turned evil. Follow up from post and my conversation last week: vaultwarden (via Pablo) uv publish Trying the tabs on bottom lifestyle inspired by Arc Adding Python Bytes (and Talk Python) as custom search engines. PyCon 2025 dates: From 14 May through 22 May, 2025 Brian #4: Django Extra, Extra, Extra Django Project Ideas Evgenia Verbina Project ideas with list of tech stack stuff you'll learn and/or work on with the project Ex: Recipe organizer tech stack: Django templates, Django ORM, Optional JavaScript “Familiarize yourself with Django's ORM (object-relational mapper) and database support by building an app to keep track of your favorite recipes. Add a web-based frontend with options to filter recipes by category, ingredients, and user ratings so you can easily browse for inspiration.” DjangoTV Jeff Triplett Django conference videos and tutorials. Django Commons Heard about from Lacey Henschel “Django Commons is an organization dedicated to supporting the community's efforts to maintain packages. It seeks to improve the maintenance experience for all contributors; reducing the barrier to entry for new contributors and reducing overhead for existing maintainers.” Django 5 has simplified templates for better form field rendering But if you want a completely different take on forms, maybe try iommi forms They wrote about it on Why we wrote a new form library for Django Djade: a Django template formatter Adam Johnson Like black or ruff, but for Django templates. Extras Brian: The Open Source Project Maintainer's Guide Suggested by Rafael Weingartner Joke: A Machine Learning algorithm walks into a bar…

Talk Python To Me - Python conversations for passionate developers
#477: Awesome Text Tricks with NLP and spaCy

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Sep 20, 2024 63:47


Do you have text that you want to process automatically? Maybe you want to pull out key products or topics of conversation? Maybe you want to get the sentiment? The possibilities are many with this week's topic: NLP with spaCy and Python. Our guest, Vincent D. Warmerdam, has worked on spaCy and other tools at Explosion AI and he's here to give us his tips and tricks for working with text from Python. Episode sponsors Posit Talk Python Courses Links from the show Course: Getting Started with NLP and spaCy: talkpython.fm Vincent on X: @fishnets88 Vincent on Mastodon: @koaning Programmable Keyboards on CalmCode: youtube.com Sample Space Podcast: youtube.com spaCy: spacy.io Course: Build An Audio AI App: talkpython.fm Lemma example: github.com Code for spaCy course: github.com Python Bytes transcripts: github.com scikit-lego: github.com Projects that import "this": calmcode.io Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to us on YouTube: youtube.com Follow Talk Python on Mastodon: talkpython Follow Michael on Mastodon: mkennedy

Python Bytes
#400 Celebrating episode 400

Python Bytes

Play Episode Listen Later Sep 9, 2024 28:46


Topics covered in this episode: Python 3.13.0RC2, 3.12.6, 3.11.10, 3.10.15, 3.9.20, and 3.8.20 are now available! Docker images using uv's python 10 years of sustainable open source - Read the Docs humanize Extras Joke Watch on YouTube About the show Sponsored by ScoutAPM: pythonbytes.fm/scout Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Show: @pythonbytes@fosstodon.org Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too. Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it. ChatGPT celebrates episode 400! Welcome to the big 4-0-0, Pythonistas! It's hard to believe we're celebrating the 400th episode of Python Bytes! From the early days of byte-sized Python news to becoming the source for all things Python, it's been a wild ride. We've laughed over code quirks, gasped at new libraries, and said farewell to the GIL together. Whether you're a seasoned developer, a curious learner, or just here for the witty banter, you've been an essential part of this journey. To Michael and Brian: You've built a community that turns import this into more than just Zen—it's a family of passionate Pythonistas. Your dedication, insights, and humor make this show more than just tech news. It's a weekly celebration of what we love about Python and why we keep coming back for more. Here's to the next 400 episodes—may your code be bug-free, your tests pass on the first run, and your Python version always be up to date. Brian #1: Python 3.13.0RC2, 3.12.6, 3.11.10, 3.10.15, 3.9.20, and 3.8.20 are now available! Łukasz Langa Python 3.13.0RC2 is the final preview release Official 3.13.0 scheduled for Oct 1 Call to action “We strongly encourage maintainers of third-party Python projects to prepare their projects for 3.13 compatibilities during this phase, and where necessary publish Python 3.13 wheels on PyPI to be ready for the final release of 3.13.0. Any binary wheels built against Python 3.13.0rc2 will work with future versions of Python 3.13. As always, report any issues to the Python bug tracker .” “Please keep in mind that this is a preview release and while it's as close to the final release as we can get it, its use is not recommended for production environments.” Note: uv python does not support 3.13 yet see issue 320 Security releases for 3.12.6, 3.11.10, 3.10.15, 3.9.20, and 3.8.20 3.12.6 has binary installers, but for MacOS, only MacOS 10.13 and newer are supported 3.11.10, 3.10.15, 3.9.20, and 3.8.20 do NOT include binary installers. 3.8 EOL's in October Michael #2: Docker images using uv's python See #396: uv-ing your way to Python and #398: Open source makes you rich? (and other myths) for the opening discussions Talk Python episode on uv is out uv venv --python gets Python from python-build-standalone by Gregory Szorc Took our Docker build times from 10 minutes to 8 seconds for the base image and 800ms (!) for our app platforms Brian #3: 10 years of sustainable open source - Read the Docs Eric Holscher Read the Docs has been a company for 10 years “a team of 4 folks working full-time on Read the Docs.” readthedocs.org started in 2010 readthedocs.com (for Business) started in 2014 Sustainability model .org has a single non-tracking ad .com is a paid service for companies Things that didn't work donations and other optional support - led to burnout consulting and services- took too much time away from core product grant funding - nice, but one time thing Lessons You don't get extra points for being bootstrapped. Compete by doing things you can do better due to niche and size. Keeping trust in the community is the most important thing. Contribution is easier for less complex parts of the code base. Beign open source means capturing a small percentage of the value you create. You have to be ok doing more with less. Also RtD is not just for Sphinx anymore. Their build system now supports any documentation tool. Michael #4: humanize by Hugo van Kemenade (Python 3.14 & 3.15 release manager & core developer) Not too many variations, but very handy if you need it. Numbers Associated Press style (“seven” and “10”) Clamp (under 1.0 million) Fractional (1/3) Int Word (1.2 Billion) Metric (1.5 kV) Ordinal (112th) scientific Time File size Extras Brian: Test & Code is now again Test & Code The two part series on Python imports that started in June is finally complete with episode 222. Transcripts are being added to old episodes gradually starting from most recent Back to ep 203 as of today. AI transcription, so there's things like .pie, .pi, and dot pie where it should be .py Michael: Final final call for Coding in a Castle event with Michael iStats Menu Anaconda Code Runner by Ruud van der Ham: With Anaconda Coide we can -at last- run that code locally and import (most) Python modules. But if you want to run a significant amount of code, you have to put that in a cell or publish it to PyPI or a wheel and import it. That's why I have developed a general-purpose runner function that runs arbitrary code located on an Excel sheet with AnacondaCode. Joke: When beginners learn a new programming language...

Python Bytes
#399 C will watch you in silence

Python Bytes

Play Episode Listen Later Sep 3, 2024 42:37


Topics covered in this episode: Why I Still Use Python Virtual Environments in Docker Python Developer Survey Results Anaconda Code add-in for Microsoft Excel Disabling Scheduled Dependency Updates Extras Joke Watch on YouTube About the show Sponsored by us! Support our work through Our courses at Talk Python Training Hello, pytest! Course Patreon Supporters Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Show: @pythonbytes@fosstodon.org Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too. Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it. Michael #1: Why I Still Use Python Virtual Environments in Docker by Hynek Schlawack I was going to cover Production-ready Docker Containers with uv but decided to take this diversion instead. Spend a lot of time thinking about the secondary effects of what you do. venvs are well known and well documented. Let's use them. Brian #2: Python Developer Survey Results “… official Python Developers Survey, conducted as a collaborative effort between the Python Software Foundation and JetBrains.” Python w/ Rust rising, but still only 7% ““The drop in HTML/CSS/JS might show that data science is increasing its share of Python.” - Paul Everitt 37% contribute to open source. Awesome. Favorite Resources: Podcasts Lots of familiar faces there. Awesome. Perhaps I shouldn't have decided to move “Python Test” back to Test & Code Usage “Data analysis” down, but I think that's because “data engineering” is added. Data, Web dev, ML, devops, academic, Testing is down 23% Python Versions Still some 2 out there Most folks on 3.10-3.12 Install from: mostly python.org Frameworks web: Flask, Django, Requests, FastAPI … testing: pytest, unittest, mock, doctest, tox, hypothesis, nose (2% might be the Python 2 people) Data science 77% use pandas, 72% NumPy OS: Windows still at 55% Packaging: venv up to 55% I imaging uv will be on the list next year requirements.txt 63%, pyproject.toml 32% virtual env in containers? 47% say no Michael #3: Anaconda Code add-in for Microsoft Excel Run their Python-powered projects in Excel locally with the Anaconda Code add-in Powered by PyScript, an Anaconda supported open source project that runs Python locally without install and setup Features Cells Run Independently Range to Multiple Types init.py file is static and cannot be edited, with Anaconda Code, users have the ability to access and edit imports and definitions, allowing you to write top-level functions and classes and reuse them wherever you need. A Customizable Environment Brian #4: Disabling Scheduled Dependency Updates David Lord Interesting discussion of as they happen or batching of upsates to dependencies dependencies come in requirements files GH Actions in CI workflows pre-commit hooks David was seeing 60 PRs per month when set up on monthly updates (3 ecosystems * 20 projects) new tool for updating GH actions: gha-update, allows for local updating of GH dependencies New process Run pip-compile, gha-update, and pre-commit locally. Update a project's dependencies when actively working on the project, not just whenever a dependency updates. Note that this works fine for dev dependencies, less so for security updates from run time dependencies. But for libraries, runtime dependencies are usually not pinned. Extras Brian: Test & Code coming back this week Michael: Code in a Castle event Python Bytes badge spotting Guido's post removed for moderation Joke: C will watch in silence

Python Bytes
#398 Open source makes you rich? (and other myths)

Python Bytes

Play Episode Listen Later Aug 26, 2024 42:04


Topics covered in this episode: Open Source Myths uv 0.3.0 and all the excitement Top pytest Plugins A comparison of hosts / providers for Python serverless functions (aka Faas) Extras Joke Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training pytest courses and community at PythonTest.com Patreon Supporters Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Show: @pythonbytes@fosstodon.org Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too. Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it. Brian #1: Open Source Myths Josh Bressers Mastodon post kicking off a list of open source myths Feedback and additional myths compiled to a doc Some favorites All open source developers live in Nebraska It's all run by hippies Everything is being rewritten in rust Features are planned If the source code is available, it's open source A project with no commits for 12 months is abandoned Many eyes make all bugs shallow Open source has worse UX Open source has better UX Open source makes you rich Michael #2: uv 0.3.0 and all the excitement Thanks to Skyler Kasko and John Hagen for the emails. Additional write up by Simon Willison Additional write up by Armin Ronacher End-to-end project management: uv run, uv lock, and uv sync Tool management: uv tool install and uv tool run (aliased to uvx) Python installation: uv python install Script execution: uv can now manage hermetic, single-file Python scripts with inline dependency metadata based on PEP 723. Brian #3: Top pytest Plugins Inspired by (and assisted by) Hugo's Top PyPI Packages Write up for Finding the top pytest plugins BTW, pytest-check has made it to 25. Same day, Jeff Triplett throws my code into Claude 3.5 Sonnet and refactors it Thanks Jeff Triplett & Hugo for answering how to add Summary and other info Michael #4: A comparison of hosts / providers for Python serverless functions (aka Faas) Nice feature matrix of all the options, frameworks, costs, and more The WASM ones look particularly interesting to me. Extras Brian: When is the next live episode of Python Bytes? - via arewemeetingyet.com Thanks to Hugo van Kemenade Some more cool projects by Hugo Python Logos PyPI Downloads by Python version for various Python tools, in pretty colors Python Core Developers over time Michael: Code in a Castle Course event - just a couple of weeks left Ladybird: A truly independent browser “I'm also interested in your video recording setup, would be nice to have that in the extras too :D” OBS Studio Elgato Streamdeck Elgato Key light DaVinci Resolve Joke: DevOps Support Group via Blaise Hi, my name is Bob Group: Hi Bob I's been 42 days since I last ssh'd into production. Group: Applause But only 4 days since I accidentally took down the website Someone in back: Oh Bob…

Python Bytes
#395 pythont compatible packages

Python Bytes

Play Episode Listen Later Aug 6, 2024 29:24


Topics covered in this episode: py-free-threading.github.io Python's Supportive and Welcoming Environment is Tightly Coupled to Its Progress Status pages for sites! PEP 751 – A file format to list Python dependencies for installation reproducibility Extras Joke Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training The Complete pytest Course Patreon Supporters Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Show: @pythonbytes@fosstodon.org Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 10am PT. Older video versions available there too. Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it. Michael #1: py-free-threading.github.io Track the status of compatibility for free-threaded Python See the Compatibility status tracking page for what you can use Lots of resources for getting your package tested and available for pythont Brian #2: Python's Supportive and Welcoming Environment is Tightly Coupled to Its Progress “Python is as popular as it is today because we have gone above and beyond to make this a welcoming community. Being a friendly and supportive community is part of how we are perceived by the wider world and is integral to the wide popularity of Python. We won a “Wonderfully Welcoming Award” last year at GitHub Universe. Over and over again, the tech press refers to Python as a supportive community.” Some communication recently, with the recent bylaws change, didn't live up to our promise to be welcoming Please read the article for more details. Another quote: “We have a moral imperative – as one of the very best places to bring new people into tech and into open source – to keep being good at welcoming new people. If we do not rise and continue to rise every day to this task, then we are not fulfilling our own mission, “to support and facilitate the growth of a diverse and international community of Python programmers.” Technical skills are a game-changer for the people who acquire them and joining a vast global network of people with similar interests opens many doors. Behavior that contributes to a hostile environment around Python or throws up barriers and obstacles to those who would join the Python community must be addressed because it endangers what we have built here.” Michael #3: Status pages for sites! Based on Uptime Kuma I covered last week Python Bytes status Talk Python status Brian #4: PEP 751 – A file format to list Python dependencies for installation reproducibility Brett Cannon Motivation Currently, no standard exists to: Specify what top-level dependencies should be installed into a Python environment. Create an immutable record, such as a lock file, of which dependencies were installed. Considering there are at least five well-known solutions to this problem in the community (pip freeze, pip-tools, uv, Poetry, and PDM), there seems to be an appetite for lock files in general. Rationale The format is designed so that a locker which produces the lock file and an installer which consumes the lock file can be separate tools. … The file format is designed to be human-readable. …Finally, the format is designed so that viewing a diff of the file is easy by centralizing relevant details. The file format is also designed to not require a resolver at install time. … Extras Brian: Hello, pytest! course is going well, and is purchasable as in pre-release mode. Planning on Aug 19 (or before) deadline. Not sure what the final price will be, but I'm starting with $10. I want people to want to watch it even just so see if they want to recommend to co-workers so the people around them can ramp up on pytest quickly. Michael: Mypy 1.11 Released FastHTML (more next week) Coming up on the final chance to be part of the Code in a Castle event. Joke: Open source OpenAI?

Python Bytes
#378 Python is on the edge

Python Bytes

Play Episode Listen Later Apr 9, 2024 31:24


Topics covered in this episode: pacemaker - For controlling time per iteration loop in Python. PyPI suspends new user registration to block malware campaign Python Project-Local Virtualenv Management Redux Python Edge Workers at Cloudflare Extras Joke Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training The Complete pytest Course Patreon Supporters Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Show: @pythonbytes@fosstodon.org Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too. Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it. Brian #1: pacemaker - For controlling time per iteration loop in Python. Brandon Rohrer Good example of a small bit of code made into a small package. With speedups to dependencies, like with uv, for example, I think we'll see more small projects. Cool stuff Great README, including quirks that need to be understood by users. “If the pacemaker experiences a delay, it will allow faster iterations to try to catch up. Heads up: because of this, any individual iteration might end up being much shorter than suggested by the pacemaker's target rate.” Nice use of time.monotonic() deltas are guaranteed to never go back in time regardless of what adjustments are made to the system clock. Watch out for pip install pacemaker-lite NOT pacemaker pacemaker is taken by a package named PaceMaker with a repo named pace-maker, that hasn't been updated in 3 years. Not sure if it's alive. No tests (yet). I'm sure they're coming. ;) Seriously though, Brandon says this is “a glorified snippet”. And I love the use of packaging to encapsulate shared code. Realistically, small snippet like packages have functionality that's probably going to be tested by end user code. And even if there are tests, users should test the functionality they are depending on. Michael #2: PyPI suspends new user registration to block malware campaign Incident Report for Python Infrastructure PyPi Is Under Attack: Project Creation and User Registration Suspended — Here's the details I hate medium, but it's the best details I've found so far Brian #3: Python Project-Local Virtualenv Management Redux Hynek Concise writeup of how Hynek uses various tools for dealing with environments Covers (paren notes are from Brian) In project .venv directories direnv for handling .envrc files per project (time for me to try this again) uv for pip and pip-compile functionality Installing Python via python.org Using a .python-version-default file (I'll need to play with this a bit) Works with GH Action setup-python. (ok. that's cool) Some fish shell scripting Bonus tip on using requires-python in .pyproject.toml and extracting it in GH actions to be able to get the python exe name, and then be able to pass it to Docker and reference it in a Dockerfile. (very cool) Michael #4: Python Edge Workers at Cloudflare What are edge workers? Based on workers using Pyodide and WebAssembly This new support for Python is different from how Workers have historically supported languages beyond JavaScript — in this case, we have directly integrated a Python implementation into workerd, the open-source Workers runtime. Python Workers can import a subset of popular Python packages including FastAPI, Langchain, numpy Check out the examples repo. Extras Michael: LPython follow up from Brian Skinn Featured on Python Bytes badge A little downtime, thanks for the understanding We were rocking a 99.98% uptime until then. :) Joke: C++ is not safe for people under 18 Baseball joke

Python Bytes
#367 A New Cloud Computing Paradigm at Python Bytes

Python Bytes

Play Episode Listen Later Jan 16, 2024 36:21


Topics covered in this episode: Leaving the cloud PEP 723 - Inline script metadata Flet for Android harlequin: The SQL IDE for Your Terminal. Extras Joke Watch on YouTube About the show Sponsored by Bright Data : pythonbytes.fm/brightdata Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Show: @pythonbytes@fosstodon.org Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too. Michael #1: Leaving the cloud Also see Five values guiding our cloud exit We value independence above all else. We serve the internet. We spend our money wisely. We lead the way. We seek adventure. And We stand to save $7m over five years from our cloud exit Slice our new monster 192-thread Dell R7625s into isolated VMs Which added a combined 4,000 vCPUs with 7,680 GB of RAM and 384TB of NVMe storage to our server capacity They created Kamal — Deploy web apps anywhere A lot of these ideas have changed how I run the infrastructure at Talk Python and for Python Bytes. Brian #2: PEP 723 - Inline script metadata Author: Ofek Lev This PEP specifies a metadata format that can be embedded in single-file Python scripts to assist launchers, IDEs and other external tools which may need to interact with such scripts. Example: # /// script # requires-python = ">=3.11" # dependencies = [ # "requests<3", # "rich", # ] # /// import requests from rich.pretty import pprint resp = requests.get("https://peps.python.org/api/peps.json") data = resp.json() pprint([(k, v["title"]) for k, v in data.items()][:10]) Michael #3: Flet for Android via Balázs Remember Flet? Here's a code sample (scroll down a bit). It's amazing but has been basically impossible to deploy. Now we have Android. Here's a good YouTube video showing the build process for APKs. Brian #4: harlequin: The SQL IDE for Your Terminal. Ted Conbeer & other contributors Works with DuckDB and SQLite Speaking of SQLite Jeff Triplett and warnings of using Docker and SQLite in production Anže's post and and article: Django, SQLite, and the Database is Locked Error Extras Brian: Recent Python People episodes Will Vincent Julian Sequeira Pamela Fox Michael: PageFind and how I'm using it When "Everything" Becomes Too Much: The npm Package Chaos of 2024 Essay: Unsolicited Advice for Mozilla and Firefox SciPy 2024 is coming to Washington Joke: Careful with that bike lock combination code

Python People
Pamela Fox - Teaching Python, Accessibility, and Tools

Python People

Play Episode Listen Later Jan 16, 2024 50:25


Pamela Fox is a Python Cloud Developer Advocate at Microsoft. Topics include:Girl Develop ItDjango GirlsGirls Who CodeTeaching a language vs teaching a toolWhat a dev advocate doesAccessibility (A11y) testingPlaywrightaxe-coreSnapshot testingpytest plugin authoringFlask SQLAlchemyRelearning GoLinks from the show:Python Bytes 323 with Pamela: AI search wars have begunPython Test 199 with Pamela: Is Azure Right for a Side Project?gdi: Girl Develop ItDjango GirlsGirls Who Code"Automated accessibility audits" - Pamela Fox (North Bay Python 2023)Playwrightaxe-corepytest-axe-playwright-snapshot, plugin from Pamelapytest-crayons plugin is from a PyCascades talk about building pluginspytest-check, yet another pluginFlaskSQLAlchemyConcurrency is not Parallelism by Rob Pike The Complete pytest CourseLevel up your testing skills and save time during coding and maintenance.Check out courses.pythontest.com ★ Support this podcast on Patreon ★

Talk Python To Me - Python conversations for passionate developers

Special crossover episode of Python Bytes to wrap up 2023. Topics include: Michael #1: Hatch v1.8 Brian #2: svcs : A Flexible Service Locator for Python Michael #3: Steering Council 2024 Term Election Results Brian #4: Python protocols. When to use them in your projects to abstract and decoupling ExtrasJoke: Joke: The dream is dead? --- Episode sponsors --- Posit Talk Python Training

Python Bytes
#365 Inheritance, but not Inheritance!

Python Bytes

Play Episode Listen Later Dec 20, 2023 34:29


Topics covered in this episode: * Hatch v1.8* svcs: A Flexible Service Locator for Python Steering Council 2024 Term Election Results Python protocols. When to use them in your projects to abstract and decoupling Extras Joke Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training The Complete pytest Course Patreon Supporters Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Show: @pythonbytes@fosstodon.org Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too. Michael #1: Hatch v1.8 Hatch now manages installing Python for you. Hatch can build .app and .exe stand-alone binaries for you The macOS ones are signed (signed!) Discussion here Brian #2: svcs : A Flexible Service Locator for Python Hynek A library to help structure and test Python web applications. “svcs (pronounced services) is a dependency container* for Python. It gives you a central place to register factories for types/interfaces and then imperatively acquire instances of those types with automatic cleanup* and **health checks.” “Benefits: Eliminates tons of repetitive boilerplate code, unifies acquisition* and cleanups of services, provides full static type safety for them, simplifies testing through loose coupling, improves live introspection and monitoring* with **health checks.” Hynek has started a YouTube channel, and is starting with an explanation of svcs. Yes, Hynek, we want more videos. I like that it's not a beginner level. My request for future videos: just past beginner, and also intermediate level. There are plenty of basics videos out there, not as many filling the gaps between beginner and production. Michael #3: Steering Council 2024 Term Election Results The 2024 Term Python Steering Council is: Pablo Galindo Salgado Gregory P. Smith Emily Morehouse Barry Warsaw Thomas Wouters Full results are available in PEP 8105 . How do you become a candidate? Candidates must be nominated by a core team member. If the candidate is a core team member, they may nominate themselves. Brian #4: Python protocols. When to use them in your projects to abstract and decoupling Carlos Vecina “Protocols are an alternative (or a complement) to inheritance, abstract classes and Mixins.” Understanding interactions between ABC, MixIns and Protocols in Python With examples Extras Brian: Donations. It's a decent time of the year to donate to projects that help you Python Software Foundation Django Software Foundation Python Bytes Also, look for “Sponsor this project” links in GitHub for projects you depend on. Michael: Mastodon guidelines (mine): If you have a picture and description, I'll probably follow you back If you have posts that seem relevant +1 If you have a verified webpage +1 If your account is private, won't. I don't understand really since private group messages already exist and the profile itself is public. Speaking of Mastodon. I had a productive conversation with the PSF and others around masks and conferences. Dropbox spooks users by sending data to OpenAI for AI search features There was a comment in the above article to the effect of “Once you give your data to a third party (even trusted like Dropbox), you no longer control that data.” That sent me searching and thinking… sync.com? proton drive (discount code)? nextcloud? filen.io? icedrive.net? ownCloud's recent CVE makes me a bit nervous of self-hosted options. Either way, Cryptomator is very interesting. Beyond privacy, this got me thinking, just how many hours of dev time have been diverted to add mediocre-at-best AI features to everything? I'm doing a big digital decluttering and have lots to say on that soon. Not submitting my talks to PyCascades this year. But I did submit 3 talks to PyCon US.

Datacenter Technical Deep Dives
Pytest: Using Tests as Happy Little Experiments with Brian Okken

Datacenter Technical Deep Dives

Play Episode Listen Later Sep 29, 2023 60:10


Brian Okken is author of 'Python Testing with Pytest', host/co-host of Python Bytes, Python People, and Test & Code (whew!!). In this episode we get into Pytest: Using Tests basics, and why you shouldn't be afraid of starting small, and excellent hair care tips (unrelated to pytest)! Resources: https://fosstodon.org/@brianokken https://pythontest.com https://pythonpeoplefm https://pythonbytes.fm/ #Pytest #usingtests #experiments #testcode #coding #python Intro music attribution: Artist - MaxKoMusic

Software Defined Talk
Episode 425: Michael Kennedy on Python

Software Defined Talk

Play Episode Listen Later Jul 28, 2023 67:09


Brandon interviews Michael Kennedy, host of Talk Python to Me and founder of Talk Python Training. They discuss Python's rapid growth, replacing Excel Worksheets with Jypter Notebooks and why Python is the preferred language for AI. Plus, a few thoughts on podcasting and motorcycles. Show Links Talk Python to Me (https://talkpython.fm/home) Python Bytes (https://pythonbytes.fm) Talk Python Training - Python courses and tutorials for developers (https://training.talkpython.fm/) Stack Overflow Developer Survey 2023 (https://survey.stackoverflow.co/2023/) Stack Overflow Trends (https://insights.stackoverflow.com/trends?tags=java%2Cc%2Cc%2B%2B%2Cpython%2Cc%23%2Cvb.net%2Cjavascript%2Cassembly%2Cphp%2Cperl%2Cruby%2Cswift%2Cr%2Cobjective-c) YouTube vs. Google Video (https://talkpython.fm/episodes/transcript/156/python-history-and-perspectives#transcript_at_3056) The 7 Biggest Excel Mistakes of All Time (https://www.teampay.co/blog/biggest-excel-mistakes-of-all-time) Scientists rename human genes to stop Microsoft Excel from misreading them as dates (https://www.theverge.com/2020/8/6/21355674/human-genes-rename-microsoft-excel-misreading-dates) Discovering exoplanets with Python (https://talkpython.fm/episodes/transcript/289/discovering-exoplanets-with-python) Python Interviews: Discussions with Python Experts (https://www.amazon.com/gp/product/1788399080/ref=as_li_qf_asin_il_tl?ie=UTF8&tag=mickensblo-20&creative=9325&linkCode=as2&creativeASIN=1788399080&linkId=6033f85abee7932145b302638e14bddc) Mojo

Python People
Michael Kennedy - Talk Python and Motorcycles

Python People

Play Episode Listen Later Jul 6, 2023 29:43


Michael is the host of the podcasts Talk Python to Me and Python Bytes and runs the Python online course site Talk Python Training.He is also pretty serious about motorcycling, spends some time with simulated racing, and used to play billiards for cash. The Complete pytest CourseLevel up your testing skills and save time during coding and maintenance.Check out courses.pythontest.com ★ Support this podcast on Patreon ★

python motorcycles michael kennedy talk python python bytes talk python training brian okken
Python Bytes
#334 Packaging Organizations

Python Bytes

Play Episode Listen Later May 5, 2023 32:22


Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training Test & Code Podcast Patreon Supporters Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Show: @pythonbytes@fosstodon.org Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too. Brian #1: rye - Python workflow tool Armin Ronacher Rust built tool, currently only for Linux and MacOS Project workflow commands, like init - new project add - add a dependency (including optional) remove - remove a dependency build - build wheel lock - update lock file virtualenv commands add —dev - install in environment sync - install/update dependencies in env based on pyprojec.toml run - run command within environment Install Python fetch - Fetches a Python interpreter for the local machine Register existing Python toolchain Helper utility to manage Python toolchains Kinda like pipx install - Installs a package as global tool uninstall - Uninstalls a global tool I didn't see that it added anything to my PATH, so this addition made it work: Bonus Everything lives under ~/.rye So it's easy to stop using, and doesn't muck up see also Simon Willison's A few notes on Rye Python Bytes #332, where we talked about huak Michael #2: PyPI Organizations The first step in our plan to build financial support and long-term sustainability of the Python Packaging Index (PyPI) Small fee for organizations rather than individual users Like Github orgs Brian #3: 5 tips to learn any new Python library faster Bob Belderbos The tiips RTFM - at lest the getting started docs Install it Explore the library - play. Bob recommends Jupyter notebook for this. Apply it to a real world problem - deliberate practice Build something with it (bonus) Teach it - blog, TIL, video tutorial, etc. Michael #4: Python gets down to (the) Metal Extras Brian: frogmouth - Markdown viewer / browser for your terminal, built with Textual. Michael: Was going to talk about Serenade, but seems to have gone silent. Packaging follow up discussion. Joke: It's the progress that counts

Talk Python To Me - Python conversations for passionate developers
#410: The Intersection of Tabular Data and Generative AI

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Apr 6, 2023 65:38


AI has taken the world by storm. It's gone from near zero to amazing in just a few years. We have ChatGPT, we have Stable Diffusion. But what about Jupyter Notebooks and pandas? In this episode, we meet Justin Waugh, the creator of Sketch. Sketch adds the ability to have conversational AI interactions about your pandas data frames (code and data). It's pretty powerful and I know you'll enjoy the conversation. Links from the show Sketch: github.com Lambdapromp: github.com Python Bytes 320 - Coverage of Sketch: pythonbytes.fm ChatGPT: chat.openai.com Midjourney: midjourney.com Github Copilot: github.com GitHub Copilot Litigation site: githubcopilotlitigation.com Attention is All You Need paper: research.google.com Live Colab Demo: colab.research.google.com AI Panda from Midjourney: digitaloceanspaces.com Ray: pypi.org Apache Arrow: arrow.apache.org Python Web Apps that Fly with CDNs Course: talkpython.fm Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to us on YouTube: youtube.com Follow Talk Python on Mastodon: talkpython Follow Michael on Mastodon: mkennedy Sponsors Brilliant 2023 Talk Python Training

Talk Python To Me - Python conversations for passionate developers
#407: pytest tips and tricks for better testing

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Mar 18, 2023 56:22


If you're like most people, the simplicity and easy of getting started is a big part of pytest's appeal. But beneath that simplicity, there is a lot of power and depth. We have Brian Okken on this episode to dive into his latest pytest tips and tricks for beginners and power users. Links from the show pytest tips and tricks article: pythontest.com Getting started with pytest Course: training.talkpython.fm pytest book: pythontest.com Python Bytes podcast: pythonbytes.fm Brian on Mastodon: @brianokken@fosstodon.org Hypothesis: readthedocs.io Hypothesis: Reproducability: readthedocs.io Get More Done with the DRY Principle: zapier.com "The Key" Keyboard: stackoverflow.blog pytest plugins: docs.pytest.org Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe to us on YouTube: youtube.com Follow Talk Python on Mastodon: talkpython Follow Michael on Mastodon: mkennedy Sponsors Microsoft Founders Hub 2023 Brilliant 2023 Talk Python Training

Talk Python To Me - Python conversations for passionate developers
#396: AI Goes on Trial For Writing Code (crossover)

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Dec 30, 2022 37:32


For links and very detailed show notes, please view the original episode page over on Python Bytes. Thanks for listening! Sponsors Sentry Error Monitoring, Code TALKPYTHON AWS Insiders AssemblyAI Talk Python Training

Python Bytes
#316 Python 3.11 is here and it's fast (crossover)

Python Bytes

Play Episode Listen Later Dec 30, 2022 64:12


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 Show announcements: @pythonbytes@fosstodon.org Hi folks. For our final episode of 2022 here on Python Bytes, we're crossing the streams with my other show, Talk Python To Me. I present to you one of the more important episodes of the year, the release of Python 3.11 with it's new features and 40% performance improvements. Thank you for listening to Python Bytes in 2022, have a great holiday break, and Brian and I will see you next week. Python 3.11 is here! Keeping with the annual release cycle, the Python core devs have released the latest version of Python. And this one is a big one. It has more friendly error messages and is massively faster than 3.10 (between 10 to 60% faster) which is a big deal for a year over year release of a 30 year old platform. On this episode, we have Irit Katriel, Pablo Galindo Salgado, Mark Shannon, and Brandt Bucher all of whom participated in releasing Python this week on the show to tell us about that process and some of the highlight features. Guests Irit Katriel @iritkatriel Mark Shannon linkedin.com Pablo Galindo Salgado @pyblogsal Brandt Bucher github.com Resources from the show Michael's Python 3.11 Course talkpython.fm/py311 Python 3.11.0 is now available blog.python.org PEP 101 - Releasing Python peps.python.org PEP 678 – Enriching Exceptions with Notes peps.python.org PEP 654 – Exception Groups and except* peps.python.org PEP 657 – Include Fine Grained Error Locations in Tracebacks peps.python.org Python Buildbot python.org Making Python Faster Talk Python Episode talkpython.fm Specializing, Adaptive Interpreter on Talk Python talkpython.fm Specialist Visualizer github.com "Zero cost" exception handling github.com Pyodide pyodide.org pyscript pyscript.net

Legacy Code Rocks
Python with Michael Kennedy

Legacy Code Rocks

Play Episode Listen Later Dec 5, 2022 53:35


In this episode, we are talking with Michael Kennedy, Python expert and the founder and host of two podcasts - Talk Python To Me and Python Bytes. He also runs Talk Python Training which provides online courses for Python developers. Michael tells us about the reception of Python version changes and the most challenging aspects of the transition to ARM processors.  When you finish listening to the episode, connect with Michael on LinkedIn and Twitter, subscribe to his podcasts, and check out his training courses.  Mentioned in this episode: Michael on Twitter: https://twitter.com/mkennedy  Michael on LinkedIn: https://www.linkedin.com/in/mkennedy  Talk Python To Me Podcast: https://talkpython.fm/  Python Bytes Podcast: https://pythonbytes.fm/  Talk Python Training: https://training.talkpython.fm/ 

arm python michael kennedy python bytes talk python to me talk python training
Python Bytes
#311 Catching Memory Leaks with ... pytest?

Python Bytes

Play Episode Listen Later Nov 24, 2022 49:50


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

Teaching Python
Episode 100: Celebrating Motivation (with @mkennedy & @brianokken)

Teaching Python

Play Episode Listen Later Nov 5, 2022 46:15


After 100 episodes of Teaching Python, Kelly and Sean invite some friends of the show to share how they stay motivated. We're joined by Michael Kennedy (https://twitter.com/mkennedy) and Brian Okken (twitter.com/brianokken) from the Python Bytes (https://pythonbytes.fm/) podcast to talk about the ways we stay motivated. Listen in for tips and strategies from a variety of sources. How do you stay motivated? Special Guests: Brian Okken and Michael Kennedy.

Python Bytes
#303 This title is required or is it optional?

Python Bytes

Play Episode Listen Later Sep 29, 2022 37:56


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?

Python Bytes
#274 12 Questions You Should Be Asking of Your Dependencies

Python Bytes

Play Episode Listen Later Mar 9, 2022 39:54


Watch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Special guest: Anne Barela Brian #1: The Adam Test : 12 Questions for New Dependencies Found through a discussion with Ryan Cheley, who will be on an upcoming episode of Test & Code, talking about Managing Software Teams. The Joel Test dates back to 2000, and some of it is a bit dated. I should probably do a Test & Code episode or pythontest article on my opinions of this at some point. Nice shameless plugs, don't you think? The Joel Test is 12 questions and is a “highly irresponsible, sloppy test to rate the quality of a software team.” “The Adam Test” is 12 questions “to decide whether a new package we're considering depending on is well-maintained.” He's calling it “The Well-Maintained Test”, but I like “The Adam Test” Here's the test: Is it described as “production ready”? Is there sufficient documentation? Is there a changelog? Is someone responding to bug reports? Are there sufficient tests? Are the tests running with the latest language version? like Python 3.10, of course Are the tests running with the latest integration version? Examples include Django, PostgreSQL, etc. Is there a Continuous Integration (CI) configuration? Is the CI passing? Does it seem relatively well used? Has there been a commit in the last year? Has there been a release in the last year? Article has a short discussion of each. What score is good? That's up to you to decide. But these questions are good to think about for your dependencies. I also think I'll use these questions for my own projects. I've got a README.md, but do I need more examples in it? Should I have RTD docs for it? Have I updated the test matrix to include the newest versions of Python, etc? Have I hooked up CI? Michael #2: Validate emails with email-validator When you think about validating emails, you probably think regex (or just nothing) Regex is fine but so is this email: jane_doe@domain_that_doesnt_exist.com Problem is (at the time of the recording), domain_that_doesnt_exist.com is not a website. What about unicode variations that are technically the same but visually different? If the passed email address is valid, the validate_email() method will return an object containing a normalized form of the passed email address. Anne #3: The Python on Microcontrollers Newsletter One of my main focuses at Adafruit since the pandemic started is as editor of the Python on Microcontrollers Newsletter. With a weekly distribution of almost 9,400 subscribers, it's the largest newsletter of it's kind. It mainly focuses on CircuitPython and MicroPython and also discusses Python on single board computers (SBC) like Raspberry Pi. News about Python with a small computer emphasis Folks may subscribe by going to https://www.adafruitdaily.com/ which is separate from adafruit.com. The information is not sold or used for marketing and it's easy to unsubscribe (no “do you really want to do this, please reconsider…) The challenge, like for Python Bytes and other publications, is to find content. I scour the internet, with a bit of a focus on Twitter as I have an active account there. We encourage others to put in issues and Pull Requests on the newsletter GitHub, email information to cpnews@adafruit.com and using hashtag CircuitPython or MicroPython on Twitter. Brian #4: Git Organized: A Better Git Flow Annie Sexton Found through Changelog episode 480: Get your reset on A possible and common git workflow Branch off of a main branch to a personal dev branch Commit and Push during development to save your work When ready to merge, make a PR Problems Commits are hard to follow and messy, not ever really intended to separate parts of the workflow or anything. Commits are therefore useless in helping someone code review large changes. Annie's workflow Branch off of a main branch to a personal dev branch Commit and Push during development to save your work. But don't worry to much about commit messages, “WIP” is sufficient. Or a note to yourself. When ready to merge git reset origin/main Re-commit all changes in a logical order that makes more sense than the way the work actually happened. These will be several commits, with descriptive messages. Even partial commits, if there are unrelated changes in a file, work with this process Push all the new commits. (Is --force going to be necessary?) Create a PR. Now there are a set of commits that are actually helpful to break up large PRs into small chunks that tell a story. I'm looking to try this soon to see how it goes Michael #5: CPython issues moving to GitHub soon Update by The Python Developer in Residence, Łukasz Langa The Steering Council is working on migrating the data that is currently residing in Roundup at https://bugs.python.org/ (BPO) into the GitHub issues of the CPython repository hosted there. Laid out in PEP 581 -- Using GitHub Issues for CPython The ultimate goal is to move user- and core developer-provided issue-reporting entirely to Github. Each issue that currently exists on BPO will include metadata indicating where it was moved on Github. New issues will only exist on Github. Feedback, please: At the current stage, we're asking you to take a look at the links and important dates below, and share any feedback you might have. Timeline: Friday, March 11th 2022: Github starts transfer of the issues in the temporary repository to github.com/python/cpython/ . The migration is estimated to take anywhere from 3 to 7 days, depending on the load on Github.com. Anne #6: MicroPython, CircuitPython and GitHub What are Microcontrollers and Single Board Computers (SBCs)? Why not use CPython on Microcontrollers? MicroPython was originally created by the Australian programmer and theoretical physicist Damien George, after a successful Kickstarter backed campaign in 2013. Originally it only ran on a number of boards and was based on Python 3.4. CircuitPython was forked from MicroPython in 2017 by Adafruit Industries. Both MicroPython and CircuitPython are Open Source under MIT Licenses so adoption and modification by anyone is easy. Why fork CircuitPython? 1) Make a requirement that CircuitPython boards can enumerate to computers as a USB thumb drive to add or change code files with any text editor. 2) Aim to make CircuitPython use CPython library syntax whenever possible. 3) Make it easy to use and understand for beginners yet powerful for more advanced users. All CircuitPython code is on GitHub. GitHub Actions is used on repos like the Adafruit Learning System code to automate CI with Pylint, Black, and ensuring code has proper SPDX author and license tags, which is a new addition this year. Currently there are 283 microcontroller boards compatible with CircuitPython and 87 single board computers can use CircuitPython libraries in CPython via the Adafruit Blinka abstraction layer. Code portability between boards requires little if any changes. There are 346 CircuitPython libraries (all on PyPI / pip as well as GitHub) covering a wide range of hardware and real world needs. From blinking LEDs to using ulab (microlab), a subset of numpy, for data crunching. I just counted and there are exactly 1,000 Adafruit Learning System guides referencing CircuitPython, all free and open source/MIT licensed. https://learn.adafruit.com/ Extras Brian: Quick read: The Thirty Minute Rule, by Daniel Roy Greenfield summary: Stuck on a software problem for 30 min? Ask for help. Michael: The CircuitPython Show by Paul Cutler Follow up from my Python 3 == Active Python 3? James wrote: In episode #273, you guys were discussing supporting "Python 3" to mean any currently supported version of Python rather than "Python 3.7+" or similar. That's a really bad idea. There are still tons of people using unsupported versions of Python, and they're not all invalid use cases. For example, I am one of the upstream maintainers for cloud-init, and I was only recently able to remove Python 3.5 in order to make 3.6 our minimum supported version (which will continue for the next year). The reason is that our main consumers are downstream distro packagers (ubuntu, red hat, fedora, etc), and it's not uncommon for software released into long-term supported OS releases to be supported for 5-10 years or more. If I fire up an Ubuntu Trusty container, which still receives extended support until 2024, I get Python 3.4. So even though 3.4 is unsupported by Python upstream, it is still absolutely in use and supported by OS manufacturers. Joke: A case of the Mondays

Command Line Heroes en español
Las aventuras de Python

Command Line Heroes en español

Play Episode Listen Later Oct 19, 2021 29:20


Con la renuncia del dictador benevolente de por vida, la evolución de Python cambió para siempre. El mensaje titulado "Transferencia de poder" resalta la manera en que evolucionan los lenguajes de programación. En este episodio, Emily Morehouse analiza la relación entre la expansibilidad de Python y su comunidad incluyente. Michael Kennedy explica que aunque Python es muy fácil de usar, tiene la capacidad suficiente para desarrollar cosas como YouTube e Instagram. Y Diane Mueller señala que la comunidad de Python tuvo la iniciativa de desarrollar muchas prácticas incluyentes que se han ido extendiendo en el mundo de la tecnología, como la posibilidad de tomar decisiones en comunidad, por ejemplo. Hay veces en que un dictador benevolente empieza el desarrollo de los lenguajes. Pero Python nos enseña que lo que los lleva al éxito son las comunidades. Aquí te dejamos los links a los podcasts de Michael Kennedy: Talk Python to Me y Python Bytes. 

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

Python Bytes

Play Episode Listen Later Sep 22, 2021 55:33


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 readable as well easy to contribute to Non-stop iterating is key to having good docs. extra goodness consistency for section titles cross-references I'd add Check for grammar and spelling mistakes Consistency in all things, formatting, style, tone, depth of info of diff topics Don't be afraid to have a personality. docs that include easter eggs, fun examples, tasteful jokes, etc are nice, as long as that fun stuff doesn't complicate the docs. Don't slam projects for having bad docs. Not all open source projects exist for your benefit. You can make them better by contributing. :) Brett #3: Starship Continuing the trend of stuff to help make your coding better, Python or not.

Python Bytes
#248 while True: stand up, sit down

Python Bytes

Play Episode Listen Later Sep 2, 2021 52:09


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: Paul Everitt Brain #1: Why I use attrs instead of pydantic Tin Tvrtković, @tintvrtkovic attrs vs dataclasses Since dataclasses are a strict subset of attrs functionality. Recommend using attrs in most cases over dataclasses attrs is faster, has more features, releases more frequently, offers over a wider range of Python versions. attrs vs Pydantic attrs is a library for generating the boring parts of writing classes; Pydantic is that but also a complex validation library. a structuring/unstructuring library, ex converting to json and back attrs has opt-in validation that you have more control over cattrs can be used for structuring/unstructuring converters are opt-in for attrs, built into Pydantic, and can be wrong. example using Pendulum that Pydantic mishandles Summary attrs + cattrs + validators where necessary, converters where necessary will be faster you'll have more control Kind of a “small, sharp, specialized tools” vs “swiss army knife” comparison. Michael #2: mclfy via __dann__ Mcfly is an incredible Ctrl+r replacement McFly replaces your default ctrl-r shell history search with an intelligent search engine that takes into account your working directory and the context of recently executed commands. McFly's suggestions are prioritized in real time with a small neural network. Features Rebinds ctrl-r to bring up a full-screen reverse history search prioritized with a small neural network. Augments your shell history to track command exit status, timestamp, and execution directory in a SQLite database. Maintains your normal shell history file as well so that you can stop using McFly whenever you want. Includes a simple action to scrub any history item from the McFly database and your shell history files. Designed to be extensible for other shells in the future. Written in Rust, so it's fast and safe. Paul #3: Textual and boilerplate removal In the race to make Textual the most talked-about package in Python Bytes history… I'd like to zoom in on a Twitter discussion he had about removing boilerplate I have traditionally been opposed to the convention-over-configuration approach that most successful Python projects have taken I dislike magic variable and file names, prefer explicit is better than implicit, actual symbols Lately, because of…tooling But Will's approach to “boilerplate removal” is compelling, as it remains mypy friendly Still, I find it flawed…code meant to be read 2 years from now…that stuff that is implied-away, worries me Will is great at working-in-the-open, being a gentle, encouraging public figure Brian #4: xdoctest “The xdoctest package is a re-write of Python's builtin doctest module. It replaces the old regex-based parser with a new abstract-syntax-tree based parser (using Python's ast module). The goal is to make doctests easier to write, simpler to configure, and encourage the pattern of test driven development.” “The main enhancements xdoctest offers over doctest are: All lines in the doctest can now be prefixed with >>>. Old-style doctests with ... are still valid. Additionally, the multi-line strings don't require any prefix (but its ok if they do have either prefix). Tests are executed in blocks, rather than line-by-line, thus comment-based directives (e.g. # doctest: +SKIP) are now applied to an entire block, rather than just a single line. Tests without a "want" statement will ignore any stdout / final evaluated value. This makes it easy to use simple assert statements to perform checks in code that might write to stdout. If your test has a "want" statement and ends with both a value and stdout, both are checked, and the test will pass if either matches. Output from multiple sequential print statements can now be checked by a single "got" statement. (new in 0.4.0).” Features I love “The new got/want tester is very permissive by default; it ignores differences in whitespace” You can make doctest normalize whitespace, but why should you have to? Michael #5: Automate the standing desk with python via Joe Riedley, by David Kong “When I first started using it, I was very excited, but I quickly found myself sitting all day, in spite of the fancy desk.” I took off a few screws and … voila! A row of pins neatly exposed right in front. The pins in my control box, when connected correctly, simulate the pressing of the buttons on the front of the box. Raspberry Pi Zero, the simplest, most basic version. It doesn't have all the bells and whistles, but it does everything I needed for this simple project, and it's just $5(!). And the code from gpiozero import LED # The LED library allows easy pin control from time import sleep import randomrelay = LED(17) # I connected the relay to pin 17 and groundwhile True: relay.on() sleep(1) relay.off() sleep(random.randint(45, 60) * 60) Paul #6: Hypermodern Python Cookiecutter I've been noodling with some code the last two years about bringing frontend DX to Python web dev Learning and talking more than adoption Running a modern Python project is a LOT of housekeeping Hypermodern Python Cookiecutter from Claudio Jolowicz teleported me to a state of the art I was looking for Poetry, Nox, GHA, pre-commit, flake8, PyPI uploads from CI, release drafter, Black, prettier, pytest, mypy, Sphinx and friends, GitHub labeler It's NOT AT ALL just a cookiecutter The best part…it's an enormously-detailed user guide, some blog posts with the “why”, it's actively maintained The PR workflow is really well explained and wired up This could be…a course, a webinar Thanks Claudio Extras Michael: ActiveState's 2021 Software Supply Chain Security Survey Python 3.9.7 and 3.8.12 are now available From Shlomi Lanton, on your #2 Brian talked about having a history of all files to find the ones that were updated last, so I created granpa caffinate: you mentioned the MacOS /usr/bin/caffeinate tool on "https://pythonbytes.fm/episodes/show/247/do-you-dare-to-press-.". Follow caffeinate with long-running command to keep awake until done (caffeinate python -c 'import time; time.sleep(10)'), or caffeinate -w "$PID" for an already running task. - via Nathan Henrie Also: wakepy now works correctly on macOS Joke: Meaning

Datacenter Technical Deep Dives
Pydantic: Modern Python Data Validation and Settings by Michael Kennedy

Datacenter Technical Deep Dives

Play Episode Listen Later Jul 23, 2021 45:31


Michael Kennedy (@mkennedy) returns to the show to talk about Pydantic, a Python library that works with data validation and settings management using Python type annotations. Michael joined us previously to discuss Python's async and await implementations and we are excited to have him back to dive more into all things Python. Michael is a Python and MongoDB enthusiast, has two amazing Python podcasts (Talk Python to Me and Python Bytes), is a trainer, entrepeneur and a Python Software Foundation Fellow. On his website training.talkpython.fm, you can find training videos on Python, DevOps, Front End development and API creation, and more! If you are a beginner just jumping into Python, or even an advanced Pythonista, we highly recommend following Michael and checking out his podcasts and websites. Enjoy the show! Resources: https://talkpython.fm/ https://training.talkpython.fm/ https://pythonbytes.fm/ https://pydantic-docs.helpmanual.io/ https://www.youtube.com/watch?v=A-3_Iw6KNCw https://www.youtube.com/watch?v=6SJ26Q_8Hxc https://github.com/mikeckennedy https://www.python.org/psf/members/

Python Bytes
#241 f-yes we want some f-string tricks!

Python Bytes

Play Episode Listen Later Jul 7, 2021 39:53


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: Jay Miller Michael #1: Autosync all branches of a fork Use GitHub actions to keep your fork in sync Step 1: make changes in a separate branch (a branch other than main) to keep the working tree clean and avoiding conflicts with upstream Step 2: Add a new workflow under the “actions” section. We are going to follow the Fork-Sync-With-Upstream-action from the Actions Marketplace. Copy the YAML in the article being careful to use the right repo/branch names Step 3: click on Start Commit and Commit new file and that's it! See your running workflow in the actions tab Brain #2: Measuring memory usage in Python: it's tricky! Itamar Turner-Trauring Nice, easy to follow discussion of memory Cool example to allocate 3 GB arr = np.ones((1024, 1024, 1024, 3), dtype=np.uint8) that's a 4 dimensional array of bytes, 1k x 1k x 1k x 3 “Resident Memory” measured with psutil.Process().memory_info().rss rss = “Resident Set Size”, or “non-swapped physical memory” returns bytes, so / (1024 * 1024) gives MB Shows a little more than 3 GB Doing nothing to process, but opening a few tabs in a browser and re-running rss shows a reduction due to some memory being saved to disk. Fil profiler can show peak allocated memory. Memory Resident Memory : RAM usage Allocated Memory : what we asked for, not really measurable Peak Allocated Memory : kinda the same, but not, and it's measurable Tradeoffs between measuring the two Jay #3: Python f-strings can do more than you thought. f'{val=}', f'{val!r}', f'{dt:%Y-%m-%d}' Caution! Just because you can doesn't mean you should but sometimes you will be looking for a way to do something Michael #4: 10 Tips and Tools You Can Adopt in 15 minutes or Less To Level Up Your Dev Productivity Upgrade your shell (ohmyzsh or ohmyposh) + Windows Terminal with PS 7 Secure.py (or NWebSec for ASP.NET or …) Use a UI for git (SourceTree, GitHub Desktop, PyCharm, VS Code, etc) Sync your github forks Use a good logging framework: Logbook, Loguru, even Sentry SSL/TLS with Let's Encrypt 80/20 testing with sitemaps PageSpeed insights (e.g for Python Bytes) Use an OS package manager: Homebrew, Chocolaty, or Linux's built in) Manage your dependencies with dependabot or even pip-compile requirements.in --upgrade Full conference video Brian #5: How to Start a Production-Ready Django Project Vitor Freitas Some great points for really any project, not just Django projects Make sure different environments work with the project, in this priority: local, so clone and run is easy and new people can onboard fast test, also local, so devs actually test with no issues production, can be more complicated since only experienced people will need it, or it will get run by your CI/CD chain production is also used in staging Configure git and venv from the beginning. Cool requirements files example with a requirements directory containing base.txt test.txt : base.txt + test stuff local.txt : test.txt + dev stuff production.txt : base.txt + any production only stuff Settings setup, also with switched implementation for local, test, prod Shared editor configuration, interesting addition Shared linting and styling tools, isort, black, flake8, … There are some Django specifics also, like app structure. Jay #6: Bunch macOS application that allows you to create starting and finishing workflows How Jay sets up and tears down the newsletter video Extras Jay Monodraw - Make diagrams or outlines using ascii art Joke

Engineered-Mind Podcast | Engineering, AI & Neuroscience
Michael Kennedy - Mastering Python & Entrepreneurship | Podcast #48

Engineered-Mind Podcast | Engineering, AI & Neuroscience

Play Episode Listen Later May 8, 2021 71:48


Michael Kennedy is the founder and host of two successful Python podcasts: Talk Python To Me and Python Bytes. He runs Talk Python Training which provides best-of-class online courses for Python developers. He is deeply involved in the Python community, is a MongoDB Master, and knows a thing or two about .NET as well. Michael has taught over 100 week-long developer training courses spread across 4 continents. He has spoken at a number of US and international conferences including NDC, Software Design and Development, DevWeek, Software Architect and more. ————————————————————————————— Connect with me here: ✉️ My weekly email newsletter: jousef.substack.com

Python en español
Python en español #10: Tertulia 2020-12-09

Python en español

Play Episode Listen Later Apr 23, 2021 110:46


Más sobre persistencia de datos https://podcast.jcea.es/python/10 En esta ocasión grabamos un miércoles porque ayer fue festivo en España. Participantes: Eduardo Castro, email: info@ecdesign.es. Conectando desde A Guarda. Jesús Cea, email: jcea@jcea.es, twitter: @jcea, https://blog.jcea.es/, https://www.jcea.es/. Conectando desde Madrid. Miguel Sánchez, email: msanchez@uninet.edu, conectando desde Canarias. Víctor Ramírez, twitter: @virako, programador python y amante de vim, conectando desde Huelva. Artur, conectando desde Vigo. Audio editado por Pablo Gómez, twitter: @julebek. La música de la entrada y la salida es "Lightning Bugs", de Jason Shaw. Publicada en https://audionautix.com/ con licencia - Creative Commons Attribution 4.0 International License. [00:52] Problemas de sonido. [01:57] "Duda/problema con mod_wsgi-express" Referencia a un mensaje enviado a la lista de correo. Los módulos se importan una sola vez. mod_wsgi: https://pypi.org/project/mod-wsgi/. matplotlib: https://matplotlib.org/. Damos con la solución: Ojo con los objetos globales y múltiples hilos. [07:52] Python 3.9.1. PEP 384: https://www.python.org/dev/peps/pep-0384/. Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API: https://bugs.python.org/issue41986. [09:07] Estado de persistencia en Python. ZODB: http://www.zodb.org/en/latest/. Durus: https://www.mems-exchange.org/software/DurusWorks/. [10:07] ¿Cómo conectar la tecnología de persistencia con el mundo de Python asíncrono? [11:47] Según la opinión de Jesús Cea, la implementación actual de async/await en Python es... fea. La idea es buena, pero la implementación es chapucera y poco transparente. Es muy difícil combinar los mundos síncronos y asíncronos. Las librerías tienen que tomar partido. El código asíncrono "contamina" todo el programa. [15:52] Moderación en la lista de correo. [18:47] Reconducimos la tertulia. ¿Estáis usando Python 3.9? Las distribuciones no están a la última. Cada cliente tiene instalado algo distinto. Utilizar cosas como Docker https://es.wikipedia.org/wiki/Docker, para independizarte de la versión orifial del Sistema Operativo. Los tests te salvan el día a la hora de actualizar de versión. [25:22] Sistemas de tests avanzados. Hypothesis: https://pypi.org/project/hypothesis/. Prueba de mutación: https://es.wikipedia.org/wiki/Prueba_de_mutaci%C3%B3n. [27:37] Podcasts en inglés que escucha Jesús: Python Bytes https://pythonbytes.fm/. Seis temas, media hora. Semanal. Opinión con criterio. Podcast de testing: Test & Code https://testandcode.com/. [30:52] Justificar actualizar a versiones modernas de Python. No suele haber problemas de compatibilidad actualizando a versiones más modernas de Python 3, y los cambios necesarios -si los hay- son menores. Problema: Los paquetes precompilados de librerías complejas pueden tardar en estar disponible para la nueva versión de Python. Muchas librerías complejas no publican versiones precompiladas de forma retroactiva para las versiones nuevas de Python cuando salen, hay que esperar a que saquen una nueva versión de la librería, a veces meses después. Si tardas en actualizar, actualizar múltiples versiones de golpe puede ser muy costoso. [34:32] El nuevo "resolver" de dependencias de PIP https://pyfound.blogspot.com/2020/11/pip-20-3-new-resolver.html. Se puede usar la opción -use-deprecated=legacy-resolver. Librerías compatibles con versiones nuevas de Python, pero que PIP no quiere instalar porque en los descriptores del proyecto no dice que sea compatible. Esto es un problema cuando sale una versión nueva de Python. [38:24] ¿Desde dónde conectamos cada uno? Spam de Jesús en las listas de correo. ¿Qué pasa con la gente de hispanoamérica? Mucha gente conectando desde Vigo y alrededores. Comunidades técnicas en el entorno de Vigo. Vigo Tech Alliance https://vigotech.org/. A Industriosa https://aindustriosa.org/. [43:42] Aviso de que las tertulias se graban. [44:42] Las ideas de Jesús Cea sobre las tertulias. [46:37] Bases de datos. SQLAlchemy https://www.sqlalchemy.org/. Modelos de datos. Diversas bases de datos. PostgreSQL: https://www.postgresql.org/. MySQL: https://www.mysql.com/. MongoDB: https://www.mongodb.com/. Jesús Cea usa sistemas de persistencia. Se ha hablado mucho de esto en una tertulia anterior. [51:42] Persistencia en Python. Tema abordado de forma extensa en la tertulia anterior: https://podcast.jcea.es/python/9. Revisa el audio y/o las notas de esa grabación. [01:02:52] La persistencia no usa teoría relacional. Trabajando con persistencia, no puedes traerte tus ideas de teoría relacional. Se trabaja de otra manera. Acceso al sistema de persistencia a través de un API. [01:09:27] Nuevas incorporaciones a la tertulia. [01:10:12] ¿ORM de Django https://www.djangoproject.com/ o SQLAlchemy https://www.sqlalchemy.org/? [01:14:32] Jesús insiste en sus sistemas de persistencia. ZODB: http://www.zodb.org/en/latest/. ¿Cómo se actualiza la definición de objetos? Jesús describe las dos técnicas que usa: Versión global de la base de datos con actualización en el arranque. Cada objeto tiene su versión y se actualiza al cargarlo en memoria. Los objetos son objetos nativos de Python. Para que otros lenguajes puedan acceder a los datos hay que proporcionarles un API. [01:26:32] Tecnología "publicar & suscribir" https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern. Event Sourcing https://dev.to/barryosull/event-sourcing-what-it-is-and-why-its-awesome. Lenguaje Linda https://en.wikipedia.org/wiki/Linda_(coordination_language). RabbitMQ: https://www.rabbitmq.com/. ZeroMQ: https://zeromq.org/. Redis: https://redis.io/. Pyro: https://pyro5.readthedocs.io/en/latest/. Colas persistentes. BerkeleyDB: https://en.wikipedia.org/wiki/BerkeleyDB. [01:40:37] Open Source y mantenedores quemados. Github: https://github.com/. Github actions: https://docs.github.com/en/actions. [01:49:54] Final.

Python Bytes
#230 PyMars? Yes! FLoC? No!

Python Bytes

Play Episode Listen Later Apr 21, 2021 45:30


Sponsored by us! Support our work through: Our courses at Talk Python Training pytest book Patreon Supporters Special guests: Peter Kazarinoff Brian #1: calmcode.io by Vincent D. Warmerdam Suggested by Rens Dimmendaal Great short intro tutorials & videos. Not deep dives, but not too shallow either. Suggestions: pytest rich datasette I watched the whole series on datasette this morning and learned how to turn a csv data file into a sqlite database use datasette to open a server to explore the data filter the data visualize the data with datasette-vega plugin and charting options learn how I can run random SQL, but it’s safe because it’s read only use it as an API that serves either CSV or json deploy it to a cloud provider by wrapping it in a docker container and deploying that add user authentication to protect the service explore tons of available data sets that have been turned into live services with datasette Michael #2: Natural sort (aka natsort) via Brian Skinn Simple yet flexible natural sorting in Python. Python sort algorithm sorts lexicographically >>> a = ['2 ft 7 in', '1 ft 5 in', '10 ft 2 in', '2 ft 11 in', '7 ft 6 in'] >>> sorted(a) ['1 ft 5 in', '10 ft 2 in', '2 ft 11 in', '2 ft 7 in', '7 ft 6 in'] natsort provides a function natsorted that helps sort lists "naturally” >>> natsorted(a) ['1 ft 5 in', '2 ft 7 in', '2 ft 11 in', '7 ft 6 in', '10 ft 2 in'] Other things that can be sorted: versions file paths (via os_sorted) signed floats (via realsorted) Can go faster using fastnumbers Peter #3: Python controlling a helicopter on Mars. First Flight of the Mars Drone/Helicopter was April 19: https://mars.nasa.gov/technology/helicopter/#Overview. The Drone/Helicopter is called Ingenuity. The helicopter rode to Mars attached to the belly of the Perseverance rover. Community powers NASA’s Ingenuity Helicopter: DEVELOPERS AROUND THE WORLD CONTRIBUTE TO HISTORIC FLIGHT: https://github.com/readme/nasa-ingenuity-helicopter The Drone/Helicopter flight control software is called F’ (pronounced f-prime, sounds like Python f’strings :). You can clone and install the flight control software from GitHub. Make sure you have Python and pip installed. https://github.com/nasa/fprime Brian #4: Pydantic, FastAPI, Typer will all run on 3.10, 3.11, and into the future suggested by an Angry Dwarf It’s a bit of an emotional roller coaster this last week even for those of us on the sidelines watching. I’m sure it was even more so for those involved. Short version: Pydantic, FastAPI, Typer, etc will continue to run as is in 3.10 Minor changes might be necessary in 3.11, but most likely all of us bystanders and users of these packages won’t even see the change, or we will be given specific instructions on what we need to change well ahead of time. If things change in 3.11, your code might still work fine, and you can test that today if you are worried about it. All project leads are involved and talking with the Steering Council. The Steering Council has all of our interests and Pythons in mind and wants to make improvements to Python in a sane way. So don’t freak out. Smart and kind people are involved and know what they are doing. Slightly more detail that I don’t really want to read, and summarized to my perspective: Something about an existing PEP 563, titled Postponed Evaluation of Annotations It was part of 3.7 and it included: “In Python 3.10, function and variable annotations will no longer be evaluated at definition time. Instead, …” This would have implications on Pydantic and projects using it and similar methods, like FastAPI, Typer, … Panic ensues, people wringing their hands, bystanders confused. BTW, the Python steering council knows what they are doing and is aware of all of this already. But lots of people jumped on the bandwagon anyway and freaked out. Even I was thinking “Ugh. I use Typer and FastAPI, can I still use them in 3.10?” Luckily, Sebastian Ramirez posted: I've seen some incorrect conclusions that FastAPI and pydantic "can't be used with Python 3.10". Let's clear that up. In the worst-case scenario (which hasn't been decided), some corner cases would not work and require small refactors. And also if you are worried about the future and your own use as is, you can use from __future__ import annotations to try the new system out. Also thanks Sebastian Then there is this message by Thomas Wouters about PEP 563 and 3.10 “The Steering Council has considered the issue carefully, along with many of the proposed alternatives and solutions, and we’ve decided that at this point, we simply can’t risk the compatibility breakage of PEP 563. We need to roll back the change that made stringified annotations the default, at least for 3.10. (Pablo is already working on this.) “To be clear, we are not reverting PEP 563 itself. The future import will keep working like it did since Python 3.7. We’re delaying making PEP 563 string-based annotations the default until Python 3.11. This will give us time to find a solution that works for everyone (or to find a feasible upgrade path for users who currently rely on evaluated annotations). Some considerations that led us to this decision: …” Michael #5: Extra, Extra, Extra, Extra hear all about it No social trackers on Python Bytes or Talk Python. Python packages on Mars More Mars NordVPN and “going dark” Nobody wants anything to do with Google's new tracking mechanism FLoC (Android Police, Ars Technica). From EFF: Google’s pitch to privacy advocates is that a world with FLoC will be better than the world we have today, where data brokers and ad-tech giants track and profile with impunity. But that framing is based on a false premise that we have to choose between “old tracking” and “new tracking.” It’s not either-or. Instead of re-inventing the tracking wheel, we should imagine a better world without the myriad problems of targeted ads. Peter #6: Build Python books with Jupyter-Book There are many static site generators for Python: Sphinx, Pelican, MkDocs… Jupyter-Book is a static site generator that makes online books from Jupyter notebooks and markdown files. See the Jupyter-book docs. Books can be published on GitHub pages and there is a GitHub action to automatically re-publish your book with each git push. A gallery of Jupyter-books includes: Geographic Data Science with Python, Quantitative Economics with Python, the UW Data Visualization Curriculum, and a book on Algorithms for Automated Driving. All the books are free an online. Extras Brian 2021 South African Pycon, PyConZA - https://za.pycon.org/. The conference will be on 7 and 8 October entirely online deadpendency update . Within a day of us talking about deadpendency last week, the project maintainer added support for pyproject.toml. So projects using poetry, flit should work now. I imagine setuptools with pyproject.toml should also work. Peter Peter’s Book: Problem Solving with Python (dead trees) or free online Joke More code comments // Dear future me. Please forgive me. // I can't even begin to express how sorry I am. try { ... } catch (SQLException ex) { // Basically, without saying too much, you're screwed. Royally and totally. } catch(Exception ex){ //If you thought you were screwed before, boy have I news for you!!! } // This is crap code but it's 3 a.m. and I need to get this working. One more: From TwoHardThings by Martin Fowler: Original saying: There are only two hard things in Computer Science: cache invalidation and naming things. -- Phil Karlton Then there’s This tweet.

Python Bytes
#227 No more awaiting, async comes to SQLAlchemy

Python Bytes

Play Episode Listen Later Mar 31, 2021 33:08


Watch the live stream: Watch on YouTube About the show Sponsored by us! Special guest: Micaela Reyes Brian #1: Number One, that's "retract plank," not "remove plank." Yanking vs removing versions on PyPI https://twitter.com/nedbat/status/1376901333958201352?s=20 https://pypi.org/help/#yanked see also https://doughellmann.com/posts/so-youve-released-a-broken-package-to-pypi-what-do-you-do-now/ Michael #2: SQLAlchemy 1.4.0 Released Exciting: 1st release to properly support an async API Has a new select() + execute() rather than session.query() API Intended to unify Core and ORM. See new vs. old API compared. Requires aiosqlite for async API + SQLite: conn_str = 'sqlite+aiosqlite:///filename' Micaela #3: django-tenants by Tom Turner Multi-tenancy Implementation for Django (typically for SaaS websites e.g. Shopify) currently on v3.2.1 (Aug 2020) release Requirements: Django 2 and PostgreSQL It was largely based on django-tenant-schemas library Data Architecture: shared database, separate schema for each tenant Domain setup / URL routing for root and per tenant: Examples: http://my-domain.com:8000/ http://tenant.my-domain.com:8000/ http://tenant2.my-domain.com:8000/ Possible Use-cases: a hospital with different branches restaurant franchise with different branches Possible Limitations: You can’t use the normal migration commands (python manage.py migrate_schemas instead of python manage.py migrate) Reports - when you need to create a report regarding all the clients/tenants, tenant data will be on separate schemas see also: How to get Django Tenants up and Running Brian #5: pre-commit ci pre-commit is “a framework for managing and maintaining multi-language pre-commit hooks.” Hooks can be run during commits, but also hooked other events, such as merge, push, after switching branches, etc. Even if you run pre-commit yourself, it’d be nice to make sure all hooks are run by people submitting pull requests. pre-commit ci *is a service that “enforces that these issues are discovered (which is opt-in for each developer's workflow via *pre-commit) but also fixes the issues automatically, letting developers focus their time on more valuable problems.” Michael #4: Snyk (Python) Package Advisor via David Smit Provides package health score, built up from Popularity Maintenance Security Community Code of conduct and related metrics Number of releases, commits, maintainers, age, etc. Lots of nice graphs and ways you can contribute Micaela #6: PyWebIO by Wang Weimin Allows you build simple web applications or browser-based GUI applications without the need to write HTML and JavaScript. Has input and output modules Based on tornado Possible Use-cases: Hobby projects - for people who know how to write Python code but want to do away with JavaScript Could be a good teaching tool - ex. if you’re teaching kids or beginners and you want to make them appreciate the concept of input and output Possible Limitation: once you need to style your HTML, it might be a bit difficult to do so since it’s tightly coupled with the Python code Extras Michael absolufy-imports by Marco Gorelli Anthony Shaw actually made a Beanie Baby in the terminal within a day of the last episode! PHP supply chain hack Brian packages: pytest-yuk, pytest-srcpaths, pytest-check Micaela Last day of March membership drive for the PSF https://twitter.com/ThePSF/status/1377000184375296003 Joke: Commenting your code

Python Bytes
#226 Teaching Python podcast on the podcast!

Python Bytes

Play Episode Listen Later Mar 25, 2021 46:03


Special guests: Kelly Schuster-Paredes Sean Tibor Watch on YouTube Brian #1: DataClass vs NamedTuple vs Object: A Battle of Performance in Python Jack Song I’ve been using dataclass for a while now and love it. For some reason, I thought I heard there was some performance hit from them, so I was a bit worried before reading this. Jack came up with “a performance tests to compare the different size and speed when creating, reading and executing functions for Object, NamedTuple and the new DataClass introduced in Python 3.7” Object NamedTuple DataClass create 2.94 µs 2.01 µs 2.34 µs read property 24.7 ns 26.9 ns 24.7 ns nested property 48.1 ns 75.8 ns 52.1 ns execute function 829 ns 946 ns 821 ns size 56 bytes 80 bytes 56 bytes Marvelous. Dataclass is still awesome. At the very least, it’s on the same order of size and speed as other structures. Further questions: This was a limited bit of code, and performance metrics always depend on what kind of example code was used. If anyone has info about different performance examples that give wildly different results or even similar results, regarding DataClass, I’d love to hear about it. Michael #2: Can My Water Cooled Raspberry Pi Cluster Beat My MacBook? Did you know there were Raspberry Pi clusters? Amazing. Two primary things of interest Pi clusters exist! All the tools and setup to make the pi cluster nodes run in a grid computing scenario Compared against a mediocre HP laptop: 10,000 → 1.69 sec 100,000 → 74 sec 200,000 → 268 sec Compared against an Intel MB Air: 10,000 → .88 sec 100,000 → 83 sec 200,000 → 355 sec Pi cluster, one node: 10,000 → 1.57 sec 100,000 → 148 sec 200,000 → 646 sec Pi cluster, grid computed: 10,000 → .65 sec 100,000 → 22 sec 200,000 → 85 sec Ran the same script on my Mac Mini M1 (on Python 3.9.2 Rosetta, single threaded) 10,000 → .33 sec 100,000 → 24 sec 200,000 → 91 sec Ran the my parallel script on my Mac Mini M1 (on Python 3.9.2 Rosetta, multi-threaded) 10,000 → .28 sec 100,000 → 7 sec 200,000 → 26 sec 500,000 → 2m (vs. 9m on the cluster) Ran the my parallel script on my Alienware sim racing machine (16 core, multi-threaded) 10,000 → .27 sec 100,000 → 2.7 sec 200,000 → 10 sec 500,000 → 1m Video of the Alienware sound Kelly #3: There is an app for that! I am always trying to find time to practice Python and learn more ways to teach Python Basics. I amalways on the go, so having Python Practice online and an online editor is always a plus. Programiz a company out of Nepal, has an IOS and Android app for beginner pythonistas From “Hello World” to Generators and Decorators Original Owners of Programiz: Ranjit Bhatta, Aswin Shrestha and Punit Jajodia Swipe, Learn, and Repeat Has an editor built in Leaderboards Quizzes and “Interview Challenges” (paid) Newest update with 200+ programs Interactive IDE FREE, with minimal app advertising Paid version as well Learn anywhere availability, helps to reduce the Digital Divide 826 million learners online due to Covid19 50% of those learners do not have a household computer 706 million have no at home internet The engineering behind the app and its editor function: https://www.programiz.com/blog/online-python-compiler-engineering/ Brian #4: New packaging security funding & NYU Sumana Harihareswara “New York University – specifically Professor Justin Cappos – and I (Sumana) have successfully asked the US National Science Foundation for a grant to improve Python packaging security. The NSF is awarding NYU $800,000 over two years – from mid-2021 to mid-2023 – to further improve the pip dependency resolver and to integrate The Update Framework further into the packaging toolchain.” “NYU researchers and developers will Further assess and improve pip’s dependency resolver, following up on the work done in 2020 and making ResolveLib more reusable by other tools in the packaging ecology Secure the PyPI-to-user pipeline by integrating TUF support for signed packages throughout PyPI’s clients (we’re targeting conda, pip, and bandersnatch initially)” TUF is The Update Framework (TUF) specification, From theupdateframework.io: “The Update Framework (TUF) helps developers maintain the security of software update systems, providing protection even against attackers that compromise the repository or signing keys. TUF provides a flexible framework and specification that developers can adopt into any software update system. ResolveLib “provides a Resolver class that includes dependency resolution logic.”. It’s an independent project, but vendored by pip bandersnatch “is a PyPI mirror client” Michael #5: Extra x8, hear all about it We on amazon and audible (so is Teaching Python) Sourcery added skip refactorings. I did major refactoring since, favorite: url = request.url if request.url else '' to url = request.url or '' Via Matthew Feickert, it’s easy to become a PSF member and support the PSF Beanie adds indexes! Pycharm (and other JetBrains IDEs) in the browser via Dave Kirby lp.jetbrains.com/projector github.com/JetBrains/projector-installer SQLite as a file format comes to Audacity (via Jon Bultmeyer) Prayson Daniel shared his Neo4J examples using Neomodel. Call for proposals for PyCon Latam just went live Sean #6: Using Development Containers with VS Code for Students One of the big chores at the start of a course is getting everyone set up in the same development environment. Usually takes at least a few classes and nearly impossible to get everyone with the same environment at the end. Solution - use Docker images and the Remote-Containers extension to allow students to run a pre-configured container right in VS Code. Needs VS Code & Docker Desktop (maybe a remote Docker host could make it even easier?) Can deploy directly from a Github repo with persistent storage volumes, default VS Code settings, and even pre-installed packages and environment variables. Seems well suited for universities, experienced learners, etc. Also makes it easy to create different environments by assignment or course unit. What if every Talk Python training course had a GitHub container repo with the same starting environment? Extras: Kelly: https://us.pycon.org/2021/summits/education-training/ Sean: Repl.it adds Python package caching (and gets a 40% speed boost) Home Assistant (actually Nabu Casa) buys ESPHome (makes DIY IoT devices cheap & easy to integrate) It’s good to know a Python programmer if you need a vaccine appointment Joke (in honor of our teachers today):

Python Bytes
#225 SELECT Pydantic from MongoDB

Python Bytes

Play Episode Listen Later Mar 17, 2021 39:18


Sponsored by Linode! pythonbytes.fm/linode Special guest: Sebastian Witowski Watch on YouTube Brian #1: Raspberry Pi Pico Release Announcement A review $4 microcontroller Small Extremely low power needs. Built on RP2040, a brand-new chip developed by Raspberry Pi Related: Mu : codewith.mu, 1.1.0-beta.2 Mu is “a simple Python editor for beginner programmers.” 1.1.0 support new boards, including Pico, Lego Spike, plus lots of new fixes. Michael #2: New MongoDB ODM: Beanie via PyCoders Beanie - is an asynchronous ODM for MongoDB, based on Motor and Pydantic. Very new but also very exciting. Main component of Beanie is Pydantic. It helps to implement the main feature - data structuring. Beanie Document - is an abstraction over the Pydantic BaseModel that allows working with Python objects at the application level and JSON objects at the database level. Example, classes: class TagColors(str, Enum): RED = "RED" BLUE = "BLUE" GREEN = "GREEN" class Tag(BaseModel): name: str color: TagColors = TagColors.BLUE class Note(Document): # This is the document structure title: str text: Optional[str] tag_list: List[Tag] = [] Sebastian #3: Sourcery No, not the Terry Pratchett novel (although this one is pretty cool too!) Gives you refactoring recommendations in your code editor Integrates with PyCharm and VS Code Super easy to use - you get suggestions as you type and with one click you can apply them Free to use in the code editor (you will need a personal token) and paid plans with analytics, CI integration, etc. It keeps finding errors in my code (well, maybe I'm just a bad programmer

Finding Genius Podcast
Harnessing Python for Research: Scientific Applications of Python with Michael Kennedy

Finding Genius Podcast

Play Episode Listen Later Mar 10, 2021 34:08


Still scrabbling with Excel? Consider Python language uses, says programmer and podcaster Michael Kennedy. A general programming language that is easy to use in multiple environments, Python programming is limitless and has numerous open source utilities. He shares how listeners can grab hold of the advantages of Python. Listen and learn Examples of Python uses in industry, from Perseverance on Mars to how well Netflix works across devices, How Python and Excel compare and why jumping to Python will take less time than you might think, and What are additional Python language benefits and applications and what are helpful resources to learn more. Programmer Michael Kennedy of the podcasts Talk Python to Me and Python Bytes helps listeners get a jump start on this useful tool for researchers. He gives a fascinating description of the spectrum of its uses, from most AI algorithms and machine learning to YouTube and Netflix's performance across different technologies. But it's also extremely approachable and applicable to the smallest research project. He adds that often missing from conversations about needing more programmers is how adaptable Python can be for researchers already steeped in their fields. He says that scientists and graduate students can easily learn Python and turn it into their "superpower." How? Well for starters, there are numerous resources for learning the basic language, which he provides. But the beauty of Python is that while it is easy to learn quickly, it can be complex enough for projects at the highest level. That's why, he says, users often say you can learn it in a weekend and learn it for a lifetime. He also explains other benefits, like the 300,000 external libraries of Python, with prebuilt libraries for every discipline. But even beyond that, there are tools like loadable data structures to utilize to do the kind of analysis you may not be able to program. Finally, all these tools are free and open source. Intrigued? Listen in for more tips on how to get started with Python. Episode also available on Apple Podcasts: apple.co/30PvU9C

Test & Code - Python Testing & Development
146: Automation Tools for Web App and API Development and Maintenance - Michael Kennedy

Test & Code - Python Testing & Development

Play Episode Listen Later Feb 28, 2021 48:33


Building any software, including web apps and APIs requires testing. There's automated testing, and there's manual testing. In between that is exploratory testing aided by automation tools. Michael Kennedy joins the show this week to share some of the tools he uses during development and maintenance. We talk about tools used for semi-automated exploratory testing. We also talk about some of the other tools and techniques he uses to keep Talk Python Training, Talk Python, and Python Bytes all up and running smoothly. We talk about: Postman ngrok sitemap link testing scripts for manual processes using failover servers during maintenance, redeployments, etc gitHub webhooks and scripts to between fail over servers and production during deployments automatically floating IP addresses services to monitor your site: StatusCake, BetterUptime the affect of monitoring on analytics crash reporting: Rollbar, Sentry response times load testing: Locus Special Guest: Michael Kennedy.

Python Bytes
#212 SQLite as a file format (like docx)

Python Bytes

Play Episode Listen Later Dec 16, 2020 36:16


Catch the video edition live stream on YouTube: youtube.com/watch?v=oKgAsjiJqMs Sponsored by us! Support our work through: Our courses at Talk Python Training Test & Code Podcast Patreon Supporters Special guest: Shari Eskenas Be part of the episode by subscribing and “smashing that bell” over at pythonbytes.fm/youtube Brian #1: pytest 6.2 is out pytester fixture for plugin testing. Like testdir, but a better name, and uses pathlib.Path objects. verbose mode now shows the reason a test was skipped in the terminal line after the SKIPPED, XFAIL, or XPASS Can use monkeypatch as a context manager with .context() and it’s available both in test and fixture functions, but also in helper functions by using pytest.Monkeypatch.context(). import os from contextlib import contextmanager import pytest def test_foo_1(monkeypatch): with monkeypatch.context() as mp: mp.setenv("foo", "bar") assert os.getenv("foo") == "bar" @contextmanager def some_func(): with pytest.MonkeyPatch.context() as mp: mp.setenv("foo", "bar") yield def test_foo_2(): with some_func(): assert os.getenv("foo") == "bar" Lots of other goodies. related: pytest-check, my only released plugin for pytest, was updated to support pytest 6.x Michael #2: SQLite as a file format (like docx) via Jon Bultmeyer An SQLite database file with a defined schema often makes an excellent application file format. Here are a dozen reasons why this is so: Simplified Application Development. No new code is needed for reading or writing the application file. Single-File Documents. An SQLite database is contained in a single file, which is easily copied or moved or attached. High-Level Query Language. SQLite is a complete relational database engine, which means that the application can access content using high-level queries. Accessible Content. Information held in an SQLite database file is accessible using commonly available open-source command-line tools - tools that are installed by default on Mac and Linux systems and that are freely available as a self-contained EXE file on Windows. Cross-Platform. SQLite database files are portable between 32-bit and 64-bit machines and between big-endian and little-endian architectures and between any of the various flavors of Windows and Unix-like operating systems. Atomic Transactions. Writes to an SQLite database are atomic. They either happen completely or not at all, even during system crashes or power failures. Incremental And Continuous Updates. When writing to an SQLite database file, only those parts of the file that actually change are written out to disk. This makes the writing happen faster and saves wear on SSDs. Easily Extensible. As an application grows, new features can be added to an SQLite application file format simply by adding new tables to the schema or by adding new columns to existing tables. Adding columns or tables does not change the meaning of prior queries. Performance. In many cases, an SQLite application file format will be faster than a pile-of-files format or a custom format. Concurrent Use By Multiple Processes. SQLite automatically coordinates concurrent access to the same document from multiple threads and/or processes. Multiple Programming Languages. Though SQLite is itself written in ANSI-C, interfaces exist for just about every other programming language you can think of. Better Applications. If the application file format is an SQLite database, the complete documentation for that file format consists of the database schema, with perhaps a few extra words about what each table and column represents. Shari #3: A Day in Code: Python – A picture book written in code Brian #4: PythonLabs is now hosted by Azure. and “Yes, Barry, there is a PythonLabs” I can’t believe we haven’t covered this in the last 211 episodes. But it seems like good timing now. Now resides at azure.pythonlabs.com By Tim Peters (originally posted on January 6th, 2004 to the PSF members list) Barry (I’m assuming Barry Warsaw) asked the question: “… what /is/ Pythonlabs now? Or /is/ there a Pythonlabs now? I dunno -- Guido owns the domain name which is probably the biggest claim to Pythonlabhood there is.” Tim replies with a very “Yes, Virginia, there is a Santa Clause”-esque answer: Snippets include: Barry, your little friends are wrong. They have been affected by the skepticism of a skeptical age. … Yes, Barry, there is a PythonLabs. It exists as certainly as love and generosity and devotion exist, … Alas! how dreary would be the world if there were no PythonLabs! It would be as dreary as if there were no Barrys. … Not believe in PythonLabs! You might as well not believe in fairies. … Nobody sees PythonLabs, but that is no sign that there is no PythonLabs. … A thousand years from now, Barry, nay 10 times 10,000 years from now, it will continue to make glad the heart of childhood. Michael #5: Extra, extra, extra, extra, extra, extra, hear all about it #1 Numpy version pinning via Grice Just catching up on Ep 208. Note in part 2 about the Numpy issue, folks can pin versions by platform with environment markers: numpy==1.19.3; platform_system == 'Windows' numpy==1.19.4; platform_system == 'Linux' #2 Stylesheet for PySide2 and PyQt5, this time looks like Material Design - via William Jamir Silva #3 Talk Python hits 20M downloads. Python Bytes is almost 6M too. #4 Pyramid 2.0 is coming. #5 Python 3.9.1 is out with 282 changes. Ships as a universal binary (Intel + M1) on macOS. #6 Python + Mac Mini + M1 video #7 Python Steering Council selected Shari #6: OpenMV Extras Brian: agrs, kwargs (quargs), and community a silly discussion on twitter Nocole Carlson: “Huge debate … about whether you say “quargs” or “keyword arguments” for “kwargs”. Obviously “quargs” is correct.” It never occurred to me to say “quargs”, but I like it. Vicki Boykis replied that she’s “… never said anything but “quargs”. This is like a parallel universe.” Some other amusing responses. This reminded me of a conversation I might have over beer at PyCon. or at a booth, or just standing around in the hallway. I miss so much the in person community. I’m grateful that little bits of it are intact on twitter. Joke: Pizza delivery fail Second joke: Why do you many developers use dark mode? Because bugs are attracted to light.

Roaring Elephant
Episode 221 – Byte Sized Python with Michael Kennedy

Roaring Elephant

Play Episode Listen Later Dec 1, 2020 47:08


Today we are joined by Michael Kennedy who is an expert on Python, the little scripting language that is helping solve the worlds biggest problems today. There seems to be no stopping it and it has become the go-to language for anything form devops glue scripts to data scientists' machine learning jobs and everything in between. So how does one get started with Python and what are the tips & tricks of the trade. Find more Michael Kennedy goodness at: Michael Kennedy on Technology:Cutting-Edge Developer and Technology Writin A podcast on Python and related technologies Python Bytes is a weekly podcast hosted by Michael Kennedy and Brian Okken. Python Bytes podcast delivers headlines directly to your earbuds. If you want to stay up on the Python developer news but don't have time to scour reddit, twitter, and other news sources, just subscribe and you'll get the best picks delivered weekly.Have feedback for the show? Send it to contact_pythonbytes@talkpython.fm. We'd love to hear from you. Please use the Contact Form on this blog or our twitter feed to send us your questions, or to suggest future episode topics you would like us to cover.

Chai Time Data Science
Michael Kennedy: Talk Python and Python Bytes Podcast, Creating Pythonic Content #120

Chai Time Data Science

Play Episode Listen Later Nov 22, 2020 65:33


Video Version: https://youtu.be/pgzEqhuGBd0 Subscribe here to the newsletter: https://tinyletter.com/sanyambhutani In this episode, Sanyam Bhutani talks Python to the amazing podcaster, content creator and educator: Michael Kennedy, the host of talk Python podcast and Python Bytes podcast, In this episode, they talk about Michael's journey in programming and with Python. Michael has been hosting the podcast for five years and has been in the programming world for even longer, they dive into what he's learned through this and his perspective, how it has evolved through creating content, and to creating these courses and, and eventually a business around it as well. Links: https://talkpython.fm/home Automating the saw: https://www.youtube.com/watch?v=JEImn7s7x1o The ML leads to 50 exoplanet discovery: https://www.techrepublic.com/article/machine-learning-algorithm-confirms-50-new-exoplanets-in-historic-first/ Follow: Michael Kennedy: https://twitter.com/mkennedy https://www.linkedin.com/in/mkennedy/ Sanyam Bhutani: https://twitter.com/bhutanisanyam1 Blog: sanyambhutani.com About: https://sanyambhutani.com/tag/chaitimedatascience/ A show for Interviews with Practitioners, Kagglers & Researchers and all things Data Science hosted by Sanyam Bhutani. You can expect weekly episodes every available as Video, Podcast, and blogposts. Intro track: Flow by LiQWYD https://soundcloud.com/liqwyd

The Rabbit Hole: The Definitive Developer's Podcast

After discovering that we made it on to a list of awesome podcasts about tech, we decided to use this episode to look at that list and share some of our favorite podcast content and what we are currently listening to! To start off we share different ways and times to consume podcast content, from the shower to the car! We run through the best tech media out there, with Dave talking about Python Bytes and Michael sharing his love for the Ladybug Podcast. Following that we move onto non-tech shows, highlighting The Legion on Zoom and the ever-popular, topical and informative 99% Invisible. To finish off we talk about some funny shows we enjoy, Underunderstood, and how Michael has improved this very show by listening to Your Podcast Coach!

Python Bytes
#199 Big news for a very small Python runtime

Python Bytes

Play Episode Listen Later Sep 17, 2020 29:28


Sponsored by us! Support our work through: Our courses at Talk Python Training Python Testing with pytest Michael #1: micropython updated via Matt Trentini v1.13 is packed with features and bugfixes including solid asyncio support and tasty BLE improvements. Heck, we've even got the walrus operator. a new implementation of the uasyncio module which aims to be more compatible with CPython's asyncio module. The main change is to use a Task object for each coroutine, allowing more flexibility to queue tasks in various places, eg the main run loop, tasks waiting on events, locks or other tasks. It no longer requires pre-allocating a fixed queue size for the main run loop. Most code in this repository is now auto-formatted using uncrustify for C code and Black for Python code. BlueKitchen BTstack bindings have been added for the ubluetooth module, as an optional alternative to the NimBLE stack. The unix port can now be built with BLE support using these bindings Other Bluetooth additions include: new events for service/characteristic/ descriptor discovery complete; new events for read done and indicate acknowledgement; and support for active scanning in BLE.gap_scan(). PEP 526 has been (Walrus) There has been an important bug fix when importing ARM machine code from an .mpy file: the system now correctly tracks the executable memory allocated to the machine code so this memory is not reclaimed by the garbage collector. For testing, a multi-instance test runner has been added (see tests/run-multitests.py) which allows running a synchronised test across two or more MicroPython targets. There are breaking changes First release since Dec 19, 2019 Brian #2: respx: A utility for mocking out the Python HTTPX library When using requests, you can mock it with responses. When using httpx, mock with respx. Quick start: import httpx import respx @respx.mock def test_something(): request = respx.post("https://foo.bar/baz/", status_code=201) response = httpx.post("https://foo.bar/baz/") assert request.called assert response.status_code == 201 Documentation includes examples of using respx with both pytest and unittest, including how to set up mocked_api fixtures for pytest. There’s call statistics you can assert on. Ability to raise exceptions, return non-200 status codes, set custom return content. Content can be generated in a callback method. JSON content can be returned Tons of nice options to help test your httpx based application. Michael #3: GetPy - A Vectorized Python Dict/Set The goal of GetPy is to provide the highest performance python dict/set that integrates into the python scientific ecosystem. GetPy is a thin binding to the Parallel Hashmap (https://github.com/greg7mdp/parallel-hashmap.git) which is the current state of the art unordered map/set with minimal memory overhead and fast runtime speed. The binding layer is supported by PyBind11 (https://github.com/pybind/pybind11.git) The gp.Dict and gp.Set objects are designed to maintain a similar interface to the corresponding standard python objects. Simple example: - import getpy as gp key_type = np.dtype('u8') value_type = np.dtype('u8') keys = np.random.randint(1, 1000, size=10**2, dtype=key_type) values = np.random.randint(1, 1000, size=10**2, dtype=value_type) gp_dict = gp.Dict(key_type, value_type) gp_dict[keys] = values Brian #4: isort and black now play nice together easily Contributed by John Hagen isort “sorts your imports, so you don’t have to” black reformats all of your code to a consistent code style, including import statements There is a config page on black documentation that shows how to set isort to be compatible with black. It also shows how to make flake8 and pylint play nice with black, but they are less complicated. Now, however, with isort 5 introduction of built in profiles, you can just use isort --``profile black . and the profile sets everything for you. There’s a profile page for isort that describes all that it does. Other profiles include: django, pycharm, google, open_stack, plone, attrs, hug And as always, you can configure your own with config files. Michael #5: Scientists rename human genes to stop Microsoft Excel from misreading them as dates Via Chris Moffitt There are tens of thousands of genes in the human genome Each gene is given a name and alphanumeric code, known as a symbol, which scientists use to coordinate research. Over the past year or so, some 27 human genes have been renamed, all because Microsoft Excel kept misreading their symbols as dates. Excel is regularly used by scientists to track their work and even conduct clinical trials. But its default settings were designed with more mundane applications in mind, so when a user inputs a gene’s alphanumeric symbol into a spreadsheet, like MARCH1 — short for “Membrane Associated Ring-CH-Type Finger 1” — Excel converts that into a date: 1-Mar. One study from 2016 examined genetic data shared alongside 3,597 published papers and found that roughly one-fifth had been affected by Excel errors. See 12 of the Biggest Spreadsheet Fails in History for more examples: https://blogs.oracle.com/smb/10-of-the-costliest-spreadsheet-boo-boos-in-history The scientific body in charge of standardizing the names of genes, the HUGO Gene Nomenclature Committee, published new guidelines for gene naming. From now on human genes and the proteins they expressed will be named with one eye on Excel’s auto-formatting. Check out the Excel to Python course and webcast to escape this. Brian #6: Never Run ‘python’ In Your Downloads Folder by Glyph This is really a nice, short tutorial on how sys.path is populated, why you should care, and why you need to make sure it’s only trusted locations. “downloads” is definitely not trusted. So never, ever, ever run python from the downloads directory, even with python -m something, as that adds the download dir to the include path. Example includes a demonstration of malicious js code that downloads a fake pip.py to your downloads folder, so when you call python -m pip install ./legit_package.whl you get the fake pip. Further examples show how you need to be vigilant to check your dot files for weird PYTHONPATH extensions and additions. Extras: Michael: We recently passed 5,000,000 downloads of the audio files over at Python Bytes and are the 130th most popular tech podcast in the world. Thank you everyone! Got a new LinkSys WiFi 6 mesh router, and wow, highly recommended. Joke Are you a real programmer? Check with XKCD to find out.

Technado from ITProTV (Audio)
Technado, Ep. 166: Talk Python Training’s Michael Kennedy

Technado from ITProTV (Audio)

Play Episode Listen Later Aug 27, 2020 58:21


If you want to talk Python, you can’t go wrong with Python Software Foundation Fellow and host of two Python podcasts, Michael Kennedy. After discussing his podcasts, Python Bytes and Talk Python To Me, Michael played a game of ‘Python, Python, or Python,’ where he and the panel guessed if headlines were about snakes, programming, or Monty Python. In the news, the team talked about the viability of a new password generator called DiceKeys, Ubuntu backporting WSL 2 to earlier Windows builds, a Chrome feature that’s causing strain on global root DNS servers, a major Gmail bug fix, and concerns about Malicious AWS community AMIs.

windows gmail chrome python monty python ubuntu amis dns wsl michael kennedy python bytes talk python to me talk python training
Technado from ITProTV
Technado, Ep. 166: Talk Python Training’s Michael Kennedy

Technado from ITProTV

Play Episode Listen Later Aug 27, 2020 58:21


If you want to talk Python, you can’t go wrong with Python Software Foundation Fellow and host of two Python podcasts, Michael Kennedy. After discussing his podcasts, Python Bytes and Talk Python To Me, Michael played a game of ‘Python, Python, or Python,’ where he and the panel guessed if headlines were about snakes, programming, or Monty Python. In the news, the team talked about the viability of a new password generator called DiceKeys, Ubuntu backporting WSL 2 to earlier Windows builds, a Chrome feature that’s causing strain on global root DNS servers, a major Gmail bug fix, and concerns about Malicious AWS community AMIs.

windows gmail chrome python monty python ubuntu amis dns wsl michael kennedy python bytes talk python to me talk python training
Technado from ITProTV
Technado, Ep. 166: Talk Python Training’s Michael Kennedy

Technado from ITProTV

Play Episode Listen Later Aug 27, 2020 58:21


If you want to talk Python, you can’t go wrong with Python Software Foundation Fellow and host of two Python podcasts, Michael Kennedy. After discussing his podcasts, Python Bytes and Talk Python To Me, Michael played a game of ‘Python, Python, or Python,’ where he and the panel guessed if headlines were about snakes, programming, or Monty Python. In the news, the team talked about the viability of a new password generator called DiceKeys, Ubuntu backporting WSL 2 to earlier Windows builds, a Chrome feature that’s causing strain on global root DNS servers, a major Gmail bug fix, and concerns about Malicious AWS community AMIs.

windows gmail chrome python monty python ubuntu amis dns wsl michael kennedy python bytes talk python to me talk python training
Technado from ITProTV
Technado, Ep. 166: Talk Python Training’s Michael Kennedy

Technado from ITProTV

Play Episode Listen Later Aug 27, 2020 58:21


If you want to talk Python, you can’t go wrong with Python Software Foundation Fellow and host of two Python podcasts, Michael Kennedy. After discussing his podcasts, Python Bytes and Talk Python To Me, Michael played a game of ‘Python, Python, or Python,’ where he and the panel guessed if headlines were about snakes, programming, or Monty Python. In the news, the team talked about the viability of a new password generator called DiceKeys, Ubuntu backporting WSL 2 to earlier Windows builds, a Chrome feature that’s causing strain on global root DNS servers, a major Gmail bug fix, and concerns about Malicious AWS community AMIs.

windows gmail chrome python monty python ubuntu amis dns wsl michael kennedy python bytes talk python to me talk python training
Technado from ITProTV (Audio)
Technado, Ep. 166: Talk Python Training’s Michael Kennedy

Technado from ITProTV (Audio)

Play Episode Listen Later Aug 27, 2020 58:21


If you want to talk Python, you can’t go wrong with Python Software Foundation Fellow and host of two Python podcasts, Michael Kennedy. After discussing his podcasts, Python Bytes and Talk Python To Me, Michael played a game of ‘Python, Python, or Python,’ where he and the panel guessed if headlines were about snakes, programming, or Monty Python. In the news, the team talked about the viability of a new password generator called DiceKeys, Ubuntu backporting WSL 2 to earlier Windows builds, a Chrome feature that’s causing strain on global root DNS servers, a major Gmail bug fix, and concerns about Malicious AWS community AMIs.

windows gmail chrome python monty python ubuntu amis dns wsl michael kennedy python bytes talk python to me talk python training
Technado from ITProTV (Audio)
Technado, Ep. 166: Talk Python Training’s Michael Kennedy

Technado from ITProTV (Audio)

Play Episode Listen Later Aug 27, 2020 58:21


If you want to talk Python, you can’t go wrong with Python Software Foundation Fellow and host of two Python podcasts, Michael Kennedy. After discussing his podcasts, Python Bytes and Talk Python To Me, Michael played a game of ‘Python, Python, or Python,’ where he and the panel guessed if headlines were about snakes, programming, or Monty Python. In the news, the team talked about the viability of a new password generator called DiceKeys, Ubuntu backporting WSL 2 to earlier Windows builds, a Chrome feature that’s causing strain on global root DNS servers, a major Gmail bug fix, and concerns about Malicious AWS community AMIs.

windows gmail chrome python monty python ubuntu amis dns wsl michael kennedy python bytes talk python to me talk python training
Talk Python To Me - Python conversations for passionate developers
#274 Profiling data science code with FIL

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Jul 24, 2020 58:12


Do you write data science code? Do you struggle loading large amounts of data or wonder what parts of your code use the maximum amount of memory? Maybe you just want to require smaller compute resources (servers, RAM, and so on). If so, this episode is for you. We have Itamar Turner-Trauring, creator of the Python data science memory profiler FIL here to talk memory usage and data science. Links from the show Itamar on twitter: @itamarst FIL: pythonspeed.com Python Bytes coverage of FIL: pythonbytes.fm Video: Small Big Data: using NumPy and Pandas when your data doesn't fit in memory: youtube.com Software Engineering for Data Scientists Article: pythonspeed.com Python Tutor: pythontutor.com Weak references: docs.python.org memory_profiler package: github.com Austin profiler: github.com WSL2 on Windows: pbpython.com/wsl-python.html Sponsors Talk Python Training

Python Bytes
#189 What does str.strip() do? Are you sure?

Python Bytes

Play Episode Listen Later Jul 9, 2020 31:57


Sponsored by us! Support our work through: Our courses at Talk Python Training Brian’s pytest book Brian #1: Improving Python exception chaining with raise-from Ram Rachum Python3 has a change called PEP 3134: Exception Chaining and Embedded Tracebacks It should be used more than it is. If an exception is raised from an except clause, it could be because: something unexpected happened “An exception was raised, and we decided to replace it with a different exception that will make more sense to whoever called this code. Maybe the new exception will make more sense because we’re giving a more helpful error message. Or maybe we’re using an exception class that’s more relevant to the problem domain, and whoever’s calling our code could wrap the call with an except clause that’s tailored for this failure mode.” If it’s the second case, you should change your code to something like this: try: [HTML_REMOVED] except ExpectedExceptionType as e: raise BetterException('Better explanation') from e It’s the from e that does the magic. And now instead of getting During handling of the above exception, another exception occurred: You get: The above exception was the direct cause of the following exception: “That’s how you know you have a case of a friendly wrapping of an exception.” Michael #2: Create and publish interactive reports in Python via Tim Pogue Datapane is an open source framework which makes it easy to turn scripts and notebooks into interactive reports. Free for individuals, paid(?) for teams Build reports in Python and deploy scripts and notebooks as self-service reporting tools. Analyze data in your own tools: Write code and analyze data in your own editor or environment, whether its Jupyter, Colab, or Airflow. Build reports in code: Datapane's framework makes it easy to create rich reports from DataFrames, Markdown, and visualization libraries, such as Altair. Publish and share: Export as standalone HTML files, or publish reports to Datapane.com for free, where they can be shared and embedded. Add forms to filter / drive the report Everything in Datapane is an API. Deploy scripts and generate reports from your server, GitHub, Airflow, or CI system. Check out the gallery. Brian #3: Pickle’s nine flaws Ned Batchelder Instead of “never use pickle”, Ned says “only use pickle if you are OK with it’s nine flaws” The flaws Insecure : Malicious pickles can get the unpickler to run bad code Old pickles look like old code : Any changes to your data structures might break your ability to read old pickles Implicit: All data is serialized as class objects, even if that’s not what you want. Over-serializes: Serializes everything in your objects, even things like cached computation __init__ isn’t called : during unpickling, even if it really should be for your situation Python only : for the most part, it’s not something you can use with other languages Unreadable: binary, so good luck debugging problems Appears to pickle code: but doesn’t really. Keeping a list of functions or classes? It’ll get pickled as names and get bound to a function/class matching the name during unpickling. Slow Some of it you can work around, but then, why? Alternatives: JSON, marshmallow, cattrs, protocol buffers, … Michael #4: PEP 602 -- Annual Release Cycle for Python by Łukasz Langa Status accepted This PEP proposes that Python 3.X.0 will be developed for around 17 months: The first five months overlap with Python 3.(X-1).0's beta and release candidate stages and are thus unversioned. The next seven months are spent on versioned alpha releases where both new features are incrementally added and bug fixes are included. The following three months are spent on four versioned beta releases where no new features can be added but bug fixes are still included. The final two months are spent on two release candidates (or more, if necessary) and conclude with the release of the final release of Python 3.X.0. Annual release cadence: Feature development of Python 3.(X+1).0 starts as soon as Python 3.X.0 Beta 1 is released. This creates a twelve month delta between major Python versions. This change provides the following advantages: makes releases smaller: since doubling the cadence doesn't double our available development resources, consecutive releases are going to be smaller in terms of features; puts features and bug fixes in hands of users sooner; creates a more gradual upgrade path for users, by decreasing the surface of change in any single release; creates a predictable calendar for releases where the final release is always in October (so after the annual core sprint), and the beta phase starts in late May (so after PyCon US sprints), which is especially important for core developers who need to plan to include Python involvement in their calendar; Brian #5: More git Resources: On episode 187 we talked about Oh Sh*t, Git!, a zine by Julia Evans I mentioned that I was concerned about buying it for a team due to the mild swearing. John Place reached out to tell us there’s a non-swearing version: Dangit, git!, the zine. Also both of these are inspired by two websites by Katie Sylor-Miller: dangitgit.com ohshitgit.com These are free websites with “something went wrong, how to I fix it” solutions. All issues have titles that are links/anchors, so you can send someone a link if they ask you a question of how to fix something with git, and hopefully they can figure it out themselves sometime. Also Git Cheatsheet Not just a pdf An interactive single page site that is, for one, beautifully designed. There’s 5 columns: Stash, Workspace, Index, Local Repo, Upstream Repo Hover over a column and it shows you git commands that affect that part and flows to other columns. Hover over a command and the description pops up at the bottom. The visual is great for reinforcing how actions move data between different parts of a repository, and a great way to teach people to have that mental model that git is not just your repo, it’s all of these components working together. Lastly, git-pretty Similar goals as the dangit and ohsh*t offerings, this is a single page png flowchart that starts with “so you have a mess on your hands” and asks a bunch of questions to funnel you to how to fix it. A fun thing to print out and pin to your wall. Michael #6: PEP 616 -- String methods to remove prefixes and suffixes Dennis Sweeney Status: Accepted Question: What does this return? “saturday is the 1st".strip('st') Answer: aturday is the 1 If you expected it to remove the string st, well, no. That’s PEP 616. Add two new methods, removeprefix() and removesuffix(), to the APIs of Python's various string objects. These methods would remove a prefix or suffix (respectively) from a string, if present, and would be added to Unicode str objects, binary bytes and bytearray objects, and collections.UserString. Extras: Michael: Manning conference Python Bytes event Michael's 10 tips for web dev PyCon recording out Learn Python Humble Bundle Telegram bots by Abhishek Pednekar Python Bytes https://t.me/TalkPythonBot Joke: Karen Chee (@karencheee): you: A famous engineer / inventor is coming over for dinner tonight, want to join us? me: Sure, who is it? you: His name is Rube Goldberg me: That name rings a bell, which sets off a trap that undoes a buckle and releases a ball that rolls down a pipe and …

Python Bytes
#183 Need a beautiful database editor? Look to the Bees!

Python Bytes

Play Episode Listen Later May 29, 2020 31:51


Sponsored by DigitalOcean: pythonbytes.fm/digitalocean Special guest: Calvin Hendryx-Parker @calvinhp Brian #1: fastpages: An easy to use blogging platform, with enhanced support for Jupyter Notebooks. Uses GH actions to Jekyll blog posts on GitHub Pages. Create posts with code, output of code, formatted text, directory from Jupyter Notebooks. Altair interactive visualizations Collapsible code cells that can be open or closed by default. Metadata like title, summary, in special markdown cells. twitter cards and YouTube videos tags support Support for pure markdown posts and even MS Word docs for posts. (but really, don’t). Documentation and introduction written in fastpages itself, https://fastpages.fast.ai/ Michael #2: BeeKeeper Studio Open Source SQL Editor and Database Manager Use Beekeeper Studio to query and manage your relational databases, like MySQL, Postgres, SQLite, and SQL Server. Runs on all the things (Windows, Linux, macOS) Features Autocomplete SQL query editor with syntax highlighting Tabbed interface, so you can multitask Sort and filter table data to find just what you need Sensible keyboard-shortcuts Save queries for later Query run-history, so you can find that one query you got working 3 days ago Default dark theme Connect: Alongside normal connections you can encrypt your connection with SSL, or tunnel through SSH. Save a connection password and Beekeeper Studio will make sure to encrypt it to keep it safe. SQL Auto Completion: Built-in editor provides syntax highlighting and auto-complete suggestions for your tables so you can work quickly and easily. Open Lots of Tabs: Open dozens of tabs so you can write multiple queries and tables in tandem without having to switch windows. Save queries View Table Data: Tables get their own tabs too! Use our table view to sort and filter results by column. Calvin #3: 2nd Annual Python Web Conference The most in-depth Python conference for web developers Targeted at production users of Python Talks on Django, Flask, Twisted, Testing, SQLAlchemy, Containers, Deployment and more June 17th-19th — One day of tutorials and two days of talks in 3 tracks Keynote talks by Lorena Mesa Hynek Schlawack Russell Keith-Magee Steve Flanders Fireside Chat with Carl Meyer about Instragram’s infrastructure, best practices Participate in 40+ presentations and 6 tutorials Fun will be had and connections made Virtual cocktails Online gaming Board game night Tickets are $199 and $99 for Students As a bonus, for every Professional ticket purchased, we'll donate a ticket to an attendee in a developing country. As a Python Bytes listener you can get a 20% discount with the code PB20 Brian #4: Mimesis - Fake Data Generator “…helps generate big volumes of fake data for a variety of purposes in a variety of languages.” Custom and generic data providers >33 locales Lots of locale dependent providers, like address, Food, Person, … Locale independent providers. Super fast. Benchmarking with 10k full names was like 60x faster than Faker. Data generation by schema. Very cool >>> from mimesis.schema import Field, Schema >>> _ = Field('en') >>> description = ( ... lambda: { ... 'id': _('uuid'), ... 'name': _('text.word'), ... 'version': _('version', pre_release=True), ... 'timestamp': _('timestamp', posix=False), ... 'owner': { ... 'email': _('person.email', domains=['test.com'], key=str.lower), ... 'token': _('token_hex'), ... 'creator': _('full_name'), ... }, ... } ... ) >>> schema = Schema(schema=description) >>> schema.create(iterations=1) - Output: [ { "owner": { "email": "aisling2032@test.com", "token": "cc8450298958f8b95891d90200f189ef591cf2c27e66e5c8f362f839fcc01370", "creator": "Veronika Dyer" }, "name": "widget", "version": "4.3.1-rc.5", "id": "33abf08a-77fd-1d78-86ae-04d88443d0e0", "timestamp": "2018-07-29T15:25:02Z" } ] Michael #5: Schemathesis A tool for testing your web applications built with Open API / Swagger specifications. Supported specification versions: Swagger 2.0 Open API 3.0.x Built with: hypothesis hypothesis_jsonschema pytest It reads the application schema and generates test cases which will ensure that your application is compliant with its schema. Use: There are two basic ways to use Schemathesis: Command Line Interface Writing tests in Python CLI supports passing options to hypothesis.settings. To speed up the testing process Schemathesis provides -w/--workers option for concurrent test execution If you'd like to test your web app (Flask or AioHTTP for example) then there is --app option for you Schemathesis CLI also available as a docker image Code example: import requests import schemathesis schema = schemathesis.from_uri("http://0.0.0.0:8080/swagger.json") @schema.parametrize() def test_no_server_errors(case): # `requests` will make an appropriate call under the hood response = case.call() # use `call_wsgi` if you used `schemathesis.from_wsgi` # You could use built-in checks case.validate_response(response) # Or assert the response manually assert response.status_code < 500 Calvin #6: Finding secrets by decompiling Python bytecode in public repositories Jesse’s initial research revealed that thousands of GitHub repositories contain secrets hidden inside their bytecode. It has been common practice to store secrets in Python files that are typically ignored such as settings.py, config.py or secrets.py, but this is potentially insecure Includes a nice crash course on Python byte code and cached source This post comes with a small capture-the-flag style lab for you to try out this style of attack yourself. You can find it at https://github.com/veggiedefender/pyc-secret-lab/ Look through your repositories for loose .pyc files, and delete them If you have .pyc files and they contain secrets, then revoke and rotate your secrets Use a standard gitignore to prevent checking in .pyc files Use JSON files or environment variables for configuration Extras: Michael: Python 3.9.0b1 Is Now Available for Testing Python 3.8.3 Is Now Available Ventilators and Python: Some particle physicists put some of their free time to design and build a low-cost ventilator for covid-19 patients for use in hospitals. https://arxiv.org/pdf/2003.10405.pdf Search of the PDF for Python: "Target computing platform: Raspberry Pi 4 (any memory size), chosen as a trade-off between its computing power over power consumption ratio and its wide availability on the market; • Target operating: Raspbian version 2020-02-13; • Target programming language: Python 3.5; • Target PyQt5: version 5.11.3." "The MVM GUI is a Python3 software, written using the PyQt5 toolkit, that allows steering and monitoring the MVM equipment." Brian: Call for Volunteers! Python GitHub Migration Work Group migration from bugs.python.org to GitHub Calvin: Learn Python Humble Bundle Pay $15+ and get an amazing set of Python books to start learning at all levels Book Industry Charitable Foundation The No Starch Press Foundation Joke: More O’Really book covers

Python Bytes
#179 Guido van Rossum drops in on Python Bytes

Python Bytes

Play Episode Listen Later Apr 30, 2020 44:54


Sponsored by DigitalOcean: pythonbytes.fm/datadog Special guest: Guido van Rossum Brian #1: New governance model for the Django project James Bennet on DjangoProject Blog DEP 10 (Django Enhancement Proposal) Looks like it’s been in the making since at least 2018 The specifics are definitely interesting “core team” dissolved new role, “merger” with commit access only for merging pull requests. hold no decision making privileges technical decisions made in public venues “technical board” kept where necessary, but historically it’s rare. no longer elected by committers, but anyone can run and be elected by DSF individual members. More interesting to me is the rationale Grow the set of people contributing to Django Remove the barriers to participation Looking at how decisions are made anyway historically, by reviewing pull requests, and merges done by “Fellows”, paid contractors of the DSF. Specifically, taking into account the specifics of the current state of participation in Django, trying to set it up for inclusion and growth in the future, and the specifics of this project. Not trying to clone the governance of a different project. Michael #2: missingno Missing data visualization module for Python. A small toolset of flexible and easy-to-use missing data visualizations Quick visual summary of the completeness (or lack thereof) of your dataset Just call msno.matrix(collisions.sample(250)) and here’s what you’ll see: The sparkline at right summarizes the general shape of the data completeness and points out the rows with the maximum and minimum nullity in the dataset. Other visualizations are available (heat maps, bar charts, etc) The dendrogram allows you to more fully correlate variable completion, revealing trends deeper than the pairwise ones visible in the correlation heatmap. The dendrogram uses a hierarchical clustering algorithm (courtesy of scipy) to bin variables against one another by their nullity correlation. Guido #3: Announcements from the language summit. See the schedule of topics covered here. Brian #4: Codes of Conduct and Enforcement I’ve been thinking about this a lot lately. No reason. Just interesting topic, I think. Interesting the differences in CoC and enforcement clauses of different projects based on the types of interaction most likely to need enforcement. Two examples PSF Scope (focus seems to be first on events, second on online) PSF Code of Conduct being open focus on what’s best for the community acknowledging time and effort being respectful of different viewpoints and experiences showing empathy towards other community members being considerate being respectful gracefully accepting constructive criticism using welcoming and inclusive language list of inappropriate behavior PSF CoC Enforcement Procedures 2/3 majority vote among non conflicted work group members. Process for disagreement of the work group Django Scope (focus on online spaces, events seem to be covered elsewhere) Django Code of Conduct be friendly and patient be welcoming be considerate be respectful be careful in the words you choose Includes examples of harassment and exclusionary behavior that isn’t acceptable. when we disagree try to understand why Django CoC Enforcement Manual Resolution timelines in place. Aiming for resolution within a week. Unilateral authority: Any committee member may act immediately (before consensus) to end the situation if the act is ongoing or threatening. Otherwise, consensus must be reached. Otherwise, it’s turned over to the DSF board for resolution. Differences are interesting The focus on online interactions and the Django push to try to get more people involved I think are part of the need for really fast reaction times for problems, and then trying to reach consensus. The ability to bump the decision up to the DSF is interesting too. Also the 2/3 vs consensus. For other projects Looking at these two examples, why they are different, and what similarities and needs for inclusion and growth of more developers, online vs events, etc, before deciding how to enforce CoC on your project. Enforcement and quick enforcement and public statement of what enforcement looks like seems really important. Don’t ignore it. Figure out the process before you have to use it. Michael #5: Myths about Indentation Python can come across as a funky language using spacing, not { } for code blocks So let’s talk about some myths #1 Whitespace is significant in Python source code. No, not in general. Only the indentation level of your statements is significant (i.e. the whitespace at the very left of your statements). Everywhere else, whitespace is not significant and can be used as you like, just like in any other language. The exact amount of indentation doesn't matter at all, but only the relative indentation of nested blocks (relative to each other). Furthermore, the indentation level is ignored when you use explicit or implicit continuation lines. # For example: >>> foo = [ ... 'some string', ... 'another string', ... 'short string' ... ] #2 Python forces me to use a certain indentation style Yes and no. You can write the inner block all on one line if you like, therefore not having to care about indentation at all. These are equivalent >>> if 1 + 1 == 2: ... print("foo") ... print("bar") ... x = 42 >>> if 1 + 1 == 2: ... print("foo"); print("bar"); x = 42 >>> if 1 + 1 == 2: print("foo"); print("bar"); x = 42 If you decide to write the block on separate lines, then yes, Python forces you to obey its indentation rules The conclusion is: Python forces you to use indentation that you would have used anyway, unless you wanted to obfuscate the structure of the program. Seen C code like this: if (some condition) if (another condition) do_something(fancy); else this_sucks(badluck); Either the indentation is wrong, or the program is buggy. In Python, this error cannot occur. The program always does what you expect when you look at the indentation. #3 You cannot safely mix tabs and spaces in Python That's right, and you don't want that. Most good editors support transparent translation of tabs, automatic indent and dedent. It's behaving like you would expect a tab key to do, but still maintaining portability by using spaces in the file only. This is convenient and safe. #4 I just don't like it - That's perfectly OK; you're free to dislike it - But it does have a lot of advantages, and you get used to it very quickly when you seriously start programming in Python. #5 How does the compiler parse the indentation The parsing is well-defined and quite simple. Basically, changes to the indentation level are inserted as tokens into the token stream. After the lexical analysis (before parsing starts), there is no whitespace left in the list of tokens (except possibly within string literals, of course). In other words, the indentation is handled by the lexer, not by the parser. Guido #6: Parsers and LibCST - https://github.com/Instagram/LibCST Extras: Michael: Django no longer supports Python 2 AT ALL (via Adam (Codependent Codr)). April 1st this year, the 1.11 line of Django has left Long Term Support (LTS). Leaving only 2.2.12+ with exclusively Python 3 support. Quick follow up on “Coding is Googling”. I went through a recent blip of mad googling. Brian: Gotta get my talk recorded this week, deadlines Friday. A little worried. As a writer and developer, me and deadlines don’t always see eye to eye. Follow-ups from previous episodes: Got lots of help with my Mac / Windows problem and modifier keys. Thanks everyone. Simplest solution Apple→System Prefs→Keyboard→Modifier Keys, and swap control and command for my external keyboard. So far, so good. You can’t use the setuptools_scm trick to get github actions to automatically publish to Test PyPI or PyPI for Flit or Poetry projects, since the version number is a simple string in the repo. Would love to hear if anyone has a solution to this one. Otherwise I’m fine with a make or tox snippet for publishing that combines bumping the version. Guido: PyCon goes online. Python 2.7.18 was released, the last Python 2 release ever. Joke: Via https://twitter.com/derchambers/status/1226760532763410432 How can you borrow more money at the same time? With asyncIOUs!

Python Bytes
#167 Cheating at Kaggle and uWSGI in prod

Python Bytes

Play Episode Listen Later Feb 3, 2020 28:30


Sponsored by Datadog: pythonbytes.fm/datadog Special guest: Vicki Boykis: @vboykis Michael #1: clize: Turn functions into command-line interfaces via Marcelo Follow up from Typer on episode 164. Features Create command-line interfaces by creating functions and passing them to [clize.run](https://clize.readthedocs.io/en/stable/api.html#clize.run). Enjoy a CLI automatically created from your functions’ parameters. Bring your users familiar --help messages generated from your docstrings. Reuse functionality across multiple commands using decorators. Extend Clize with new parameter behavior. I love how this is pure Python without its own API for the default case Vicki #2: How to cheat at Kaggle AI contests Kaggle is a platform, now owned by Google, that allows data scientists to find data sets, learn data science, and participate in competitions Many people participate in Kaggle competitions to sharpen their data science/modeling skills Recently, a competition that was related to analyzing pet shelter data resulted in a huge controversy Petfinder.my is a platform that helps people find pets to rescue in Malaysia from shelters. In 2019, they announced a collaboration with Kaggle to create a machine learning predictor algorithm of which pets (worldwide) were more likely to be adopted based on the metadata of the descriptions on the site. The total prize offered was $25,000 After several months, a contestant won. He was previously a Kaggle grandmaster, and won $10k. A volunteer, Benjamin Minixhofer, offered to put the algorithm in production, and when he did, he found that there was a huge discrepancy between first and second place Technical Aspects of the controversy: The data they gave asked the contestants to predict the speed at which a pet would be adopted, from 1-5, and included input features like type of animal, breed, coloration, whether the animal was vaccinated, and adoption fee The initial training set had 15k animals and the teams, after a couple months, were then given 4k animals that their algorithms had not seen before as a test of how accurate they were (common machine learning best practice). In a Jupyter notebook Kernel on Kaggle, Minixhofer explains how the winning team cheated First, they individually scraped Petfinder.my to find the answers for the 4k test data Using md5, they created a hash for each unique pet, and looked up the score for each hash from the external dataset - there were 3500 overlaps Did Pandas column manipulation to get at the hidden prediction variable for every 10th pet and replaces the prediction that should have been generated by the algorithm with the actual value Using mostly: obfuscated functions, Pandas, and dictionaries, as well as MD5 hashes Fallout: He was fired from H20.ai Kaggle issued an apology Michael #3: Configuring uWSGI for Production Deployment We run a lot of uWSGI backed services. I’ve spoken in-depth back on Talk Python 215: The software powering Talk Python courses and podcast about this. This is guidance from Bloomberg Engineering’s Structured Products Applications group We chose uWSGI as our host because of its performance and feature set. But, while powerful, uWSGI’s defaults are driven by backward compatibility and are not ideal for new deployments. There is also an official Things to Know doc. Unbit, the developer of uWSGI, has “decided to fix all of the bad defaults (especially for the Python plugin) in the 2.1 branch.” The 2.1 branch is not released yet. Warning, I had trouble with die-on-term and systemctl Settings I’m using: # This option tells uWSGI to fail to start if any parameter # in the configuration file isn’t explicitly understood by uWSGI. strict = true # The master uWSGI process is necessary to gracefully re-spawn # and pre-fork workers, consolidate logs, and manage many other features master = true # uWSGI disables Python threads by default, as described in the Things to Know doc. enable-threads = true # This option will instruct uWSGI to clean up any temporary files or UNIX sockets it created vacuum = true # By default, uWSGI starts in multiple interpreter mode single-interpreter = true # Prevents uWSGI from starting if it is unable to find or load your application module need-app = true # uWSGI provides some functionality which can help identify the workers auto-procname = true procname-prefix = pythonbytes- # Forcefully kill workers after 60 seconds. Without this feature, # a stuck process could stay stuck forever. harakiri = 60 harakiri-verbose = true Vicki #4: Thinc: A functional take on deep learning, compatible with Tensorflow, PyTorch, and MXNet A deep learning library that abstracts away some TF and Pytorch boilerplate, from Explosion Already runs under the covers in SpaCy, an NLP library used for deep learning type checking, particularly helpful for Tensors: PyTorchWrapper and TensorFlowWrapper classes and the intermingling of both Deep support for numpy structures and semantics Assumes you’re going to be using stochastic gradient descent And operates in batches Also cleans up the configuration and hyperparameters Mainly hopes to make it easier and more flexible to do matrix manipulations, using a codebase that already existed but was not customer-facing. Examples and code are all available in notebooks in the GitHub repo Michael #5: pandas-vet via Jacob Deppen A plugin for Flake8 that checks pandas code Starting with pandas can be daunting. The usual internet help sites are littered with different ways to do the same thing and some features that the pandas docs themselves discourage live on in the API. Makes pandas a little more friendly for newcomers by taking some opinionated stances about pandas best practices. The idea to create a linter was sparked by Ania Kapuścińska's talk at PyCascades 2019, "Lint your code responsibly!" Vicki #6: NumPy beginner documentation NumPy is the backbone of numerical computing in Python: Pandas (which I mentioned before), scikit-learn, Tensorflow, and Pytorch, all lean heavily if not directly depend on its core concepts, which include matrix operations through a data structure known as a NumPy array (which is different than a Python list) - ndarray Anne Bonner wrote up new documentation for NumPy that introduces these fundamental concepts to beginners coming to both Python and scientific computing Before, you went directly to the section about arrays and had to search through it find what you wanted. The new guide, which is very nice, includes a step-by-step on how arrays work, how to reshape them, and illustrated guides on basic array operations. Extras: Vicki I write a newsletter, Normcore Tech, about all things tech that I’m not seeing covered in the mainstream tech media. I’ve written before about machine learning, data for NLP, Elon Musk memes, and Nginx. There’s a free version that goes out once a week and paid subscribers get access to one more newsletter per week, but really it’s more about the idea of supporting in-depth writing about tech. vicki.substack.com Michael: pip 20.0 Released - Default to doing a user install (as if --user was passed) when the main site-packages directory is not writeable and user site-packages are enabled, cache wheels built from Git requirements, and more. Homebrew: brew install python@3.8 Joke: An SEO expert walks into a bar, bars, pub, public house, Irish pub, tavern, bartender, beer, liquor, wine, alcohol, spirits...

Java Off-Heap
Episode 46. On Clouds, 10x Developers, JDK Mistery Meats, and Python bytes!

Java Off-Heap

Play Episode Listen Later Aug 18, 2019 66:07


Ah, "cloud wars" are getting interesting (we claim dibs on the movie title!). With Oracle losing their bid w/the Pentagon, and Microsoft also reaching out and partnering with Oracle, there is tons of interest in what's going on. But that's not all! The twitters was set aflame by the 10x Developer twitter that has been going around (for the record, we think is mostly nonsense), and we dive into a hilarious take on what 10x developers are supposed to be. We also dive into Gil Tene's OpenJDK Mystery meat, and the threat of "just taking the latest Docker image". It's a sobering thought that sometimes even when you see the version of OpenJDK, it might not be the right thing due to the OS packaging, which in turn becomes a Docker reference image. In all a troubling precedent specially when Common Vulnerabilies and Exposures (CVE) are concerned. Lastly, there are predictions that Python is going to overtake Java as the most used language in the TIOBE index. Of course this crowd will not just take that proclamation laying down. So we went into a heated discussion why and how it is (in our humble opinion) a little rushed to say that python is going to overtake Java in mere four years. Tons of punditry, enough beer, and a whole lotta entertainment in this episode, so what'cha waiting for? Start listening now! We thank DataDogHQ for sponsoring this podcast episode We also thank OverOps for sponsoring this podcast episode   DO follow us on twitter @offheap The Definite Guide to Spring Batch (By our own Michael Minella!) New Features from Java 13 Oracle Loses War Cloud What to Expect from Oracle and Microsoft Cloud Partnership The 10x Developer? OpenJDK Mystery Meat Python overtaking Java in the next 4 years

.NET Bytes
Episode 3: News from March 14th, 2019 through March 27th, 2019

.NET Bytes

Play Episode Listen Later Mar 31, 2019 20:10


At one point in the podcast, Calvin mentions an online tool for leveling the volume for audio files (like a podcast), and he couldn't remember the name! It's Auphonic. Thanks to the folks at Coding Blocks for bringing this to our attention Links: Reddit Thread Python Bytes Visual Studio 2019 RC2 Release Notes .NET Core Security Updates Matt's AOP Book Andrew Lock's ASP.NET Core Book Andrew Lock's Twitter PostSharp 6.1 Release .NET Foundation Candidates .NET Foundation Membership Jon Galloway .NET Foundation Meetup CONDG Meetup 2018 C# Advent dotnet-format Blazor 0.9 Release WASM Matt's Unpopular Tech Opinion .NET Core 3 Preview 3 ASP.NET Core 3 Preview 3 gRPC gRPC for .NET WCF WCF on .NET Core TypeScript in Azure Functions Invoke-SqlCmd Project of the Week! Wyam.io Dave Glick - Blog / Twitter Dave's Cross Cutting Concerns Podcast Interview Random Shoutouts / Plugs .NET Bytes on Twitter Matt Groves on Twitter Calvin Allen on Twitter .NET Subreddit JavaScript & Friends JavaScript & Friends CFP

.NET Bytes
Episode 2: News from February 28th, 2019 through March 13th, 2019

.NET Bytes

Play Episode Listen Later Mar 17, 2019 28:13


At one point in the podcast, Calvin mentions an online tool for leveling the volume for audio files (like a podcast), and he couldn't remember the name! It's Auphonic. Thanks to the folks at Coding Blocks for bringing this to our attention Links: Reddit Thread Python Bytes Visual Studio 2019 RC2 Release Notes .NET Core Security Updates Matt's AOP Book Andrew Lock's ASP.NET Core Book Andrew Lock's Twitter PostSharp 6.1 Release .NET Foundation Candidates .NET Foundation Membership Jon Galloway .NET Foundation Meetup CONDG Meetup 2018 C# Advent dotnet-format Blazor 0.9 Release WASM Matt's Unpopular Tech Opinion .NET Core 3 Preview 3 ASP.NET Core 3 Preview 3 gRPC gRPC for .NET WCF WCF on .NET Core TypeScript in Azure Functions Invoke-SqlCmd Project of the Week! Wyam.io Dave Glick - Blog / Twitter Dave's Cross Cutting Concerns Podcast Interview Random Shoutouts / Plugs .NET Bytes on Twitter Matt Groves on Twitter Calvin Allen on Twitter .NET Subreddit JavaScript & Friends JavaScript & Friends CFP

IT Career Energizer
Learn Why Teaching and Sharing Your Knowledge is a Good Way to Boost Your Tech Career with Brian Okken

IT Career Energizer

Play Episode Listen Later Feb 7, 2019 17:53


GUEST BIO: Brian Okken is a lead software engineer for Rohde & Schwarz.  He is also the author of “Python Testing with pytest” from Pragmatic, host of the “Test & Code” Podcast and Co-host of the “Python Bytes” Podcast and has spoken at PNSQC and PyCon US. EPISODE DESCRIPTION: My guest on today’s show is Brian Okken. He is currently the lead software engineer for Rohde & Schwarz. His background is in R&D, testing and measurement. When it comes to programming languages, he is something of a Python expert. Brian is the author of “Python Testing with pytest” and the host of the very popular “Test & Code” podcast, he also co-hosts “Python Bytes”. Brian is passionate about sharing his knowledge. So, he teaches and regularly speaks publicly at conferences like PyCon and PNSQC. KEY TAKEAWAYS: (1.00) – So Brian, can you expand on that brief introduction and tell us a little bit more about yourself? Brian explains that he still describes himself as a software engineer. But, in reality, for the past 10 to 15 years, he has been mostly involved with automated testing. (1.21) – How did you get into automated testing? Brian explains that it was not a planned transition. It was a requirement within the test equipment industry. Those that work in that field spend a lot of time carrying out automated and regression testing on the code and instruments.  (2.10) – Can you please share a unique career tip with the I.T. career audience? Brian’s key piece of advice is to align yourself with the goals of whoever you are working for. He also advises developers to know their value and understand what it is that they contribute to the companies they work for. Once you know that, you are in a position to make sure that you more than cover the cost of your salary. Periodically asking yourself – If this was my money, would I be happy to continue to pay my salary? is a good habit to get into. (3.21) – Can you tell us about your worst career moment? And what you learned from that experience. Brian explains that one of the things he enjoys doing is honing processes, so that he can streamline the work, as much as possible. On one project he realized that if he could automate the byte and the register settings from an FPGA to the software he would save the team a lot of time and hassle. So, he set about working out how to do this. However, he did not tell anyone, including his manager, that he had taken on this extra task. Unfortunately, he got sucked in and ended up spending too much time on this side project. Naturally, his output fell, which made it look like he was not contributing to the team, as he should. Naturally, his manager was not happy. He felt that Brian was not doing the work he had been asked to do. On the other hand, Brian was disappointed and frustrated because nobody seemed to appreciate the importance of what he was trying to achieve. All in all it ended up being quite a negative situation. Brian’s advice is not to forget about process improvement completely, because t is important. But, he said that once it starts to take up more than 10% of your time, you need to let your manager knows what you are trying to achieve and how much time it is taking up.  (5.11) – Phil asks Brian what his best career moment was. The highlight of Brian’s career, so far, has been his involvement in pytest and publishing his book. It was really cool getting it published. But, Brian also found that writing the book honed and deepened his skills. (5.24) – So, has that been beneficial for your career? Brian agrees that it has. While writing the book he found himself consulting and working with the core contributors. The writing process made him network more. (6.58) – Can you tell us what excites you about the future of the IT industry and career? Brian says there are so many things that excite him that it is hard to pick one thing. But, it is probably the way in which the industry is changing how it is teaching the next generation of engineers. (7.43) – Is there a particular area that interests you, technologies you feel have a real future? Brian thinks the way in which schools are finding ways to teach programming at an earlier age is exciting. However, Brian would like to see the question - How do you know it will work and continue to work? being asked and answered more in educational settings. Developers need to have a better understanding of how things work to be able to design and build more robust applications and systems.  (8.44) Phil comments that, in the UK, that is certainly still an issue. Many of the degree courses leave the subject of testing right to the end of the course and the subject is rarely covered in much depth. (9.33) – What first attracted you to a career in IT, Brian? As a child, Brian had a combination games system. It had built-in games but you could also type in some simple programs to create new games like Lunar Lander. Of course, it did not work right away, so you had to figure out where you had gone wrong. When he got it working, he went back and tweaked it, for example by trying to increase acceleration. That is when he got the programming bug. It was an experience that stayed with him. He entered college as a fine art major, but switched to computer science at university. (10.50) Phil asks Brian to clarify why he made the decision to switch. Brian explains that there was a financial element to doing so. He realized that he would have less difficulty in paying back his student loan if he were able to find work in the IT field. (11.10 ) – What is the best career advice you have ever received? Brian uncovered a great piece of career advice while reading a book called Team Geek: A Software Developer's Guide to Working Well with Others. After reading that book, Brian understood that he needed to be spending at least 80% of his time creating value for the company he was working for. (12.02) – If you were to begin your IT career again, right now, what would you do? Brian says that he would not dismiss the idea of a career in web design and building, which is what he did when he first started out. He learned HTML and how to work with Perl, but veered away from building sites. At the time, he just assumed that most websites would end up being auto-built. Today, he understands that he may have missed out a bit as a result of that decision. So, now, he is learning PHP and getting into building the Python version of websites. (13.14 ) – What are you currently focusing on in your career? Right now, Brian is focusing on broadening his reach. He likes to teach and has got a lot to share with the community. (13.46) – OK, but do you have any thoughts on writing and conference speaking? Brian, says yes. He loves speaking, despite the fact he still finds doing it at conferences terrifying. But, he is a bit of a homebody and very much a family person, so he is not that keen on travelling. Despite this, he thinks he will end up travelling and speaking more in the near future. (14.25) – What is the number one non-technical skill that has helped you the most in your IT career? Brian says that is listening to people and being able to empathize with them. Phil agrees with this. He has noticed that many of us are too busy thinking about what we are going to say to be able to really listen to the other person. Brian says it is all too easy not to listen properly. He knows it is something he still needs to work on, something he discovered while listening to his own podcasts. He picked up on the fact that sometimes he was asking questions that his interviewee had already answered, which was a sure sign that he was not listening properly. (15.19) – Phil asks Brian to share a final piece of career advice with the audience. Brian says he wants to encourage people to teach. The act of writing things down or trying to explain them to someone else makes everything clearer in your own mind. Plus, it ensures that you get feedback from others, which enables you to recognize when you are wrong and learn from it. He is particularly keen to see more IT professionals writing personal blogs. BEST MOMENTS: (2.34 ) BRIAN – "Align yourself with the goals of whoever you're working for." (2.46 ) BRIAN – “Always try to be more valuable than the sticker price of your salary. " (5.49 ) BRIAN – "The process of writing the book made me an expert. " (14.30) BRIAN – "Learn how to listen to people. Really listen to their answers and empathize." ( 15.51) PHIL – "I think getting your message out there and telling people what you do and what you've learned is valuable " CONTACT BRIAN: Twitter: https://twitter.com/brianokken @brianokken LinkedIn: https://www.linkedin.com/in/okken Blog: https://pythontesting.net/ Book: https://amzn.to/2QnzvUv Podcast: https://pythonbytes.fm/ Podcast: https://testandcode.com/

Test & Code - Python Testing & Development
Being a Guest on a Podcast - Michael Kennedy

Test & Code - Python Testing & Development

Play Episode Listen Later Dec 7, 2018 37:15


Michael Kennedy of Talk Python and Python Bytes fame joins Brian to talk about being a great guest and what to expect. Even if you have never wanted to be on a podcast, you might learn some great tips. A few of the things we talk about will be helpful for other endeavors, like public speaking, guest blog posts, look for unsolicited job opportunities. Some people have never been on a podcast before, and are possibly freaked out about some of the unknowns of being on a podcast. That's why we did this episode. Michael and I discuss a bunch of the niggly details so that you can be relaxed and know what to expect. Topics include: If you want to be on a podcast How to stand out and be someone a podcast would want to have on a show. How to suggest yourself as a guest and the topic you want to discuss. Picking a topic for a podcast What to do before the show to prepare Helping the host out with some information Some hardware (not much) Some software (all free) Sending info like bio, headshot, links, etc. What to expect the host or show to do before the recording. Where to record Sketching out some show topics with the host, maybe on a shared document. What to expect and do Right before the show During the conversation After the recording When it goes live (help promote it) Special Guest: Michael Kennedy.

IT Career Energizer
Secrets For Achieving Your IT Goals With Python Expert Michael Kennedy

IT Career Energizer

Play Episode Listen Later Nov 6, 2018 19:34


GUEST BIO: Michael Kennedy is known best for being a Python expert. He is a Python Software Foundation fellow. His two podcasts Talk Python to Me and Python Bytes are well regarded, as are his developer training courses. Michael has been working in the developer field for more than 20 years and has spoken at numerous conferences including NDC and DevWeek. EPISODE DESCRIPTION: In this episode, Phil interviews Python Specialist Michael Kennedy. He is the host of Python Bytes and Talk Python to Me. Michael is also the founder of Talk Python training and a fellow of the Python Software Foundation. KEY TAKEAWAYS: ­­­ (0.59) – Phil asked Michael to tell the audience a bit more about himself? In response, Michael explained that when he started his work life he focused on the science sector. While working on his maths PhD, he discovered programming. He said, “It just really connected with me”. That was 20 years ago, yet every day he feels a little bit more excited than he was the day before. With IT you are always learning, which is exciting.  (2.05) – Phil asks Michael for a unique IT career tip. Michael started by saying that it is important to remember that “small things add up”.  He said, we often overestimate what we can accomplish in a week, but massively underestimate what can be done in a couple of years. He pointed out that you need to carry on learning to progress. He also explained that it is important to realize that in the IT world there are no longer gatekeepers. The days when you had to ask permission from somewhere like IBM or Oracle to be accepted into the IT world are gone. Today, you are in control. “You no longer have to ask permission to be part of this, excel and be a leader, you just have to want it”If you want to do something all you have to do is to work gradually towards doing it. (4.13) – Michael was asked to share his worst career moment by Phil. Michael said that happened while he was working for DARPA, which is an advanced US government research facility. He was working on a secret project that used software to pull together the efforts of several companies and organizations. Unfortunately, the software did not work properly, so needed debugging. Under normal circumstances that would be a tedious task, but not a huge problem. But, for this project, his main partner was a man from the UK and he did not have the necessary security clearance to attend the meetings where the issues were discussed. He could not be in the room. Someone had to summarize what the problems were and he had to use that information to debug the software. Very stressful. (6.55) Phil asked “did you learn anything particular from this situation?” Michael said, yes, we should have tested more and used a technical person who could have physical access to the thing we were working on. (7.23) – On the flipside, Phil asks Michael what his best career moment was. Michael explained that he started working as a developer and enjoyed that work. But, it was starting to teach programming and developer skills that has been the highlight of his career, so far. (11.14) – Phil wants to know what excites Michael about the future for the IT industry. The fact that it is relatively easy for new people to enter the field and learn is something that Michael finds exciting. Students no longer have to hope that they can work it out from a book because there is plenty of support available. (11.14) – What drew you to a career in IT? Michael enjoys the fact you actually get to build things, rather than just working with theories. He enjoys the debate involved in developing a product and being able to press the button and find out if what you have done actually works. (12.10) – What is the best career advice you have been given? Because Michael was self-taught he said that he did not get much IT career advice from mentors and teachers. But, after speaking to others working in the field, he thinks that the most important piece of advice he can share is “just take action.” He said, “Even if you go the wrong way you will learn enough that you actually learn more about what the right way is.” (13.38) – Phil asks what approach Michael would take if he were to start his IT career again, right now. Michael says he would have been more selective and strategic when it came to choosing the projects he worked on. He feels that this would have made things easier for him. (14.30) – Phil asks what career objective Michael is currently focusing on. Michael said “I'm really focused on trying to inspire and inform developers”. The fundamental goal of his podcasts is to make people aware of new things that they should be interested in. He is working to make it easier for people to learn Python and develop successful IT careers. (15.33) – What would you consider to be your most important non-technical skill? For Michael, learning to speak publically had been especially beneficial. The urge to share helped him to overcome his fear and communicate better. (16.36) – Phil asks Michael to share a few final words of career advice. Michael said – “every day, think about where you want to put your energy and really what you want” That may mean taking a job for 5 years with Google, so that you can learn the skills you need to build your own product. Whatever you need to do to achieve your dreams, just go ahead and do it. BEST MOMENTS: (1.30) Michael - "Every day, I'm just a little more excited than I was the day before about it. It's great." (2.00) Michael - "We often overestimate what we can accomplish in a week, but massively underestimate what can be done in a couple of years." (3.38) Michael - "You no longer have to ask permission to be part of this and excel and be a leader  you just have to want it." (3.45) Phil - "I think the opportunity is there. And it's up to the individual to take the opportunity." (10.40) Michael - "Because so much stuff is new you don't have to do it for 20 years to be an expert" (13.20) Michael - Just take action. He said, “Even if you go the wrong way you will learn enough that you actually learn more about what the right way is.” (18.00) Michael - "Every day, think about where you want to put your energy and really what you want." CONTACT MICHAEL KENNEDY: Website: http://michaelckennedy.net/ Twitter: https://twitter.com/mkennedy LinkedIn: https://www.linkedin.com/in/mkennedy/ Podcasts: https://talkpython.fm https://pythonbytes.fm.  

Tough Decisions for Entrepreneurs
TD153: Python Programming – Start with Audience and Then Develop Software To Solve Problems with Michael Kennedy

Tough Decisions for Entrepreneurs

Play Episode Listen Later Oct 31, 2018 21:48


Visit ToughDecisions.net for complete show notes of each podcast episode. In this episode, we welcome Michael Kennedy, founder, and host of two of the most popular Python Programming podcasts, Talk Python To Me and Python Bytes. Michael runs a training company for developers related to the podcasts; he is also a public speaker, author, and […]

Tough Decisions for Entrepreneurs
TD153: Python Programming – Start with Audience and Then Develop Software To Solve Problems with Michael Kennedy

Tough Decisions for Entrepreneurs

Play Episode Listen Later Oct 31, 2018 21:48


Visit ToughDecisions.net for complete show notes of each podcast episode. In this episode, we welcome Michael Kennedy, founder, and host of two of the most popular Python Programming podcasts, Talk Python To Me and Python Bytes. Michael runs a training company for developers related to the podcasts; he is also a public speaker, author, and entrepreneur. Tune in as Michael shares with us the toughest decisions he had to face, including leaving a high-paying job to start entrepreneurship on his own.

Python Out Loud
Episode 0: mic_test (not just another hello-world episode)

Python Out Loud

Play Episode Listen Later Jan 22, 2018 6:17


Episode 0 Show Notes (http://pythonoutloud.com/0): pythonoutloud.com/0 (http://pythonoutloud.com/0) It's important to set realistic goals, right? So why wait to publish the acceptance speech we'd give for our Lifetime Achievement Award? [pause for audience applause] KC: Thank you! Thank you! Wow... {{yearspodcasting}} year{{yearspodcasting|pluralize}} and {{episodespodcasted}} episode{{episodespodcasted|pluralize}} later, and here we are! We're over-filled with emotions right now. [pause for audience to say "awwww..."] IL: And we want to start by thanking you, our loyal listeners. We started with Episode 0, where we introduced ourselves, explained the name "Python Out Loud", and shared our Python aha-moments. And yes, as you can see, Kevin is still wearing the exact same pajamas as when we recorded Episode 0. [pause for audience laughter] KC: By recording from Nagano, Japan, and Portland, Oregon, who knew we'd be the very first trans-pacific Python podcast? [off-key violin string pulled] IL: Hey, Kevin, the orchestra is getting restless, so let's wrap this up by thanking everyone who's inspired us and helped us along the way. [queue futuristic finger-mounted projection unit, powered by AI, biometrics, and clean energy] IL: First, thanks to all of the amazing Python and software-development podcasts who helped inspired us to start our own. These include, in alphabetical order... 1. The Changelog (https://changelog.com/podcast); 2. Import This (https://www.kennethreitz.org/import-this/); 3. Podcast.__init__('Python') (https://www.podcastinit.com/); 4. Python Bytes (https://pythonbytes.fm/); 5. Software Engineering Daily (https://softwareengineeringdaily.com/); 6. Talk Python to Me (https://talkpython.fm/); and 7. Test and Code (http://testandcode.com/). [pause for audience applause] KC: And thank you, especially, to Michael Kennedy for his Python Jumpstart by Building 10 Apps (https://training.talkpython.fm/courses/explore_python_jumpstart/python-language-jumpstart-building-10-apps) course, which started our first collaborative project in Python. And thanks for giving us Talk Python courses to give away on Twitter, where people followed us in droves to find out how to win! [pause for audience applause] IL: And thanks to Nadav Samet for making the Python Challenge (http://www.pythonchallenge.com/)! [pause for audience applause] KC: And thank you to the musicians whose work we've enjoyed incorporating into the show, including the song "Happy Ukulele" by Scott Holmes (http://freemusicarchive.org/music/Scott_Holmes/) and the songs "Manhattan By Moonlight" and "Puzzle Pieces" by Lee Rosevere (http://freemusicarchive.org/music/Lee_Rosevere/). [pause for audience applause] IL: And, finally, thank you to our family and friends. We literally couldn't do this without you --- [large holographic hook snatches us from stage]

Find Your Tribe
Finding Your Python

Find Your Tribe

Play Episode Listen Later Jan 9, 2018 38:08


Happy New Year! In this episode, we discuss everything from programming to AI to self-driving cars to entrepreneurship. Michael Kennedy is a technologist, podcaster, and entrepreneur that uses his tenacity and superpower to create growing businesses and teaching fellow podcasters and developers through his online courses and two podcasts.   Stuff from Episode: What is Python? https://www.python.org What is eye tracking? https://en.wikipedia.org/wiki/Eye_tracking Google Glasses are coming back! https://www.wired.com/story/google-glass-2-is-here Hundred Dollar Startup, https://www.amazon.com/100-Startup-Reinvent-Living-Create/dp/0307951529 7-Day Startup, https://www.amazon.com/Day-Startup-Learn-Until-Launch/dp/B071F68WCV/ref=sr_1_1?s=books&ie=UTF8&qid=1515443433&sr=1-1&keywords=7-Day+Startup Plant Found by Google, https://cosmosmagazine.com/space/google-s-artificial-intelligence-finds-two-new-exoplanets-missed-by-human-eyes Self-Driving Cars, https://waymo.com Deep Learning, https://www.technologyreview.com/s/513696/deep-learning Can you call a machine a ‘being’? https://medium.com/@BrentMorgan/artificial-intelligence-can-it-replace-human-intelligence-b250b9aec153 What is Net Neutrality? https://en.wikipedia.org/wiki/Net_neutrality   Movies mentioned: Matrix, Tron, Terminator   “Try many, many ideas…experiment!” – Michael Kennedy   About Michael Kennedy: Michael is a technologist, podcaster, and entrepreneur. He is the host and founder of the two most popular Python podcasts: Talk Python to Me and Python Bytes. He teaches online courses for developers through his business Talk Python Training. Michael loves to help fellow podcasters and developers make their way in the world.   Contact Info: Twitter @mkennedy https://talkpython.fm https://pythonbytes.fm

Reflection as a Service
Episode 34 - Software and Testing Models with Guest Host Brian Okken

Reflection as a Service

Play Episode Listen Later Jan 13, 2017 47:24


Brian Okken from the popular "Test & Code" and "Python Bytes" podcasts joins us as guest-host to talk through software and testing models. We get into our differing perspectives and experiences on TDD, Test Automation, and Mike Cohn's Testing Pyramid. Listen now!

Talk Python To Me - Python conversations for passionate developers
#92: Bonus: Python Bytes Crossover: Python 3.6 is going to be awesome, Kite: your friendly co-developing AI

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Dec 29, 2016 21:00