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 слични објави

Пребарај: #fastai

当前筛选 #fastai清除筛选
ChatGPT AI Technology News

@chatgpt_officialnews · Post #49 · 19.03.2025 г., 14:59

🚀Say Hello to GPT-O3 Mini – Small but Mighty!🧠💡 Need a lightweight AI that’s still smart? GPT-O3 Mini is your go-to choice! ⚡️🎯 ✨What makes it great? 🟢 Super Fast – Perfect for quick chats & short tasks! 🟢 Energy Efficient – Uses minimal resources but delivers big! 🟢 Great for Simple Tasks – Ask questions, get answers, and enjoy AI on the go! 💡How to use it? Simply type: 🔹 /model – Select GPT-O3 Mini for a fast & smooth AI experience! 🔹 Need help? @OpenAI_helpdesk 🔹 Join the discussion: https://t.me/chatgpt_officialchat 🔥 Try GPT-O3 Mini now and enjoy AI in its lightest form! ➖➖➖➖🔻 💎@Chatgpt_OfficialNews – Stay Updated! ⚡️ 🧠 BOT: @Chatgpt_OfficialBOT #️⃣#GPT#GPT-O3Mini #FastAI#LightweightAI#SmartTech ➖➖➖➖🔺

ChatGPT AI Technology News

@chatgpt_officialnews · Post #48 · 18.03.2025 г., 15:59

🚀 Meet GPT-O1 – The Fast & Reliable AI! 🤖 ⚡️ Looking for a quick, efficient AI for everyday tasks? GPT-O1 is here to help! 🧠💡 ✨What can it do? ✅ Fast & Lightweight – Get instant answers without delays! ✅ Smart & Efficient – Perfect for casual chats, summaries, and quick responses. ✅ Low-latency AI – Works seamlessly even on lower-end devices. 💡How to use it? Simply type: 🔹 /model – Select GPT-O1 for speed & efficiency! 🔹 Need help? @OpenAI_helpdesk 🔹 Join the discussion: https://t.me/chatgpt_officialchat 🔥 Try GPT-O1 now and experience smooth AI interactions! ➖➖➖➖🔻 💎@Chatgpt_OfficialNews – Stay Updated! ⚡️ 🧠 BOT: @Chatgpt_OfficialBOT #️⃣#GPT#GPT-O1 #FastAI#SmartChat#AI#NextGen ➖➖➖➖🔺

ChatGPT AI Technology News

@chatgpt_officialnews · Post #50 · 20.03.2025 г., 04:36

📱Google:"Hey guys, wait for us! We have an AI chatbot too… it’s just not ready yet!" 📱GPT-4 gang:Silence. Judging. Side-eyes. 📱GPT-4 gang:Unanimous rejection with the ultimate thumbs-down 📱Google:Left standing like a kid who brought a calculator to a sword fight AI wars are brutal—either you launch big or get left behind! 📇Share ➖➖➖➖🔻 💎@Chatgpt_OfficialNews – Stay Updated! ⚡️ 🧠 BOT: @Chatgpt_OfficialBOT #️⃣#GPT#Fun#FastAI#SmartTech#Meme#Joke ➖➖➖➖🔺