Python Weekly (Issue 655 June 20 2024)

Python Weekly - Issue 655

Python Weekly

Welcome to issue 655 of Python Weekly. Let's get straight to the links this week.

From Our Sponsor 

A weekly newsletter featuring the best hand curated news, articles, tutorials, talks, tools and libraries etc for programmers.

Articles, Tutorials and Talks

The post describes how the integration of Rust can significantly speed up the parsing of Python Abstract Syntax Trees (ASTs). By rewriting critical components in Rust, the process can be made up to 20 times faster compared to the original Python implementation, offering substantial performance improvements for developers working with ASTs in Python.

In this video, I'll share 5 key things you should do to avoid writing crappy code. These tips, drawn from my own experience, will help you write clean code.

The article discusses the performance implications of using generators vs list comprehensions when joining strings with str.join() in Python. Contrary to expectations, using a generator expression with str.join() is slower than a list comprehension because the CPython implementation converts the generator to a list internally before joining the strings, negating the memory efficiency benefits of generators.

Ruff is an extremely fast Python linter written in Rust, deriving its speed from parsing Python code and implementing linting rules natively in Rust rather than Python. The article provides insights into Ruff's internals, including its initial implementation using RustPython's parser, the evolution to a hand-written recursive descent parser, and its caching and parallelization mechanisms.

In this talk we will see how to add semantic search functionality to an existing Python-based web project, in particular Django, with data storage on PostgreSQL.

Showcasing historical summer Olympic data through multiple data visualizations.

We'll build a React and Django app fast, using Django Ninja - aiming for under 15 minutes.

In this article, we will explore a technique called "abliteration" that can uncensor any LLM without retraining. This technique effectively removes the model's built-in refusal mechanism, allowing it to respond to all types of prompts.

And how your Python library can become dataframe-agnostic too.

The study investigates the energy usage of Pandas and Polars in data analysis tasks to provide insights on energy-efficient software tools. Results show that Polars is more energy-efficient than Pandas, especially with large dataframes, and recommends Polars for energy-efficient and fast data analysis, highlighting the importance of CPU core utilization in library selection.

This talk explores enhancing AI projects using Python with tools like Click CLI for command-line interfaces, Jinja2 for dynamic content generation, and GPT libraries for language model integration. Attendees will see a practical project demonstration and gain skills to build functional AI applications, along with opportunities to connect with other Python developers.

Considering replacing pandas with Polars? Learn how to make the switch, what to keep in mind, and how PyCharm can help.

Interesting Projects, Tools and Libraries

NVIDIA Warp is a Python framework for writing high-performance simulation and graphics code. Warp takes regular Python functions and JIT compiles them to efficient kernel code that can run on the CPU or GPU.

Convert any PDF into a podcast episode!

Aurora is a static site generator implemented in Python.

CLI for remote controlling LG webOS TVs.

Open-Source Python ETL. Extract, transform and load data with low-code. Generate native Python code you can deploy anywhere.

Serve Textual apps locally.

Build fast, user-friendly applications with Django and React.

Easy token price estimates for 400+ LLMs. 

AI Math Notes is an interactive drawing application that allows users to draw mathematical equations on a canvas. Once an equation is drawn, the application uses a multimodal LLM to calculate and display the result next to the equals sign.

New Releases

NumPy 2.0.0 is the first major release since 2006. It is the result of 11 months of development since the last feature release and is the work of 212 contributors spread over 1078 pull requests. It contains a large number of exciting new features as well as changes to both the Python and C APIs.

Upcoming Events and Webinars

There will be a talk, Introduction to LLM Agents with LangChain.

There will be following talks

  • Scientific programming techniques for improving trustworthiness and reproducibility applied to nuclear fusion data

  • Garbage In, Garbage Out: AI without Intentional Data Engineering

There will be following talks

  • Pickle: everybody hates it, everybody uses it

  • API Quality Framework 

There will be a talk, ScrapeGraphAI: You Only Scrape Once.

There will be a talk, Exploring the Magic of Command Line Tools and TUI's for Python Developers, Data Science Pros, and DevOps professionals.

There will be a talk, The Good, the Bad, and the Ugly: Navigating Large Language Models.

Our Other Newsletters

 - A free weekly newsletter for programmers.

- A free weekly newsletter for entrepreneurs featuring best curated content, must read articles, how to guides, tips and tricks, resources, events and more.