@data_stitches · Post #353 · 24.10.2024 г., 08:05
十月一些大大小小的地图 #cartography
Hashtags
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #191 · 14 дек.
Как разделить строку с shell-командой на отдельные аргументы в виде списка? Если сделать просто сплит по пробелу то получим то что надо, кроме случаев со вставками текста с пробелами. Например так: >>> '-arg "I Am Groot"'.split(' ') ['-arg', '"I', 'Am', 'Groot"'] Чтобы учитывать текст в кавычках как единый аргумент можно воспользоваться функцией shlex.split() Кто читает мой канал давно, уже в курсе. А что делать, если нужно обратное действие? Объединить аргументы из списка в строку и при этом добавить кавычки в аргумент с пробелами. Конечно, если вы используете subprocess то он сам всё разрулит. Но если вам нужна именно команда одной строкой, то можно воспользоваться готовой функцией в том же subprocess. >>> from subprocess import list2cmdline >>> list2cmdline(['-arg', 'I Am Groot']) '-arg "I Am Groot"' Он также позаботится об экранировании уже имеющихся кавычек >>> list2cmdline(['-arg', 'I Am "Groot"']) '-arg "I Am \"Groot\""' А вот так он может "схлопнуть" в команду JSON >>> list2cmdline(['--json', json.dumps({'key': 'value'})]) '--json "{\"key\": \"value\"}"' _______________ Возможно кто-то спросит, а зачем соединять аргументы в строку если subprocess сам это сделает а os.system не наш путь? Мне как-то потребовалось отправлять команду на удалённое выполнение и в API поддерживалось указание команды только строкой. Так что всякое бывает) #libs#basic
Пребарај: #cartography
@data_stitches · Post #353 · 24.10.2024 г., 08:05
十月一些大大小小的地图 #cartography
Hashtags
@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
@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
@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
@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
@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
@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🌍
@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
@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
@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🌍
@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🌍
@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🌍