تو پایتون گاهی امکان داره که یه سری محاسبات تکراری با استفاده از یک تابع انجام بشه. برای جلوگیری از محاسبات تکراری و استفاده از جوابهایی که قبلا تولید شدند، پایتون اومده یه decorator معرفی کرده به نام lru_cache.
این امکان میتونه مثلا تو افزایش سرعت اجرای کدهاتون خیلی کاربردی باشه و اینکه میشه براش مقدار حافظه هم تعیین کرد که یه موقع stackتون overflow نشه!
تو این لینک به جزییات این decorator خوب اشاره شده، توصیه میکنم 5 دقیقه وقت بذارید و بخونیدش.
تو پایتون گاهی امکان داره که یه سری محاسبات تکراری با استفاده از یک تابع انجام بشه. برای جلوگیری از محاسبات تکراری و استفاده از جوابهایی که قبلا تولید شدند، پایتون اومده یه decorator معرفی کرده به نام lru_cache.
این امکان میتونه مثلا تو افزایش سرعت اجرای کدهاتون خیلی کاربردی باشه و اینکه میشه براش مقدار حافظه هم تعیین کرد که یه موقع stackتون overflow نشه!
تو این لینک به جزییات این decorator خوب اشاره شده، توصیه میکنم 5 دقیقه وقت بذارید و بخونیدش.
With the help of the Search Filters option, users can now filter search results by type. They can do that by using the new tabs: Media, Links, Files and others. Searches can be done based on the particular time period like by typing in the date or even “Yesterday”. If users type in the name of a person, group, channel or bot, an extra filter will be applied to the searches.
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.