semvec/pypi-packages huggingface dataset:
fake-https-server 0.0.10
Fake http and https servers
Requires Python: >=3.14
Keywords: fake, mock, http, https, server, request

# Fake Https Server

## Introduction

Fake Https Server is a package to create auto assigned HTTPS and HTTP servers to
use with tests. Useful to tests web scrapers and https or https clients.

## How create auto assigned certificates

Follow `docs/receita-servidor-cliente-ssl.md` recipe.

## How to use

Install it using `pip` command:

```bash
pip install fake_https_server
```

in your project folder.

## Usage

First, generate the server and ca certificates. To do it, follow the recipe.
Then, you can use HTTP or HTTPS server as follow:

### Fake HTTP Server

```python
# Message to be sent
msg = "It works"
# Create the fake HTTP server. By default the HTTP server will listen at
# localhost, a random free port (between 1024 and 65535)
server = Daemon(FakeHttpServer(ContentGet(msg)))
# Start the server
server.start()
# Make a http client connection to the server
client = http.client.HTTPConnection("localhost", server.port())
client.request("GET", "/")
# Get the server response
response = client.getresponse()
content = response.read().decode()
# Stop the fake http server
server.stop()
```

### Fake HTTPS Server

```python
# Path to ca certificate file (the https client needs it)
ca_file = Path(__file__).parent.parent / "certificates" / "ca.crt"
# Message to be sent
msg = "It works!"
# Create the fake HTTPS server. By default the HTTPS server will listen at
# localhost, a random free port (between 1024 and 65535)
server = Daemon(FakeHttpsServer(ContentGet(msg)))
# Start the server
server.start()
# Make a https client connection to the server
client = http.client.HTTPSConnection(
    "localhost",
    server.port(),
    context=ssl.create_default_context(cafile=ca_file)
)
client.request("GET", "/")
# Get the server response
response = client.getresponse()
content = response.read().decode()
# Stop the fake http server
server.stop()
```

## License

The MIT License (MIT)

Copyright (C) 2025 Fabrício Barros Cabral

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE 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 NON-INFRINGEMENT. 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.
butext 0.3.6
https://butext.readthedocs.io/en/latest/

BUtext focuses on text processing techniques commonly used in Natural Language Processing (NLP). Natural Language Processing is important for many applications. When given a very large body of text, there is only so much a human can do to analyze it. Imagine trying to find the word count of a book you are reading? That would be very difficult and impractical, so it’s better to have a computer do it as it takes milliseconds to perform. That’s just one area where Natural Language Processing is useful. In essence, Natural Language Processing allows computers to understand and interpret text, far beyond our capabilities. When a computer can understand text, it can learn from it and make predictive models, sentiment analysis, chatbots, and even artificial intelligence through text generation. BUtext allows a seamless experience for text processing and preparing text for natural language processing and machine learning purposes.
postgresdbmodel 0.1.1
Capa de acceso a datos para PostgreSQL integrada con SQLAlchemy
Requires Python: >=3.7

# postgresdbmodel

Capa de acceso a datos para PostgreSQL integrada con SQLAlchemy.

## Instalación
```bash
pip install postgresdbmodel
```

## Uso
```python
from postgresdbmodel.postgres_dal import PostgresDAL
from postgresdbmodel.sqlalchemy_data_mapper import DataMapper
# ...
```

## Licencia
MIT
swmm-toolkit 0.16.2
PySWMM SWMM Python Toolkit
Requires Python: >=3.9
Keywords: swmm5, swmm, stormwater, hydraulics, hydrology

# swmm-toolkit

`swmm-toolkit` contains SWIG generated Python wrappers for the swmm-solver and swmm-output libraries. 


## Build Status

