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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #76 · 27 апр.

Ранее я делал серию постов про битовые операторы. Вот вам ещё один наглядный пример как это используется в Python в модуле re. Чтобы указать флаг для компилятора нам надо указать его после передаваемой строки. Например, добавляем флаг для игнорирования переноса строки. pattern = re.compile(r"(\w+)+") words = pattern.search(text, re.DOTALL) А как указать несколько флагов? Ведь явно будут ситуации когда нам потребуется больше одного. Кто читал посты по битовые операторы уже понял как. pattern.search(text, re.DOTALL | re.VERBOSE) А теперь смотрим исходники, что находится в этих атрибутах? Не удивительно, степени двойки. Почему? Потому что каждое следующее значение это сдвиг единицы влево. >>> for n in [1, 2, 4, 8, 16, 32, 64, 128, 256]: >>> print(bin(n)) 0b1 0b10 0b100 0b1000 0b10000 0b100000 0b1000000 0b10000000 0b100000000 Чтобы было понятней, давайте напишем тоже самое но иначе, добавим ведущие нули: 000000001 000000010 000000100 000001000 000010000 000100000 001000000 010000000 100000000 Не понятно что тут происходит? Читай три поста про битовые операторы начиная с этого ➡️https://t.me/pythonotes/45 В общем, это пример применения побитовых операций в самом Python. Теперь вы знаете Python еще немного лучше) #tricks#regex#libs

Резултати

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

Пребарај: #cartography

当前筛选 #cartography清除筛选
Amazing Geography 🌍

@amazingeo · Post #683 · 06.04.2026 г., 20:31

🌍 The oldest known map carved on stone was found in Europe and dates back over 4,000 years. It shows a planned landscape with fields and waterways carefully etched by early mapmakers. ✨ #cartography⚡#history⚡#mapping⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #640 · 18.02.2026 г., 20:31

🌍 Modern cartographers use remote sensing from satellites to create digital maps so detailed they can track changes in forests, cities, and coastlines within days of new data. ✨ #cartography⚡#mapping⚡#satellites⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #600 · 29.01.2026 г., 12:31

🌍 Early world maps placed Jerusalem at the center, with Asia, Europe, and Africa shown as a T-shape around it. These symbolic "T-O" maps reveal how medieval people viewed the world’s layout. ✨ #cartography⚡#history⚡#mapping⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #415 · 25.10.2025 г., 20:31

🌍 The first aerial photograph used for mapping was taken from a hot air balloon over Paris in 1858. This breakthrough marked the start of modern cartography using images from above. ✨ #cartography⚡#mapping⚡#history⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #377 · 15.10.2025 г., 20:31

🌍 The biggest map ever made is the modern digital world map stored by satellites. Billions of points are updated daily, letting scientists watch Earth’s surface change almost in real time. ✨ #cartography⚡#satellites⚡#mapping⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #146 · 30.08.2025 г., 20:12

🌍 In 2000, the complete first digital map of Earth—called the SRTM—was created from space using radar. It captured mountain heights and landscape details for over 80% of Earth’s land. ✨ #mapping⚡#cartography⚡#satellites⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

Amazing Geography 🌍

@amazingeo · Post #561 · 07.01.2026 г., 12:31

🌍 The Winkel Tripel projection is now widely used for world maps because it balances area, shape, and distance better than older methods, reducing distortion across continents and oceans. ✨ #cartography⚡#mapprojection⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #339 · 06.10.2025 г., 15:31

🌍 The first known use of contour lines on a map appeared in 1584, showing the depth of water in the Netherlands. This method is still used today to show elevation and terrain on modern maps. ✨ #cartography⚡#elevation⚡#history⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #184 · 06.09.2025 г., 00:12

🌍 Some ancient Polynesian maps were made with sticks and shells, showing ocean swells and island positions. These unique charts helped navigators cross vast distances without modern tools. ✨ #cartography⚡#navigation⚡#history⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

Amazing Geography 🌍

@amazingeo · Post #64 · 17.08.2025 г., 09:12

🌍 In 1972, the first Landsat satellite began photographing Earth's surface from space, fueling a new era of digital mapping and revealing real-time changes in forests, cities, and coastlines. ✨ #cartography⚡#satellite⚡#mapping⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍

Amazing Geography 🌍

@amazingeo · Post #258 · 18.09.2025 г., 09:12

🌍 The first map to show the Americas as a separate continent was made by German cartographer Martin Waldseemüller in 1507. It’s where the name “America” first appeared on a world map. ✨ #cartography⚡#history⚡#discovery⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

ПретходнаСтраница 1 од 5Следна