semvec/pypi-packages huggingface dataset:
numba-cache-lock 0.1.0a2
A caching system for Numba with file locking support
Requires Python: >=3.9
Keywords: numba, caching

# numba-lock-cache

A Python package that monkey-patches Numba's caching mechanism to safely coordinate concurrent cache access using file locks.

## Why?

Numba’s function-level caching (`@jit(cache=True)`) is not concurrency-safe by default. This can lead to:

- Crashes when multiple processes load/write to the same cache
- Especially problematic on shared filesystems (e.g., NFS)

## Locking Mechanism

- Uses [`flufl.lock`](https://pypi.org/project/flufl.lock/) for file-based locking.
- Lock file is created next to the cache index file:
  `/path/to/cache/func.nbi.lock`
- Lock behavior:
  - Timeout to acquire: 60 minutes (configurable)
  - Lifetime: `None` (lock persists until released)
  - NFS-safe: relies on atomic file creation

## Installation

```bash
pip install numba-lock-cache
```

## How to use it

Just import the patch Numba in your application:

```python
import numba_cache_lock

numba_cache_lock.patch_numba_cache()

from numba import jit

@jit(cache=True)
def my_func(x):
    return x * 2
```

By default, `patch_numba_cache` will hold a lock for 1 hour in the worst case.
One can change this value by assigning the `lifetime=` keyword argument to a
`timedelta` object.
polars_rng 0.1.0
Random number generation as polars expressions
Requires Python: >=3.13

# polars_rng

Random number generation in Polars.

## Usage

All random number generators are implmented as Polars expressions and can be used anywhere that expressions are allowed, including in lazy contexts.

```python
import polars as pl
import polars_rng as prng

# simulate data from a linear model
# y = x^2 + N(0, 3^2)
(
    pl.DataFrame(dict(x = [-3, 0, 2, 3, 4, 6, 11]))
    .with_columns(
        y = prng.normal(mu = pl.col("x").pow(2), sigma = 3)
    )
)
# shape: (7, 2)
# ┌─────┬────────────┐
# │ x   ┆ y          │
# │ --- ┆ ---        │
# │ i64 ┆ f64        │
# ╞═════╪════════════╡
# │ -3  ┆ 8.623695   │
# │ 0   ┆ -7.884036  │
# │ 2   ┆ 2.864818   │
# │ 3   ┆ 5.348727   │
# │ 4   ┆ 19.721068  │
# │ 6   ┆ 37.855376  │
# │ 11  ┆ 123.532992 │
# └─────┴────────────┘


# lazily simulate from binomial
lazy = (
    pl.LazyFrame()
    .select(n_coins = pl.repeat(10, 6))
    .with_columns(
        n_heads = prng.binomial(p = .5, n = "n_coins")
    )
)

lazy
# <LazyFrame at 0x1150E94F0>

lazy.collect()
# shape: (6, 2)
# ┌─────────┬─────────┐
# │ n_coins ┆ n_heads │
# │ ---     ┆ ---     │
# │ i32     ┆ f64     │
# ╞═════════╪═════════╡
# │ 10      ┆ 4.0     │
# │ 10      ┆ 7.0     │
# │ 10      ┆ 6.0     │
# │ 10      ┆ 3.0     │
# │ 10      ┆ 2.0     │
# │ 10      ┆ 5.0     │
# └─────────┴─────────┘

```

## Available Distributions

A full list of implmented distributions is available in the main namespace:

```python
from polars_rng import DISTRIBUTIONS

DISTRIBUTIONS
# ['normal',
# 'uniform',
# 'bernoulli',
# 'binomial',
# 'exponential',
# 'poisson',
# 'weibull',
# 'laplace',
# 'gamma',
# 'beta']
```
mustafaInstaSerch 0.1.0
A Python library for Instagram search and login (placeholder).
Requires Python: >=3.6

# mustafaInstaSerch

A Python library for Instagram search and login (placeholder).

## Installation

```bash
pip install mustafaInstaSerch
```

## Usage

### Search Usernames

```python
from mustafaInstaSerch.instagram_search import generate_usernames

usernames = generate_usernames()
for username in usernames:
    print(username)
```

### Login (Placeholder)

```python
from mustafaInstaSerch.instagram_search import login

result = login("your_email@example.com", "your_password")
print(result)
```