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

Резултати

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

Пребарај: #metrics

当前筛选 #metrics清除筛选
TONlines – News

@tonlines · Post #7016 · 01.05.2025 г., 18:08

⚡️swap.coffee: Impressive April 2025 Metrics #swap#metrics Swap.coffee shared its growth metrics for April 2025, showing a transaction volume of nearly $18 million, 37,129 transactions, and 5,934 unique users. The team expresses gratitude for the ongoing support from their community. Source: link @tonlines

GitHub Trends

@githubtrending · Post #14948 · 11.07.2025 г., 12:30

#go#logging#metrics#opentelemetry#tracing OpenTelemetry-Go is a tool for Go applications that helps you track how your software performs by collecting data like traces and metrics, then sending this information to monitoring platforms so you can see what’s happening inside your app in real time[2][3][4]. It works on many operating systems and Go versions, and you can use it by adding a few lines of code to your app and setting up an exporter. This makes it much easier to find and fix problems, understand how your app is running, and keep everything reliable and fast[2][3][4]. https://github.com/open-telemetry/opentelemetry-go

Sliverkissの废弃文化研究所

@sliverkiss_blog · Post #390 · 04.07.2025 г., 12:32

Scripting 对接 ☁ Cloudflare Workers/Pages Functions Metrics 🙏 高产群友 001 的投稿 小组件参数: 第一行 email 第二行 accountId 第三行 global api token 文件见评论区 相关: Scriptable 版 🤭小组件合集🧐频道资源合集😄恰饭推荐💬群组 🥰#scripting#widget#小组件#cloudflare#cf#pages#workers#function#metrics#数据#统计#请求数

Venture Village Wall 🦄

@venturevillagewall · Post #4266 · 28.02.2025 г., 07:00

AI Predictions: From Vacuums to Real Impact AI-powered prediction platforms are gaining traction, with a focus on forecasting reactions based on content and audience. Initial predictions using tools like ChatGPT yield 17% accuracy, but considering audience interactions can boost accuracy to 83%. This innovative approach helped a startup refine its pitch to enter Y Combinator. Discover more insights on enhancing prediction accuracy in various fields here. #AI#Startup#Prediction#YCombinator#Marketing#Innovation#Tech#Growth#Entrepreneurship#Forecasting#AudienceAnalysis#DataScience#MachineLearning#Success#Business#Trends#Platforms#Metrics#Investment#VC