semvec/pypi-packages huggingface dataset:
toomanyports 0.1.11
Port allocation cleanup usage reporting
License: MIT
Requires Python: >=3.7

# TooManyPorts

A lightweight Python library for port allocation, monitoring, and management.

## Installation

Install via pip:

```bash
pip install toomanyports
```

## Usage

```python
from toomanyports import PortManager

pm = PortManager()
```

### Examples

#### Find a free port

Find a single available port starting from 3000:

```python
port = pm.find(3000, 1)[0]
```

#### Find multiple free ports

```python
ports = pm.find(3000, 2)
```

#### Kill a process on a specific port

```python
success = pm.kill(8080)
```

#### Kill processes on multiple ports

```python
results = pm.kill_all([8080, 8081])
```

#### List port usage

Retrieve the process IDs listening on ports 3000 through 3010:

```python
usage = pm.list_usage((3000, 3010))
```

#### Obtain a random ephemeral port

```python
random_port = pm.random_port()
```

#### Shorthand call

```python
free_port = pm(3000)
```

## Testing

Run the test suite with:

```bash
pytest tests_core.py
```

## License

This project is licensed under the MIT License.
sph-harm 1.0.0
Hyperspherical harmonics in NumPy / PyTorch / JAX
License: MIT
Requires Python: >=3.9

# sph_harm

<p align="center">
  <a href="https://github.com/34j/sph_harm/actions/workflows/ci.yml?query=branch%3Amain">
    <img src="https://img.shields.io/github/actions/workflow/status/34j/sph_harm/ci.yml?branch=main&label=CI&logo=github&style=flat-square" alt="CI Status" >
  </a>
  <a href="https://sph_harm.readthedocs.io">
    <img src="https://img.shields.io/readthedocs/sph_harm.svg?logo=read-the-docs&logoColor=fff&style=flat-square" alt="Documentation Status">
  </a>
  <a href="https://codecov.io/gh/34j/sph_harm">
    <img src="https://img.shields.io/codecov/c/github/34j/sph_harm.svg?logo=codecov&logoColor=fff&style=flat-square" alt="Test coverage percentage">
  </a>
</p>
<p align="center">
  <a href="https://github.com/astral-sh/uv">
    <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json" alt="uv">
  </a>
  <a href="https://github.com/astral-sh/ruff">
    <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff">
  </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&style=flat-square" alt="pre-commit">
  </a>
</p>
<p align="center">
  <a href="https://pypi.org/project/sph_harm/">
    <img src="https://img.shields.io/pypi/v/sph_harm.svg?logo=python&logoColor=fff&style=flat-square" alt="PyPI Version">
  </a>
  <img src="https://img.shields.io/pypi/pyversions/sph_harm.svg?style=flat-square&logo=python&amp;logoColor=fff" alt="Supported Python versions">
  <img src="https://img.shields.io/pypi/l/sph_harm.svg?style=flat-square" alt="License">
</p>

---

**Documentation**: <a href="https://sph_harm.readthedocs.io" target="_blank">https://sph_harm.readthedocs.io </a>

**Source Code**: <a href="https://github.com/34j/sph_harm" target="_blank">https://github.com/34j/sph_harm </a>

---

Hyperspherical harmonics in NumPy / PyTorch / JAX

## Installation

Install this via pip (or your favourite package manager):

`pip install sph_harm`

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

<!-- prettier-ignore-start -->
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- markdownlint-disable -->
<!-- markdownlint-enable -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
<!-- prettier-ignore-end -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

## Credits

[![Copier](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-orange.json)](https://github.com/copier-org/copier)

This package was created with
[Copier](https://copier.readthedocs.io/) and the
[browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template)
project template.