Django: Flush out test flakiness by randomly ordering QuerySets
https://adamj.eu/tech/2023/07/04/django-test-random-order-querysets/
https://adamj.eu/tech/2023/07/04/django-test-random-order-querysets/
adamj.eu
Django: Flush out test flakiness by randomly ordering QuerySets - Adam Johnson
Sometimes code depends on the order of a QuerySet whilst not specifying an order. This can lead to random, flaky test failures because databases can return rows in any order when none is specified. The problem is made worse by some databases, notably PostgreSQL…
100% Offline ChatGPT Alternative?
In this video I show I was able to install an open source Large Language Model (LLM) called h2oGPT on my local computer for 100% private, 100% local chat with a GPT.
https://www.youtube.com/watch?v=Coj72EzmX20
In this video I show I was able to install an open source Large Language Model (LLM) called h2oGPT on my local computer for 100% private, 100% local chat with a GPT.
https://www.youtube.com/watch?v=Coj72EzmX20
YouTube
100% Offline ChatGPT Alternative?
In this video I show I was able to install an open source Large Language Model (LLM) called h2oGPT on my local computer for 100% private, 100% local chat with a GPT.
Links
* h2o website: https://h2o.ai/
* h2oGPT UI: https://falcon.h2o.ai/
* h2oGPT GM-UI…
Links
* h2o website: https://h2o.ai/
* h2oGPT UI: https://falcon.h2o.ai/
* h2oGPT GM-UI…
Automating Deployment of Applications using Kubernetes Python SDK
https://www.faizanbashir.me/automating-deployment-of-python-applications-kubernetes-sdk
https://www.faizanbashir.me/automating-deployment-of-python-applications-kubernetes-sdk
Faizan Bashir
Automating Deployment of Applications using Kubernetes Python SDK
Learn how to use the Python Kubernetes SDK to automate application deployments, including creating Kubernetes resources like deployments, services, secrets, config maps, and ingress.
Organizing Database Queries: Managers vs. QuerySets
In this article Mariusz Felisiak introduces concepts of Django's Managers and QuerySet to organize common database queries.
https://fly.io/django-beats/organizing-database-queries-managers-vs-querysets/
In this article Mariusz Felisiak introduces concepts of Django's Managers and QuerySet to organize common database queries.
https://fly.io/django-beats/organizing-database-queries-managers-vs-querysets/
Fly
Organizing Database Queries: Managers vs. QuerySets
Introducing concepts of Django's Managers and QuerySet to organize common database queries
Building a Toy Programming Language in Python - Part 1
The first installment of this series shows how to implement the lexer, parser and interpreter for a very simple version of the language that did only one thing: print numbers.
https://blog.miguelgrinberg.com/post/building-a-toy-programming-language-in-python
The first installment of this series shows how to implement the lexer, parser and interpreter for a very simple version of the language that did only one thing: print numbers.
https://blog.miguelgrinberg.com/post/building-a-toy-programming-language-in-python
Miguelgrinberg
Building a Toy Programming Language in Python
I thought it would be fun to go outside of my comfort zone of web development topics and write about something completely different and new, something I have never written about before. So today, I'm…
The easiest way to speed up Python with Rust
If you want to speed up some existing Python code, writing a compiled extension in Rust can be ...
https://pythonspeed.com/articles/easiest-rust-python/
If you want to speed up some existing Python code, writing a compiled extension in Rust can be ...
https://pythonspeed.com/articles/easiest-rust-python/
Python⇒Speed
The easiest way to speed up Python with Rust
Rust can make your Python code much faster; here’s how to start using it as quickly as possible.
Python in 2023 still sucks at importing modules from another folder
https://stackoverflow.com/questions/714063/importing-modules-from-parent-folder/50194143#50194143
https://stackoverflow.com/questions/714063/importing-modules-from-parent-folder/50194143#50194143
Stack Overflow
Importing modules from parent folder
I am running Python 2.5.
This is my folder tree:
ptdraft/
nib.py
simulations/
life/
life.py
(I also have __init__.py in each folder, omitted here for readability)
How do I import ...
This is my folder tree:
ptdraft/
nib.py
simulations/
life/
life.py
(I also have __init__.py in each folder, omitted here for readability)
How do I import ...
vlite
A blazing fast, lightweight, and simple vector database written in less than 200 lines of code.
https://github.com/sdan/vlite
A blazing fast, lightweight, and simple vector database written in less than 200 lines of code.
https://github.com/sdan/vlite
GitHub
GitHub - sdan/vlite: fast vector database made in numpy
fast vector database made in numpy. Contribute to sdan/vlite development by creating an account on GitHub.
CLI tools hidden in the Python standard library
A comprehensive collection of practical tips and examples showcasing various command-line interface (CLI) tools available in the Python Standard Library, providing valuable guidance for developers looking to leverage these built-in functionalities for efficient scripting and automation.
https://til.simonwillison.net/python/stdlib-cli-tools
A comprehensive collection of practical tips and examples showcasing various command-line interface (CLI) tools available in the Python Standard Library, providing valuable guidance for developers looking to leverage these built-in functionalities for efficient scripting and automation.
https://til.simonwillison.net/python/stdlib-cli-tools
Simon Willison’s TILs
CLI tools hidden in the Python standard library
Seth Michael Larson pointed out that the Python gzip module can be used as a CLI tool like this:
Using the AWS Parameters and Secrets Lambda Extension with Python: A Practical Example
Using the AWS Parameters and Secrets Lambda Extension can speed up your Lambda code and save you money. In this practical example we will go through a full example, complete with a couple of gotchas I found that could catch you out.
https://community.aws/posts/parameters-and-secrets-lambda-extension-with-python
Using the AWS Parameters and Secrets Lambda Extension can speed up your Lambda code and save you money. In this practical example we will go through a full example, complete with a couple of gotchas I found that could catch you out.
https://community.aws/posts/parameters-and-secrets-lambda-extension-with-python
Community.aws
Using the AWS Parameters and Secrets Lambda Extension with Python: A Practical Example
Using the AWS Parameters and Secrets Lambda Extension can speed up your Lambda code and save you money. In this practical example we will go through a full example, complete with a couple of gotchas I found that could catch you out
GPT Engineer: Things Are Starting to Get Weird
GPT Engineer is another nail in the coffin of software developers. In this video, I'll show you how it works. The tool is crazy powerful. Just specify what you want it to build, and then, well, it just builds it. I’ll show you how it works in today's video and share my thoughts on where this technology might lead us.
https://www.youtube.com/watch?v=FPZONhA0C60
GPT Engineer is another nail in the coffin of software developers. In this video, I'll show you how it works. The tool is crazy powerful. Just specify what you want it to build, and then, well, it just builds it. I’ll show you how it works in today's video and share my thoughts on where this technology might lead us.
https://www.youtube.com/watch?v=FPZONhA0C60
YouTube
GPT Engineer: Things Are Starting to Get Weird
👷 Review code faster and better with my 3-Factor Framework: https://arjan.codes/diagnosis.
GPT Engineer is another nail in the coffin of software developers. In this video, I'll show you how it works. The tool is crazy powerful. Just specify what you want…
GPT Engineer is another nail in the coffin of software developers. In this video, I'll show you how it works. The tool is crazy powerful. Just specify what you want…
If PEP 703 is accepted, Meta can commit three engineer-years to nogil CPython
https://discuss.python.org/t/a-fast-free-threading-python/27903/99
https://discuss.python.org/t/a-fast-free-threading-python/27903/99
Discussions on Python.org
A fast, free threading Python
I don’t think that is true. If free threading is possible, the cat will be out of the bag, even developers that only cares about single threaded work will still be affected by threading issues. If a library starts a thread in the background for whatever reason…
Generating Code without Generating Technical Debt?
The article also provides some tips on how to make the code generated by ChatGPT more maintainable, such as using short functions, splitting the code into smaller files, and using comments to explain the code.
https://sourcery.ai/blog/chatgpt-maintainable-code/
The article also provides some tips on how to make the code generated by ChatGPT more maintainable, such as using short functions, splitting the code into smaller files, and using comments to explain the code.
https://sourcery.ai/blog/chatgpt-maintainable-code/
sourcery.ai
Generating Code without Generating Technical Debt?
Delivering and maintaining AI-generated code.
UltraChat
Large-scale, Informative, and Diverse Multi-round Dialogue Data, and Models.
https://github.com/thunlp/UltraChat
Large-scale, Informative, and Diverse Multi-round Dialogue Data, and Models.
https://github.com/thunlp/UltraChat
GitHub
GitHub - thunlp/UltraChat: Large-scale, Informative, and Diverse Multi-round Chat Data (and Models)
Large-scale, Informative, and Diverse Multi-round Chat Data (and Models) - thunlp/UltraChat
Back end of Meta Threads is built with Python 3.10 with some interesting tweaks
https://twitter.com/llanga/status/1676846870520291329
https://twitter.com/llanga/status/1676846870520291329
X (formerly Twitter)
Łukasz Langa (@llanga) on X
Did you know that the backend of #MetaThreads is built with #Python 3.10?
It's running on Instagram's #Cinder fork that includes a JIT, lazy-loaded modules, pre-compiled static modules, and a bunch of other interesting tweaks against vanilla Python 3.10.…
It's running on Instagram's #Cinder fork that includes a JIT, lazy-loaded modules, pre-compiled static modules, and a bunch of other interesting tweaks against vanilla Python 3.10.…
You Don’t Need __all__
Every now and then, I get a PR from a well-meaning contributor trying to add all to a Python module for whatever reason. I always decline these, they are unnecessary (at least for the way I structure my code) and I thought I’d write a short post explaining why.
https://jamesturk.net/posts/you-dont-need-all/
Every now and then, I get a PR from a well-meaning contributor trying to add all to a Python module for whatever reason. I always decline these, they are unnecessary (at least for the way I structure my code) and I thought I’d write a short post explaining why.
https://jamesturk.net/posts/you-dont-need-all/