小编exp*_*101的帖子

如何在 Python 中监控每个进程的网络使用情况?

我正在寻求解决我的互联网问题,因此我需要一种方法来跟踪我的延迟以及哪个应用程序正在使用多少网络带宽。

我已经解决了检查延迟的问题,但现在我需要一种方法来监视每个进程的网络使用情况(KB/秒),就像它在 Windows 任务管理器中的显示方式一样。

在您建议一个程序之前,除非它能够用时间戳记录值,否则这不是我想要的。我要求采用 Pythonic 方式,因为我需要同时记录网络带宽和延迟值,以便我可以确定特定进程是否导致延迟峰值。

所以这是我需要的信息:

时间 | 进程 ID | 进程名称| 向下使用 | 增加使用量 | 网络延迟 |

另外,请不要链接到另一个 Stackoverflow 问题,除非您知道他们的解决方案有效。我已经查过很多了,但没有一个起作用,这就是我再次询问的原因。

python networking

6
推荐指数
1
解决办法
2100
查看次数

如何获取提到的用户的 ID (Discord.py)

@bot.command()
async def id(ctx, a:str): #a = @user
Run Code Online (Sandbox Code Playgroud)

我如何获取命令中提到的用户的 ID,并将其输出为:

await ctx.send(id)
Run Code Online (Sandbox Code Playgroud)

python-3.x discord.py

1
推荐指数
1
解决办法
2万
查看次数

如何抑制来自 Tensorflow 的所有签名警告?

我收到一个警告,我找不到解决办法。显然是这样的:

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'  # or any {'0', '1', '2'}
import tensorflow as tf
os.environ['AUTOGRAPH_VERBOSITY'] = '1'
Run Code Online (Sandbox Code Playgroud)

不足以阻止这条烦人的消息:

WARNING:tensorflow:AutoGraph could not transform <function Model.make_train_function.<locals>.train_function at 0x00000281A55264C8> and will run it as-is.
Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output.
Cause: Bad argument number for Name: 4, expecting 3
To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convert
Run Code Online (Sandbox Code Playgroud)

每个纪元后都会弹出。

是的,我装饰了我拥有的每一个功能 @tf.autograph.experimental.do_not_convert,但消息仍然弹出。我目前正在使用 …

python python-3.x keras tensorflow

1
推荐指数
1
解决办法
626
查看次数

标签 统计

python ×2

python-3.x ×2

discord.py ×1

keras ×1

networking ×1

tensorflow ×1