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: |

The messaging service and social-media platform owes creditors roughly $700 million by the end of April, according to people briefed on the company’s plans and loan documents viewed by The Wall Street Journal. At the same time, Telegram Group Inc. must cover rising equipment and bandwidth expenses because of its rapid growth, despite going years without attempting to generate revenue.

How Does Bitcoin Mining Work?

Bitcoin mining is the process of adding new transactions to the Bitcoin blockchain. It’s a tough job. People who choose to mine Bitcoin use a process called proof of work, deploying computers in a race to solve mathematical puzzles that verify transactions.To entice miners to keep racing to solve the puzzles and support the overall system, the Bitcoin code rewards miners with new Bitcoins. “This is how new coins are created” and new transactions are added to the blockchain, says Okoro.

Python_Labs from jp


Telegram Python_Labs🐍
FROM USA