TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #396 · 9 окт.

7.09.2025 состоялся релизPithon 3.14! На фоне хайпа про NoGIL всё позабыли про другие фичи. Особенно про Multiple Interpreters, который обещает изоляцию процессов но с эффективностью потоков! На сколько действительно это будет эффективно мы узнаем позже, потому что сейчас это лишь первый релиз с ограничениями и недоработками. Но что там про NoGIL? Теперь этот режим не экспериментальный, а официально поддерживаемый, но опциональный. Чтобы запустить без GIL нужна специальная сборка. И перед стартом нужно объявить переменную PYTHON_GIL=0 Для вас я собрал готовый репозиторий где достаточно запустить скрпит, который всё сделает: ▫️ соберет релизный Python 3.14 в новый Docker-образ ▫️ запустит тесты в контейнере (GIL, NoGIL, MultiInterpreter) ▫️ распечатает результаты Тест очень простой, усложняйте сами) Вот какие результаты у меня: === Running ThreadPoolExecutor GIL ON TOTAL TIME: 45.48 seconds === Running ThreadPoolExecutor GIL OFF TOTAL TIME: 6.14 seconds === Running basic Thread GIL ON TOTAL TIME: 45.54 seconds === Running basic Thread GIL OFF TOTAL TIME: 4.74 seconds === Running with Multi Interpreter TOTAL TIME: 18.30 seconds Если сравнивать GIL и NoGIL, то на мои 32 ядра прирост х7-x10 (почему не х32? 🤷). При этом нам обещают что скорости будут расти с новыми релизами. Режим без GIL похож (визуально) на async, тоже параллельно, тоже не по порядку. Но это не IO! и от того некоторый диссонанс в голове 😵‍💫, нас учили не так! Интересно, что чистый Thread работает быстрей чем ThreadPoolExecutor без GIL. Ну и где-то плачет один адепт мульти-интерпретаторов😭 Теперь нужно искать где они могут пригодиться с такой-то скоростью. Скорее всего своя область применения найдется. Отдельно я затестил память и вот что вышло на 32 потока: ThreadPoolExecutor GIL ON 305.228 MB ThreadPoolExecutor GIL OFF 500.176 MB basic Thread GIL ON 90.668 MB basic Thread GIL OFF 472.444 MB with Multi Interpreter 1267.788 MB Пока не знаю как к этому относиться) В целом - радует направление развития! #release

Hashtags

Резултати

Пронајдени 54 слични објави

Пребарај: #survival

当前筛选 #survival清除筛选

On what to save As times get interesting, we should consider what we should keep in the worst case: A good rule of thumb when it comes to saving something is will you be able to use it 10 years after a possible disaster. That's not to say all electronics should be forgotten or you shouldn't try to save anything. Batteries, small devices may be valuable in the intermediate aftermath. Hand driven or solar radios are a good choice, microwaves are not. #survival @EuropeanTribalism

Hashtags

On fire There is an easy way of making a quite effective camp fire: the Dacota Fire Hole. Dig a hole around 30cm deep and also dig an air hole connected to it. Place dry wood into the hole and start a fire with an approach of your choice. Matches and lighters are okay. The growing fire will pull needed oxygen through the secondary hole but will be resistant to wind. Place any pots or objects to heat above the hole with the fire. #survival @EuropeanTribalism

Hashtags

On growing plants In Nahuatl, the old language of the Quiche-Maya, there is the term 'milpa'. It defines an agricultural system, which uses the symbiosis of three plants: corn, beans and pumpkins. The corn plants support the beans growing up, the beans support the corn plants by supplying nitrogen and the pumpkin prevents the soil from drying out with its big leaves. This setup is also known as 'the Three Sisters'. We will try out this system this year and I will share the results with you. #survival @EuropeanTribalism

Hashtags

On gardening We are rapidly approaching spring, with only February ahead! I want to remind you that it is time to think about your gardening plans for the coming season! The first plants need to be sowed next month! This is going to be an essential year for us, so try to be as independent on food as possible! #survival @EuropeanTribalism

Hashtags

On the most basic survival rule Always remember, that you will survive: ~ 3 hours in extreme cold ~ 3 days without water ~ 3 weeks without food Prepare accordingly! Is your heating running and backed up? Do you have fresh water supplies? Do you have food supplies for some time? Something will come, be prepared! #survival @EuropeanTribalism

Hashtags

On preparations (2) You don't have to be completely self-sufficient. Almost no one truly is. However, having at least SOME food independence is hugely valuable, even if it's ONLY some carrots and tomatoes growing in your back garden. A huge amount of the government's power comes from controlling the food supply, which is why Communists always attack that first. If every individual could feed themselves and their family for a week, then the government is weak. If everyone could feed themselves for a month, then the government is afraid, because a month is more than enough time to annihilate a government in. If everyone can feed themselves indefinitely, the government is powerless and at your mercy. Again: you DON'T have to be completely independent or even come close to it. Just having enough growing in your garden to feed yourself for a week or two is already an advantage. So focus on that. One week. Then two. Take it easy and manage your energy but don't do nothing. #survival @EuropeanTribalism

Hashtags

On backups We live in a quite rural area. Around 6.00AM this morning there was a blackout which was fixed around 5.00PM. Luckily we have several combustion ovens in our house, which work quite decent for cooking. Combined with a Dutch Oven, we had a decent lunch: chicken and vegetables. What do I want to tell you is the following: do not take electricity for granted! Make backup plans or just think about what you need in case of a blackout. These three questions should be answered first: - Can I provide clean water without electricity? - Can I cook without electricity? - Can I heat my living space without electricity? If you answer any of those questions with 'no', be aware that you might be among the first to die in a real blackout scenario. #survival @EuropeanTribalism

Hashtags

Take a look at the recent statistics of sunspots! The implications are, that we will soon enter a period of cold. Draw your conclusions: the availability of food will decrease. Prepare yourselves with local projects, such as gardens with your own food, community gardens or cooperations with farmers! #survival

Hashtags

movies & series 🍿

@images · Post #1733 · 04.12.2024 г., 11:01

🍿 'Last Breath': The Underwater Thriller That Will Leave You Breathless in 2025 📆Release: February 28, 2025 🎭Genre: #Thriller · #Survival 🎟 If the Netflix documentary Last Breath left me in awe, its cinematic adaptation is set to bring this incredible true story to life once again. 😱 Finn Cole (Peaky Blinders) stars as Chris Lemons, a diver stranded in the depths of the North Sea with only minutes of oxygen. Meanwhile, Woody Harrelson (True Detective) and Simu Liu (Shang-Chi and the Legend of the Ten Rings) lead a nail-biting race against time to save him. ⏳ The most intriguing part? The documentary's (available on Netflix 📺) director, Alex Parkinson, helms the film, ensuring the authenticity and tension of the original story remain intact.

ПретходнаСтраница 1 од 5Следна