PythonHub
2.49K subscribers
2.35K photos
50K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
Full-Text Search with DuckDB

The post shows how DuckDB’s full-text search extension can index a large email corpus and run BM25-ranked keyword search directly in SQL, without needing a separate search engine. It also walks through practical preprocessing and filtering steps, then demonstrates conjunctive queries that return only documents matching all search terms.

https://peterdohertys.website/blog-posts/full-text-search-w-duckdb.html
lightning PyPI Compromise: A Bun-Based Credential Stealer in Python

The post describes a PyPI supply-chain compromise in lightning 2.6.2/2.6.3, where importing the package silently downloads Bun and runs an obfuscated JavaScript credential stealer. It also says the payload steals GitHub, cloud, and other secrets, then uses any captured credentials to spread further and commit exfiltrated data back into victim repos.

https://snyk.io/blog/lightning-pypi-compromise-bun-based-credential-stealer/
Fast Mesh Booleans in Python

Learn how to perform fast mesh boolean operations in Python. Union, intersection, and difference at interactive speed on million-polygon meshes. One pip install, NumPy arrays in and out.

https://polydera.com/tutorials/fast-mesh-booleans-in-python
Boosting multimodal inference performance by >10% with a single Python dictionary

Multimodal models are promising, but inference engines haven't been optimized for them yet. We profiled SGLang’s scheduler on a multimodal workload and identified an opportunity to replace expensive book-keeping around shared GPU memory with a simple cache lookup. Throughput and latency both improved over 10% on our target workload.

https://modal.com/blog/boosting-multimodal-inference-performance-by-greater-than-10-with-a-single-python-dictionary