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

Пребарај: #edl

当前筛选 #edl清除筛选
Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #254 · 01.03.2024 г., 05:33

EDL Unbrick Guide | Nothing Phone (2) [Outdated] Did you mess up your device playing around with flashing tools or pull a "fastboot erase xbl" dance move? Maybe this can help🤣 ⬇️ Download: Links dead 🗒 XDA Thread: Here 🏷 Tags: #Unbrick#EDL ❗️ Requirements: - You need be on a machine running Windows. - Make sure to install the appropriate Qualcomm EDL drivers (Import the .inf file manually after extracting) - If your device can access the bootloader / fastboot, you can proceed using the stock cable. - If your device is unresponsive and cannot be triggered into EDL mode with a button press, a v2 EDL cable is required. ✍️ Instructions: 1. Download the file from the link above. 2. Extract the package. Password is password. 3. Open the NothingFlashTool.exe and run it and then select your phone. 4. Power off your Nothing Phone 2 and then press and hold both the volume keys together to boot into EDL mode. If it does not shows up as Qualcomm HS-USB 9008 under device manager then please install the drivers. For EDL mode volume keys shall work or else you can use a modified cable. 5. Click on Start Button to Flash the phone and let the flashing complete. The phone shall automatically reboot after flash is complete. Note: - Target NOS version post successful flashing is 2.5.1. - DIY for EDL Cable - If the tool stops working or you mess up, dont blame the management here. We dont have any responsibility for the same! 🤓 Provided by: Pong TG Development Team 👤 Posted by: Mvikrant 🐙 Pong Community » CLICK HERE

Hashtags

EU in Kazakhstan 🇪🇺🇰🇿

@euinkazakhstan · Post #190 · 26.09.2022 г., 08:03

Today the European Day of Languages. This day means promoting awareness among the general public of the importance of language learning and protecting linguistic heritage. Did you know that the 🇪🇺EU has 24 official languages? They are: Bulgarian, Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, German, Greek, Hungarian, Irish, Italian, Latvian, Lithuanian, Maltese, Polish, Portuguese, Romanian, Slovak, Slovenian, Spanish and Swedish. **** Бүгін Еуропалық тілдер күні. Бұл күн жалпы қоғамның арасында тіл үйренудің және тілдік мұраны қорғаудың маңыздылығын насихаттайды. 🇪🇺Еуропалық Одақта 24 ресми тіл бар екенін білесіз бе? Олар: болгар, хорват, чех, дат, нидерланд, ағылшын, эстон, фин, француз, неміс, грек, венгр, ирланд, итальян, латыш, литва, мальта, поляк, португал, румын, словак, словен, испан және швед тілдері. #europeandayoflanguages#EDL