Telegram Group & Telegram Channel
تو پایتون گاهی امکان داره که یه سری محاسبات تکراری با استفاده از یک تابع انجام بشه.
برای جلوگیری از محاسبات تکراری و استفاده از جواب‌هایی که قبلا تولید شدند، پایتون اومده یه decorator معرفی کرده به نام lru_cache.

این امکان می‌تونه مثلا تو افزایش سرعت اجرای کدهاتون خیلی کاربردی باشه و اینکه میشه براش مقدار حافظه هم تعیین کرد که یه موقع stackتون overflow نشه!

تو این لینک به جزییات این decorator خوب اشاره شده، توصیه می‌کنم 5 دقیقه وقت بذارید و بخونیدش.

🙏Thabks to: @Ai_Events



tg-me.com/PyLab/603
Create:
Last Update:

تو پایتون گاهی امکان داره که یه سری محاسبات تکراری با استفاده از یک تابع انجام بشه.
برای جلوگیری از محاسبات تکراری و استفاده از جواب‌هایی که قبلا تولید شدند، پایتون اومده یه decorator معرفی کرده به نام lru_cache.

این امکان می‌تونه مثلا تو افزایش سرعت اجرای کدهاتون خیلی کاربردی باشه و اینکه میشه براش مقدار حافظه هم تعیین کرد که یه موقع stackتون overflow نشه!

تو این لینک به جزییات این decorator خوب اشاره شده، توصیه می‌کنم 5 دقیقه وقت بذارید و بخونیدش.

🙏Thabks to: @Ai_Events

BY Python_Labs🐍


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/PyLab/603

View MORE
Open in Telegram


Python_Labs Telegram | DID YOU KNOW?

Date: |

What is Secret Chats of Telegram

Secret Chats are one of the service’s additional security features; it allows messages to be sent with client-to-client encryption. This setup means that, unlike regular messages, these secret messages can only be accessed from the device’s that initiated and accepted the chat. Additionally, Telegram notes that secret chats leave no trace on the company’s services and offer a self-destruct timer.

Importantly, that investor viewpoint is not new. It cycles in when conditions are right (and vice versa). It also brings the ineffective warnings of an overpriced market with it.Looking toward a good 2022 stock market, there is no apparent reason to expect these issues to change.

Python_Labs from in


Telegram Python_Labs🐍
FROM USA