semvec/pypi-packages huggingface dataset:
lisaai 0.1.0
High-level APIs and training utilities for the LISA Vision+Audio model
Requires Python: >=3.9

# lisaai

High-level, repo-independent tools for the LISA Vision+Audio model.

## Install

From this folder:

```
pip install -e .
```

## CLI

- Inspect a checkpoint (folder or .safetensors):
```
lisa.inspect "PATH/TO/MODEL_DIR"
```
- Compare param counts by saved prefixes:
```
lisa.compare-params "PATH/TO/MODEL_DIR"
```

## Python API

```python
from lisaai import inspect_checkpoint, compare_param_counts

rep = inspect_checkpoint("PATH/TO/MODEL_DIR")
print(rep["inferred_dimensions"])  # {vision_embed_dim, fusion_hidden_dim}
```

To use runtime loading (optional, if the original repo is available):
```python
from lisaai import load_model
m = load_model()  # will use LISA_MODEL_PATH if set
```
django-ratelimit-middleware 0.1.1
A simple Django middleware for rate limiting by IP or user
Requires Python: >=3.12

# django-ratelimit-middleware


[![codecov](https://codecov.io/gh/k3y5tr0k3/django-ratelimit-middleware/branch/master/graph/badge.svg?token=nkXbpqFJot)](https://codecov.io/gh/k3y5tr0k3/django-ratelimit-middleware)
[![Python - >=3.12](https://img.shields.io/badge/Python->=3.12-2ea44f?logo=python&logoColor=yellow)](https://www.python.org/)
[![Django - >=5.2](https://img.shields.io/badge/Django->=5.2-2ea44f?logo=django&logoColor=lime)](https://www.djangoproject.com/)
[![Style - Black](https://img.shields.io/badge/Style-Black-black?logo=stylelint&logoColor=white)](https://github.com/psf/black)


## 🌟 Overview

**Django Rate Limit Middleware** is a simple, lightweight Django middleware for rate limiting requests based on **user identity** or **IP address**.  
It helps prevent abuse, brute force attacks, and excessive traffic with **minimal configuration**.


## ✨ Features

- 🔑 Supports **anonymous and authenticated** users
- ⏱ Configurable **request count and time window**
- 🧠 Uses Django’s **cache framework**
- 🪶 Lightweight, dependency-free


## 📦 Installation

```bash
pip install django-ratelimit-middleware
```


## ⚙️ Configuration

Add to your `MIDDLEWARE`:

```python
MIDDLEWARE = [
    ...
    "django_ratelimit_middleware.middleware.RateLimitMiddleware",
]
```

Add settings:

```python
RATE_LIMIT_REQUESTS = 100       # Number of requests allowed
RATE_LIMIT_WINDOW = 60          # Window in seconds
```

## 🚀 Usage

After installation and config, all views are automatically rate-limited.  
Example response when exceeding the limit:

```http
HTTP/1.1 429 Too Many Requests
Retry-After: 60
```

## 🧪 Running Tests

```bash
pytest
```

## 📊 Coverage

Coverage reports are uploaded to [**Codecov**](https://codecov.io)


## 🤝 Contributing

Contributions are welcome! 🎉

See [CONTRIBUTING.md](CONTRIBUTING.md) for details.


## 📌 Roadmap

- [ ] Custom rate limit strategies (e.g., per endpoint)
- [ ] Redis backend example
- [ ] Admin dashboard for monitoring blocked IPs
- [ ] Configurable responses (JSON, HTML)
- [ ] Turnstile feature


## 📜 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.


## Disclaimer

This software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement.  
In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.  
Use at your own risk.


## 👨‍💻 Author

Maintained with ❤️ by [K3y5tr0k3](https://github.com/k3y5tr0k3).
lotf 0.0.4
LotusFilter: Diversity-aware approximate nearest neighbor search
Requires Python: >=3.10

<div align="center">

![LotusFilter Logo](logo.png)

[![PyPI version](https://badge.fury.io/py/lotf.svg)](https://badge.fury.io/py/lotf)
[![Documentation](https://img.shields.io/badge/docs-available-brightgreen.svg)](https://matsui528.github.io/lotf)
[![CI](https://github.com/matsui528/lotf/workflows/Tests/badge.svg)](https://github.com/matsui528/lotf/actions)

**LotusFilter**: Diversity-aware approximate nearest neighbor search combining Faiss with cutoff tables to prevent similar results from dominating search outputs.

</div>

## ✨ Features

- ⚡ **Lightweight**: Ultra-fast processing < 0.1ms per query
- 🔓 **Independence**: Post-processing module that doesn't require original data retention  
- 🔧 **Flexibility**: Works seamlessly with various Faiss indexes
- 📦 **Simplicity**: Single `CutoffTable` class - easy to integrate


## 🚀 Quick Start

### Installation

```bash
pip install lotf
```




### Simple Usage

```python
import lotf
import faiss
import numpy as np

# Prepare data
Xb = np.random.rand(10000, 128).astype('float32')  # Database vectors
Xq = np.random.rand(5, 128).astype('float32')      # Query vectors

# Step 1: Build Faiss index
index = faiss.IndexFlatL2(Xb.shape[1])
index.add(Xb)

# Step 2: Build cutoff table for diversity filtering
epsilon = 15.0
ctable = lotf.CutoffTable(X=Xb, index=index, epsilon=epsilon)

# Step 3: Search candidates
candidate_k = 300
candidate_dists, candidate_ids = index.search(Xq, candidate_k)

# Step 4: Filter out candidates to obtain diverse results
final_k = 100
diverse_dists, diverse_ids = ctable.filter(
    dists=candidate_dists, 
    ids=candidate_ids, 
    final_k=final_k
)

print(f"Diverse results: {diverse_ids}")
```

## 📄 Citation

If you use LotusFilter in your research, please cite our CVPR 2025 paper:

```bibtex
@inproceedings{mtasui2025cvpr,
    author    = {Yusuke Matsui},
    title     = {LotusFilter: Fast Diverse Nearest Neighbor Search via a Learned Cutoff Table},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    year      = {2025},
    pages     = {30430-30439}
}
```

## 📚 Documentation

- **Repository**: https://github.com/matsui528/lotf
- **Documentation**: https://matsui528.github.io/lotf
- **Paper**: https://www.arxiv.org/abs/2506.04790




## 👤 Author

**Yusuke Matsui**
- Email: matsui@hal.t.u-tokyo.ac.jp
- GitHub: [@matsui528](https://github.com/matsui528)
- Web: https://yusukematsui.me
optilab 27
Simple framework for optimization functions and metamodels
Requires Python: >=3.11.9

# Optilab
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
![Docker Pulls](https://img.shields.io/docker/pulls/mlojek/optilab?logo=Docker&label=Dockerhub%20pulls)
![Read the Docs](https://img.shields.io/readthedocs/optilab)

Optilab is a lightweight and flexible python framework for testing black-box optimization.

## Features
- ✅ Intuitive interface to quickly prototype and run optimizers and metamodels.
- 📚 High quality documentation.
- 📈 Objective functions, optimizers, plotting and data handling.
- ⋙ CLI functionality to easily summarize results of previous experiments.
- 🚀 Multiprocessing for faster computation.

## How to install
Optilab has been tested to work on python versions 3.11 and above. To install it from PyPI, run:
```
pip install optilab
```
You can also install from source by cloning this repo and running:
```
make install
```

## Try the demos
Learn how to use optilab and fit it to your needs with demo notebooks in `demo` directory.

## CLI tool
Optilab comes with a powerful CLI tool to easily summarize your experiments. It allows for plotting the results and performing statistical testing to check for statistical significance in optimization results.
```
usage: optilab [-h] [--aggregate_pvalues] [--aggregate_stats] [--entries ENTRIES [ENTRIES ...]]
               [--hide_outliers] [--hide_plots] [--no_save] [--raw_values]
               [--save_path SAVE_PATH] [--siginificance SIGINIFICANCE] [--test_evals] [--test_y]
               pickle_path

Optilab CLI utility.

positional arguments:
  pickle_path           Path to pickle file or directory with optimization runs.

options:
  -h, --help            show this help message and exit
  --aggregate_pvalues   Aggregate pvalues of stat tests against run 0 in each pickle file into
                        one table.
  --aggregate_stats     Aggregate median and iqr for all processed runs into one table.
  --entries ENTRIES [ENTRIES ...]
                        Space separated list of indexes of entries to include in analysis.
  --hide_outliers       If specified, outliers will not be shown in the box plot.
  --hide_plots          Hide plots when running the script.
  --no_save             If specified, no artifacts will be saved.
  --raw_values          If specified, y values below tolerance are not substituted by tolerance
                        value.
  --save_path SAVE_PATH
                        Path to directory to save the artifacts. Default is the user's working
                        directory.
  --significance SIGNIFICANCE
                        Statistical significance of the U tests. Default value is 0.05.
  --test_evals          Perform Mann-Whitney U test on eval values.
  --test_y              Perform Mann-Whitney U test on y values.
```

## Docker
This project comes with a docker container. You can pull it from dockerhub:
```
docker pull mlojek/optilab
```
Or build it yourself:
```
make docker
```
flai-sdk 1.1.1
A command-line toolset for interacting with the Flai web app.
Requires Python: >=3.7

# Flai SDK
    
The Flai SDK is a command-line toolset for interacting with the Flai web app. It is also used by our [QGIS plugin](https://plugins.qgis.org/plugins/flai_cli_interface).


## Install

### From PyPI

```bash
pip install flai-sdk
```

### From source

1. Clone the repo and enter the directory:

    ```bash
    git clone https://github.com:flai-ai/flai-sdk.git
    cd flai-sdk
    ```

2. (Optional) Create and activate a virtual environment.

    **With Conda**

    ```bash
    conda create --name flai-sdk
    conda activate flai-sdk
    ```

    **With venv**

    ```bash
    python3(.VERSION) -m venv ~/.python-virtual-env/flai-sdk
    source ~/.python-virtual-env/flai-sdk/bin/activate
    ```

3. Install in “editable” mode in it's directory:

    `pip install -e .`


## First-time setup

To use our package you will need to call `login` command and pass at least two arguments for authorization (see **Tips** below). 

```bash
flai-sdk login
```

This command will create a json file under path `$HOME/.flai` (Linux / macOS / Windows - Powershell) or `%USERPROFILE%/.flai` (Windows - cmd).

### **Tips:**

 * **`flai_access_token`**
     - can be found on [Flai web app](https://app.flai.ai/#/admin/pages:user-settings?tab=access_tokens) or 
     - by going to our Web App at `flai.ai` > Sign in > Click your `icon` > Select `Settings` from menu > Click `Access tokens` tab > Click `Add new personal access token`
 * **`flai_host`**
     - set it to https://api.flai.ai/


## Examples

### Upload a dataset to a project 

Upload all `.las`/`.laz` files in the current folder to a project.

```bash
# simple example
flai-sdk upload-dataset --project_id PROJECT_NAME --dataset_name DATASET_NAME FILES

# working example
flai-sdk upload-dataset --project_id "Staring project" --dataset_name "Testing upload" "*.la?"

# compact version
flai-sdk upload-dataset -p "Staring project" -n "Testing upload" "*.la?"
```

The flag `--project_id / -p` can be omitted. In this case, the data will not be assigned to a project and will be shown in the catalog on your instance of our web app.

### Download dataset

```bash
flai-sdk download-dataset -d "59d66bfc-c2a4-4e91-91f3-2f469078297b" "downloaded files.zip"
```


## Explore commands

To see what arguments our SDK expects you can start from initial command and then add `--help` to see more hints.

```bash
# to see all available options
flai-sdk --help

# let's say we want to know what option 'download-flainet-model' expects
flai-sdk download-flainet-model --help

# and that is it :)
```
asyncakumuli 0.6.4
Write data to Akumuli
Requires Python: >=3.10
Keywords: iot, logging

AsyncAkumuli
============

Welcome to `AsyncAkumuli <https://github.com/M-o-a-T/asyncakumuli>`__!

This library contains a small async wrapper for submission of data to,
and (rudimentary) reading from, `Akumuli <https://akumuli.org>`__.

Also included:

* A basic unit test
* Test scaffolding, to easily test your own code
* a utility to read the last timestamp, as Akumuli doesn't go backwards
* helper code to interpred RRD / collectd input so that you can feed those
  to Akumuli
* a couple of example scripts

Tests and collectd support currently require Trio because (a) anyio doesn't
support subprocesses, (b) UDP socket support in anyio is kindof limited.
koronascript 0.2.1
Wrapper around Korona modules for processing echosounder data

# Running Korona through Python

## Prerequisites

### Install LSSS/Korona.

This version of the KoronaScript is tested against lsss-2.16.0-alpha
version. LSSS and korona is usually placed at
`~/lsss/lsss-2.16.0-alpha` or a similar directory.

Download the appropriate version from here:

https://marec.no/tmp/lsss-2.16.0-alpha-20230922-1417-linux.zip

https://marec.no/tmp/lsss-2.18.0-alpha-20240918-0847-linux.zip

https://marec.no/tmp/lsss-2.16.0-alpha-20230922-1417-windows.zip

https://marec.no/tmp/lsss-2.18.0-alpha-20240918-0847-windows.zip

If you run linux you need to install the netcdf separately:

`apt-get install libnetcdf` or `sudo apt install libnetcdf-dev`


### Add license 

You need an LSSS licence. The licence have to be added according to the LSSS manual. the licence files are typically placed at the `~/marec/license` directory.

### Set system variables

The `LSSS` environment variable should point to the root directory of your
LSSS installation.  It can be set at run time either by setting the LSSS environment
variable in the shell
~~~
export LSSS=~/lsss-2.16.0-alpha
~~~
before running your script, or by adding it manually from inside Python:
~~~
lsss = '~/lsss-2.16.0-alpha'
os.environ["LSSS"] = lsss
~~~

# Usage

Import the modules:

	import KoronaScript as ks
	import KoronaScript.Modules as ksm

Create a script object:

	ks = ks.KoronaScript(Categorization='categorization.xml',
                     HorizontalTransducerOffsets='HorizontalTransducerOffsets.xml')

Add some modules:

	ks.add(ksm.EmptyPingRemoval())
	ks.add(ksm.Comment(LineBreak='false', Label='CW_0256ms'))
	ks.add(ksm.ChannelRemoval(Channels=[1,5,9,13,17],KeepSpecified='true'))
	ks.add(ksm.Writer(RelativeDirectory='CW_0256ms'))

Write out the resulting configuration:

	ks.write()
	
Run the script:

	ks.run(src="input_dir", dst="output_dir")

The list of modules and their parameters can be found in the
[configuration/korona-info.json](configuration/korona-info.json) file.
sheetwhat 0.6.0
Submission correctness tests for spreadsheets

> :warning: **This repo has outdated tokens in its travisci config**
> To make new releases for this project it needs to be moved to circleci

# sheetwhat

[![PyPI version](https://badge.fury.io/py/sheetwhat.svg)](https://badge.fury.io/py/sheetwhat)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fdatacamp%2Fsheetwhat.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fdatacamp%2Fsheetwhat?ref=badge_shield)

`sheetwhat` enables you to write Submission Correctness Tests (SCTs) for interactive Spreadsheet exercises on DataCamp.

- If you are new to teaching on DataCamp, check out https://instructor-support.datacamp.com.
- If you want to learn what SCTs are and how they work, visit [this article](https://instructor-support.datacamp.com/courses/course-development/submission-correctness-tests) specifically.
- For a complete overview of all functionality inside `sheetwhat` and articles about what to use when, consult https://sheetwhat.readthedocs.io.

## Installing

```
pip install sheetwhat
```

## Demo

Sheetwhat is typically used in a web application, but you can also experiment with its functions on your local machine.
SCT functions that fail will throw a `TestFail` error.

```python
# Setup: make all checking functions available
from sheetwhat.sct_syntax import SCT_CTX
globals().update(SCT_CTX)

# Setup: set up state with student data, solution data and SCT range
from sheetwhat.State import State
from protowhat.Reporter import Reporter
Ex.root_state = State(
    {'values': [["a", "a"]], "formulas": [["=B1"]]},
    {'values': [["b", "b"]], "formulas": [["=B1"]]},
    "A1",
    Reporter()
)

# Experiment interactively with SCTs
# Passes, as formulas at A1 match
Ex().has_equal_formula()

# Fails, as values at A1 do not match
Ex().has_equal_value()
```

## Testing

```
pip install -r requirements.txt
pip install -e .
pytest
```


## License
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fdatacamp%2Fsheetwhat.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fdatacamp%2Fsheetwhat?ref=badge_large)
dlwheel 1.0.12
A lightweight deep learning library.
Requires Python: >=3.6

# DLWheel

[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Python Version](https://img.shields.io/badge/python-3.6%2B-blue)]()

A lightweight deep learning library.

## Installation

### Editable Installation

```bash
pip install -e .
```

### Stable Release

```bash
pip install dlwheel
```

## Getting Started

### Basic Usage

```python
from pprint import pprint

import dlwheel

cfg = dlwheel.setup()
pprint(cfg)
```

### Backup System

Use the `--backup` flag to enable automatic backup (stored in `./log` by default):

```bash
python main.py --backup
```

### Configuration System

#### YAML Config File (config/default.yaml):

```yaml
# config/default.yaml
lr: 1e-3
batch_size: 32
```

#### Command-Line Argument Override

```bash
python main.py --config=config/exp.yaml --name=exp batch_size=2 lr=0.1
```