semvec/pypi-packages huggingface dataset:
toms-async-task-processor 0.1.0
A simple asynchronous task processor
Requires Python: >=3.7

# Async Task Processor

The Async Task Processor is a lightweight, easy-to-use Python library designed to manage and process asynchronous tasks efficiently. Utilizing Python's asyncio library, it offers a straightforward way to queue tasks, process them asynchronously, and retrieve their statuses and results.

## Features

- Simple task queue management.
- Asynchronous processing of tasks with real-time status updates.
- Flexible task creation supporting any callable Python function.
- Comprehensive task status tracking, from queued to completed or failed.

## Installation

Install async_task_processor using pip:

```bash
pip install async_task_processor
```

## Quick Start

To get started with Async Task Processor, follow these steps:

1. **Create a Task**

```python
from async_task_processor.models import Task

# Define your asynchronous function
async def sample_task_function(arg1, arg2):
    # Your async task logic here
    return arg1 + arg2

# Create a task
task = Task(task_id="1", function=sample_task_function, args=[10, 20])
```

2. **Initialize the Processor and Add Tasks**

```python
from async_task_processor.async_task_processor import AsyncTaskProcessor

processor = AsyncTaskProcessor()

# Add tasks to the processor
await processor.add_task(task)
```

3. **Process the Tasks**

```python
# Start processing tasks
await processor.process_tasks()
```

## Contribute

Contributions are welcome! If you have a feature request, bug report, or a pull request, please open an issue or submit a pull request.
two-sample-binomial 0.0.4
Several two-samples tests for count data
Requires Python: >=3.6

# TwoSamplesBinomial: Two-sample testing for counts data
Usually in the context of a multiple testing approach to compare two or more frequency tables. Combine with ``multiple-hypothesis-testing`` to
obtain a global test for the significance of the difference between the 
tables.

References:
- [1] D. L. Donoho and A. Kipnis. (2022) Higher criticism to compare two large frequency tables, with sensitivity to possible rare and weak differences. Annals of Statistics. 
- [2]  C. B. Dean. (1992) Testing for Overdispersion in Poisson and Binomial Regression Models. Journal of the American Statistical Association


## Methods:
- ``bin_allocation_test`` (the test from [1])
- ``bin_variance_test`` (test from [2])
- ``bin_variance_test_df`` the same as ``bin_variance_test`` plus additional information


### Additional auxiliary function of independent interest:
 - ``poisson_test`` Vectorized one-sided Poisson test with an option to do a randomized test
 - ``binom_test`` Vectorized one-sided binomial test with an option to do a randomized test
 - ``binom_test_two_sided`` Vectorized Two-sided binomial test with an option to do a randomized test
 - ``binom_test_two_sided_slow`` Vectorized two-sided binomial test using scipy.stats.binom_test

## Example:
```
from twosample import bin_allocation_test, bin_variance_test
from multitest import MultiTest
import numpy as np

N = 100
n = 500
eps = 0.1
mu = 0.01

P = np.ones(N) / N
Q = P.copy()
Q[np.random.rand(N) < eps] += mu
Q = Q / Q.sum()

  
smp1 = np.random.multinomial(n, P)  # sample form P
smp2 = np.random.multinomial(n, Q)  # sample from Q

pvals_alloc = bin_allocation_test(smp1, smp2) # binomial P-values
pvals_var = bin_variance_test(smp1, smp2) # binomial P-values

mt_alloc = MultiTest(pvals_alloc)
mt_var = MultiTest(pvals_var)

print("HC(binomial_allocation) = ", mt_alloc.hc()[0])
print("HC(varaince) = ", mt_var.hc()[0])
```