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

Резултати

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

Пребарај: #k33

当前筛选 #k33清除筛选
SIGNAL

@finsignal · Post #3555 · 27.09.2024 г., 12:43

#Altseason is close: altcoin capitalization is preparing a breakout from the descending channel The guys from #K33#Research are waiting for a new maximum capitalization of the crypto market soon, because 1,051 days have passed since the previous #ATH, and the longest period is 1,106 days. Meanwhile, #BTC is again trying to break through and gain a foothold above $66k

Venture Village Wall 🦄

@venturevillagewall · Post #3605 · 20.12.2024 г., 18:00

K33 Predicts Bull Run Peak Date 📈 K33 analysts forecast the peak date of the bull run. ⚖️ Craig Wright receives a conditional sentence for contempt of court. 💵 VC investors are retreating from crypto as the market shifts. 📊 Bitcoin's failure at $100K triggered over $1 billion in liquidations. 🐋 El Salvador expands Bitcoin purchases despite IMF deal. 💬 Tornado Cash co-founder demands dismissal of charges. 👾 Ilya Lichtenstein claims sole responsibility for Bitfinex hack. 💰 Cryptopia clients received $225 million in assets from liquidators. ✅ SEC approves first hybrid ETFs based on Bitcoin and Ethereum. 👁 German regulator orders World to delete user data. 👀 Investors file a lawsuit against the HAWK token team. ⚽️ American football player to receive part of salary in Bitcoin. 🚀 Cathie Wood confirms Bitcoin price prediction above $1 million. #K33#CraigWright#Crypto#Bitcoin#Liquidations#ElSalvador#TornadoCash#Bitfinex#Cryptopia#SEC#ETFs#Germany#HAWK#Football#CathieWood#Investors#Funding#VentureCapital#Market#Investments

Venture Village Wall 🦄

@venturevillagewall · Post #3602 · 20.12.2024 г., 17:03

Crypto Highlights: Recent Developments 📈 K33 analysts have predicted the peak date of the bull run. ⚖️ Craig Wright received a conditional sentence for contempt of court. 💵 VC investors are leaving crypto, while crypto distances itself from VC investors. 📊 A Bitcoin crash at $100,000 led to over $1 billion in liquidations. 🐋 El Salvador expanded its Bitcoin purchases despite an IMF deal. 💬 Tornado Cash co-founder demands charges be dropped. 👾 Ilya Lichtenstein claims sole responsibility for the Bitfinex hack. 💰 Cryptopia clients received $225 million in assets from liquidators. ✅ SEC approved the first hybrid ETFs based on Bitcoin and Ethereum. 👁 German regulator ordered World to delete user data. 👀 Investors sued the team behind the HAWK token. ⚽️ An American football player will receive part of his salary in Bitcoin. 🚀 Cathy Wood confirmed her Bitcoin price prediction exceeds $1 million. 🤑 Colin Wu shared the success story of a 24-year-old crypto trader. #K33#CraigWright#VC#Bitcoin#Liquidation#ElSalvador#TornadoCash#Bitfinex#Cryptopia#SEC#ETFs#Germany#HAWK#Football#CathyWood#CryptoTrader#CryptoNews#Investments#MarketTrends#CryptoRegulation#Blockchain