semvec/pypi-packages huggingface dataset:
microaggregation 0.1.9
Fast C++ implementation of microaggregation algorithms for data privacy
License: MIT
Requires Python: >=3.7

# Microaggregation

Fast C++ implementation of microaggregation algorithms for data privacy protection.

## Features

- High-performance C++ implementation of SSE dynamic programming
- Python fallback when C++ extension is not available
- Compatible with NumPy arrays
- Timing utilities for performance measurement

## Installation

bash pip install microaggregation

## Usage

```python
import numpy as np
from microaggregation import calculate_sse_dynamic, calculate_total_variance, get_timing

# Example usage:
my_data = np.random.rand(100, 5)
min_k = 3

sse_value = calculate_sse_dynamic(my_data, min_k)
# sse_value_py_only = calculate_sse_dynamic(my_data, min_k, use_cpp=False) # To force Python

total_var = calculate_total_variance(my_data)

timers = get_timing()
start_wall = timers['wall_time']()
# ... some operation ...
end_wall = timers['wall_time']()
print(f"Wall time: {end_wall - start_wall}")

print(f"SSE: {sse_value}, Total Variance: {total_var}")
print(f"IL: {sse_value / total_var * 100 if total_var != 0 else float('inf')}")
```
lzhfreshrssapi 0.2.1
获取`FreshRSS`数据库中对应`url`的订阅源中已有的`guid`的集合
License: MIT
Requires Python: >=3.7

# freshrss api

获取`FreshRSS`数据库中对应`url`的订阅源中已有的`guid`的集合

## 示例
```python
if __name__ == "__main__":
    import asyncio

    async def main():
        try:
            links = await api_get_links_by_site_url(
                freshrss_url='http://rss.example.com/api/greader.php',
                username='username',
                api_password='api_password',
                site_url="https://jandan.net/top#tab=3days",
                n = 100
            )
            print(links)
        except Exception as e:
            print(e)

        db_config = {
            'host': 'host',
            'port': '5432',
            'user': 'user',
            'password': 'password',
            'base': 'base',
            'prefix': 'freshrss_userxxx_',
        }

        try:
            guids = await pg_get_guids_by_site_url(
                site_url="https://jandan.net/top#tab=3days",
                db_config = db_config
            )
            print(guids)
        except Exception as e:
            print(e)

    asyncio.run(main())

```