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 #18204 · 26.03.2026 г., 18:07

📰 Open-Source Nouveau Performance With Linux 7.0 + NVK Mesa 26.1-dev vs. NVIDIA Linux Driver As a few months have passed since our prior round of testing the fully open-source NVIDIA Linux driver stack with the Nouveau kernel driver and Mesa NVK Vulkan driver plus Zink, here is a fresh round of benchmarks using Linux 7.0 and Mesa 26.1-dev compared to the open-source stack shipped by Ubuntu 25.10 (Linux 6.17 + Mesa 25.2) for showing how far the open-source NVIDIA driver has progressed the past few months. 🔗 Source: https://www.phoronix.com/review/linux-70-nouveau #opensource#ubuntu#linux#kernel

Linuxgram 🐧

@linuxgram · Post #18619 · 29.04.2026 г., 18:28

📰 The Intel Lunar Lake CPU Performance Gains On Linux Over The Past Year Recently I ran benchmarks looking at the Xe2 graphics performance gains on Intel Lunar Lake over the past year with what's shipped by Ubuntu and comparing against our original tests of the Lenovo ThinkPad X1 Carbon Gen 13 Aura Edition. With those Lunar Lake iGPU benchmarks out of the way, here is a look at how the Lunar Lake CPU performance has evolved on Linux since April 2025. 🔗 Source: https://www.phoronix.com/review/intel-lunar-lake-ubuntu-2604 #intel#linux#ubuntu

Linuxgram 🐧

@linuxgram · Post #18647 · 01.05.2026 г., 19:38

📰 First Arch Linux ISO Powered by Linux Kernel 7.0 Is Now Available for Download Arch Linux 2026.05.01 is now available for download as Arch Linux’s ISO release for May 2026, powered by Linux kernel 7.0 and featuring an improved installation experience. 🔗 Source: https://9to5linux.com/first-arch-linux-iso-powered-by-linux-kernel-7-0-is-now-available-for-download #arch#kernel#linux

Linuxgram 🐧

@linuxgram · Post #18223 · 28.03.2026 г., 16:34

📰 SystemRescue 13 Released With Linux Kernel 6.18 and GParted 1.8.1 SystemRescue 13, based on Arch, updates to Linux kernel 6.18, enhances HiDPI support, and upgrades core tools such as GParted and bcachefs. 🔗 Source: https://linuxiac.com/systemrescue-13-released-with-linux-kernel-6-18-and-gparted-1-8-1/ #linux#kernel#arch

Linuxgram 🐧

@linuxgram · Post #17939 · 01.03.2026 г., 20:34

📰 Arch Linux March ISO Is Out With Kernel, Desktop, and Security Updates Arch Linux has released its updated March 2026 installation ISO, bringing a new kernel, refreshed system libraries, desktop updates, and security fixes. 🔗 Source: https://linuxiac.com/arch-linux-march-iso-is-out-with-kernel-desktop-and-security-updates/ #linux#arch#kernel

AIGC

@aigcrubbish · Post #257 · 19.03.2026 г., 01:29

[$] BPF comes to io_uring at last Linux 内核的异步 I/O 接口 io_uring 通过两个共享环形缓冲区与用户空间通信:提交队列用于发送请求,完成队列则存放结果。尽管共享内存减少了大量开销,但内核仍需切换至用户空间以处理完成事件并提交后续工作,这仍会产生开销。 Pavel Begunkov 提交的补丁集旨在最小化这一开销。它允许开发者使用 BPF 程序扩展 io_uring 的事件循环,使程序能直接响应完成事件并提交后续工作项,无需切换至用户空间。该补丁集已开发很长时间,现已被内核社区接受。 这一改进将进一步提升 io_uring 的高性能 I/O 处理能力。 原文链接:https://lwn.net/Articles/1062286/ #Linux#内核#io_uring#BPF#性能优化 #AIGC Read more

AIGC

@aigcrubbish · Post #295 · 03.04.2026 г., 15:52

