semvec/pypi-packages huggingface dataset:
clear-html 0.5.0
Clean and normalize HTML.
Requires Python: >=3.9

==========
clear-html
==========

.. image:: https://img.shields.io/pypi/v/clear-html.svg
   :target: https://pypi.python.org/pypi/clear-html
   :alt: PyPI Version

.. image:: https://img.shields.io/pypi/pyversions/clear-html.svg
   :target: https://pypi.python.org/pypi/clear-html
   :alt: Supported Python Versions

.. image:: https://github.com/zytedata/clear-html/workflows/tox/badge.svg
   :target: https://github.com/zytedata/clear-html/actions
   :alt: Build Status

.. image:: https://codecov.io/github/zytedata/clear-html/coverage.svg?branch=master
   :target: https://codecov.io/gh/zytedata/clear-html
   :alt: Coverage report

Clean and normalize HTML. Preserve embeddings (e.g. Twitter, Instagram, etc)

.. contents::

Quick start
***********

Installation
============

Install the library with pip::

    pip install clear-html

Usage
=====

Example usage with lxml:

.. code-block:: python

    from lxml.html import fromstring
    from clear_html import clean_node, cleaned_node_to_html

    html="""
            <div style="color:blue" id="main_content">
                Some text to be
                <div>cleaned up!</div>
            </div>
         """
    node = fromstring(html)
    cleaned_node = clean_node(node)
    cleaned_html = cleaned_node_to_html(cleaned_node)
    print(cleaned_html)


Example usage with Parsel:

.. code-block:: python

    from parsel import Selector
    from clear_html import clean_node, cleaned_node_to_html

    selector = Selector(text="""<html>
                                <body>
                                    <h1>Hello!</h1>
                                    <div style="color:blue" id="main_content">
                                        Some text to be
                                        <div>cleaned up!</div>
                                    </div>
                                </body>
                                </html>""")
    selector = selector.css("#main_content")
    cleaned_node = clean_node(selector[0].root)
    cleaned_html = cleaned_node_to_html(cleaned_node)
    print(cleaned_html)

Both of the different approaches above would print the following:

.. code-block:: HTML

    <article>

    <p>Some text to be</p>

    <p>cleaned up!</p>

    </article>


Other interesting functions:

* ``cleaned_node_to_text``: convert the cleaned node to plain text
* ``formatted_text.clean_doc``: low level method to control more aspects
  of the cleaning up
zyte-parsers 0.6.0
Parsing of data from web pages.
Requires Python: >=3.9

============
zyte-parsers
============

.. image:: https://img.shields.io/pypi/v/zyte-parsers.svg
   :target: https://pypi.python.org/pypi/zyte-parsers
   :alt: PyPI Version

.. image:: https://img.shields.io/pypi/pyversions/zyte-parsers.svg
   :target: https://pypi.python.org/pypi/zyte-parsers
   :alt: Supported Python Versions

.. image:: https://github.com/zytedata/zyte-parsers/workflows/tox/badge.svg
   :target: https://github.com/zytedata/zyte-parsers/actions
   :alt: Build Status

.. image:: https://codecov.io/github/zytedata/zyte-parsers/coverage.svg?branch=master
   :target: https://codecov.io/gh/zytedata/zyte-parsers
   :alt: Coverage report

.. image:: https://readthedocs.org/projects/zyte-parsers/badge/?version=stable
   :target: https://zyte-parsers.readthedocs.io/en/stable/?badge=stable
   :alt: Documentation Status

.. description starts

``zyte-parsers`` is a Python 3.9+ library that contains functions to extract
data from webpage parts.

.. description ends

* Documentation: https://zyte-parsers.readthedocs.io/en/latest/
* License: BSD 3-clause
browser-automation-launcher 2.0.3
Browser Automation launcher
Requires Python: >=3.12

