Python Tips and Tricks for Efficient Coding, How to debug your battery design and more
Hugging Face Transformers: Leverage Open-Source AI in Python, Python 3.12.5 released with some more interesting news, articles, packages and projects
News
Introducing the Anaconda Code add-in for Microsoft Excel
Many people wanted a way to run their Python code in Excel locally, without relying on Microsoft Cloud for calculations. Now, this is possible. Excel and Python users can run their Python-powered projects directly in Excel using the Anaconda Code add-in.
Notice of Python Software Foundation Bylaws change, effective 10 August 2024
Python 3.12.5 released
3.12.5 is the latest maintenance release, containing over 250 bug fixes, build improvements and documentation changes since 3.12.4.
Articles
Hugging Face Transformers: Leverage Open-Source AI in Python
You might have heard about Hugging Face. Do you know how to download, run and manipulate models using the Hugging Face Transformers package? If not, you should check out Harrison Hoffman's article. He covered navigating the Hugging Face ecosystem, downloading, running and manipulating models and speeding up model inference with GPUs.
# Harrison Hoffman
Python Tips and Tricks for Efficient Coding
Gianpiero Andrenacci's article covered various topics such as the role of the underscore (_), the inspect module and conditional expressions with ternary operators. He provided numerous examples for each tip to ensure better understanding.
# Gianpiero Andrenacci
Highlights from Git 2.46
Git 2.46 has been released. Taylor Blau shared highlights in this article. You can find release notes here.
# Taylor Blau
How to debug your battery design
Tom Tranter explained the current problem with batteries regarding high energy and power—they are typically designed to be either high energy or high power, but not both. He presented a problem statement and demonstrated using the PyBaMM package to simulate and debug battery issues.
#Tom Tranter
Tracing the evolution of a Python function with git log
If there's a bug in a function and you need to understand the changes that led to an issue, the "git log -L" command can help. In this article, Joël Perras explained how to use this command with a real-world example.
# Joël Perras
Direct Preference Optimization (DPO) for LLM Alignment (From Scratch)
Sebastian Raschka implemented Direct Preference Optimization (DPO) from scratch in this code notebook and applied it to a large language model (LLM) to improve its response alignment with user preferences. Check out this code repository, which contains the code for developing, pretraining, and fine-tuning a GPT-like LLM. It is also the official code repository for the book Build a Large Language Model (From Scratch).
# Sebastian Raschka
Interesting Packages and Projects to explore
PythonMonkey - A Mozilla SpiderMonkey JavaScript engine embedded into the Python VM, using the Python engine to provide the JS host environment.
backoff - Python library providing function decorators for configurable backoff and retry
cx_Freeze - cx_Freeze creates standalone executables from Python scripts, with the same performance, is cross-platform and should work on any platform that Python itself works on.
About Upcoming Python Events
Python Community Building and Training event
Aug 12 – 18, 2024
Leipzig Python User Group Meeting
Aug 13, 2024
SheDevelopers: Python Mastery Workshop 1st Edition
Aug 16, 2024
BangPypers - Bangalore Python Users Group
Aug 17, 2024