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

How Does Bitcoin Work?

Bitcoin is built on a distributed digital record called a blockchain. As the name implies, blockchain is a linked body of data, made up of units called blocks that contain information about each and every transaction, including date and time, total value, buyer and seller, and a unique identifying code for each exchange. Entries are strung together in chronological order, creating a digital chain of blocks. “Once a block is added to the blockchain, it becomes accessible to anyone who wishes to view it, acting as a public ledger of cryptocurrency transactions,” says Stacey Harris, consultant for Pelicoin, a network of cryptocurrency ATMs. Blockchain is decentralized, which means it’s not controlled by any one organization. “It’s like a Google Doc that anyone can work on,” says Buchi Okoro, CEO and co-founder of African cryptocurrency exchange Quidax. “Nobody owns it, but anyone who has a link can contribute to it. And as different people update it, your copy also gets updated.”

At a time when the Indian stock market is peaking and has rallied immensely compared to global markets, there are companies that have not performed in the last 10 years. These are definitely a minor portion of the market considering there are hundreds of stocks that have turned multibagger since 2020. What went wrong with these stocks? Reasons vary from corporate governance, sectoral weakness, company specific and so on. But the more important question is, are these stocks worth buying?

Python_Labs from ua


Telegram Python_Labs🐍
FROM USA