semvec/pypi-packages huggingface dataset:
pkr-regression 0.0.1
Pure Kernel Regression: noise-free, explainable tabular regression via high-purity feature windows
License: MIT
Requires Python: >=3.8

# Pure Kernel Regression (PKR)

A *rule‑based*, **explainable** alternative to black‑box regression that trusts only the "cleanest" regions of your feature space.

---
## 🌟 Why PKR?
* **Noise‑proof:** uses only regions where ≥90 % of training rows share the *same* extreme label.
* **Explainable:** every prediction is traced to a single kernel rule — or falls back to a safe median.
* **Plug‑and‑play:** one call to `pkr.fit(train)` and `pkr.predict(test)` — no hyper‑parameter hunt.

---
## ⚙️ Algorithm in 60 seconds
1. **Extreme–label flagging**  
   Compute the 20th (q20) and 80th (q80) percentiles of the target.  
   * y ≤ q20 ⇒ `y_bin = 0`  
   * y ≥ q80 ⇒ `y_bin = 1`
2. **Exhaustive window scan (1‑D → 3‑D)**  
   * Numeric cols: 0.5‑wide sliding windows, step 0.25  
   * Categorical : exact match
3. **Keep only _“clean kernels”_**  
   ≥90 % rows share the same `y_bin` **and** `count ≥ 10`.
4. **Representative values**  
   * `rep0` = 33rd percentile of rows with `y_bin = 0`  
   * `rep1` = 66th percentile of rows with `y_bin = 1`  
   * `rep_mid` = global median of *y*
5. **Prediction rule**  
   * *No matching kernel* → `rep_mid`  
   * *One match* → `rep0` or `rep1` (by label)  
   * *Many matches* → average of the matched reps

---
## 🔧 Quick start
```bash
pip install pkr   # (coming soon)
```
```python
from pkr import PKR

model = PKR(max_dim=3)
model.fit(train_df, target="Listening_Time_minutes")

pred = model.predict(test_df)
submission = test_df[["id"]].assign(Listening_Time_minutes=pred)
submission.to_csv("submission.csv", index=False)
```
A full Google Colab demo notebook is in **`/notebooks/PKR_demo.ipynb`**.

---
## 📂 Repository layout
```
├── src/                 # core library
│   └── pkr.py
├── notebooks/           # demos (Colab & Kaggle)
├── examples/            # sample data + CLI
└── README.md            # you are here
```

---
## 📈 Roadmap
- [ ] PyPI package
- [ ] Auto‑kernel pruning for high‑dim data
- [ ] Stacking helper (PKR + any ML model)

---
## 🖋 Citation
If you build on PKR, please cite (pending arXiv link):
```
@misc{yusuf2025pkr,
  title  = {Pure Kernel Regression: Noise‑free Region Rules for Fast Tabular Prediction},
  author = {Yusuf Burak …},
  year   = {2025},
  url    = {https://github.com/YusufBurak/PKR}
}
```

---
## 📜 License
MIT — free for personal & commercial use with attribution.
my-sse-http-custom-param-server 0.1.1
A custom MCP SSE HTTP Server with parameter support.
License: MIT

# MCP SSE 服务器

这是一个基于Python Flask实现的MCP（Message Communication Protocol）服务器，支持SSE（Server-Sent Events）和自定义HTTP参数。

## 功能特点

- 基于SSE的实时消息推送
- 支持自定义客户端ID和消息类型
- 跨域支持（CORS）
- 内置测试页面

## 依赖要求

- Python 3.7+
- Flask 2.3.3
- Flask-CORS 4.0.0
- Gunicorn 21.2.0
- python-dotenv 1.0.0

## 安装说明

1. 安装依赖：
```bash
pip install -r requirements.txt
```

2. 运行服务器：
```bash
python main.py
```

服务器将在 http://localhost:5000 启动

## 使用方法

### 测试页面

访问 http://localhost:5000 可以看到内置的测试页面。

### SSE 接口

接口地址：`/events`

支持的URL参数：
- `client_id`: 客户端标识符
- `type`: 消息类型

示例：
```javascript
const eventSource = new EventSource('/events?client_id=client1&type=notification');

eventSource.onmessage = function(event) {
    const data = JSON.parse(event.data);
    console.log('收到消息:', data);
};
```

## 生产环境部署

使用Gunicorn启动服务：

```bash
gunicorn -w 4 -b 0.0.0.0:5000 main:app
```

## 注意事项

- 开发模式下默认启用了调试功能
- 生产环境部署时建议使用Gunicorn作为WSGI服务器
- 确保防火墙允许5000端口的访问
ebike-connect 0.0.2
Python client for Bosch eBike Connect.
License: MIT
Requires Python: >=3.11
Keywords: api, bosch, ebike

# ebike-connect

Python library to get rides and trips from the [Bosch eBike Connect](ebike-connect.com) platform.

![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/rogiervandergeer/ebike-connect/test.yaml?branch=main) 
![PyPI](https://img.shields.io/pypi/v/ebike-connect)
![PyPI - License](https://img.shields.io/pypi/l/ebike-connect)
![PyPI - Downloads](https://img.shields.io/pypi/dm/ebike-connect) 

## Installation

The package is available on [PyPI](https://pypi.org/project/ebike-connect/). Installation is can be done with your favourite package manager. For example:

```bash
pip install ebike-connect
```

## Usage

Initialize a client with your username and password:
```python
from ebikeconnect.client import EBikeConnectClient


client = EBikeConnectClient.login("username", "password")
```

The eBike Connect api provides `rides` and `trips`, where a ride is a single uninterrupted ride, and a trip is a collection of rides (all rides on a single day?).

Rides and trips can be listed with the following methods:

```python
def find_rides(
    self, from_datetime: datetime | None = None, to_datetime: datetime | None = None
) -> Iterable[EBikeConnectRide]
```

This returns an iterable of `EBikeConnectRide` dataclasses, which have the following fields:
```python
    id: str
    start_time: datetime
    end_time: datetime
    driving_time: timedelta
    type: str
    status: int
    total_distance: float
    title: str
    calories: float
    avg_speed: float
    max_speed: float
```

```python
def find_trips(
    self, from_datetime: datetime | None = None, to_datetime: datetime | None = None
) -> Iterable[EBikeConnectTrip]:
```

This returns an iterable of `EBikeConnectTrip` dataclasses, which have the following fields:
```python
    id: str
    start_time: datetime
    end_time: datetime
    driving_time: timedelta
    type: str
    status: int
    total_distance: float
    ride_ids: list[str]
```


In addition, ride details (with many additional fields) can be obtained by calling:

```python
def get_ride(self, id: str) -> EBikeConnectRideDetails
```