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 SSE was the first modern stock exchange to open in China, with trading commencing in 1990. It has now grown to become the largest stock exchange in Asia and the third-largest in the world by market capitalization, which stood at RMB 50.6 trillion (US$7.8 trillion) as of September 2021. Stocks (both A-shares and B-shares), bonds, funds, and derivatives are traded on the exchange. The SEE has two trading boards, the Main Board and the Science and Technology Innovation Board, the latter more commonly known as the STAR Market. The Main Board mainly hosts large, well-established Chinese companies and lists both A-shares and B-shares.

How to Use Bitcoin?

n the U.S. people generally use Bitcoin as an alternative investment, helping diversify a portfolio apart from stocks and bonds. You can also use Bitcoin to make purchases, but the number of vendors that accept the cryptocurrency is still limited. Big companies that accept Bitcoin include Overstock, AT&T and Twitch. You may also find that some small local retailers or certain websites take Bitcoin, but you’ll have to do some digging. That said, PayPal has announced that it will enable cryptocurrency as a funding source for purchases this year, financing purchases by automatically converting crypto holdings to fiat currency for users. “They have 346 million users and they’re connected to 26 million merchants,” says Spencer Montgomery, founder of Uinta Crypto Consulting. “It’s huge.”

Python_Labs from pl


Telegram Python_Labs🐍
FROM USA