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

Резултати

Пронајдени 1,453 слични објави

Глобално пребарување

Linuxgram 🐧

@linuxgram · Post #18132 · 21.03.2026 г., 13:58

📰 Linux 7.0 Lands Fix For Years Old Bug Affecting AMD Hainan GPUs Merged overnight for Linux 7.0 and set to be back-ported to existing Linux stable kernel versions is a fix for aging AMD GCN 1.0 "Hainan" GPU models. This closes a 2021 bug report that was long neglected and ended up being just a small tweak to fix the issue reported of GPU hangs... 🔗 Source: https://www.phoronix.com/news/AMD-Hainan-Fix-Linux-7.0 #kernel#amd#linux

Linuxgram 🐧

@linuxgram · Post #18118 · 19.03.2026 г., 23:26

📰AMD Preps More GFX12.1 Enablement For Linux 7.1, Initial VCN 5.0.2 & JPEG 5.0.2 IP AMD today sent out another batch of AMDGPU kernel graphics driver and AMDKFD kernel compute driver changes to DRM-Next ahead of next month's Linux 7.1 merge window... 🔗 Source: https://www.phoronix.com/news/AMD-More-GFX12.1-Linux-7.1 #kernel#linux#amd

Linuxgram 🐧

@linuxgram · Post #18073 · 16.03.2026 г., 12:43

📰 AMD Preps More Graphics Driver Code For Linux 7.1 Last week yet more AMDGPU kernel graphics driver updates were submitted to DRM-Next ahead of the Linux 7.1 merge window happening in April... 🔗 Source: https://www.phoronix.com/news/More-AMDGPU-For-Linux-7.1 #linux#kernel#amd

Linuxgram 🐧

@linuxgram · Post #18032 · 11.03.2026 г., 18:47

📰AMD Ryzen AI NPUs Are Finally Useful Under Linux For Running LLMs Over the past two years AMD has developed the AMDXDNA accelerator driver in the mainline Linux kernel for supporting the AMD Ryzen AI NPUs. But when it comes to user-space software on Linux actually able to leave the Ryzen AI NPUs it's been... extremely limited with nothing really useful besides some niche bits of code. Even AMD's own software like their GAIA on Linux has used Vulkan with their iGPUs rather than any NPU support. 🔗 Source: https://www.phoronix.com/news/AMD-Ryzen-AI-NPUs-Linux-LLMs #kernel#linux#amd

Linuxgram 🐧

@linuxgram · Post #17964 · 04.03.2026 г., 14:56

📰Linux Preps IBPB-On-Entry Feature For AMD SEV-SNP Guest VMs Heading toward the Linux 7.0 kernel and marked for back-porting to current stable Linux kernel versions is employing a new SEV-SNP security feature found on AMD Zen 5 processors for enhancing security of guest virtual machines... 🔗 Source: https://www.phoronix.com/news/AMD-IBPB-On-Entry-SNP-VMs #linux#amd#kernel

Linuxgram 🐧

@linuxgram · Post #17958 · 04.03.2026 г., 07:05

📰 AMD DPTCi Driver Posted For Linux To Better Enhance Ryzen Gaming Handhelds A request for comments (RFC) patch series was posted today to the Linux kernel mailing list to introduce the AMD Dynamic Power and Thermal Configuration Interface "DPTCi" driver. With this driver it would provide better upstream Linux kernel support for tuning the power / performance / thermals of modern Ryzen-powered gaming handheld devices. 🔗 Source: https://www.phoronix.com/news/AMD-DPTCi-Linux-Driver #linux#amd#kernel

Linuxgram 🐧

@linuxgram · Post #17931 · 28.02.2026 г., 19:01

📰AMD Prepares Linux For Instruction-Based Sampling Improvements With Zen 6 A set of patches recently posted to the Linux kernel mailing list have now been queued up to a tip/tip.git branch for planned introduction in Linux 7.1. These patches are for enhancing the Linux perf subsystem support for AMD Instruction-Based Sampling (IBS) improvements with next-gen Zen 6 processors... 🔗 Source: https://www.phoronix.com/news/Linux-Perf-AMD-IBS-Zen-6 #amd#linux#kernel

Linuxgram 🐧

@linuxgram · Post #17893 · 25.02.2026 г., 09:18

📰 AMD Posts Linux Patches For SEV-SNP BTB Isolation It's quite a mouthful but today AMD posted Linux kernel patches for preparing SEV-SNP BTB isolation support for further enhancing the security of virtual machines (VMs) for confidential computing... 🔗 Source: https://www.phoronix.com/news/AMD-SEV-SNP-BTB-Isolation #amd#linux#kernel

Linuxgram 🐧

@linuxgram · Post #17817 · 17.02.2026 г., 21:46

📰 AMD Preparing Linux Kernel For "RMPOPT" To Help Reduce Overhead On SEV-SNP Servers AMD sent out a set of Linux kernel patches today for enabling use of a new instruction dubbed RMPOPT. Given the timing of these patches, RMPOPT is presumably a feature coming with next-gen AMD EPYC Zen 6 "Venice" processors... 🔗 Source: https://www.phoronix.com/news/AMD-RMPOPT-Linux #linux#kernel#amd

AIGC

@aigcrubbish · Post #287 · 31.03.2026 г., 15:51

[$] The role of LLMs in patch review Linux 内核补丁审查中引入 LLM 工具 Sashiko 引发争议。内存管理维护者 Andrew Morton 提议修改审查流程,要求补丁作者必须回应 Sashiko 的反馈,但遭到其他子维护者的反对。讨论焦点在于如何及何时采用此类 AI 工具,其影响可能波及内核其他部分。 原文链接:https://lwn.net/Articles/1064830/ #Linux#内核开发#AI工具#代码审查 #AIGC Read more

AIGC

@aigcrubbish · Post #107 · 18.12.2025 г., 01:34

[$] Going boldly into the COSMIC desktop environment 经过三年开发,Linux硬件供应商System76已宣布COSMIC桌面环境稳定。12月11日,该公司在万众期待的Pop!_OS 24.04 LTS版本中发布了COSMIC Epoch 1,正好让Linux爱好者在年底假期有东西可折腾。随着稳定版的推出,现在是重新审视COSMIC的好时机,看看它自首个Alpha版本以来的演变。作为新桌面环境的首次稳定发布,COSMIC展现出巨大潜力和成长空间。 原文链接:https://lwn.net/Articles/1050268/ #Linux#桌面环境#System76#开源 #AIGC Read more

12•••8788899091•••100•••121122
ПретходнаСтраница 89 од 122Следна