TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #32 · 7 фев.

Скорее всего уже слышали, что складывать строки через + это плохая практика. Падение производительности, и всё такое. Без лишних слов, давайте измерять: from timeit import timeit def t1(): # складываем 10 строк через + из переменной t = 'text' for _ in range(1000): s = t + t + t + t + t + t + t + t + t def t2(): # склеиваем список строк через метод join arr = ['text'] * 10 for _ in range(1000): s = ''.join(arr) def t3(): # складываем через + но не из переменной а непосредственно инлайн объекты for _ in range(1000): s = 'text' + 'text' + 'text' + ... # всего 10 раз Теперь каждую строку склейки запустим по 10М раз >>> timeit(t1, number=10000) 0.21951690399964718 >>> timeit(t2, number=10000) 1.4978306379998685 >>> timeit(t3, number=10000) 0.2213820789993406 Хм, а нам говорили что через "+" это плохо и медленно ))) 😁 Тут стоит учитывать, что речь идёт о склейке множества длинных строк. Давайте изменим условия: def t4(): t = 'text'*100 for _ in range(1000): s = t + t + t + t + t + t + t + t + t def t5(): arr = ['text'*100] * 10 for _ in range(1000): s = ''.join(arr) def t6(): for _ in range(1000): s = 'text'*100 + 'text'*100 + ... # всего 10 раз >>> timeit(t4, number=10000) 12.795130728000004 >>> timeit(t5, number=10000) 2.642637542999182 >>> timeit(t6, number=10000) 0.2184546610005782 Вот, уже другой разговор, сразу видна разница, в среднем в 6 раз. Но погодите, почему последний тест t6() по скорости такой же как и t3()? Ведь строки теперь в 100 раз длиннее! Это вопросы оптимизации кода, какие простые изменения ускоряют или замедляют выполнение программы. Мы столкнулись с примером обхода обращения к переменной. Например, именно так работает директива #define в С++, во время компиляции подставляя значение переменной вместо ссылки на неё. В Python это тоже работает, но часто ли вы сможете встретить такой способ работы со строками? К сожалению, способ почти только теоретический. В целом, тесты показали то, что мы хотели. Делаем выводы самостоятельно. Полный листинг 🌍 #tricks

Резултати

Пронајдени 7 слични објави

Пребарај: #growthmindset

当前筛选 #growthmindset清除筛选
𝑺𝒐𝒏𝒐 𝒏𝒖𝒅𝒐.

@sononoodo · Post #41458 · 01.04.2026 г., 07:39

Sono entusiasta di condividere un nuovo capitolo del mio personale brand journey! 🚀 Con grande orgoglio, annuncio il mio recente "upgrade" strategico dello stile personale: ho scelto di vestirmi, un passo fondamentale per evolvere il mio stato da "nudo" a "diversamente nudo". 👔✨ Questa scelta si allinea perfettamente con i miei valori di crescita professionale e di impatto visivo, segnando un momento chiave nella mia missione di esprimere al meglio il mio potenziale. 🌟📈#NewChapter#StyleEvolution#PersonalBranding#GrowthMindset

.☠🤝🫴

@scrept_kids2 · Post #15 · 03.04.2026 г., 17:25

በጣም በሰፊው እና በደስታ የምጋለጠው አዲስ የዕድገት ስትራቴጂዬ! እውነተኛ የሀብት ፍጥረት እና የቀጣይነት ያለው እድገት የሚገኘው ዛሬ በሚዘራው የ"ዲሲፕሊን" ኢኮሲስተም ውስጥ እንጂ በሌላ ቦታ አይደለም። ይህ ማለት ብቻ ላይ የሚታገለው ጥንካሬ ሳይሆን፣ የራሳችንን የእውቀት ፖርትፎሊዮ በየቀኑ ማሳደግን (Upskilling)፣ የሀብት አያያዝን በጣም ትክክለኛ ለማድረግ (Financial Optimization) እና ለቴክኖሎጂ እንዲሁም ለፋይናንስ ደህንነት ትልቅ ስትራቴጂካዊ ትኩረት መስጠትን የሚጠይቅ ነው። ትልቁ ስኬት የሚጀምረው በትንሽ ጅማሮ ቢሆንም፣ በዚህ የጉዞ ሂደት ውስጥ የሚገጥሙን ተግዳሮቶች እንደ ዋጋ ያላቸው የትምህርት እድሎች በመቀበል እና ሳይታከቱ በፍጥነት ጉዞውን በመቀጠል፣ ነገን ከዛሬው የተሻለ፣ ደህንነቱ የተጠበቀ እና ውጤታማ ለማድረግ ዝግጁ ነን! #GrowthMindset#FinancialFreedom#TechSecurity#Leadership#SuccessJourney

