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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #183 · 23 ное.

Python + bash Если вам часто требуется запускать shell команды из Python-кода, какой способ вы используете? Самый низкоуровневый это функция os.system(), либо os.popen(). Рекомендованный способ это subprocess.call(). Но это всё еще достаточно неудобно. Советую обратить своё внимание на очень крутую библиотеку sh. Что она умеет? 🔸 удобный синтаксис вызова команд как функций # os import os os.system("tar cvf demo.tar ~/") # subprocess import subprocess subprocess.call(['tar', 'cvf', 'demo.tar', '~/']) # sh import sh sh.tar('cvf', 'demo.tar', "~/") 🔸 простое создание функции-алиаса для длинной команды fn = sh.lsof.bake('-i', '-P', '-n') output = sh.grep(fn(), 'LISTEN') в этом примере также задействован пайпинг 🔸 удобный вызов команд от sudo with sh.contrib.sudo: print(ls("/root")) Такой запрос спросит пароль. Чтобы это работало нужно соответствующим способом настроить юзера. А вот вариант с вводом пароля через код. password = "secret" sudo = sh.sudo.bake("-S", _in=password+"\n") print(sudo.ls("/root")) Это не все фишки. Больше интересных примеров смотрите в документации. Специально для Windows💀 юзеров #libs#linux

Hashtags

Резултати

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

Пребарај: #pacific

当前筛选 #pacific清除筛选
Interesting Planet 🌍

@interesting_planet_facts · Post #443 · 28.07.2025 г., 00:22

🌎 On tiny Easter Island, ancient Polynesians transported massive stone heads—some weighing over 80 tons—using log rollers and ropes. These enigmatic statues, called moai, were carved from volcanic rock and honor ancestral chiefs, shaping the island’s mysterious history. ✨ #archaeology⚡#history⚡#pacific 👉subscribe Interesting Planet

Amazing Geography 🌍

@amazingeo · Post #454 · 14.11.2025 г., 20:31

🌍 The island nation of Kiribati is so spread out that it once straddled the International Date Line. In 1995, it shifted the line eastward, so the entire country could share the same date. ✨ #timezones⚡#Pacific⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #602 · 30.01.2026 г., 12:31

🌍 Samoa and American Samoa are just 160 kilometers apart but are 24 hours apart on the calendar due to the International Date Line, making them neighbors living in different days. ✨ #timezone⚡#Pacific⚡#islands⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #54 · 15.08.2025 г., 16:12

🌍 The Chatham Islands, east of New Zealand, use a unique time zone: Chatham Standard Time is 45 minutes ahead of New Zealand, making it one of the few zones offset by less than a full hour. ✨ #timezone⚡#islands⚡#Pacific⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍

🚢Тихоокеанские страны сталкиваются с финансовыми барьерами при внедрении ветрового судоходства. Ввод в эксплуатацию грузового парусного судна "Juren Ae" (Маршалловы острова) стал символом перехода к ветровой пропульсии в Океании. Проект реализован в рамках инициативы Pacific Blue Shipping Partnership, объединяющей страны региона для декарбонизации морских перевозок. Судно использует ветер как основной источник энергии (до 80% тяги), что позволяет существенно снизить зависимость от импортируемого топлива. Однако дальнейшее масштабирование таких решений сталкивается с ключевой проблемой — экономической нецелесообразностью при небольших грузопотоках и больших расстояниях между островами. С отраслевой точки зрения ситуация подчеркивает разрыв между технологическими возможностями и коммерческой реализацией. Несмотря на высокий потенциал ветровой пропульсии, ее внедрение требует поддержки через государственно-частные партнерства и международные климатические фонды. Дополнительно проект отражает уникальную интеграцию традиционных морских технологий региона с современными инженерными решениями. Однако без системного финансирования замена устаревшего флота, включая ro-ro суда, остается ограниченной. Таким образом, ветровое судоходство в Тихоокеанском регионе становится не только технологическим, но и финансово-политическим вызовом, где ключевым фактором успеха станет доступ к долгосрочному финансированию. 📌Pacific Blue Shipping Partnership — международная инициатива, создана в 2020 году, объединяет государства Океании, поддерживается правительствами стран-участников и международными организациями. #shipping#wind#decarbonization#Pacific#energy

Amazing Geography 🌍

@amazingeo · Post #260 · 18.09.2025 г., 16:12

🌍 Samoa’s 2011 time zone shift moved it west of the International Date Line, so travelers flying there from the U.S. now skip a day entirely, making for a calendar jump like nowhere else. ✨ #timezone⚡#dateline⚡#pacific⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

Amazing Geography 🌍

@amazingeo · Post #417 · 27.10.2025 г., 12:31

🌍 Chile’s unique Easter Island uses UTC–6 time zone, two hours behind mainland Chile. This rare split lets sunrise and sunset times align better with local daylight on the remote Pacific island. ✨ #timezone⚡#Pacific⚡#island⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #74 · 19.08.2025 г., 00:12

🌍 On January 1 each year, the first sunrise on Earth is usually seen in the Pacific island nation of Tonga or its neighbor, depending on the position of the International Date Line. ✨ #timezones⚡#sunrise⚡#Pacific⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍

Amazing Geography 🌍

@amazingeo · Post #110 · 24.08.2025 г., 20:12

🌍 The tiny Pacific nation of Tokelau was one of the last places to switch from UTC–11 to UTC+13 in 2011, leaping nearly a whole day forward to align time with its main trading partners. ✨ #timezones⚡#pacific⚡#islands⚡#calendars⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

American Оbserver

@american_observer · Post #5535 · 01.04.2026 г., 20:58

Russia’s Kinzhal Flyby Was a Message, Not a Strike Moscow sent MiG-31s armed with Kinzhal missiles over the Sea of Japan to make a point, not to start a war. The timing and the publicized flight path were meant to remind Japan and the U.S. that Russia can flash long-range strike power in the Pacific whenever it wants. The flight was over neutral waters, and the Russian Defense Ministry called it a routine mission with refueling drills. But the routine part is exactly the theater: Moscow wanted the image of a hypersonic-capable jet in a sensitive corridor because the image itself is the weapon. Japan is the real audience here. Russia is signaling displeasure over Tokyo’s ties to Washington, its support for Ukraine, and its growing role in the regional missile picture, including the broader U.S.-Japan security architecture. The message is blunt: if Japan wants to push Russia on one front, Moscow can raise pressure on another. So yes, this was a show of force. It was also propaganda with engines running, the kind of aerial display that tells rivals, allies, and domestic audiences that Russia still wants to be seen as a Pacific power, not just a Eurasian one. #Russia#Japan#Kinzhal#MiG31#SeaOfJapan#Pacific#military#geopolitics 📱American Оbserver - Stay up to date on all important events 🇺🇸

BDTN Island

@bdtn19 · Post #105 · 14.06.2022 г., 16:44

Эскиз нового принта для наших изделий готов Техника акварель / фломастеры В скором времени конвертируем в цифру и сделаем предзаказ на футболки Пишите в личку, если появятся вопросы или предложения Всем мир ;) #bednotown#bednotownfactory#omsk#omsk55#siberia#irtysh#damirmuratov#art#modernart#pacific#mountains#palms

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