semvec/pypi-packages huggingface dataset:
dyson-equalizer 0.1.8
Computes the Dyson Equalizer and related low rank approximation of the input data
Requires Python: >=3.10
Keywords: Dyson Equalizer, low rank approximation

# Dyson Equalizer #

This package is a Python implementation of the Dyson Equalizer. 
The method is described in detail in the article [The Dyson Equalizer: Adaptive Noise Stabilization for Low-Rank Signal Detection and Recovery
](https://doi.org/10.48550/arXiv.2306.11263)

The documentation is available at [https://klugerlab.github.io/DysonEqualizer](https://klugerlab.github.io/DysonEqualizer).

## Installation ##
The main version of the package can be installed as 
```
pip install dyson-equalizer
```

The development version of the package can be installed as 
```
pip install git+https://github.com/Klugerlab/DysonEqualizer.git
```

## Getting started ##

To import the package and apply the Dyson Equalizer to a test matrix

```python
from dyson_equalizer.examples import generate_Y_with_heteroskedastic_noise
from dyson_equalizer.dyson_equalizer import DysonEqualizer

Y = generate_Y_with_heteroskedastic_noise()
de = DysonEqualizer(Y).compute()

```

The `DysonEqualizer` result class will contain the following attributes
- `Y`: The original data matrix
- `x_hat`: The normalizing factors for the rows
- `y_hat`: The normalizing factors for the columns
- `Y_hat`: The normalized data matrix so that the variance of the error is 1
- `X_bar`: The estimated signal matrix. It has rank `r_hat`
- `r_hat`:  The estimated rank of the signal matrix
- `S`: The principal values of the data matrix `Y`
- `S_hat`:  The principal values of the data matrix `Y_hat`

Detailed examples are available on the [Examples](https://klugerlab.github.io/DysonEqualizer/examples.html) 
page.
WebsocketTest 1.0.0
websocket api autotest
Requires Python: >=3.7

# WebSocket 接口自动化测试工具 (WS_API_TEST)

#### 介绍

这是一个基于 WebSocket 协议的接口自动化测试工具。它可以用于自动化测试 WebSocket 接口，确保接口的稳定性和可靠性。

#### 系统要求

**Python 3.10+**：确保你的系统上已经安装了 Python 3.10（推荐使用最新稳定版）。
**项目依赖**：项目需要一些第三方库，可以通过 requirements.txt 文件安装。

#### 安装步骤

**1.安装 Python：**
确保你的系统上已经安装了 Python 3.10 或更高版本。你可以从 [Python 官方网站 ](https://www.python.org/downloads/?spm=5176.28103460.0.0.40f75d27PnqPkU)下载并安装。
**2.克隆项目：**
使用 Git 克隆项目到你的本地机器。

```
git clone https://code.iflytek.com/ZNQC_AUTO_AI/python_scripts.git
cd python_scripts
git checkout WS_API_TEST
```

**3.安装项目依赖：**
使用 pip 安装项目所需的依赖库。

```
pip install -r requirements.txt
```
**4.运行项目：**
你可以通过以下两种方式之一来运行项目：

* **使用命令行**：
  在命令行中运行以下命令：

```
python run_tests.py --env uat --app 3d7d3ea4  --service gateway_5.4 --project vwa
```

* **使用批处理脚本**：
  双击 run_tests.bat 文件来运行项目。

#### 项目结构
├─allure_report
├─allure_results
├─build
├─common
├─config
├─data
├─dist
├─logs
├─testcase

* **文件说明**:
**allure_report**：存放 Allure 生成的 HTML 报告，用于展示测试结果。
**allure_results**：存放 Allure 生成的测试结果数据文件，如 result-12345.xml。
**build**：存放构建过程中生成的临时文件
**common**：存放通用的工具类
**config**：存放环境配置文件
**data**：存放测试数据文件
**dist**：存放最终发布的测试包
**logs**：存放运行日志文件
**testcase**：存放测试用例脚本
pyowletapi 2025.4.10
Owlet baby monitor API wrapper
Requires Python: >=3.10
Keywords: owlet, api, baby

# Introduction

Inspiration and API reverse engineering taken from various projects:

https://github.com/BastianPoe/owlet_api

https://github.com/mbevand/owlet_monitor

## Install

To install via pip run command

```
pip install pyowletapi
```

## To do

Tidy up exception logging

Create test routines

## Use

import the api and sock objects

```python
from pyowletapi.api import OwletAPI
from pyowlet.sock import Sock
```

create an api object passing your region, username and password, the OwletAPI will also take a aiohttp session as a keyword argument

```python
api = OwletAPI('europe', username, password)
```

you can then authenticate against the Owlet servers using this object and create a list of sock objects

```python
await api.authenticate()
socks = {device['device']['dsn']: Sock(api, device['device']) for device in devices}
```

to get current reading from sock call the update_properties function on each sock object

```python
device.update_properties()
```

This will return a dictionary, the key 'raw_properties' contains the raw response as a dict and the 'properties' key is a more cut down dict version of the response showing only the most relevant data and the 'tokens' key will return a dictionary if the api tokens have changed since the last call
evaluatorspk 0.0.1
A library for evaluating Retrieval-Augmented Generation (RAG) systems
Requires Python: >=3.10

# RAG Evaluator

## Overview

RAG Evaluator is a Python library for evaluating Retrieval-Augmented Generation (RAG) systems. It provides various metrics to evaluate the quality of generated text against reference text.

## Installation

You can install the library using pip:

```bash
pip install evaluatorspk
```

## Usage

Here's how to use the RAG Evaluator library:

```python
from evaluatorspk import RAGEvaluator

# Initialize the evaluator
evaluator = RAGEvaluator()

# Input data
question = "What are the causes of climate change?"
response = "Climate change is caused by human activities."
reference = "Human activities such as burning fossil fuels cause climate change."

# Evaluate the response
metrics = evaluator.evaluate_all(question, response, reference)

# Print the results
print(metrics)
```

## Streamlit Web App

To run the web app:

- cd into streamlit app folder.
- Create a virtual env
- Activate
- Install all dependencies
- and run
```
streamlit run app.py
```

## Metrics

The following metrics are provided by the library:

- **BLEU**: Measures the overlap between the generated output and reference text based on n-grams.
- **ROUGE-1**: Measures the overlap of unigrams between the generated output and reference text.
- **BERT Score**: Evaluates the semantic similarity between the generated output and reference text using BERT embeddings.
- **Perplexity**: Measures how well a language model predicts the text.
- **Diversity**: Measures the uniqueness of bigrams in the generated output.
- **Racial Bias**: Detects the presence of biased language in the generated output.

## Testing

To run the tests, use the following command:

```
python -m unittest discover -s rag_evaluator -p "test_*.py"
```
boilerplate-tools 0.1.4
A set of helper functions
Requires Python: >=3.10

# Boilerplate Tools

A collection of utility functions and tools to simplify common development tasks.

## Installation

```bash
pip install boilerplate-tools
```

## Features

- **Smart String Formatting**: String templating with variable validation
- **Configuration Management**: Load and process configuration files
- **JSON I/O**: Simple functions for reading, writing, and appending JSON data
- **Path Management**: Easily handle Python path configuration

## Usage Examples

### Smart Format

```python
from boilerplate_tools import smart_format

# Format a string with required variables
result = smart_format("Hello, {name}!", {"name": "World"})
print(result)  # Output: Hello, World!

# Will raise KeyError for missing variables
try:
    smart_format("Hello, {name}!", {})
except KeyError as e:
    print(e)  # Missing required template variable: 'name'

# Will warn about unused variables
import warnings
with warnings.catch_warnings(record=True) as w:
    smart_format("Hello, {name}!", {"name": "World", "unused": "value"})
    if w:
        print(w[0].message)  # Unused variables provided that are not in the template: unused
```

### Configuration Loading

```python
from boilerplate_tools import load_config

# Load a configuration file with variable resolution
config = load_config("config.yaml")
print(config.some_key)
```

### JSON I/O

```python
from boilerplate_tools import read_json, write_json, append_json

# Read a JSON file
data = read_json("data.json")

# Write a JSON file
write_json("output.json", {"name": "John", "age": 30})

# Append to a JSON list file
append_json("list.json", [{"name": "John"}, {"name": "Jane"}])
```

### Path Management

```python
from boilerplate_tools import setup_root

# Add the current directory to sys.path
setup_root()

# Add the parent directory to sys.path
setup_root(n_up=1)

# Get the root directory path
root_dir = setup_root(n_up=1, return_root=True)
print(f"Root directory: {root_dir}")
```

## Development

Distribution creation:

```bash
python setup.py sdist bdist_wheel
``` 

Upload to PyPI:

```bash
twine upload dist/*
```

## TODO
- Add Pytest tests for all functions
jaffatools 0.5.0
Tools for working with JAFFA fusion gene detection
Requires Python: >=3.6


# JaffaTools

A Python toolkit for JAFFA fusion gene detection

### Instructions

1. **Filter FASTQ files**: Filter FASTQ files based on the reads in the BAM file and keep only matching reads.
2. **Run JAFFA**: Encapsulates the running function of the JAFFA fusion gene detection process.
3. **Add NB:Z tags**: Extract NB:Z tags from the BAM file and add them to the JAFFA result CSV file.
4. **jaffa-viz**: Visualize JAFFA results
	1. **jaffa-viz circos**: Creates Circos plots to visualize fusion genes
	2. **jaffa-viz cell-stats:** Generates statistics about fusion genes per cell
	3. **jaffa-viz class-stats:** Creates plots showing the classification of fusion genes


## Install

```bash
pip install jaffatools
```

## Dependencies
### System Requirements
* **Python**: 3.6 or later
* **R**: 4.0.0 or later (Required for visualization functions)
### Python Dependencies

* **NumPy**: For numerical operations
* **pandas**: For data manipulation
* **pysam**: For parsing and manipulating SAM/BAM file
* **subprocess**: For executing R scripts (built-in)
* **argparse**: For command-line interface (built-in)
* **os**: For file path operations (built-in)
### R Package Dependencies
The visualization functions require the following R packages:
* **data.table**: Fast data manipulation
* **ggplot2**: Statistical data visualization
* **RCircos**: Circular visualization of genomic data
* **gtools**: Various R programming tools
* **dplyr**: Data manipulation grammar
#### Installation of R Dependencies
You can install all required R packages with the following R command:

```R
install.packages(c("data.table", "ggplot2", "RCircos", "gtools", "dplyr"))  
if (!requireNamespace("BiocManager", quietly = TRUE))  
    install.packages("BiocManager")  
BiocManager::install("RCircos")  
```
xparameter 0.0.1
A portable configuration tool to manage hyperparameters and settings of your experiments.
Requires Python: >=3.7

# xparameter
A portable configuration tool to manage hyperparameters and settings of your experiments.

## Features
:white_check_mark: Support syntax highlighting and autocompletion for attributes  
:white_check_mark: Support arguments control through command line  
:white_check_mark: Support nested definition (namespaces) to isolate parameters of the same name  
:white_check_mark: Inherent Singleton ensuring consistent revision across files  
:white_check_mark: Support basic type checking  

## Quickstart
You can install the latest official version of xparameter from PyPI:

```haskell
pip install xparameter
```

### Define Custom Configuration
```python
# config.py
from xparameter import Configure as C
from xparameter import Field as F

class Config(C):
    """Define your overall description here"""

    class checkpoint(C):
        """Define group description here"""
        directory       = F(str,   default="./checkpoints", help="Directory to save model checkpoints")

```

### Parse Command-line Arguments
```haskell
Config.parse_sys_args()
```

Parameters in `Config` class will be automatically registered onto a `argparse.ArgumentParser()`, which acts as a parser to extract parameter values from command line. In this example case, we use

```haskell
python test.py --checkpoint.directory "/path/to/checkpoints"
```

The argument `Config.checkpoint.directory` will be set to `"/path/to/checkpoints"`. This parsing process and the following manual revision will trigger an inherent type check.

Use the `help` command to print automatically generated help menu:
```haskell
python test.py --help
```
```yaml
Usage: config_01.py [-h] [--checkpoint.directory str]

Define your overall description here

Options:
  -h, --help                  show this help message and exit

Checkpoint:
  Define group description here

  --checkpoint.directory str  Directory to save model checkpoints
```

### Revise Arguments Manually
Manual revision of the argument values can be performed either independently or as a post-processing step following the aforementioned command-line parsing, e.g.,

```haskell
# Config.parse_sys_args()
Config.checkpoint.directory = "/path/to/checkpoints"
```

### Export as Different Formats
Export as python dict:
```haskell
Config.as_dict()
```
Export as json string:
```haskell
Config.as_json()
```