Edu
830 posts

Edu retweeté

Tip: You don't need python-dotenv, use "uv run" with --env-file, and your env vars from .env get loaded.
For example, if you've got a @FastAPI project you can run it locally with env vars like:
uv run --env-file .env fastapi dev
English
Edu retweeté
Edu retweeté
Edu retweeté

🚀 Feature Friday: Django's update_or_create() got Smarter in v5.0!
The new create_defaults argument lets you handle creation vs update scenarios elegantly, bringing more power to Django's object management.
🧵 (1/3)
#Django #DjangoFeatureFriday
English
Edu retweeté

I'm often asked what do I think the future for Postgres holds, and my answer has been mostly the same for probably 8 years now, maybe even longer. You see for Postgres itself stability and reliability is core. So where does the new stuff come from if it's not in the stable core... extensions.
Extensions within Postgres are unlike most other databases allowing you to modify or well extend the standard Postgres behavior. You can build other storage backends, new types, etc. Postgres itself ships with a number of extensions within the "contrib". The list of contrib extensions hasn't changed any time recently, but even contrib is a small sampling of what is possible. Beyond core there is a whole world of extensions, I want dig into just a smalls sampling starting with a few in core.
pg_stat_statements is to me the most useful extension that exists. It records what queries were run, how long they took, and a number of other details about the queries. A key extension for managing performance of your database.
auto_explain another one in contrib that is helpful for performance. For queries that run over a certain period of time will automatically log the explain plan–helpful for performance debugging.
pg_prewarm useful to prewarming the cache ahead of a failover.
Let's jump out of contrib a little bit now. Of course that isn't everything that ships with Postgres there is more, explore for yourself.
Citus is one of the (to date) more advanced extensions ever created. Citus turns postgres into a sharded, distributed, horizontally scalable database. Citus is especially built to work well for B2B style multi-tenant apps, and now after being acquired years ago part of Microsoft.
Pg_search extends Postgres to support elastic-quality full text search directly within Postgres. I often say Postgres can do just about everything and be pretty capable. Things like time series and search it's about 80% as good of some of the best in class options out there, but pg_search takes it further making it a full competitor to elastic, but Postgres.
Those are some bigger ones, but you've also got a lot of small focused ones as well.
Pg_cron is incredibly handy. Created originally by @marcoslot while at Citus, it's a small extension that does what it sounds like run scheduled jobs within Postgres. It is now a standard across all the major cloud providers. We leverage it heavily at @crunchydata, but went a little further and built a UI on top so you don't have to worry about crontab styling of the jobs.
Just yesterday we released pg_parquet. There have been some questions about what about other extensions that sort of do similar but not exact but also do a lot of other things. This allows you to seamless copy to and from Parquet files with Postgres. It follows the linux philosophy of small sharp tools. @mslot described the why incredibly well:
"We wanted to create a light-weight implementation of Parquet that does not pull a multi-threaded library into every postgres process. When you get to more complex features, a lot of questions around trade-offs, user experience, and deployment model start appearing."
There is a whole lot of extensions out there, but if you want to know where the future of Postgres is I can't imagine a world where extensions do not play a heavy roll.
English
Edu retweeté

Reportes científicos pronostican riesgo de que CABA se inunde parcial o permanentemente. La mayoría de las causas están vinculadas al calentamiento global.
lanacion.com.ar/sociedad/alert… a través de @lanacion
Español
Edu retweeté
Edu retweeté
Edu retweeté

Scores of Palestinian journalists have been documenting the horrors suffered in Gaza, and many of them have lost their lives doing so. Now @CNN’s @clarissaward, @scottycnn and @BrentSwailsCNN managed to enter without Israeli military escort. Watch their extraordinary report.
English
Edu retweeté

Microsoft just released Phi-2, a 2.7B LLM that rivals the 25x bigger LLaMa-2 70B.
The best part? The model is small enough to run on a laptop or mobile device.
Trained on 1.4T tokens: mixture of synthetic & web datasets, it beats Mistral 7B and Llama-2-70B model on muti-step reasoning tasks, i.e., coding and math.
microsoft.com/en-us/research…

English
Edu retweeté
Edu retweeté
Edu retweeté

¿Cómo hizo @figma que estaba a punto de lanzar un nuevo producto (Figjam) para escalar la UNICA base de datos productiva que tenían hasta ese momento?
Así 👇
Me encantó
figma.com/blog/how-figma…
Español














