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

Пребарај: #quiet

当前筛选 #quiet清除筛选
Libreware

@libreware · Post #1463 · 10.06.2025 г., 18:31

Quiet v5.1.2 => https://tryquiet.org/ Quiet is an alternative to team chat apps like Slack, Discord, and Element that does not require trusting a central server or running one's own. In Quiet, all data syncs directly between a team's devices over Tor with no server required. NOTE: #Quietis not audited and should not be used when privacy and security are critical. It lacks basic features and probably won't replace your Slack or Discord yet. That said, it works surprisingly well and we use it daily as a Slack replacement. => https://github.com/TryQuiet/quiet/releases/tag/%40quiet/desktop%405.1.2 => https://github.com/TryQuiet/quiet/releases/tag/%40quiet/mobile%405.1.2 via @dcntr #Tor#IPFS

Libreware

@libreware · Post #1232 · 22.02.2024 г., 11:58

Quiet Encrypted p2p team chat with no servers, just Tor. https://tryquiet.org/index.html https://github.com/TryQuiet/quiet Currently in developpement stage so be cautious of your data Quiet is an alternative to team chat apps like Slack, Discord, and Element that does not require trusting a central server or running one's own. In Quiet, all data syncs directly between a team's devices over Tor with no server required. No email or phone number required, Unlike #Slack, #Discord, #WhatsApp, #Telegram, and #Signal, no email or phone number is required to create or join a #community. End-to-end encryption, All data is #encrypted end-to-end between member devices, using Tor. Channels, Organize chats in Slack-like channels, so conversations don't get messy. Images, Send and receive images, with copy/paste, drag & drop, and image previews. Files, Send and receive files of unlimited size! Notifications, Invite links, Keyboard controls, Desktop apps Android, Quiet works on Android, and F-Droid support is on the way. #E2E#Chat#Quiet#Tor