[![Build Wheels](https://github.com/pyswmm/swmm-python/actions/workflows/build_wheel.yml/badge.svg)](https://github.com/pyswmm/swmm-python/actions/workflows/build_wheel.yml)


## Installation

[![version](https://img.shields.io/pypi/v/swmm-toolkit.svg?maxAge=3600)](https://pypi.org/project/swmm-toolkit/) [![Downloads](https://pepy.tech/badge/swmm-toolkit)](https://pepy.tech/project/swmm-toolkit)

  ``pip install swmm-toolkit``

## Community

[![Discord](https://img.shields.io/badge/Discord-Join%20Chat-7289da?logo=discord&logoColor=white)](https://discord.gg/U8wqxgjt9C)

Join the discussion!  We will do everything we can to help you!

## Features

`swmm-toolkit` makes SWMM a fully fledged Python extension with:  

 - Compatibility with USEPA SWMM
 - Python integration at the speed of C
 - Full access to library APIs
 - Pythonic naming, enums, exceptions, and return value handling 


## Basic Usage

Run a SWMM simulation. 
```
from swmm.toolkit import solver

solver.run('input_file.inp', 'report_file.rpt', 'output_file.out')

```

## Build From Source

> [!NOTE]  
> Since version version 0.16.1, swmm-toolkit by default has been built and published
> using the [python stable ABI](https://docs.python.org/3/c-api/stable.html#stable-abi) for 
> python 3.9 onward. Using the stable ABI introduces very minor performance reduction while 
> substantially simplifying our release process and compatibility with future python versions.
> 
> The commands below show how to build this package with and without using the python stable ABI.

### Build with python stable ABI

` python -m build .`

### Build without python stable ABI

` NO_STABLE_ABI=1 python -m build`
WheelOfFortune 0.1.0
Игра "Поле чудес" на Python
Requires Python: >=3.6

Простая реализация игры "Поле чудес" на python.

## Установка

```bash
pip install WheelOfFortune
```

## Использование

```bash
python -m wheel_of_fortune
```
## Пример игры

```
=== Поле Чудес ===
выберите сложность:
легко  (введите 1)
средне (введите 2)
сложно (введите 3)
1
■■■■■■■■■■
 Введите букву:
и
верно
■■■■■■■■и■
 Введите букву:
п
неверно
 Осталось жизней:  6
■■■■■■■■и■ 
 Введите букву: 
и
неверно
 Осталось жизней:  5
■■■■■■■■и■ 
 Введите букву: 
о
верно
■■■■о■о■и■ 
 Введите букву: 
технология
Слово угаданно!

==победа в раунде!==

■■■■■
 Введите букву:
питон
Слово угаданно!

==победа в раунде!==

■■■■■■■■■
 Введите букву:
и
неверно
 Осталось жизней:  4
■■■■■■■■■
 Введите букву:
п
неверно
 Осталось жизней:  3
■■■■■■■■■
 Введите букву:
р
верно
■■■■р■■■р
 Введите букву:
е
верно
■е■■р■■■р
 Введите букву:
генератор
декоратор слово не угаданно!
Время выполнения: 1 мин 31 сек
```
## Лицензия
impkmeans 1.0.2
ImpKMeans: Improved K-Means initialization using KDE + KD-Tree
Requires Python: >=3.8
Keywords: clustering, kmeans, k-means, kde, density, kd-tree, machine-learning

[![PyPI version](https://badge.fury.io/py/mcmstclustering.svg)](https://badge.fury.io/py/mcmstclustering)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)

# ImpKMeans

**ImpKMeans** is an improved version of the K-Means clustering algorithm, designed to automatically determine high-quality initial centroids using:

- **Multivariate Kernel Density Estimation (KDE)**
- **KD-Tree–based radius suppression**
- **Mode-seeking peak extraction**

---

## Motivation

K-Means often performs poorly when its initial centroids are chosen randomly. The paper shows that selecting centroids from KDE-based density peaks and filtering them with a KD-Tree radius rule leads to more accurate and stable clustering. ImpKMeans implements this idea to provide a simple, effective improvement over standard K-Means initialization.

## 🚀 Features

- KDE-based high-density region detection  
- Intelligent centroid selection via KD-Tree radius filtering  
- Deterministic behavior with `random_state`  
- Fully compatible with scikit-learn API (`fit`, `fit_predict`, `predict`, `get_params`, `set_params`)  
- Lightweight and fast  

---

## 📦 Installation

Install directly from PyPI:

```bash
pip install impkmeans
```

---

## Basic Usage

```bash

from sklearn.datasets import load_iris
from impkmeans import ImpKMeans
from sklearn.metrics.cluster import adjusted_rand_score

# Load dataset
data = load_iris()
X, y = data.data, data.target

model = ImpKMeans(k=7, r=0.7245, random_state=42)
labels = model.fit_predict(X)

ARI=adjusted_rand_score(y, labels)
print("Adjusted Rand Index = %0.4f"%ARI)

```

---

## Cite

If you use the code in your works, please cite the paper given below:

```bash
Şenol, A. (2024). Impkmeans: An improved version of the k-means algorithm, by determining 
optimum initial centroids, based on multivariate kernel density estimation and kd-tree. 
Acta Polytechnica Hungarica, 21(2), 111-131.
```

```bash
@article{csenol2024impkmeans,
  title={Impkmeans: An improved version of the k-means algorithm, by determining optimum initial centroids, based on multivariate kernel density estimation and kd-tree},
  author={{\c{S}}enol, Ali},
  journal={Acta Polytechnica Hungarica},
  volume={21},
  number={2},
  pages={111--131},
  year={2024}
}
```


## License

This project is licensed under the MIT License.
See the LICENSE file for details.
run-with-coverage 0.1.0a6
Run a Python script with coverage tracking and allow the user to specify the coverage data file.
Requires Python: >=2

# Run With Coverage

Run a Python script with coverage tracking, allowing the user to specify the coverage data file - even in complex or non-standard environments.

- ✅ **Python 2 & 3 compatible**
- ✅ **Windows & POSIX support**
- ✅ **Unicode-safe**, including non-ASCII paths
- ✅ **Safe `.coverage` writing**, even when filenames contain spaces or non-UTF-8 characters
- ✅ **Temp file management compatible with SQLite's UTF-8-only file requirements**

> Fun Fact: The basic Unix implementation took 1 day. Windows compatibility took 14. You're welcome.

## Why This Exists

Most test runners (`pytest`, `nose`, etc.) and coverage tools (`coverage.py`) make assumptions:

- Filenames are UTF-8 or ASCII
- Paths don't contain spaces or non-English characters
- Python 3 is the only target platform
- subprocess is sufficient for launching scripts

These assumptions **break** in:
- Internationalized environments (e.g. Chinese, Japanese, Cyrillic filenames)
- Enterprise and legacy systems still running **Python 2**
- **Windows**, where environment variables use `mbcs` and temp file encoding matters

## Usage

```
python -m run_with_coverage [-c <coverage_file>] [-v] [-L] -- <script_to_run> [args...]
```

- `-c`: Coverage output file (default: `.coverage`)
- `-v`: Enable verbose logging
- `-L`: Measure library code
- `--`: Required delimiter to separate runner options from the script being tested

## Example: Running on Windows with Non-ASCII Paths

This example runs a Python script in a Unicode path with arguments, saving the coverage file to a Unicode path as well.

Example script under test `C:\Users\Administrator\Desktop\路径 有空格\名字 有空格.py`:

```python
# coding=utf-8
from __future__ import print_function
import sys

for i, arg in enumerate(sys.argv):
    print('sys.argv[%d]=%s' % (i, arg))
```

Example command:

```
C:\Users\jifengwu2k\packages\run-with-coverage>python -m run_with_coverage -c "..\..\路径 有空格\输出 文件.sqlite3" -v -- "..\..\路径 有空格\名字 有空 格.py" 参数1 "参数2 有空格"
```

Sample output:

```
2025-06-21 14:47:28,516 - DEBUG - Preparing to run script with coverage.
2025-06-21 14:47:28,516 - DEBUG - Script path: C:\Users\jifengwu2k\路径 有空格\名字 有空格.py
2025-06-21 14:47:28,516 - DEBUG - Arguments: [u'\u53c2\u65701', u'\u53c2\u65702 \u6709\u7a7a\u683c']
2025-06-21 14:47:28,516 - DEBUG - Coverage output path: C:\Users\jifengwu2k\路径 有空格\输出 文件.sqlite3
2025-06-21 14:47:28,517 - DEBUG - Temporary file for coverage created at: C:\Windows\Temp\tmphulafg
2025-06-21 14:47:28,517 - DEBUG - Launching process:
sys.argv[0]=C:\Users\jifengwu2k\路径 有空格\名字 有空格.py
sys.argv[1]=参数1
sys.argv[2]=参数2 有空格
2025-06-21 14:47:28,678 - INFO - Script exited with code: 0
2025-06-21 14:47:28,680 - DEBUG - Moving temp coverage file to final destination: C:\Users\jifengwu2k\路径 有空格\输出 文件.sqlite3
```

## Contributing

Contributions are welcome! Please submit pull requests or open issues on the GitHub repository.

## License

This project is licensed under the [MIT License](LICENSE).