semvec/pypi-packages huggingface dataset:
shawon-mt5-automation 2.2.3
A Flask webhook server to automate MetaTrader 5 trading based on TradingView signals with configurable settings and API key authentication.
Requires Python: >=3.7

# MT5 Webhook Trader

A Python Flask application designed to automate MetaTrader 5 (MT5) trading based on incoming webhook signals, typically from platforms like TradingView. This package allows users to configure their MT5 account details, trade parameters (lot size, optional Stop Loss/Take Profit in USD), and secure the webhook endpoints with an API key.

## Features

-   **Configurable MT5 Details**: Easily set your MT5 account, password, server, and trading symbol.
-   **Flexible Trade Parameters**: Define lot size, and optional Stop Loss (SL) and Take Profit (TP) values in USD. If SL/TP values are 0 or not provided, they won't be set on the trade.
-   **API Key Authentication**: Secure your webhook endpoints with an API key (`X-API-Key` header) to prevent unauthorized access.
-   **Signal Gap Control**: Prevent over-trading by setting a minimum time gap between consecutive BUY or SELL signals.
-   **Automatic Position Management**: Closes all existing positions for the specified symbol before placing a new trade signal.
-   **Status Endpoints**: Check current open positions or manually close all positions via dedicated API endpoints.
-   **Persistent Signal Times**: Stores the last signal time to disk to maintain state across restarts.

## Installation

```bash
pip install shawon_mt5_automation
bear-django-db-reconnect 0.1.0
A Django middleware and decorator to automatically handle database connection losses.
Requires Python: >=3.8

# Django DB Reconnect

A simple Django app that provides a middleware and a decorator to automatically handle database connection losses (e.g., "MySQL server has gone away").

This utility catches specific `OperationalError` exceptions, closes the stale database connections, and retries the operation once. This can help improve the stability of long-running Django applications or applications with intermittent network access to the database.

## Installation

```bash
pip install bear-django-query-profiler
```

## Usage

1.  Add the middleware to your `MIDDLEWARE` list in `settings.py`.

```python
# settings.py
MIDDLEWARE = [
    'db_reconnect.middleware.DBConnectionMiddleware',
]
```

2.  (Optional) You can override this list by defining DB_RECONNECT_ERROR_CODES in your settings.py.

```python
# settings.py
DB_RECONNECT_ERROR_CODES = [2006, 2013]
```
FWHFDL 0.0.2
WHFDL Feature Selector
Requires Python: >=3.11

# FWHFDL

A package for feature selection with WHFDL.

This package is part of "WHFDL: an explainable method based on World Hyper-heuristic and Fuzzy Deep Learning approaches for gastric cancer detection using metabolomics data" article's experiment.

Example:

```python
import pandas as pd
from sklearn.model_selection import train_test_split

import FWHFDL as fw

data_path = 'data.csv'

data = pd.read_csv(data_path)
X = data.drop(['state'], axis=1)
y = data['state']
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)

fwhh = fw.FWHH()
fwhh.data_set(X_train, y_train, X_test, y_test)
fwhh.problem_set()
# iteration of each algorithm
fwhh.problem.MaxIt = 15
# iteration of whh
fwhh.MaxIt = 15
fwhh.algs_set()
fwhh.pop_set()
res = fwhh.run()
print("Best Cost:", res['best_cost'])
print("Selected Num:", res['selected_num'])
print("Selected:", res['selected'])
```
You can find the "data.csv" [here](https://github.com/arman-daliri/WHFDL/tree/main/Data).
macos-serving 0.1.1
Simple LLM continous batching engine implementation with support for optimized macos-inference
Requires Python: >=3.11

# macos-serving

This repository contains a minimal continuous batching LLM engine. The current implementation is a straightforward PyTorch prototype focused on exercising the serving loop and request scheduler.

## Current Capabilities

- Runs a single dense model configuration: Qwen 0.6B.
- Demonstrates continuous batching to keep GPU execution saturated under streaming request load.

## Vision

- Transition the backend to Metal-accelerated kernels purpose-built for Apple silicon.
- Broaden model coverage and support quantized variants suited for on-device serving.
- Introduce production-grade observability, adaptive batching heuristics, and deployment tooling tailored for macOS.

## Quick Start

1. Make sure you have uv installed

```bash
uvx macos-serving --model_path Qwen/Qwen3-0.6B
```
This command will install all required dependencies and run an API on port 4444 by default.

After server goes up you can go to `http://localhost:4444` some simple chat page will be exposed there that you can use to test out inference process.
Additionally you can use exposed API as openai compatible server and do something like this
```
from openai import OpenAI
client = OpenAI(base_url="http://localhost:4444/v1", api_key="")
messages = [
    {"role": "system", "content": "You are helpful assistant, answer user questions"},
    {"role": "user", "content": "Who was Shakesphere? Tell me in detail"},
]
response = client.chat.completions.create(messages=messages, model="w/e")
print(response)
```
Oh and right now there is no sophisticated sampling implemented, during decoding next token is just sampled using argmax from logits.

For now this is just an experimental-exploration project in future there is a plan to further optimize it and play around with metal kernes.