semvec/pypi-packages huggingface dataset:
nvsmifs 1.1.0
A (user-)friendly wrapper to nvidia-smi
License: MIT
Requires Python: <4.0,>=3.6
Keywords: nvidia, gpu, nvidia-smi, cli, hardware, monitoring

---

# nvsmifs

A user-friendly wrapper for `nvidia-smi`, forked from [pmav99's repository](https://github.com/pmav99), with added support for fan speed and power draw monitoring. This tool is particularly useful in multi-GPU systems, allowing you to filter GPUs based on resource usage (e.g., selecting the least utilized GPU).

---

## Features

- **Enhanced GPU Monitoring**: Includes fan speed and power draw metrics.
- **Resource-Based Filtering**: Easily identify the least utilized GPU in your system.
- **Flexible Usage**: Use as a CLI tool or integrate it as a Python library.

---

## Table of Contents

1. [Usage](#usage)
   - [CLI](#cli)
   - [Library](#library)
2. [Quick Example: GPU Info](#quick-example-gpu-info)
3. [Prerequisites](#prerequisites)
4. [Installation](#installation)
   - [Using pipx (Recommended)](#using-pipx-recommended)
   - [Using pip](#using-pip)
5. [Contributing](#contributing)
6. [License](#license)

---

## Usage

### CLI

Run the following commands to explore available options:

```shell
nvsmifs --help
nvsmifs ls --help
nvsmifs ps --help
```

### Library

You can also use `nvsmifs` as a Python library for more advanced workflows:

```python
import nvsmifs

gpus = nvsmifs.get_gpus()
available_gpus = nvsmifs.get_available_gpus()
gpu_processes = nvsmifs.get_gpu_processes()
```

---

## Quick Example: GPU Info

Here's a simple Python function to display detailed GPU information:

```python
import nvsmifs

def gpu_info():
    for gpu in nvsmifs.get_gpus():
        if gpu.display_active == 'Enabled':
            gpu_details = (
                f"ID: {gpu.id}, Power: {gpu.power_draw}W, "
                f"Name: {gpu.name}, Temp: {gpu.temperature}°C, "
                f"Fan Speed: {gpu.fan_speed}%, Utilization: {gpu.gpu_util}%"
            )
            print(gpu_details)

gpu_info()
```

Output example:

```
ID: 0, Power: 50W, Name: NVIDIA GTX 1080, Temp: 65°C, Fan Speed: 30%, Utilization: 20%
```

---

## Prerequisites

Ensure the following requirements are met before using `nvsmifs`:

- An NVIDIA GPU
- `nvidia-smi` installed and accessible
- Python 2.7 or 3.6+

---

## Installation

### Using pipx (Recommended)

The recommended installation method is via [pipx](https://github.com/pipxproject/pipx). Install `nvsmifs` with:

```shell
pipx install nvsmifs
```

This creates a virtual environment in `~/.local/pipx/venvs/nvsmifs` and adds the `nvsmifs` executable to `~/.local/bin`.

### Using pip

Alternatively, install directly with pip:

```shell
pip install --user nvsmifs
```

---

## Contributing

Contributions are welcome! If you'd like to improve this project, please:

1. Fork the repository.
2. Create a feature branch.
3. Submit a pull request with a clear description of your changes.

---

## License

This project is licensed under the MIT License. See the LICENSE file for details.

---
bubop 0.2.4a0
Bergercookie's Useful Bits Of Python
License: MIT
Requires Python: <3.14,>=3.10.0
Keywords: utilities, utils

# bubop - Bergercookie's Useful Bits Of Python

<a href="https://github.com/bergercookie/bubop/actions" alt="CI">
<img src="https://github.com/bergercookie/bubop/actions/workflows/ci.yml/badge.svg" /></a>
<a href="https://github.com/pre-commit/pre-commit">
<img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white" alt="pre-commit"></a>

<a href='https://coveralls.io/github/bergercookie/bubop?branch=master'>
<img src='https://coveralls.io/repos/github/bergercookie/bubop/badge.svg?branch=master' alt='Coverage Status' /></a>
<a href="https://github.com/bergercookie/bubop/blob/master/LICENSE.md" alt="LICENSE">
<img src="https://img.shields.io/github/license/bergercookie/bubop.svg" /></a>
<a href="https://pypi.org/project/bubop/" alt="pypi">
<img src="https://img.shields.io/pypi/pyversions/bubop.svg" /></a>
<a href="https://badge.fury.io/py/bubop">
<img src="https://badge.fury.io/py/bubop.svg" alt="PyPI version" height="18"></a>
<a href="https://pepy.tech/project/bubop">
<img alt="Downloads" src="https://pepy.tech/badge/bubop"></a>
<a href="https://github.com/psf/black">
<img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>

## Description

This is a collection of python utilities that I seem to be re-writing again and
again in all new python projects of mine.

## Installation

Just install this with pip:

```sh
pip install --user bubop

# Or via poetry as a dependency
poetry add bubop
```
capture-run 0.1.0
A drop-in replacement for `subprocess.run` that captures stdout and stderr while also displaying output live in the console.
License: MIT
Requires Python: <4.0,>=3.8
Keywords: subprocess, run, popen, capture_output

# capture-run

[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/capture-run)](https://pypi.org/project/capture-run/)
[![PyPI - Version](https://img.shields.io/pypi/v/capture-run)](https://pypi.org/project/capture-run/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/capture-run)](https://pypi.org/project/capture-run/)
[![PyPI - License](https://img.shields.io/pypi/l/capture-run)](https://raw.githubusercontent.com/d-chris/capture-run/main/LICENSE)
[![GitHub - Pytest](https://img.shields.io/github/actions/workflow/status/d-chris/capture-run/pytest.yml?logo=github&label=pytest)](https://github.com/d-chris/capture-run/actions/workflows/pytest.yml)
[![GitHub - Release](https://img.shields.io/github/v/tag/d-chris/capture-run?logo=github&label=github)](https://github.com/d-chris/capture-run)
[![codecov](https://codecov.io/gh/d-chris/capture-run/graph/badge.svg?token=SV13P9RSKS)](https://codecov.io/gh/d-chris/capture-run)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://raw.githubusercontent.com/d-chris/capture-run/main/.pre-commit-config.yaml)

<!-- [![GitHub - Page](https://img.shields.io/website?url=https%3A%2F%2Fd-chris.github.io%2Fcapture-run&up_message=pdoc&logo=github&label=documentation)](https://d-chris.github.io/capture-run) -->
---

A drop-in replacement for `subprocess.run` that captures stdout and stderr while also displaying output live in the console.

## Installation

```cmd
pip install capture-run
```

## Usage

```doctest
>>> from capture import run

>>> run("echo $ bytes")
$ bytes
CompletedProcess(args='echo $ bytes', returncode=0, stdout=b'$ bytes\r\n', stderr=b'')

>>> run("echo $ text", text=True)
$ text
CompletedProcess(args='echo $ text', returncode=0, stdout='$ text\n', stderr='')

>>> run("echo $ captured", capture_output=True, encoding="utf-8")
CompletedProcess(args='echo $ captured', returncode=0, stdout='$ captured\n', stderr='')
```