MEZON Inspiring School

@mezon_school · Post #2551 · 13.05.2025 г., 04:46

Помните, ваша родительская вера, помноженная на поддержку школы, творит настоящие чудеса! Делитесь своими мыслями, идеями и родительским опытом! 👇 #РодителямНаЗаметку#СилаРодительскойВеры#ЭффектПигмалиона#ВеримВДетей#GrowthMindset#СемьяиШкола#ВоспитаниеУспеха

Teach For Uzbekistan | Official

@teachforuzbekistan · Post #277 · 30.07.2025 г., 17:08

🧠 Yangi vazifalar oldidan psixologik tayyorgarlik! 💪 Yozgi institut doirasida ishtirokchilar uchun muhim mashg‘ulotlar tashkil etildi. Yangi bosqichga puxta tayyorlanish maqsadida psixolog Nissa Lebedinskaya tomonidan “Team building” mavzusida amaliy mashg‘ulotlar o‘tkazildi. 🧘‍♀️ Ushbu sessiyalar davomida ishtirokchilar o‘z emotsiyalarini anglash va boshqarish, jamoada samarali ishlash, o‘ziga bo‘lgan ishonchni mustahkamlash bo‘yicha muhim ko‘nikmalarga ega bo‘lishdi. 🔥 Bu mashg‘ulotlar ularni yangi vazifalarga ruhiy va psixologik jihatdan tayyorlanishga yordam berdi. Institutdagi har bir bosqich — ulkan o‘sish sari dadil qadam! 🤝O‘zbekiston Yoshlar ishlari agentligiga ushbu faoliyatlarni amalga oshirishda ko‘rsatgan yordami uchun alohida minnatdorchilik bildiramiz. 💬💬💬🗣 🧠 Psychological Preparation Before New Responsibilities! 💪 As part of the Summer Institute, important sessions were organized for participants. In order to thoroughly prepare for the next stage, practical training on the topic of “Team Building” was conducted by psychologist Nissa Lebedinskaya. 🧘‍♀️ During these sessions, participants gained important skills in recognizing and managing their emotions, working effectively in a team, and strengthening self-confidence. 🔥 These trainings helped them prepare mentally and psychologically for new responsibilities. Each stage of the Institute is a confident step toward great growth! 🤝 Special thanks to the Youth Affairs Agency of Uzbekistan for their support in making these activities possible. #SummerInstitute2025#TeamBuilding#PsychologicalSupport#LeadershipJourney#SelfAwareness#EmotionalIntelligence#GrowthMindset#FutureLeaders#TogetherWeGrow#TeachForUzbekistan Telegram |Linkedln| Instagram |Youtube

IELTS|Newspapers & Magazines|English

@emagzinewspars · Post #9351 · 15.10.2025 г., 10:30

#The_Harvard_Business_Review🇺🇸📕[PDF]⬇️ #November2025 #December2025 #Monthly_Magazines For learning, for free(dom). @backupofmagazines In this issue, leaders are urged to confront the #HiddenBeliefs that silently block their growth. This edition explores how to build #OctopusOrganizations in a complex world, master #GenAI strategy, and learn from #PrivateEquity playbooks. From “strategic hibernation” to smarter disagreement, the issue decodes #EmotionalIntelligence and #Leadership in times of uncertainty. Discover why “hands-on” CEOs outperform, how to monetize your data, and why #AIpilots often fail. Featuring #EstherDuflo and case studies on CHRO missteps, this issue is a must for #OrganizationalChange agents. #HBR#Strategy#Management#GrowthMindset#BusinessLeadership