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

Резултати

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

Пребарај: #russiandrones

当前筛选 #russiandrones清除筛选
Red Nile

@rednile12 · Post #10879 · 25.01.2026 г., 19:21

🔺Continuation from above @rednile12 🔍 Why this confirmation matters The unveiling is corroborated by multiple defence-focused outlets with photos and videos from the expo, including: 🔗Defence Blog (breaking report): 🔗Defence Security Asia (in-depth analysis): ▪️ Additional confirmation came from UNITED24 Media and Ethiopia’s Institute of Foreign Affairs (IFA), reinforcing that this is consistent, cross-verified reporting, not media hype. ▪️Variants on display suggest ISR-focused configurations, while reporting confirms strike-capable Orion-E versions are part of the acquisition — aligning with the platform’s dual-role MALE design. ▪️While no formal press release has been issued by Addis Ababa or Rosoboronexport (standard practice for sensitive arms deals), the public exhibition itself functions as de facto confirmation. 🛩️ Aviation Expo 2026 — key context 📍Location: Bishoftu Air Force Headquarters 🎖️Occasion: 90th anniversary of the Ethiopian Air Force — the Black Lion 📅Dates: January 23–27, 2026 🌍Theme:“Flying Forward, Building a Shared Future” 🛰️ What Ethiopia is actually acquiring According to Defence Security Asia: ▪️The Orion-E is a medium-altitude, long-endurance (MALE) UAV capable of 24+ hours endurance ▪️Payload capacity of up to 250 kg, supporting electro-optical/infrared sensors and precision-guided munitions ▪️Operational altitude of roughly 7,500 meters, designed to remain above most MANPADS threats ▪️Optimised for persistent ISR and precision strike, particularly in large, rugged, infrastructure-poor environments like the Horn of Africa 💸 The deal is widely assessed to be worth USD 300–500 million, likely covering: ▪️Multiple airframes ▪️Ground control stations ▪️Training and operational support ▪️Weapons integration and sustainment 🌍 Strategic implications The Orion-E unveiling marks: A decisive leap in Ethiopian airpower modernisation ▪️ A clear shift toward sovereignty-centric, non-Western defence partnerships, especially after Western arms restrictions during the Tigray conflict ▪️Russia’s first real breakthrough in exporting MALE UAVs, validating long-stated claims by Rosoboronexport chief Alexander Mikheev that multiple Orion contracts had been signed 🔹 Regionally, Ethiopia’s drone modernisation directly affects: ▪️Horn of Africa security dynamics ▪️The Red Sea and Bab al-Mandab corridor ▪️Deterrence, escalation control, and power projection through persistent unmanned dominance 📌 Bottom line This is not speculation, not propaganda, and not unverified chatter. Ethiopia has now visibly entered the MALE-class drone club, becoming the first foreign operator of Russia’s Orion-E and a pace-setter in Africa’s next phase of aerial warfare. The skies over Africa are changing — and Ethiopia is choosing to shape that future, not react to it. — RedNile Media🌊🧭 📡@rednile12 Geopolitics | Multipolarity | Sovereignty | Strategic Reality #Ethiopia#OrionE#RussianDrones#AfricanAirpower#DroneWarfare#EthiopianAirForce#HornOfAfrica#RedSea#MilitaryModernization#Geopolitics