Python Weekly (Issue 656 June 27 2024)

Python Weekly - Issue 656

Python Weekly

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

Articles, Tutorials and Talks

Learn how to use pgvector, the Postgres extension for vector storage and querying, from Python scripts and web apps. I'll include demos with the most common drivers and ORMs, like psycopg, asyncpg, SQLAlchemy, SQLModel, and deploy a full FastAPI app using pgvector for a vector search API. I'll also talk about embedding model options and indexing strategies.

In this tutorial, I'll guide you through the ins and outs of Pytest fixtures. You'll learn how to create fixtures, parameterize them for flexibility, and leverage their power to create efficient, reliable, and maintainable unit tests.

The video delves into generator co-routines in Python, explaining the distinctions between generators, functions, and generator instances, and the protocols and roles of collections.abc in defining generators. It highlights the advantages of lazy computation with generators, efficient control and data flow management, and addresses challenges in chaining operations and modeling complex processes.

Have you noticed that ChatGPT sometimes writes out Python code and somehow executes it? How does that work? What kind of environment is it using? Can we co-opt it for our own ends? Let's find out!

Large language models (LLMs) like ChatGPT and Gemini often generate false or unsubstantiated outputs, posing risks in fields like law, journalism, and medicine. A new statistical method using entropy-based uncertainty estimators can detect these "hallucinations" by evaluating the uncertainty of the generated meaning rather than specific word sequences, improving reliability without requiring task-specific data.

This video explores 7 functional programming techniques and demonstrate their functionality. Despite Python not being a purely functional language, embracing these techniques can greatly enhance your Python skills.

Learn everything about hash tables, collision handling, and performance optimization.

The video explores smartwatch firmware development, comparing TC32 and thumb code generation, showcasing SDK simplicity, MicroPython integration for efficient RAM usage, and demonstrating hardware modification with added connectors and firmware flashing. It addresses compiler challenges, battery life concerns, and potential applications, providing valuable insights for enthusiasts.

The article introduces Timefold, a new open-source solver for Python designed to handle complex optimization problems efficiently. It highlights the solver's capabilities, including its flexibility and ease of integration into various applications, making it a valuable tool for developers and researchers.

The film reveals the true story behind PyTorch's creation, highlighting the contributions of its dedicated developers. It showcases the strength of the PyTorch community, aiming to inspire further contributions and recognition of its importance in the open source world.

Chances are that you never touched and maybe haven't even heard about Python's weakref module. While it might not be commonly used in your code, it's fundamental to the inner workings of many libraries, frameworks and even Python itself. So, in this article we will explore what it is, how it is helpful, and how you could incorporate it into your code as well.

The video demonstrates building a full stack web application using only Python with Reflex, bypassing the need for HTML, CSS, and JavaScript. It covers creating interfaces, adding features like user authentication and data storage, managing data efficiently, and customizing design with Radix UI for a seamless development experience.

Interesting Projects, Tools and Libraries

High-performance diffing of large datasets across databases.

Mass document analytics platform based on LlamaIndex, Pgvector, React and Django.

A high-frequency trading and market-making backtesting tool in Python and Rust, which accounts for limit orders, queue positions, and latencies, utilizing full tick data for trades and order books, with real-world crypto market-making examples for Binance Futures 

Official implementation of Unique3D: High-Quality and Efficient 3D Mesh Generation from a Single Image

Open Source, modern, and easy-to-use HR and Payroll Software for all organizations

Use LLMs in your SQLite queries.

New Releases

Upcoming Events and Webinars

There will be a talk, Data Analytics with Pandas.

There will be following talks

  • Predicting User Churn with PyTorch Neural Networks

  • Contributing to Open Source AI Projects

There will be following talks

  • Data table formats

  • bitsandbytes: A Year in review & FSDP + QLoRA/QDoRA Fine-tuning Walkthrough

There will be following talks

  • NLP and generative models for psychology research

  • Homomorphic Encryption in Python

There will be following talks

  • Beyond Pip: Exploring New Python Package Managers

  • Column Level Lineage for Data Platforms

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.