semvec/pypi-packages huggingface dataset:
lc3-ensemble-test 0.1.12
Python backend and autograder library for LC-3 assembly
Requires Python: >=3.8

# lc3-ensemble-test: Python backend & autograder for LC-3 assembly

This project is built upon [lc3-ensemble](https://github.com/endorpersand/lc3-ensemble). This module is an autograder library to test programs written in LC-3 assembly. To see the functions and how to implement an autograder, see [`doc/API.md`](https://github.com/endorpersand/lc3-ensemble-test/blob/main/doc/API.md).

## Installation

To install this package, you can use pip:

```zsh
pip install lc3-ensemble-test
```

To install additional packages to help create autograders for GT CS 2110,

```zsh
pip install "lc3-ensemble-test[std]"
```

## Running

### With standard dependencies

There are several ways to display test results using `pytest`'s built-in functionality.

#### Display in command-line

```zsh
pytest 
```

#### Display as HTML

```zsh
pytest --html=report.html --self-contained-html
```

*The `conftest.py` provided in `examples/` will automatically open the generated page in a web browser.*

#### Display as JUnitXML

```zsh
pytest --junitxml=report.xml
```

### Without standard dependencies

If standard dependencies are not included, autograders can still be run with `unittest`.

```zsh
python3 -m unittest <DIR>
```

## Development

### Development Setup

1. Create a Python virtual environment with `python -m venv venv`
2. Activate the environment by running the activate script:
    - Windows: `venv\Scripts\activate`
    - Other: `source venv/bin/activate`
3. Install maturin (`pip install maturin`)
4. Run `maturin develop`
5. Import the `ensemble_test.core` or `ensemble_test.autograder` modules while inside the virtual environment

You can run the autograder tests with the following:

```sh
cd tests
pytest
```

### Development Installation

If installing directly from this repository,

- `pip install .`: Install the barebones autograder
- `pip install ".[std]"`: Install the autograder and additional packages to help create autograders for CS 2110.
polars-strsim 0.2.5
Polars extension for string similarity
Requires Python: >=3.8
Keywords: polars-extension, string-similarity

<a href="https://pypi.org/project/polars-strsim/">
    <img src="https://img.shields.io/pypi/v/polars-strsim.svg" alt="PyPi Latest Release"/>
</a>

# String Similarity Measures for Polars

This package provides python bindings to compute various string similarity measures directly on a polars dataframe. All string similarity measures are implemented in rust and computed in parallel.

The similarity measures that have been implemented are:

- Levenshtein
- Jaro
- Jaro-Winkler
- Jaccard
- Sørensen-Dice

Each similarity measure returns a value normalized between 0.0 and 1.0 (inclusive), where 0.0 indicates the inputs are maximally different and 1.0 means the strings are maximally similar.

## Installing the Library

### With pip

```bash
pip install polars-strsim
```

### From Source

To build and install this library from source, first ensure you have [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) installed. You will also need maturin, which you can install via `pip install 'maturin[patchelf]'`

polars-strsim can then be installed in your current python environment by running `maturin develop --release`

## Using the Library

**Input:**

```python
import polars as pl
from polars_strsim import levenshtein, jaro, jaro_winkler, jaccard, sorensen_dice

df = pl.DataFrame(
    {
        "name_a": ["phillips", "phillips", ""        , "", None      , None],
        "name_b": ["phillips", "philips" , "phillips", "", "phillips", None],
    }
).with_columns(
    levenshtein=levenshtein("name_a", "name_b"),
    jaro=jaro("name_a", "name_b"),
    jaro_winkler=jaro_winkler("name_a", "name_b"),
    jaccard=jaccard("name_a", "name_b"),
    sorensen_dice=sorensen_dice("name_a", "name_b"),
)

with pl.Config(ascii_tables=True):
    print(df)
```
**Output:**
```
shape: (6, 7)
+----------+----------+-------------+----------+--------------+---------+---------------+
| name_a   | name_b   | levenshtein | jaro     | jaro_winkler | jaccard | sorensen_dice |
| ---      | ---      | ---         | ---      | ---          | ---     | ---           |
| str      | str      | f64         | f64      | f64          | f64     | f64           |
+=======================================================================================+
| phillips | phillips | 1.0         | 1.0      | 1.0          | 1.0     | 1.0           |
| phillips | philips  | 0.875       | 0.958333 | 0.975        | 0.875   | 0.933333      |
|          | phillips | 0.0         | 0.0      | 0.0          | 0.0     | 0.0           |
|          |          | 1.0         | 1.0      | 1.0          | 1.0     | 1.0           |
| null     | phillips | null        | null     | null         | null    | null          |
| null     | null     | null        | null     | null         | null    | null          |
+----------+----------+-------------+----------+--------------+---------+---------------+
```
wordmill 0.0.2
Document summarization API service
Requires Python: >=3.12

# wordmill

A work-in-progress.

wordmill is a document summary API service. It provides a simple REST API which accepts requests to summarize a document. Under the hood, it reaches out to a LLM hosted on any OpenAI-compatible API service.

It is designed to abstract away the "AI" details from your user base. Many people in your organization want to summarize documents. Not as many of them care to know all the details related to LLMs, prompts, document prep, model selection, etc. The service will allow administrators to configure and customize these aspects based on the incoming document type. All the end users need to do is request a summary.

## Setup

1. It is recommended to [install pyenv](https://github.com/pyenv/pyenv?tab=readme-ov-file#installation).

     NOTE: Make sure to follow all steps! (A, B, C, D, and so on)

2. Set up the virtual environment:

    ```shell
    pipenv install --dev
    ```

3. Add your LLM access info into `.env`, example:

   ```text
   LLM_API_KEY=<your key>
   LLM_BASE_URL="https://my-llm-server:443/v1"
   LLM_MODEL_NAME="mistral-7b-instruct"
   ```

## Running API server

To run the server:

```shell
pipenv shell
flask run
```

## Example Usage of the API server

The service accepts a request to summarize the document and returns a URL that you should visit to check the status of your summary.

A background task reaches out to the LLM and awaits the response. Eventually, the status of your summarize task will shift to 'done' and you can view the LLM-generated content. Your task may also shift to 'error' if something went wrong.

Since these summaries do not need to be long-lived, currently we are using flask-caching's "SimpleCache" to store the data. For production purposes, the cache service used by flask-caching will need to be changed to redis or memcached

```python
import json
import requests
import time

# load the document you wish to summarize
with open("incident.json") as fp:
    data = json.load(fp)

# customize the prompt passed to the LLM (optional)
requests.post(
    "http://127.0.0.1:8000/prompt",
    json={"prompt": "Please summarize this document:\n\n{document}"}
)

# submit request to summarize and get background task id
id = requests.post("http://127.0.0.1:8000/summarize", json={"document": data}).json()["id"]

# repeatedly check on the 'summarize' task and wait for summary to be generated...
while True:
    time.sleep(5)
    summary = requests.get(f"http://127.0.0.1:8000/summary/{id}").json()
    if summary["status"] == "done":
        print(summary["content"])
        break
```
dbt-select-builder 0.1.0
Add your description here
Requires Python: >=3.10

# dbt-select-builder

A builder to create a select / exclude clause for dbt.

The format of select / exclude clauses in dbt supports only `','` and `' '` (white-space) denoting 'and' and 'or', respectively. Besides parentheses are not supported. Therefore, to create a complicated select clause you often decompose factors into one-line. An example is shown below.

```math
A \land (B \lor C) \Rightarrow A,B \ A,C
``` 

The left side is a logical expression and the right side is a dbt-select expression. Since parentheses are not supported, it is required to expand your logical expression by yourself.

Using this library, the following can be written in python code in a straightforward way.

```python
from dbt-select-builder import (
    dbt_and,
    dbt_or
)

dbt_and(
    "A",
    dbt_or(
        "C", "D"
    )
).resolve().build()
# "A,C A,D" is returned!
```

Also, strings with `','` and `' '` are supported.

```python
from dbt-select-builder import (
    dbt_and,
    dbt_or
)

dbt_and(
    "A,B",
    "C D"
).resolve().build()
# "A,B,C A,B,D" is returned!
```
datawhale 1.1.0rc3
金融数据平台，数据统一标准层。统一多数据源接口，可维护本地数据存储、更新
Requires Python: >=3.10

# DataWhale 数据分析工具包

## 项目简介
DataWhale 是一个综合性的数据分析工具包，集成了多个金融数据源的接口，提供了便捷的数据获取和分析功能。本项目旨在为数据分析师和量化交易研究者提供一站式的数据解决方案。

## 主要特性
- 多数据源支持：集成 AKShare、Tushare、JQData、BaoStock 等主流金融数据接口
- 数据处理工具：提供数据清洗、转换和分析的常用工具
- 数据存储：支持 SQL 数据库存储和管理
- 可扩展性：模块化设计，便于扩展和自定义
- 数据下载与更新：支持全市场数据批量下载和增量更新
- 断点续传：支持数据下载和更新的断点续传功能

## 安装方法

### 使用pip安装
```bash
pip install datawhale
```

### 从源码安装
```bash
git clone https://github.com/yourusername/datawhale.git
cd datawhale
pip install -e .
```

### 依赖要求
- Python >= 3.8
- akshare >= 1.16.13
- baostock >= 0.8.9
- pandas >= 2.2.3
- numpy >= 2.2.3
- tushare >= 1.4.19
- jqdatasdk >= 1.9.7
- SQLAlchemy >= 2.0.38

## 快速开始

### 基本使用
```python
from datawhale.application import get_daily_kline, get_stock_list

# 获取股票列表
stock_list = get_stock_list()

# 获取日K线数据（不复权）
df = get_daily_kline(
    stock_code="600000",
    start_date="20240101",
    end_date="20240331",
    adjust_flag="3"  # 1：后复权，2：前复权，3：不复权
)
```

### 数据下载功能
```python
from datawhale.application import download_daily_kline, download_adjust_factor
from datetime import datetime

# 下载全市场日K线数据
result = download_daily_kline(
    mode='all',              # 下载全市场数据
    start_date='1990-01-01', # 从1990年开始下载
    end_date=datetime.now().strftime('%Y-%m-%d'),  # 下载到最新日期
    adjust_flag='3',         # 不复权
    force_update=False,      # 不强制更新已存在的数据
    resume_failed=True       # 继续下载之前失败的数据
)

# 下载复权因子数据
result = download_adjust_factor(
    mode='all',              # 下载全市场数据
    start_date='1990-01-01', # 从1990年开始下载
    end_date=datetime.now().strftime('%Y-%m-%d'),  # 下载到最新日期
    force_update=False,      # 不强制更新已存在的数据
    resume_failed=True       # 继续下载之前失败的数据
)
```

### 数据更新功能
```python
from datawhale.application import update_daily_kline, update_adjust_factor, update_stock_list

# 更新股票列表
update_result = update_stock_list()

# 更新最新一天的日K线数据
result = update_daily_kline(
    resume_failed=True  # 继续更新之前失败的股票数据
)

# 更新最新的复权因子数据
result = update_adjust_factor(
    resume_failed=True  # 继续更新之前失败的股票数据
)
```

## 项目结构
```
datawhale/
├── application/       # 应用层：业务逻辑实现
├── domain/           # 领域层：核心业务模型
├── infrastructure/   # 基础设施层：数据源、存储等
└── config/           # 配置文件
```

## API文档

### 数据获取接口
- `get_daily_kline()`: 获取本地日K线数据
- `get_stock_list()`: 获取本地股票列表
- `get_adjust_factor()`: 获取本地复权因子数据

### 数据下载接口
- `download_daily_kline()`: 下载日K线数据，支持全市场或按股票代码首位数字下载
- `download_adjust_factor()`: 下载复权因子数据，支持全市场或按股票代码首位数字下载

### 数据更新接口
- `update_stock_list()`: 更新股票列表数据
- `update_daily_kline()`: 更新最新一天的日K线数据，支持断点续传
- `update_adjust_factor()`: 更新最新的复权因子数据，支持断点续传
- `update_listing_date()`: 更新股票上市日期数据

详细的API文档请参考 `docs/domain_services_usage.md`

## 贡献指南
1. Fork 本仓库
2. 创建新的分支 `git checkout -b feature/your-feature`
3. 提交更改 `git commit -am 'Add new feature'`
4. 推送到分支 `git push origin feature/your-feature`
5. 提交 Pull Request

## 开源协议
本项目采用 BSD 协议开源，详见 [LICENSE](LICENSE) 文件。

## 联系方式
- 作者：王工一念
- 邮箱：hans_wang@outlook.com

更新日志
详见 [CHANGELOG](CHANGELOG.md) 文件。