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

Резултати

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

Пребарај: #futo

当前筛选 #futo清除筛选
Libreware

@libreware · Post #1455 · 03.05.2025 г., 22:27

#FUTO#Keyboard Updates: The Swipe Dataset is Public! https://peertube.futo.org/videos/watch/44d2e41a-307b-49ab-9a14-1e2e1eaa9a94 You can access the dataset here: https://huggingface.co/datasets/futo-org/swipe.futo.org More info about FUTO Keyboard https://t.me/Libreware/1299 You can learn more about FUTO here: https://futo.org

Libreware

@libreware · Post #1452 · 03.05.2025 г., 11:47

FUTO is launching a new open-source software distribution project: the FUTOcore Software Store. https://www.bitchute.com/video/dVmDId8GPn8b/ You can learn more about FUTOcore and participate in our survey here: https://futocore.futo.org/ This talk was given by Adam Jesionowski on March 15 during FUTO's Don't be Evil Conference #futo#apk#store

Libreware

@libreware · Post #1299 · 29.06.2024 г., 08:35

FUTO Keyboard Keyboard being developed, forked from the AOSP keyboard. The goal is to create a good, customizable keyboard that doesn't sacrifice on privacy or freedoms. If you're testing this, please join either the Discord server or the FUTO chat. Your feedback is valuable during this testing period https://keyboard.futo.org https://gitlab.futo.org/alex/keyboard-wiki/-/wikis/FUTO-Keyboard https://github.com/futo-org/android-keyboard/issues https://app.futo.org/fdroid/repo?fingerprint=39D47869D29CBFCE4691D9F7E6946A7B6D7E6FF4883497E6E675744ECDFA6D6D Solving #Google's #Keyboard Privacy Issue: Introducing Offline #voice to text & #keyboard from #FUTO https://odysee.com/solving-google's-keyboard-privacy-issue#7b51783c3bb27a967223ac3a7c3eb756267b1594 https://github.com/abb128/LiveCaptions https://www.nytimes.com/2022/08/21/technology/google-surveillance-toddler-photo.html https://youtu.be/r09Hm2zd2lY https://www.youtube.com/watch?v=_vWAF13KigI 👉 Rossmann chat: https://matrix.to/#/#rossmannrepair:matrix.org #futo#android#keyboard

Libreware

@libreware · Post #1312 · 29.07.2024 г., 14:12

Harbor Decentralized p2p identity verification system. Identity management application written, targeting iOS, and Android, built on Polycentric. Create pseudonymous identities, make claims, link identities across applications. Checkout harbor.social, or docs.polycentric.io for more information What is Harbor and How it Works: https://peertube.futo.org/w/939a212d-920f-4411-b9b6-d60aa4ef4db7 https://gitlab.futo.org/polycentric/harbor/ #p2p#id#verification#futo