Tweetovi
- Tweetovi, trenutna stranica.
- Tweetovi i odgovori
- Medijski sadržaj
Blokirali ste korisnika/cu @be_haki
Jeste li sigurni da želite vidjeti te tweetove? Time nećete deblokirati korisnika/cu @be_haki
-
Haki proslijedio/la je Tweet
Correct
@sidag95 (and others) who guessed it! The offending object was an inline RegEx! After moving its declaration to get compiled once... Bam! A 1,000x performance change! I'd have guessed it would be 5-10x slower - not *that* much slower.pic.twitter.com/55OUS8bcF4
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi -
A quick #Django tip: generating translations using makemessages can create huge git diffs that are tricky to merge. One way to reduce the amount of diffs is to turn off the file location using the --no-location option
https://docs.djangoproject.com/en/3.0/ref/django-admin/#cmdoption-makemessages-no-location …pic.twitter.com/ptDVh9T5qw
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi -
TIL: To provide initial values for a multiple choice field in a Django form, you can't just use request.GET... you have to use a little trick
pic.twitter.com/lqGamtuxhP
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi -
Haki proslijedio/la je Tweet
1) Are you using
#postgres via#docker for mac? Have you ever noticed `EXPLAIN ANALYZE` slowing down your queries by like 60x? Let's dig into some#postgres and#linux internals to figure out what's going on!pic.twitter.com/X4GFgJrcof
Prikaži ovu nitHvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi -
Following my previous #python#mypy tweet... Use Sequence instead of List for immutable lists.pic.twitter.com/ESyBsI6nhO
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi -
Here is another #python#mypy tip: Use Mapping instead of Dict for immutable dictionaries
https://mypy.readthedocs.io/en/latest/cheat_sheet_py3.html#standard-duck-types …pic.twitter.com/KDmDuerxkK
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi -
TIL: `msguniq` is a utility program that eliminates duplicate translations in po files. Just saved myself a major headache merging an old branch
https://www.gnu.org/software/gettext/manual/html_node/msguniq-Invocation.html …
#Django#gettext#i18npic.twitter.com/LHLDmzDdvj
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi -
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
The missing part from #python#mypy: exhaustiveness checking for union types. Add `assert_never` to your code and be forever grateful...
https://github.com/python/mypy/issues/5818 …pic.twitter.com/5FjXkuqx8F
Prikaži ovu nitHvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi -
You can get the query text in #Django using queryset.query. But, if the queryset contains parameters the text is usually not valid SQL. Using psycopg mogrify, you can get the interpolated query. Very useful for debugging SQL issues. https://hakibenita.com/how-to-use-grouping-sets-in-django …pic.twitter.com/htpjODC0aQ
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi -
In #Python you can bind identifiers such as table and column names safely, and avoid#SQL Injections in#PostgreSQL using psycopg2. Keep in mind the next time you use string interpolation to generate SQL... https://realpython.com/prevent-python-sql-injection/ …pic.twitter.com/jxEbvexCkT
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi -
Haki proslijedio/la je Tweet
Oh my God! I didn't know that!!!
#TIL#postgresql https://buff.ly/38c6Qd5 pic.twitter.com/sKyU92dsYC
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi -
Here is A magical context processor to temporarily set #Django model instance attributes. Saved us dozens of test fixture variations... works very nice with#pytest https://hakibenita.com/how-we-replaced-dozens-of-test-fixtures-with-one-simple-function …pic.twitter.com/a9ZLIOF5xW
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi -
Did you know you can provide your own query to #Django prefetch related using the Prefetch object? You can even add select_related to the prefetched query. Very useful for speeding up processing across M2M relations. More here: https://hakibenita.com/all-you-need-to-know-about-prefetching-in-django …pic.twitter.com/VuaxQYpxEw
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi -
Here's a little
#Django ORM gotacha: using select_for_update will lock *all the tables* in the query. To lock specific tables use select_for_update(of=(...)). https://hakibenita.com/9-django-tips-for-working-with-databases#select-for-update-of …pic.twitter.com/URWfHXmmVX
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi -
How to add a calculated percent field to a #Django QuerySet? Not so simple... This is why https://hakibenita.com/sql-dos-and-donts#be-careful-when-dividing-integers …pic.twitter.com/Tr8E5X9eTR
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi -
Attaching the reference to where prefetching is mentioned. However, prefetching large files into memory is not ideal. Tried to experiment with different buffer sized, no effect.https://github.com/paramiko/paramiko/issues/175#issuecomment-543612579 …
Prikaži ovu nitHvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi -
Paramiko, a #Python#SFTP client, is apparently very slow out of the box: 27MB in 1:30 minutes. With prefetching the same file downloads in only 7s
What is the right way to speed download with Paramiko?pic.twitter.com/59MNLTtbrX
Prikaži ovu nitHvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi -
Haki proslijedio/la je Tweet
Remember that you can use a ~/.gitignore_global file to include all your dev tools-related git exclusions, instead of annoyingly doing it per project.pic.twitter.com/XjOqHz7WQb
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi -
Haki proslijedio/la je Tweet

How to Create an Index in Django Without Downtime
In this step-by-step Python tutorial, you'll get a solid understanding of the limitations of Django migrations by tackling a well known problem: creating an index in Django with no downtime
#pythonhttps://realpython.com/create-django-index-without-downtime/ …Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.