# browser-automation-launcher
浏览器自动化启动器. 与 [DrissionPage](https://pypi.org/project/DrissionPage/) 配合使用, 实现浏览器自动化的启动和关闭.

## 主要功能
- 自动启动浏览器并设置浏览器参数, 例如调试端口号等 (需要指定 Chrome 浏览器的路径)
- 通过端口号接管当前已打开的 Chrome 浏览器 (只能接管通过调试模式打开的浏览器)
- 自动创建或加载浏览器用户数据目录

## 安装
```bash
pip install browser-automation-launcher
```

## 使用方法
```python
from BrowserAutomationLauncher import BrowserInitOptions, Launcher

launcher = Launcher()

init_options = BrowserInitOptions()
init_options.set_basic_options(
    browser_path=r'C:\Program Files\Google\Chrome\Application\chrome.exe'
)
# 设置浏览器窗口大小 (可选)
init_options.set_window_loc(width=1400, height=900, x=20, y=20)

browser = launcher.init_browser(init_options)
page = browser.chromium.latest_tab

page.get('https://www.baidu.com')
```
airmise 2.0.0
The native experience of calling remote functions, like local ones.
Requires Python: >=3.8

# Airmise

Expose local runtime namespace to local network area. Others who have access to 
the network can call functions, instantiate classes, use variables, import 
modules etc.

## How to use

### Access variables

```python
# server.py
import airmise as air
a = 'alpha'
b = []
air.run_server(globals(), port=...)
```

```python
# client.py
import airmise as air
air.connect(host=..., port=...)
c = air.exec(
    '''
    print(a)
    print(b)
    b.append(a)
    return b
    '''
)
print(c)  # -> ['alpha']
```

### Call functions

```python
# server.py
import airmise as air

def foo(bar):
    print(bar)
    return 'ok'
    
air.run_server(globals(), port=...)
```

```python
# client.py
import airmise as air
air.connect(host=..., port=...)
air.exec("return foo('bar')")
```

### Iterator

```python
# server.py
import airmise as air

def foo(count: int):
    for i in range(count):
        yield i
    
air.run_server(globals(), port=...)
```

```python
# client.py
import airmise as air
air.connect(host=..., port=...)
for i in air.call('foo', 10):
    print(i)
```

### Share codebase

Server and client can use the same code base, but with different 
`if __name__ == '__main__'`:

```python
# server.py
import airmise as air

class Bar:
    def __init__(self, name: str):
        self.name = name
    def baz(self):
        return f'{self.name} 123'  

if __name__ == '__main__':
    air.register(Bar)
    air.run_server(port=...)
```

```python
# client.py
import airmise as air

class Bar:
    def __init__(self, name: str):
        self.name = name
    def baz(self):
        return f'{self.name} 123'  

if __name__ == '__main__':
    remote_bar = air.delegate(Bar, 'Alice')
    print(remote_bar)  # -> <airmise.RemoteCall>
    print(remote_bar.baz())  # -> 'Alice 123'
```
xannounce-parser 0.1.0
Add your description here
Requires Python: >=3.10

# Xannounce-parser

Exchange Announce Parser, 使用语法分析(基于 lark)提取交易所公告标题中的币种和公告类型, 例如: 

```bash
$ uv run xparser 'Market Support for Clearpool(CPOOL) (KRW, BTC, USDT Market)'
> ParserResult(exchange='Upbit', type='New Spot', assets=[Coin(name='Clearpool', symbol='CPOOL')])
```

优势: 无假阳性, 解析器判别是特定类型就一定是特定类型. 
缺陷: 可能有正例未检出

## 安装

使用 uv(推荐)

```bash
uv add xannounce-parser
```

使用 pip

```bash
pip install xannounce-parser
```

## 不安装测试

```bash
uvx --from xannounce-parser 
```

## 为何不用 X?

### 正则表达式

简单的关键字匹配不够精确, 说实话, 你敢在交易中用正则匹配来的结果吗? 如果写得很复杂, 那为什么不使用特化的工具呢? 比如 Upbit 的英文公告中有四种上架格式:

```BNF
Market Support for Zora(ZORA) (KRW, BTC, USDT Market)
Market Support for ACS, GO, OBSR, QTCON, RLY (USDT Market)

New Digital Assets Added to USDT Market (AGLD, AHT, ARPA, ASTR, BNT, EGLD, FIL, LWA, NEAR, OXT, RAD, XLM)
New digital asset on KRW Market (MINA)
```

硬写正则也没问题, 但是一定会比基于 BNF 语法的版本麻烦. 

### 大语言模型

太慢了, 我希望能在 1ms 内得到结果然后发起交易. 不过目前的 https://coin.myuan.fun 上的匹配结果就是基于 GPT-5-nano 的. 

### 小语言模型

有点复杂, 目前 Lark 表现已经很好, 如果未来有必要会考虑. 

## Roadmap

- [x] 支持 Upbit 的上架、下架、警告信息
- [ ] 支持 Binance
- [ ] 支持 Bybit
- [ ] 支持 OKX
owasp-dependency-track-client 4.13.7
Inofficial OWASP Dependency Track API Python client

[![PyPI version](https://badge.fury.io/py/owasp-dependency-track-client.svg)](https://badge.fury.io/py/owasp-dependency-track-client)

# OWASP Dependency Track Python API client

This is a generated library based on the official OWASP Dependency Track OpenAPI spec (`/api/openapi.json`) using [openapi-python-client](https://github.com/openapi-generators/openapi-python-client).

## Usage

```shell
pip install owasp-dependency-track-client
```

Create the client
```python
from owasp_dt import Client

client = Client(
    base_url="http://localhost:8081/api",
    headers={
        "X-Api-Key": "YOUR API KEY"
    },
    verify_ssl=False,
)
```

Call endpoints:
```python
from owasp_dt.api.project import get_projects

projects = get_projects.sync(client=client)
assert len(projects) > 0
```

## More OWASP Dependency Track utils

This library is part of a wider OWASP Dependency Track tool chain:
- OWASP Dependency Track Python API client: https://github.com/mreiche/owasp-dependency-track-python-client
- OWASP Dependency Track CLI: https://github.com/mreiche/owasp-dependency-track-cli
- OWASP Dependency Track Azure DevOps Sync: https://github.com/mreiche/owasp-dependency-track-azure-devops

## Development

### Update the library

1. Install the requirements: `pip install -r requirements.txt`
2. Start a OWASP DT instance locally (like via. Docker-Compose): https://docs.dependencytrack.org/getting-started/deploy-docker/
3. Run `regenerate-api-client.sh`
4. Check if bug https://github.com/openapi-generators/openapi-python-client/issues/1256 is still in effect
5. Publish this library with the API version tag

### Start the test environment
```shell
cd test
podman|docker compose up
```

- Preconfigured user: `admin:admin2`
- Preconfigured API key: see `test/test.env`
audio-feature-extractor 0.1.1
a simple audio feature extraction tool
Requires Python: >=3.12

# Audio Feature Extractor

A simple and extensible tool for extracting audio features, designed for speech and audio experiments.

## Features

- Extracts traditional audio features (pitch, timbre, loudness, etc.)
- Supports English and Chinese G2P (grapheme-to-phoneme) conversion
- Embedding and semantic feature extraction (e.g., speaker embeddings, ASR, etc.)
- Modular design for easy extension

## Installation

1. **Clone the repository:**
    ```bash
    git clone <your-repo-url>
    cd audio_feature_extractor
    ```

2. **Install dependencies:**
    ```bash
    pip install .
    ```
    > **Note:** For GPU support, install the appropriate version of PyTorch for your CUDA version before running `pip install .`. See [PyTorch Get Started](https://pytorch.org/get-started/locally/) for details.

## Usage

```python
from audio_feature_extractor import FeatureExtractor

extractor = FeatureExtractor()
audio_path = "tmp/test.wav"
features = extractor.extract_features(audio_path)
print(features)
```

## Project Structure

```
src/audio_feature_extractor/
    extractor.py
    features/
        traditional.py
        embedding.py
        semantic.py
    g2p/
```

## Notes

- This tool is intended for research and experimental use.
- For large models or neural network weights, see the documentation for download instructions.
- If you encounter CUDA/cuDNN or dependency issues, please refer to the [Troubleshooting](#troubleshooting) section below.

## Troubleshooting

- **CUDA/cuDNN errors:**  
  Make sure your environment variables (e.g., `LD_LIBRARY_PATH`) are set correctly and that you have installed the correct CUDA/cuDNN versions. 
- **PyTorch version:**  
  Install the correct PyTorch version for your hardware and CUDA version before installing this package.

## License

[MIT](LICENSE) 

## Changelog

### v0.1.0

- Initial release: basic usage for English speech feature extraction.

---

Feel free to contribute or open issues!
splunk-hec-logger 0.1.5
A simple Splunk HEC logger.
Requires Python: >=3.6

# Splunk Logger

A simple Python package for sending logs to Splunk using the HTTP Event Collector (HEC).

## Installation

```bash
pip install splunk-hec-logger # (or from your local wheel file)
```

## Configuration

The `SplunkLogger` class retrieves its configuration from environment variables. These are **required**:

*   `SPLUNK_HEC_URL`: The URL of your Splunk HEC endpoint (e.g., `https://your-splunk-instance:8088/services/collector`).
*   `SPLUNK_HEC_TOKEN`: Your Splunk HEC token.

These are optional:
*   `SPLUNK_HOST`: The host field for your Splunk events (defaults to the local hostname).
*   `SPLUNK_SOURCE`: The source field for your Splunk events (defaults to "RPA").
*   `SPLUNK_SOURCETYPE`: The sourcetype field for your Splunk events (defaults to "_json").
*   `SPLUNK_INDEX`: The index for your Splunk events (defaults to "rdb").

## Usage

```python
import os
from splunk_logger import SplunkLogger

# Set environment variables (for demonstration; normally set outside the script)
os.environ["SPLUNK_HEC_URL"] = "YOUR_SPLUNK_HEC_URL"
os.environ["SPLUNK_HEC_TOKEN"] = "YOUR_SPLUNK_HEC_TOKEN"
os.environ["SPLUNK_HOST"] = "my-application-host"
os.environ["SPLUNK_SOURCE"] = "my-app"
os.environ["SPLUNK_SOURCETYPE"] = "_json"
os.environ["SPLUNK_INDEX"] = "my_index"

logger = SplunkLogger()

logger.info("This is an informational message.", Module="my_module", TaskId="123")
logger.warning("A potential issue occurred.", Module="my_module", StatusCode=404)
logger.error("An error occurred.", Module="my_module", ErrorCode=500, Exception="ValueError")
logger.debug("A potential error.", Module="my_module", StatusCode=200)

# You can also log events with a custom level or provide a complete event dictionary
logger.log_event({
    "Level": "DEBUG",
    "Message": "Detailed debug information.",
    "Component": "Database",
    "Query": "SELECT * FROM users"
})
```