[$] Ubuntu's GRUBby plans GNU GRUB 2 是 x86_64 Linux 系统上最广泛使用的引导加载程序,支持从多种文件系统读取、处理 UEFI 或传统 BIOS 启动,并允许用户自定义启动画面。然而,这些功能也带来了代价:GRUB 多年来存在一系列安全漏洞。 为缓解部分问题,Ubuntu 核心开发者 Julian Andres Klode 提议在 Ubuntu 26.10 中移除 GRUB 的若干功能,以提升其安全性。但该提议并未获得一致认可,许多被建议移除的功能拥有坚定的支持者。 原文链接:https://lwn.net/Articles/1065420/ #Linux#Ubuntu#GRUB#安全#引导加载程序 #AIGC Read more

Libreware

@libreware · Post #1579 · 19.04.2026 г., 21:15

Speech Note #Linux desktop and #Sailfish OS app for note taking, reading and translating with offline #Speech to Text #stt, Text to Speech #tts and Machine #Translation https://github.com/mkiol/dsnote MPL-2.0 license https://github.com/mkiol/dsnote#how-to-install Speech Note let you take, read and translate notes in multiple languages. It uses Speech to Text, Text to Speech and Machine Translation to do so. Text and voice processing take place entirely offline, locally on your computer, without using a network connection. Your privacy is always respected. No data is sent to the Internet. Speech Note uses many different processing engines to do its job. Currently these are used: Speech to Text (STT) Coqui STT (a fork of Mozilla DeepSpeech) Vosk whisper.cpp Faster Whisper april-asr Text to Speech (TTS) espeak-ng MBROLA Piper RHVoice Coqui TTS Mimic 3 WhisperSpeech Kokoro Parler-TTS F5-TTS S.A.M. Machine Translation (MT) Bergamot Translator

Libreware

@libreware · Post #1192 · 06.10.2023 г., 11:18

#Linux Desktop application that provides live #captioning FUTO Fellowship program interview; linux captions software 👉 Live Captions github: https://github.com/abb128/LiveCaptions 🔵 Q&A w/ billionaire alt-tech investor/philanthropist Eron Wolf https://www.youtube.com/watch?v=OJPmbcU-Vzo 🔵 FUTO Fellows program: https://futo.org/fellows/ 🔵 FUTO Youtube channel - @futotech ⚠️ Google's breaches of privacy have gone TOO FAR! https://www.youtube.com/watch?v=_vWAF13KigI #speech#recognition#stt#voice

AIGC

@aigcrubbish · Post #170 · 02.02.2026 г., 15:51

[$] Modernizing swapping: introducing the swap table Linux 内核的交换子系统(swap)是内存管理的关键部分,但代码复杂且性能影响大。在 2025 年 Linux 存储、文件系统、内存管理与 BPF 峰会上,Kairui Song 提出了一个简化和优化交换代码的计划。该计划的第一部分已在 6.18 内核版本中合并,由 Chris Li 协助完成。本文介绍了 6.18 中的初步改动,为后续更深入的优化奠定了基础。 原文链接:https://lwn.net/Articles/1056405/ #Linux#内核#内存管理#交换子系统#性能优化 #AIGC Read more

Dasturlash hayoti️️ ️

@dasturlash_hayoti · Post #3673 · 14.02.2025 г., 05:57

💻DevOps va IT bo‘yicha muhim qo‘llanma to‘plami! 🚀 Muhim mavzular bo‘yicha tezkor va qulay cheat-sheet (shpargalkalar) to‘plami. DevOps va IT mutaxassislari uchun juda foydali! 📌Ichiga oladi: — Nginx — Docker — Ansible — Python — Go (Golang) — Git — Regular Expression (Regex) — PowerShell — VIM — Jenkins — CI/CD (Continuous Integration & Continuous Delivery) — Kubernetes — Linux — Redis — Slack — Puppet — Google Cloud Developer — PostgreSQL — Ajax — Amazon Web Services (AWS) 📥Bepul yuklab olish... #CheatSheet#DevOps#IT#Linux#Docker#Kubernetes 💻@dasturlash_hayoti — bir xatoni tuzatib, ikkinchisiga tayyorlanish! 😅

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