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

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

AIGC

@aigcrubbish · Post #226 · 03.03.2026 г., 01:16

Høiland-Jørgensen: The inner workings of TCP zero-copy Toke Høiland-Jørgensen 发布了一篇关于 Linux 内核中零拷贝网络工作原理的概述。 核心机制在于,数据可以直接从用户空间内存复制到网络设备,无需经过内核缓冲区的额外拷贝。为了实现这一点,应用程序在调用 `sendmsg()` 系统调用后,必须保持待发送内存区域的内容不变,直到发送完成。`sendmsg()` 本身是异步的,会立即返回。当内核网络栈不再需要这些内存缓冲区时,会向用户空间发送一个通知,告知应用程序这些缓冲区可以被重新使用了。 原文链接:https://blog.tohojo.dk/2026/02/the-inner-workings-of-tcp-zero-copy.html #Linux#内核#网络#零拷贝#性能优化 #AIGC Read more

GitHub Trends

@githubtrending · Post #15209 · 09.10.2025 г., 14:30

#typescript#docker#docker_compose#linux#rdp#virtualization#windows WinBoat lets you run any Windows app on Linux with a smooth, native-like experience by running a full Windows system inside a Docker container using virtualization. It has an elegant interface and automates installation, so you just pick your settings and it handles the rest. You can run individual Windows apps seamlessly alongside Linux apps or access the full Windows desktop when needed. Your Linux files are easily shared with Windows, making file management simple. This helps you use Windows-only software on Linux without complicated setups, though it requires some system resources and setup steps like enabling virtualization and installing Docker. WinBoat is still in beta, so occasional bugs may occur. https://github.com/TibixDev/winboat

Linuxgram 🐧

@linuxgram · Post #18314 · 04.04.2026 г., 19:33

📰 Debian Is Figuring Out How Age Verification Laws Will Impact It With age verification/attestation laws down to the OS level enacted by California and being decided upon by other US states, it's been a hot topic of discussion in the open-source world. For the Debian project that is strictly volunteer/community-driven unlike various commercial Linux platforms, they are figuring out how such laws will impact them... 🔗 Source: https://www.phoronix.com/news/Debian-Undecided-Age-Laws #linux#opensource#debian

折腾实验室频道

@TossLabChannel · Post #428 · 22.12.2024 г., 14:32

#虚拟机#Orbstack#Docker#Linux 轻量级、高性能,OrbStack是你的Docker新选择! OrbStack 是一个为 macOS 用户量身定制的轻量级工具,能让你快速、高效地运行 Docker 容器和 Linux 虚拟机,是 Docker Desktop 的完美替代品。 主要优势: * 速度飞快: 启动速度比 Docker Desktop 快得多,让你节省更多时间。 * 轻量级: 资源占用少,不会拖慢你的电脑。 * 易于使用: 界面简洁,操作简单,即使是新手也能快速上手。 * 功能强大: 支持 Docker Compose 和 Kubernetes,满足各种开发需求。 为什么选择 OrbStack? * macOS 开发者必备: 如果你在 macOS 上进行开发,OrbStack 能显著提升你的开发效率。 * Docker 用户福音: 如果你经常使用 Docker,OrbStack 是一个更轻量级的选择。 * Linux 爱好者最爱: 如果你想在 macOS 上体验 Linux 环境,OrbStack 就能满足你。 📢 群聊: @TossLab 🎈 频道: @TossLabChannel ❤️不想错过精彩内容,请打开 #频道通知,你的 #阅读#点赞#转发 便是我发帖的最大动力!

Linuxgram 🐧

@linuxgram · Post #18727 · 09.05.2026 г., 20:48

📰 Parrot OS 7.2 Ships with Linux Kernel 6.19 and Copy Fail Fix Parrot OS 7.2 is now available with Linux kernel 6.19, updated security tools, Debian package sync, and Copy Fail mitigation. 🔗 Source: https://linuxiac.com/parrot-os-7-2-ships-with-linux-kernel-6-19-and-copy-fail-fix/ #debian#kernel#linux

Linuxgram 🐧

@linuxgram · Post #18347 · 08.04.2026 г., 08:08

📰 GParted Live 1.8.1-3 Released with Linux Kernel 6.19.10 and GParted 1.8.1 GParted Live 1.8.1-3 Debian-based live system for performing disk partitioning tasks using the GParted partition editor is now available for download with Linux kernel 6.19. 🔗 Source: https://9to5linux.com/gparted-live-1-8-1-3-released-with-linux-kernel-6-19-10-and-gparted-1-8-1 #linux#kernel#debian

Linuxgram 🐧

@linuxgram · Post #18112 · 19.03.2026 г., 11:13

📰 GParted Live 1.8.1 Released With Linux Kernel 6.19 GParted Live 1.8.1, a bootable Linux system for disk partitioning, is out with Linux kernel 6.19, Debian Sid updates, and the stable GParted 1.8.1 release. 🔗 Source: https://linuxiac.com/gparted-live-1-8-1-released-with-linux-kernel-6-19/ #kernel#linux#debian

Linuxgram 🐧

@linuxgram · Post #18068 · 15.03.2026 г., 19:33

📰 SparkyLinux 2026.03 Tiamat Released Based on Debian Testing Forky SparkyLinux 2026.03 has been released, featuring updated Debian Testing packages, Linux kernel 6.19, and refreshed rolling ISO images. 🔗 Source: https://linuxiac.com/sparkylinux-2026-03-tiamat-released-based-on-debian-testing-forky/ #kernel#debian#linux

Linuxgram 🐧

@linuxgram · Post #17805 · 17.02.2026 г., 09:56

📰 SparkyLinux 8.2 Released with Support for Linux Kernel 6.19, Updated Packages SparkyLinux 8.2 distribution is now available for download with support for Linux kernel 6.19, based on Debian 13 "Trixie". Here's what's new! 🔗 Source: https://9to5linux.com/sparkylinux-8-2-released-with-support-for-linux-kernel-6-19-updated-packages #linux#debian#kernel

互联E栈

@bcd8888 · Post #1230 · 28.06.2025 г., 11:24

#远程控制#工具#免费分享 #BilldDesk 一款开源免费的远程桌面控制软件, 可以通过网页或客户端实现对其他 设备的控制或仅观看功能。还具备 多屏操作、文件传输、连接鉴权等 多种实用功能。 支持平台:#Windows#macOS #Linux#Web#Android 🔘网址 :点击下载 🔊频道💬群组🎁福利📍导航

互联E栈

@bcd8888 · Post #1170 · 20.06.2025 г., 10:07

#订阅转换#订阅工具#互联E栈 #subs-check订阅合并转换检测 一个功能强大的订阅管理工具,主要用于订阅转换、测速、节点检测和流媒体解锁等功能。 可以通过该工具将不同格式的订阅(如clash、clash.meta、base64、QX等)进行转换,并支持节点的去重和重命名。 还提供了节点可用性检测、测速、解锁情况检查等功能,帮助优化网络连接和使用体验。 支持平台:#Windows#macOS#Linux 🔘下载:点击下载 🔊频道💬群组🎁福利📍导航

Linuxgram 🐧

@linuxgram · Post #18060 · 14.03.2026 г., 17:48

📰 Google Now Using AutoFDO To Enhance Android's Linux Kernel Performance Google's Android LLVM toolchain team shared publicly this week that they have begun making use of AutoFDO for automatic feedback directed optimizations of their Linux kernel build used by Android... 🔗 Source: https://www.phoronix.com/news/Android-Using-Linux-AutoFDO #kernel#android#linux

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