semvec/pypi-packages huggingface dataset:
apsstack 0.0.3
stack module
Requires Python: >=3.8

from apsstack import Stack

# Create a stack instance
stack = Stack()

# Push items onto the stack
print(stack.push(10))
print(stack.push(20))

# Peek at the top item
print(stack.peek())

# Pop an item from the stack
print(stack.pop())

# Check the length of the stack
print(stack.length())

# Try popping from an empty stack
print(stack.pop())
binwise 0.2.0
Enable classification models for regression tasks and provide uncertainty estimation
Requires Python: >=3.7

# Binwise
Enable classification models for regression tasks and provide uncertainty estimation.

## Introduction
Implementation of the binned uncertainty estimation ensemble method, as described in the paper ["An Efficient Model-Agnostic Approach for Uncertainty Estimation in Data-Restricted Pedometric Applications"](https://arxiv.org/abs/2409.11985) (Barkov et al., 2024).

Binwise serves as an adapter that allows you to apply classification algorithms to regression problems by discretizing the continuous target into bins. The approach not only enables the use of classification models for regression tasks but also can provide uncertainty estimates.

This approach is particularly useful in scenarios with limited training data, as demonstrated in applications like pedometrics and digital soil mapping.

## Features

- Use classification algorithms with scikit-learn interface for regression tasks
- Obtain uncertainty estimates for regression predictions

## Installation

```bash
pip install binwise
```

## Quick Start

Simple example of how to use the binning adapter with TabPFN:
```python
from tabpfn import TabPFNClassifier
from binwise import RegressionToClassificationEnsemble

tabpfn_ensemble = RegressionToClassificationEnsemble(
    base_model_constructor=lambda: TabPFNClassifier(N_ensemble_configurations=1),
    random_state=42,
)

tabpfn_ensemble.fit(X_train, y_train)
y_pred = tabpfn_ensemble.predict(X_test)
```

## Examples

For more detailed examples, check out the following notebooks:

[Regression Predictions](examples/example.py): Using classification model (TabPFN) for regression task

[Regression Predictions with Uncertainty Estimation](examples/example_uncertainty.py): Obtaining uncertainty estimates along with predictions

## Citation

If you use this code in your research, please cite:

```bibtex
@misc{barkov2024uncertainty,
      title={An Efficient Model-Agnostic Approach for Uncertainty Estimation in Data-Restricted Pedometric Applications}, 
      author={Viacheslav Barkov and Jonas Schmidinger and Robin Gebbers and Martin Atzmueller},
      year={2024},
      eprint={2409.11985},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2409.11985}, 
}
```

## License:

This project is licensed under the AGPLv3 License - see the [LICENSE.md](LICENSE.md) file for details.
parabar 0.3.0
Python multiprocessing with progress bars
Requires Python: >=3.9

# parabar

Progress bars from `tqdm` for multiprocessing with `pathos` in Python.

This is similar in spirit to `tqdm_pathos` but more simplified.

## Installation

`pip install parabar`

## Usage

There is a single function `parabar.map`.

The two required arguments are the function you want to map and the iterable(s) you want to map over: `parabar.map(func, iterable)`.

If you want to iterate over multiple arguments, you should zip them: `parabar.map(func, zip(iterable1, iterable2))`.

It has two optional arguments:
- `ncpus = 1`: the number of processes for the pool
- `tqdm_kwargs = {}`: dictionary of extra arguments to pass to `tqdm`.

If the length of your iterable is `total`, you can tell `tqdm` by using `tqdm_kargs = {'total': total}`. Otherwise, `parabar.map` will convert your iterables to a list and use `len`.

You can provide other fixed positional and keywords arguments to your function that you do not want to iterate over as the reminaing position and keyword arguments: `parabar.map(func, iterable, arg1, arg2, kwarg1=None, ncpus=1)`.

## Examples

### Function of a single iterable:

```python
f = lambda x: x**2
iterable = [1, 2, 3]

# Serial
y = [f(x) for x in iterable]
print(y)

# Parallel
y = parabar.map(f, iterable)
print(y)
```

### Function of a single iterable, with non-iterable args and kwargs:

```python
f = lambda x, a, b = 0: x**2 * a + b
iterable = [1, 2, 3]
a = 1
b = 0

# Serial
y = [f(x, a, b = b) for x in iterable]
print(y)

# Parallel
y = parabar.map(f, iterable, a, b = b)
print(y)
```

### Function of multiple iterables:

```python
f = lambda x, y: x * y
iterable1 = [1, 2, 3]
iterable2 = [4, 5, 6]

# Serial
z = [f(x, y) for x, y in zip(iterable1, iterable2)]
print(z)

# Parallel
z = parabar.map(f, zip(iterable1, iterable2))
print(z)
```

### Function of multiple iterables, with non-iterable args and kwargs

```python
f = lambda x, y, a, b = 0: x * y * a + b
iterable1 = [1, 2, 3]
iterable2 = [4, 5, 6]
a = 1
b = 0

# Serial
z = [f(x, y, a, b = b) for x, y in zip(iterable1, iterable2)]
print(z)

# Parallel
z = parabar.map(f, zip(iterable1, iterable2), a, b = b)
print(z)
```

### Specify number of processes and keyword arguments for progress bar

```python
from tqdm.auto import tqdm

f = lambda x: x
iterable = [1, 2, 3]
tqdm_kwargs = dict(total = 3, desc = 'iterating')

# Serial
y = [f(x) for x in tqdm(iterable, **tqdm_kwargs)]
print(y)

# Parallel
y = parabar.map(f, iterable, ncpus=2, tqdm_kwargs=tqdm_kwargs)
print(y)
```
ctisearch 0.0.3
A broadly common async interface for Shodan, URLScan, and VirusTotal
Requires Python: >=3.11

# `ctisearch`

A collection of similar interfaces to Shodan, URLScan, and VirusTotal searches.

> [!WARNING]  
> This is under slow development in my spare time. You may experience bugs or
> breaking changes between versions.

This provides a consistent experience for searching:

* [Shodan search](https://shodan.io/)
* [URLScan search](https://urlscan.io/search/#)
* [VirusTotal intelligence search](https://virustotal.readme.io/reference/intelligence-search)

The motivation for this was to make automation of searches from all three feel
familiar and consistent, as well as provide asynchronous interfaces to Shodan
and URLScan at the same time. The official VirusTotal library is already
asynchronous, so under the hood, this package is a light wrapper around `vt-py`.