semvec/pypi-packages huggingface dataset:
pysociety 0.2.4
Multi-agent society simulation with playful personalities
Requires Python: >=3.12

# A Society of Agents

[![Pylint](https://github.com/zzzrbx/llm-society/actions/workflows/pylint.yml/badge.svg)](https://github.com/zzzrbx/llm-society/actions/workflows/pylint.yml)
[![PyPI](https://img.shields.io/pypi/v/pysociety)](https://pypi.org/project/pysociety/)

<p align="center">
  <img src=".github/banner.png" alt="LLM Society - AI agents in philosophical debate" width="800">
</p>

Inspired by Marvin Minsky's [Society of Mind](https://en.wikipedia.org/wiki/Society_of_Mind), a multi-agent simulation where AI personalities debate questions from different perspectives. Ask a question, specify the viewpoints you want, and watch the debate unfold.

## What it does

1. You provide a question and the perspectives you want represented
2. AI generates distinct agent personalities for each perspective
3. An orchestrator facilitates debate between the agents
4. Agents discuss, disagree, and build on each other's arguments

## Installation

```bash
pip install pysociety
```

or

```bash
uv add pysociety
```

## Quick Start

Create a `.env` file with your API key:

```bash
ANTHROPIC_API_KEY=your-api-key-here
```

### Run a debate

```bash
uv run python -m llm_society \
  "What is the meaning of life? I want an optimistic, a pessimistic, and a pragmatic view."
```

### More examples

```bash
# Ethics debate
uv run python -m llm_society "$(cat examples/trolley_problem.txt)"

# Philosophy
uv run python -m llm_society "$(cat examples/free_will.txt)"

# Social issues
uv run python -m llm_society "$(cat examples/wealth_inequality.txt)"
```

## Example Questions

| File | Topic | Perspectives |
|------|-------|--------------|
| `meaning_of_life.txt` | Meaning of life | Optimist, Pessimist |
| `trolley_problem.txt` | Trolley problem | Utilitarian, Deontologist, Virtue ethicist |
| `free_will.txt` | Free will | Determinist, Libertarian, Compatibilist |
| `wealth_inequality.txt` | Wealth inequality | Libertarian, Socialist, Rawlsian, Communitarian |
| `animal_rights.txt` | Animal rights | Peter Singer, Traditionalist, Environmental ethicist |
| `civil_disobedience.txt` | Civil disobedience | Thoreau, MLK, Legal positivist, Conservative |

## Optional Configuration

You can customize models in `.env`:

```bash
# Main orchestrator model
MAIN_AGENT_MODEL=anthropic:claude-opus-4-5-20251101

# Sub-agent models
SUB_AGENT_MODEL=anthropic:claude-sonnet-4-5-20250929

# Prompt generation model
PROMPT_GENERATOR_MODEL=anthropic/claude-opus-4-5-20251101
```
jupyterlite-simple-cors-proxy 0.1.17
A simple CORS proxy utility with requests-like response
Requires Python: >=3.8

# jupyterlite-simple-cors-proxy
Simple CORS proxy wrapper for making http requests from JupyterLite. Uses https://corsproxy.io/

## Installation

```bash
pip install jupyterlite-simple-cors-proxy
```

## Usage

```python
from jupyterlite_simple_cors_proxy.proxy import cors_proxy_get, robust_get_request, furl, xurl

# Set up
url = "https://api.example.com/data"
# Optional params
params = {"key": "value"}

# Get a cross-origin proxied url
cross_origin_url = xurl(url) # xurl(url, params)

# Get a file like object
# (Make the request, then create a file like object
# from the response)
file_ob = furl(url) # furl(url, params)

# Make a request
response = cors_proxy_get(url, params)

# Use like requests
print(response.text)
data = response.json()
raw = response.content
```

The `robust_get_request()` will first try a simple request, then a proxied request: `robust_get_request(url, params)`

## Features

- Simple CORS proxy wrapper
- Requests response object
- Support for URL parameters

## `fastf1` cors proxy

A monkey patch for `fastf1` is provided as:

```python
import fast f1
from jupyterlite_simple_cors_proxy.fastf1_proxy import enable_cors_proxy

enable_cors_proxy(
#    domains=["api.formula1.com", "livetiming.formula1.com"],
#    debug=True,
#    proxy_url="https://corsproxy.io/",
)
```

## `CorsProxy` with cache facility

Via `claude.ai`, the package is now further enriched.

*Note that `pyodide` sqlite can't write to `/drive` so the cache path dir needs to be something like `/tmp` or a dir created on `/`.*

*I'm not convinced the following works in `pyodide` and `xeus-python` yet - `requests-cache` dependency issues etc. `requests-cache` has requirements `attrs`, `cattrs`,`platformdirs`, `url-normalize`.*

```python
from simple_cors_proxy.proxy import CorsProxy

# Create a cached proxy instance
proxy = CorsProxy(use_cache=True, expire_after=3600)  # Cache for 1 hour

# Use furl directly from your proxy instance
file_like = proxy.furl('https://example.com/somefile.csv')

#----
import pandas as pd
from simple_cors_proxy.cacheproxy import CorsProxy

proxy = CorsProxy(use_cache=True)
file_like = proxy.furl('https://example.com/data.csv')
df = pd.read_csv(file_like)

#----

from simple_cors_proxy.proxy import create_cached_proxy

proxy = create_cached_proxy(cache_name='my_cache', expire_after=86400)  # Cache for 1 day
file_like = proxy.furl('https://example.com/somefile.csv')
```
cnaclib 0.1.30
Simulateur RAC
Requires Python: >=3.8
Keywords: cnac, tools

# cnaclib : Librairie Python developpee pour les usagers et les employes de la CNAC. 

## About cnaclib

**cnaclib** est un package `Python` dedie aux usagers et aux employes de la CNAC.

## Pourquoi utiliser cnaclib?

* Il dispose de plusieurs modules et fonctions `Python` pour : 
    * Faire une simulation de calculs pour le benefice du regime assurance chomage (RAC);
    * Faire une simulation de calculs pour le benefice des mesures encouragement a emploi (loi 06-21);
    * Generer la liste des codes de wilaya de 01 a 58;
    * Avoir le nom de la wilaya en arabe ou en francais en fonction de son code ;
    * Avoir le code de la wilaya en fonction de son nom en arabe ou en francais;
    * Generer des dossiers qui postent le nom des wilayas en arabe ou en francais;
    * Avoir le montant du SNMG en fonction de la date a compter du 01/01/1990;

* Il sera mis a jour regulierement par des modules qui peuvent automatiser certaines taches.


## Installation

### Dependencies

cnaclib requires 

```
certifi >=2023.5.7
charset-normalizer >=3.1.0
idna >=3.4
numpy >=1.24.3
pandas >=2.0.1
python-dateutil >=2.8.2
pytz >=2023.3
six >=1.16.0
tzdata >=2023.3
urllib3 >=2.0.2
```

### User installation

You can install cnaclib using `pip` :

```
pip install cnaclib
```

Tutorial are available

````
https://github.com/aistatendz/cnaclib/blob/master/Exemple_RAC_01.ipynb
https://github.com/aistatendz/cnaclib/blob/master/Exemple_RAC_02.ipynb
https://github.com/aistatendz/cnaclib/blob/master/Exemple_LSix21_01.ipynb
https://github.com/aistatendz/cnaclib/blob/master/Exemple_LSix21_02.ipynb
https://github.com/aistatendz/cnaclib/blob/master/Exemple_Tools_01.ipynb
https://github.com/aistatendz/cnaclib/blob/master/Exemple_Tools_02.ipynb
https://github.com/aistatendz/cnaclib/blob/master/Exemple_Tools_03.ipynb
````

## Author

BENHAMADA Nadir ([aistatendz@gmail.com](aistatendz@gmail.com))
microesb 1.1.1
A Small OOP Based Enterprise Service Bus Implementation.
Requires Python: >=3.8

# Python Micro-Enterprise-Service-Bus Module

![push main](https://github.com/clauspruefer/python-micro-esb/actions/workflows/pylint.yaml/badge.svg)
[![PyPI version](https://badge.fury.io/py/microesb.svg)](https://badge.fury.io/py/microesb)
[![codecov](https://codecov.io/gh/clauspruefer/python-micro-esb/graph/badge.svg?token=03VPTCG8YI)](https://codecov.io/gh/clauspruefer/python-micro-esb)

## 1. Abstract / Preface

*Enterprise Service Bus* is still a pretty vague term, first introduced in the Gartner Report of 2002.

It is essential for maintaining large SOA infrastructures.

## 2. Features

Our interpretation of what an ESB should consist of:

- ✅ Service Abstraction / Declarative Metadata Modeling
- ✅ Centralized Service / API Registry providing clean XML, JSON Models
- ✅ Centralized Service AAA (Authentication / Authorization / Accounting)
- ✅ Service Metadata XML, JSON / Internal (Python) Class Abstraction
- ✅ Relational Backend OOP / ORM / ODM Mapper
- ✅ Service Model Documentation / API (Auto)-Generation

## 3. Install

```bash
# setup virtual-env
python3 -m venv .micro-esb

# activate virtual-env
source .micro-esb/bin/activate

# upgrade pip
python3 -m pip install --upgrade pip

# install microesb module
pip3 install microesb

# install dependencies
pip3 install pytest pytest-pep8
```

## 4. Platform As A Service (PaaS) / Microservices

The NoSQL conform JSON abstraction / data transformation capabilities make the micro-esb
suitable for modern, scalable Next-Level applications.

## 5. Current Features

- ✅ Service Abstraction / Metadata Definition
- ✅ Internal Code (Python) Class / Service Properties Mapping
- ✅ Graph-Based / Recursive JSON Result Abstraction
- ✅ OOP Relational ODM Mapper / MongoDB Integration

### 5.1. In Progress

- :hourglass: Service Documentation (Auto)-Generation
- :hourglass: Service Registry / Encapsulated Service Routing
- :hourglass: YANG Model Import / Export / Transformation
- :hourglass: Web-Interface / Dashboard

## 6. Documentation / Examples

Documentation, including detailed examples, can be found either in the `./doc` directory or at:
[https://pythondocs.webcodex.de/micro-esb](https://pythondocs.webcodex.de/micro-esb)

[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint)
qfilmplayer 1.0
Видеоплеер для Qt 6

# QFilmPlayer
## Видео плеер для Qt 6
## Версия 1.0

![](docs/screenshot.png)

### Установка

```shell
pip install git+https://gitflic.ru/project/nchistov/qfilmplayer.git
```

### Использование

QFilmPlayer можно использовать как отдельное окно, так и как виджет.

**examples/window_example.py**

```python
import sys

from PyQt6 import QtWidgets

import qfilmplayer

app = QtWidgets.QApplication(sys.argv)
fp = qfilmplayer.QFilmPlayer(["example_video.mp4"], title="QFilmPlayer")
fp.show()
sys.exit(app.exec())
```

**examples/widget_example.py**

```python
import sys

from PyQt6 import QtWidgets

from qfilmplayer import QFilmPlayer


class Window(QtWidgets.QWidget):
    def __init__(self, parent=None) -> None:
        super().__init__(parent)

        self.grid = QtWidgets.QGridLayout()

        self.fp = QFilmPlayer(["example_video.mp4"])

        self.grid.addWidget(QtWidgets.QPushButton("Some button"), 1, 1)
        self.grid.addWidget(QtWidgets.QPushButton("Some another button"), 2, 1)
        self.grid.addWidget(QtWidgets.QPushButton("And another one"), 2, 2)
        self.grid.addWidget(self.fp, 1, 2)

        self.setLayout(self.grid)


app = QtWidgets.QApplication(sys.argv)
window = Window()
window.show()
sys.exit(app.exec())
```

### Известные ошибки

 + Полноэкранный режим не работает, если QFilmPlayer встраивать как виджет
 + Если вы заметите какие-либо ошибки, [пишите](https://gitflic.ru/project/nchistov/qfilmplayer/issue)!

### Copyright

 + Код - © Николай Чистов, [Лицензия MIT](LICENSE)
 + `examples/example_video.mp4` - © Vincenzo Malagoli (https://www.pexels.com/@zenzazione/)
city-ch-autocomplete 0.4.9
A Django app to query the Swiss Post API for postcodes and localities.
Requires Python: >=3.9

city-ch-autocomplete
====================

city-ch-autocomplete is a Django helper app to add an autocomplete widget
in an address form that searches postal codes and locality names through the
post.ch API.

It depends on Bootstrap 5 to produce the autocomplete widget.

Quick start
-----------

1. Add "city_ch_autocomplete" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [
        ...,
        "city_ch_autocomplete",
    ]

2. Include city_ch_autocomplete urls to your urlpatterns::

    urlpatterns = [
        ...,
        path("", include("city_ch_autocomplete.urls")),
        ...,
    ]

2. Get an API access from the Swiss Post (starting from
   https://developer.apis.post.ch/ui/home). Note the process can take some
   time.
   Then add the POST_API_USER and POST_API_PASSWORD settings to your project.

   Optionally you can get the data from a CSV and put it in a database table.
   Read below for more details.

3. In the target form(s) of your project, add the `CityChMixin` to your
   form inheritance and a `CityChField` as a form field::

    from city_ch_autocomplete.forms import CityChField, CityChMixin

    class YourForm(CityChMixin, forms.ModelForm):
        class Meta:
            fields = [..., '<my_postcode_model_field>', '<my_city_model_field>', ...]
        city_auto = CityChField(...)
        postal_code_model_field = '<my_postcode_model_field>'
        city_model_field = '<my_city_model_field>'

   Don't forget to include `{{ form.media }}` in the templates where you are using
   the form.

Searching from the database
---------------------------

If for some reason, you would prefer searching postcodes/names from a database
table instead from the Swiss Post API, you can populate the `PLZdb` model with
external data. The `PLZdb.import_from_csv(csv_path)` class method allows for
importing such data.

A good CSV data source is https://www.swisstopo.admin.ch/fr/repertoire-officiel-des-localites
(choose the csv ending with `2056.csv`).

Then set the POST_API_USER setting to `None` and the view will search from the
database instead.

Geographic city filter
----------------------
If your database is spatially enabled, the `PLZdb.objects` manager allows for
searching cities from within a distance around another city::

    PLZdb.objects.filter_cities_around(<plz value>, <km>)
LscNumbers 0.0.9
用于精确计算的数字类
Requires Python: >=3.7

# 用于精确计算的数字类

### 解决de问题
* 使用multifunctional-calculator库，防止0.1+0.2=0.30...4的局面

### 调用方法
```
from LscNumbers import *

"""
Numbers : 数字类
"""

print(Numbers(1))
print(Numbers("1.0")) 
```
bspmap 1.0.0
B-spline library with C++ backend
Requires Python: >=3.12

# bspmap - 高性能 B-Spline 映射库

bspmap 是一个利用 C++ 后端加速的 B-Spline 计算库，通过 Python 的 ctypes 库提供易用的接口。适用于需要高效执行 B-Spline 插值、映射和基函数计算的场景。

## 主要特性 (Features)

* **高性能**: 核心计算逻辑（如 Cox-de Boor 递归、基函数求导）由 C++ 实现，显著快于纯 Python 实现。
* **多维支持**: 支持任意维度的输入和输出空间映射。
* **灵活的 Python 接口**: 基于 `ctypes` 封装，提供直观的面向对象 API (`BSP`, `Basis`)。
* **跨平台**: 支持 Windows, Linux 和 macOS (需编译对应的动态库)。
* **张量积结构**: 自动处理多维基函数的张量积组合。

## 项目结构 (Structure)

```
bspmap/
├── src/
│   ├── cpp/                # C++ 核心源码
│   │   ├── include/        # 头文件 (.h)
│   │   └── src/            # 源文件 (.cpp)
│   └── python/             # Python 包源码
│       └── bspmap/
│           ├── __init__.py
│           ├── bsp.py      # B-Spline 映射类
│           ├── basis.py    # 基函数定义
│           └── capi.py     # Ctypes 绑定层
├── tests/                  # 测试用例
├── docs/                   # 文档
└── CMakeLists.txt          # CMake 构建配置
```

## 快速开始 (Quick Start)

### 1. 安装 (Installation)

由于本项目包含 C++ 扩展，建议通过源码编译安装。

详细步骤请参考 [安装指南](docs/installation.md)。

简述：

```bash
# 1. 编译 C++ 后端
mkdir build
cd build
cmake ..
cmake --build . --config Release

# 2. 将编译好的 bspmap.dll (或 libbspmap.so) 放入 src/python/bspmap/bin/

# 3. 安装 Python 包
cd ..
pip install -e .
```

### 2. 基本使用 (Usage)

创建一个简单的 2D -> 1D B-Spline 映射：

```python
import numpy as np
from bspmap import BSP, Basis

# 1. 定义每个维度的基函数 (Basis)
#    参数: 控制点数量 (num_cps), 阶数 (degree)
basis_x = Basis(num_cps=5, degree=2)
basis_y = Basis(num_cps=5, degree=2)

# 2. 准备控制点 (Control Points)
#    输入维度为2，每个维度大小为5，所以总共有 5x5=25 个控制点
#    输出维度假设为1
size = [5, 5]
# 随机生成控制点数据，形状 (25, 1) 或者展平
control_points = np.random.rand(25, 1)

# 3. 初始化 BSP 对象
bsp = BSP(
    basis=[basis_x, basis_y],
    size=size,
    control_points=control_points
)

# 4. 执行映射
#    输入数据 x 形状: (N, input_dim) -> (10, 2)
input_data = np.random.rand(10, 2)
output_data = bsp.map(input_data)

print("Input shape:", input_data.shape)
print("Output shape:", output_data.shape)
```

## 文档 (Documentation)

* [安装指南](docs/installation.md)
* [API 参考](docs/api.md)
* [开发指南](docs/development.md)
beets-folkways 0.1.2
Beets metadata plugin to fetch folkways record data.
Requires Python: >=3.13

[Folkways](https://folkways.si.edu/) autotagger plugin for [beets](https://beets.io/).

It directly scrapes the html of the website which makes it prone to breakage.
The meta tags are sadly even more inconsistent than the info boxes, so for now, that's what this code is using.

As I only test it with the folkways records I actually own, the rest of their catalogue might have still other ways storing
their values that this library is not aware of.