@internationalgeographic · Post #5892 · 20.08.2025 г., 15:18
Folegandros Island, #Greece🇬🇷 This tiny paradise offers secluded turquoise bays, delicious seafood, and a beautiful view from the Panagia church on top of the hill.
Hashtags
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
Пребарај: #greece
@internationalgeographic · Post #5892 · 20.08.2025 г., 15:18
Folegandros Island, #Greece🇬🇷 This tiny paradise offers secluded turquoise bays, delicious seafood, and a beautiful view from the Panagia church on top of the hill.
Hashtags
@internationalgeographic · Post #5776 · 25.06.2025 г., 08:57
Corfu, #Greece🇬🇷 Corfu (also known as Kerkyra) is the northernmost and second-largest of the Greek Ionian Islands. The Greeks themselves use the name Kerkyra. Corfu is a very green and picturesque island. Many tourists find the atmosphere of Corfu to be more Italian than Greek, and there is a reason for this: for 400 years, this landmass in the Ionian Sea belonged to Venice. Here, you will find turquoise bays, luxurious beaches, diverse architecture, and ancient temples.
Hashtags
@internationalgeographic · Post #5701 · 21.05.2025 г., 12:54
Megara, #Greece Wow, that's great, it's an interesting attraction. A railway bike is a unique and exciting way to explore the stunning landscapes of Greece.
Hashtags
@internationalgeographic · Post #5675 · 14.05.2025 г., 14:05
Symi Island, #Greece There is no airport here, so you will be met by boat in a neoclassical harbor with pastel-colored buildings. The island of Simi is famous for the extraction of sea sponges.
Hashtags
@artematizando · Post #4519 · 26.07.2023 г., 10:09
Holy Trinity, Kastoriay #Greece
Hashtags
@militantwire · Post #2311 · 19.07.2022 г., 00:00
Militant Wire’s Tom Lord: I just wrote a piece on the killing of Thanos Axarlian, 30 years ago, during a 17N assassination attempt on the finance minister of #Greece. "Remembering 17N's Assassination Attempt on Finance Minister Ioannis Palaiokrassas, July 1992" by @PotempkinBrain https://twitter.com/potempkinbrain/status/1548821545174257664?s=21&t=lWm80Fg8DDtUzXgLKt-nZw
Hashtags
@militantwire · Post #2166 · 14.06.2022 г., 01:20
🇬🇷🏴#Greece: Anarchist and alleged member of the Conspiracy Cells of Fire, Yannis Michailidis (aka "The Syntagma Archer"), has been taken to hospital on the 21st day of his hunger strike in prison. He has apparently lost more than 10% of his intial body weight: https://twitter.com/potempkinbrain/status/1536475186282872833?s=21&t=Tdg9UGvGARRa9FjQOyGpPA
Hashtags
@VOYAGE · Post #1660 · 31.01.2026 г., 13:14
Greece🇬🇷 Astypalea Island, a gem of the Dodecanese, lies in the southeastern Aegean. Its remote location has preserved authentic culture and traditions. On a central hill sits Chora, the historic capital, offering panoramic views of the endless Aegean Sea, crowned by the Venetian-era Querini Castle. 🏰🌊 #Greece | @voyage
Hashtags
@VOYAGE · Post #1625 · 13.12.2025 г., 13:14
Greece🇬🇷 Astypalea Island, a gem of the Dodecanese, lies in the southeastern Aegean. Its remote location has preserved authentic culture and traditions. On a central hill sits Chora, the historic capital, offering panoramic views of the endless Aegean Sea, crowned by the Venetian-era Querini Castle. 🏰🌊 #Greece | @voyage
Hashtags
@VOYAGE · Post #1380 · 05.04.2025 г., 12:14
😍 Sarakiniko Beach is widely considered the most beautiful beach on Milos Island. 📏 📏 📏 📏 📏 📏 📏 📏 #Greece🇬🇷@voyage
Hashtags
@VOYAGE · Post #1077 · 30.08.2024 г., 12:14
🗺Greece 🇬🇷 Corfu Island has long been celebrated as one of the most charming spots in Greece. It captivates with its beauty from the very first glance. Looking at the island from an airplane window, you'll be amazed by its extraordinary emerald color. #Greece @voyage
Hashtags
@VOYAGE · Post #1066 · 20.08.2024 г., 12:14
🗺Greece🇬🇷 A gentle pink sunset at a luxurious resort on the island of Mykonos #Greece @voyage
Hashtags