تو پایتون گاهی امکان داره که یه سری محاسبات تکراری با استفاده از یک تابع انجام بشه. برای جلوگیری از محاسبات تکراری و استفاده از جوابهایی که قبلا تولید شدند، پایتون اومده یه decorator معرفی کرده به نام lru_cache.
این امکان میتونه مثلا تو افزایش سرعت اجرای کدهاتون خیلی کاربردی باشه و اینکه میشه براش مقدار حافظه هم تعیین کرد که یه موقع stackتون overflow نشه!
تو این لینک به جزییات این decorator خوب اشاره شده، توصیه میکنم 5 دقیقه وقت بذارید و بخونیدش.
تو پایتون گاهی امکان داره که یه سری محاسبات تکراری با استفاده از یک تابع انجام بشه. برای جلوگیری از محاسبات تکراری و استفاده از جوابهایی که قبلا تولید شدند، پایتون اومده یه decorator معرفی کرده به نام lru_cache.
این امکان میتونه مثلا تو افزایش سرعت اجرای کدهاتون خیلی کاربردی باشه و اینکه میشه براش مقدار حافظه هم تعیین کرد که یه موقع stackتون overflow نشه!
تو این لینک به جزییات این decorator خوب اشاره شده، توصیه میکنم 5 دقیقه وقت بذارید و بخونیدش.
However, analysts are positive on the stock now. “We have seen a huge downside movement in the stock due to the central electricity regulatory commission’s (CERC) order that seems to be negative from 2014-15 onwards but we cannot take a linear negative view on the stock and further downside movement on the stock is unlikely. Currently stock is underpriced. Investors can bet on it for a longer horizon," said Vivek Gupta, director research at CapitalVia Global Research.
Unlimited members in Telegram group now
Telegram has made it easier for its users to communicate, as it has introduced a feature that allows more than 200,000 users in a group chat. However, if the users in a group chat move past 200,000, it changes into "Broadcast Group", but the feature comes with a restriction. Groups with close to 200k members can be converted to a Broadcast Group that allows unlimited members. Only admins can post in Broadcast Groups, but everyone can read along and participate in group Voice Chats," Telegram added.