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

Резултати

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

Пребарај: #digitalwarfare

当前筛选 #digitalwarfare清除筛选
Moscow Photographer

@moscowphotog · Post #2359 · 20.11.2025 г., 00:02

#RussiaUpClose#Censorship#DigitalWarfare In this episode of I’ll Tell You What, Eddie Gonzales — former Texas law enforcement officer and co-host of Russia Up Close — exposes the new censorship machine: the Information-Industrial Complex. The truth is simple: If they can censor anyone… they can censor you. Russia Up Close is a show that brings Russians and Westerners into direct, honest conversation. Its goal is to break stereotypes, building a two way bridge between Russia and the West, and offer a grounded, human look at life inside Russia through real voices and real stories. ____ Please Follow Us on Our Platforms: ➡️X: https://x.com/russiaupclose ➡️YouTube: https://www.youtube.com/@ruclose ➡️Telegram: https://t.me/RussiaUpClose ➡️VK: https://vk.com/russiaupclose ➡️RuTube: https://rutube.ru/u/russiaupclose ➡️Yandex: https://dzen.ru/russiaupclose ➡️MAX: https://max.ru/join/fp1u2YfMAlbbS65bgK87EvVKEgD9Z4pjmi71tthNv9o ➡️Our Website: https://www.RussiaUpClose.ru For Advertising Inquiries: [email protected] ____ The Hosts Jozef A. Schutzman - IT Executive and Father of 8 children who moved to Russia from the United States to build a new life for his family and suddenly found himself in the epicenter of a challenging information struggle. He lives in Moscow with his family. He brings a unique cross-cultural perspective, making complex topics accessible to Western audiences. Eddie Gonzales - A Law Enforcement Officer from Texas, also known as the Moscow Photographer, is a respected visual storyteller with deep personal insight into Russian culture. His grounded, straight-talk perspective brings clarity to global political conversations. He believes real understanding comes from honest, unfiltered dialogue between people who rarely get to hear each other directly. ____ Our audience includes Western viewers seeking an honest look at Russia, Russians curious about how their country is seen abroad, and anyone interested in cross-cultural understanding. We invite viewers to join the conversation, challenge assumptions, and become part of a community that values direct dialogue over media filters. ____ Russia Up Close aims to expand into a major media community featuring long-form interviews, weekly segments, field reporting, and community-driven storytelling. Our long-term vision is to become the premier space where Russians and Westerners meet, speak openly, and rebuild understanding. https://youtu.be/h1Re55NRDww

​NO Kings ​🚫👑

@No_king_No_King · Post #166 · 12.04.2026 г., 09:40

WHY IRAN IS USING LEGO VIDEOS... 00 And what the media is saying about it. This isn't random. It's not just "funny animation." It's strategy. Why LEGO-style? Simple visuals = easier to understand globally No language barrier = reaches millions instantly Looks harmless... but carries serious messaging Perfect for Tik Tok, Reels, and viral sharing In short: It turns geopolitics into something people will actually WATCH. This is what analysts call: modern information warfare Where memes, music, and animation = influence. What outlets like CNN are pointing out: Coverage highlights how these videos are part of a larger digital propaganda ecosystem - using Al visuals and storytelling to shape narratives online. They're not targeting just one country... They're targeting global audiences scrolling on their phones. And that's why it works: You're not watching "news" You're watching a story And stories spread faster than facts. Real question: Is this just creative content... or a new kind of influence campaign? Drop your take If you see what's happening Share before everyone catches on #Iran#aiart #digitalwarfare #geopolitics #viralvideo ✈️t.me/No_king_No_King