semvec/pypi-packages huggingface dataset:
openinterest 0.1.2
Calculate max pain from open interest data
Requires Python: >=3.8

# Open Interest Max Pain Calculator

A Python package for calculating max pain from open interest data.

## Installation

```bash
pip install openinterest
```

## Usage

```python
from openinterest import calculate_max_pain

# Example data
data = [
    {"expiration": "2024-03-22", "strike": 90, "type": "call", "open_interest": 100},
    {"expiration": "2024-03-15", "strike": 90, "type": "call", "open_interest": 100},
    {"expiration": "2024-03-15", "strike": 90, "type": "put", "open_interest": 50},
    {"expiration": "2024-03-15", "strike": 100, "type": "call", "open_interest": 200},
    {"expiration": "2024-03-15", "strike": 100, "type": "put", "open_interest": 150},
    {"expiration": "2024-03-15", "strike": 110, "type": "call", "open_interest": 50},
    {"expiration": "2024-03-15", "strike": 110, "type": "put", "open_interest": 200},
    {"expiration": "2024-03-15", "strike": 120, "type": "call", "open_interest": 20},
    {"expiration": "2024-03-15", "strike": 120, "type": "put", "open_interest": 300},
    {"expiration": "2024-03-15", "strike": 130, "type": "call", "open_interest": 10},
    {"expiration": "2024-03-15", "strike": 130, "type": "put", "open_interest": 400},
]
# Calculate max pain
max_pain_price, pain_values = calculate_max_pain(data)

print(f"Max pain price: {max_pain_price}")
```

## Development

To set up the development environment:

```bash
git clone https://github.com/charlesverge/openinterest.git
cd openinterest
pip install -e .
```

## Testing

Run the tests with:

```bash
pytest
```

## License

MIT License
tasadofi 1.0.1
Python random numbers
Requires Python: >=3.6

<h1 align="center">
<img src="https://github.com/Raverss/Python-Random-Types/blob/main/imgs/logo.png?raw=true" width="800">
</h1><br>

# **Tasadofi** - random python numerical types

This library wraps random number generation into classes inheriting from `int` and `float`. Every time a variable of random type is used, it has a different value, e.g. `1 + random_type` will have different return value everytime. This allows to inject randomness into code without having to alter it, i.e. making numerical parameter of a class random without changing class itself. The random type also remembers last n generated random values.

## Installation

`pip install tasadofi`

## Example

Let us consider a demonstrative class that generates sine signal with fixed noise value.
```
import numpy as np
from tasadofi.random_number import RndFloat

class Signal:
    def __init__(self, noise=0.1):
        self.noise = noise
        
    def generate_signal(self, length=100):
        # code to generate some signal
        signal = np.linspace(0, length/2*np.pi, length)  # Example signal: a sine wave
        signal = np.sin(signal)  # Example signal: a sine wave
        signal += self.noise
        return signal
```

Then generated signal will be identical each repetation. 

```
signal = Signal()
for _ in range(2):
    print(signal.generate_signal(length=5))
    # [ 0.1 1.02387953 -0.60710678 -0.28268343  1.1 ]
    # [ 0.1 1.02387953 -0.60710678 -0.28268343  1.1 ]
```

We can change this by using random type without touching underlying Signal class:

```
signal = Signal(noise=RndFloat('uniform', 0, 0.5))
for _ in range(2):
    print(signal.generate_signal(length=5))
    # [ 0.13548616  1.0593657  -0.57162062 -0.24719727  1.13548616]
    # [ 0.08913056  1.01301009 -0.61797623 -0.29355288  1.08913056]
```

We can also inspect last 10 generated values (or different number by using `set_cache_size(n)` function):
```
print(signal.noise)
# sampler uniform(0, 0.5)
# last 10 generated values [0.13548616468953223, 0.08913055526374658]
```
prowl 0.3.0
Generate caracal/caracat/saimiris probes and build awesome probing tools.
Requires Python: >=3.13

# Prowl

[![CICD Status](https://img.shields.io/github/actions/workflow/status/nxthdr/prowl/cicd.yml?logo=github&label=cicd)](https://github.com/nxthdr/prowl/actions/workflows/cicd.yml)
[![PyPI](https://img.shields.io/pypi/v/prowl?color=blue&logo=pypi&logoColor=white)](https://pypi.org/project/prowl/)

> [!WARNING]
> Currently in early-stage development.

Library to generate [caracal](https://github.com/dioptra-io/caracal) / [caracat](https://github.com/maxmouchet/caracat) probes. Also intended to be used with [saimiris](https://github.com/nxthdr/saimiris).

To use it as a standalone library, you can install it without any extra:

```bash
pip install prowl
```

## CLI Usage

To be able to use the CLI app, you need to install it with the `cli` extra.

```bash
pip install prowl[cli]
```

The CLI generates probes based on a "targets" file. A target is defined as:

```
target,protocol,min_ttl,max_ttl,n_flows
```

where the target is a IPv4/IPv6 prefix or IPv4/IPv6 address. The prococol can be icmp, icmp6 or udp.


To use it, you can use the `prowl` command:

```bash
python -m prowl --help
```

## Development

This projects use [uv](https://github.com/astral-sh/uv) as package and project manager.

Once uv installed, you can run the CLI app:

```bash
uv run -m prowl
```