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

Резултати

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

Пребарај: #easter

当前筛选 #easter清除筛选

🧺 🧁 🧁 🥚 🥚 🥚 🥚 🥚 🥚 🐰 🥕 🐇 🐰 🐇 🐰 🐰 🥚 🥚 🐥 🏵 💮 🪴 🌺 🪴 🥚 🥚 🥚 🚩 🚩 🚩 🚩🥮🙏 🤩🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏 🤩 🤩 🤩 🤩 🤩 🤩🥚 🤩 🤩🥚🥚🥚🥚 пасха | add#easter please boost 👼

Hashtags

Quick and easy way to color your eggs for #Easter: Wrap plant parts of your choice around an egg with a nylon sock very tightly, so that the plant is pressed against the shell. Place the eggs into warm water with loads of onion peels. Boil it for twelve minutes and let everything cool down. Remove the sock with the plant and rub speck all over the egg to make it look shiny. Happy Easter to all of you! @EuropeanTribalism

Hashtags

Learn RCRussian🤍💙❤️

@learnrcrussian · Post #4534 · 17.04.2025 г., 16:00

An online video demonstrating how to dye Easter eggs with red wine has become viral. The only thing: keep the wine in the pot, not in yourself! 🔻Here's how: ⚡️Pour any red wine into a pot with red eggs. ⚡️Bring to a boil and simmer for 10 minutes. ⚡️Then cool and put the pot with the eggs and wine into the fridge (not freezer!) for the night. ⚡️In the morning, place them on paper towels to dry. ⚡️The result is matte, shimmering Easter eggs with an unusual color. 🐣Happy Easter to all! #holidays #Easter 😎RCRussian | Support | Boost

TONlines – News

@tonlines · Post #6814 · 17.04.2025 г., 13:05

JetTon Games: Final Stage of Easter Treasure Hunt Tournament #JetTon#EASTER JetTon Games announces the final stage of the Easter Treasure Hunt Tournament with a total prize pool of €250,000. Participants can compete in various games like Hot Triple Sevens and The Greatest Catch Bonus Buy with a minimum bet of 0.2 EUR. This is the last opportunity to secure a position in the winners ranking. Source: link @tonlines

Learn RCRussian🤍💙❤️

@learnrcrussian · Post #4547 · 19.04.2025 г., 14:00

🙏🙏🙏Some Russian Easter mood for you: • Красить яйца (imperf.) [kra-sit' yay-tsa] To colour/dye eggs ❓А вы красите яйца на Пасху? Video: AIvikki_topneuro #AI #holidays #Easter 😎RCRussian | Support | Boost

Андрей Лаупер

@free4ones · Post #935 · 20.04.2025 г., 09:07

Как все изменилось за несколько сотен лет... Когда-то последователи скрывались в темных катакомбах, а сегодня сторонников учения бесчисленное множество — христианство прошло огромный путь, став одной из главных духовных сил мира. #пасха#easter

Tkong Channel

@tkong_channel · Post #121 · 19.04.2025 г., 12:38

🐰 Happy Easter from Tkong! 💐 Wishing you a peaceful and joyful spring. 🐰 Tkong 祝你復活節快樂! 💐 願這個春天帶來平安與喜悅。 #Easter#Tkong

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