semvec/pypi-packages huggingface dataset:
tei-rdfa 0.1.0b4
A Python utility for extracting RDFa data from TEI-XML documents.
Requires Python: >=3.8

> [!IMPORTANT]
> tei-rdfa is currently in beta and welcomes feedback from early adopters.

# tei-rdfa

A Python utility for extracting RDFa data from TEI-XML documents.

![tei-rdfa](tei-rdfa.png)

## Overview

`tei_rdfa()` is a dedicated function that extracts RDFa (Resource Description Framework in Attributes) data embedded in TEI (Text Encoding Initiative) XML documents and converts it into a standard RDF graph.

The function handles native TEI namespace formatting through `<prefixDef>` elements (`//tei:encodingDesc/tei:listPrefixDef/tei:prefixDef`) rather than through the HTML5-style `prefix` or XHTML/XML-style `xmlns:prefix` attributes.[^1]

## Features

- Loads TEI-XML files from local paths or URLs
- Processes RDFa attributes `about`, `typeof`, `property`, `rel`, `rev`, `resource`, `content`
- Extracts and resolves namespace prefixes from TEI-specific `<prefixDef>` elements
- Generates RDF triples from embedded RDFa information
- Provides targeted extraction via XPath expressions
- Returns an RDFlib Graph object for further processing or serialization
- Implements robust error handling and informative error messages
- Offers verbose mode with detailed logging

## Parameters

- `xmlfile` (str): File path or URL to a TEI-XML file (must have `.xml` or `.tei` extension)
- `xpath_expr` (str, optional): XPath expression to target specific elements for RDFa extraction; will otherwise target the XML root element
- `verbose` (bool, default=True): Controls logging output

## Dependencies

- [RDFlib](https://rdflib.readthedocs.io): Core RDF functionality
- [lxml](https://lxml.de/): XML processing and XPath support

## Implementation Details

The package includes several helper functions that handle specific aspects of RDFa extraction. It implements defensive programming practices with input validation and comprehensive error handling for common issues:

- Invalid file extensions
- Invalid XML syntax
- Invalid URLs or file paths
- Invalid XPath syntax
- Erroneous XPath queries

Error messages provide contextual information to facilitate debugging and resolution.

## Installation

```shell
pip install tei-rdfa
```

## Example Usage

```python
from tei_rdfa import tei_rdfa

# Basic usage
graph = tei_rdfa('path/to/document.xml')

# With XPath to target specific elements
graph = tei_rdfa(
    xmlfile='https://example.org/document.tei',
    xpath_expr='//tei:person[2]',
    verbose=True
)

# Process resulting graph
print(graph.serialize(format='turtle'))
```

## Directory Structure

```
tei_rdfa/
├── LICENSE
├── README.md
├── pyproject.toml
└── tei_rdfa/
    ├── __init__.py
    ├── requirements.txt
    └── ipynb/
        └── tei_rdfa.ipynb
```
The repository is organized as follows:

- **tei_rdfa/** contains project metadata and configuration
- **tei_rdfa/tei_rdfa/** contains the package implementation
- **tei_rdfa/tei_rdfa/ipynb/** contains a Jupyter notebook demonstrating usage examples and error scenarios

---
[^1]: See https://github.com/TEIC/TEI/issues/1860.
pgptAI 0.1.2
All in one AIGC API package for Python
Keywords: python, first package

# pgptAI
All-in-one AIGC API package for Python

For more info about our services, please visit our website [pgpt.cloud](https://www.pgpt.cloud/ ).

## Intro
pgptai simplifies the way you use AIGC APIs by putting everything you need together while keeping their original usages :)

## Installation
```bash
pip install pgptAI
```

## Usage
For now, we support the following AIGC providers' APIs, click to see their usages in pgptai:
* [OpenAI](https://github.com/pgpt-ai/apigptcloud/tree/main/docs/openai.md)
* [Claude](https://github.com/pgpt-ai/apigptcloud/tree/main/docs/claude.md)
* [ChatGLM2](https://github.com/pgpt-ai/apigptcloud/tree/main/docs/chatglm.md)
* [Stable Diffusion](https://github.com/pgpt-ai/apigptcloud/tree/main/docs/stablediffusion.md)
* [GeminiAI](https://github.com/pgpt-ai/apigptcloud/tree/main/docs/geminiai.md)

Or, use our integrated API:
* [AllAI](https://github.com/pgpt-ai/apigptcloud/tree/main/docs/allai.md)

And, we also provide an AIChat service based on Langchain:
* [AIChat](https://github.com/pgpt-ai/apigptcloud/tree/main/docs/aichat.md)

Some useful tools:  
* [AudioAI](https://github.com/pgpt-ai/apigptcloud/tree/main/docs/audioai.md)
* [TextAI](https://github.com/pgpt-ai/apigptcloud/tree/main/docs/textai.md)
lib-etl 1.0.0
Ini adalah mini library untuk memudahkan proses ETL menggunakan pyspark

# My Library

`my_library` is a simple Python package that provides greeting functionality.

## Installation

```bash
pip3 install git+https://gitlab.cloudias79.com/internal-apps/etl-data-management/lib-etl.git@v1

# lib_etl
lib etl for talent management
featurelib 1.0.0
Separate complicated functionality from your class
Requires Python: >=3.8

[![Downloads](https://static.pepy.tech/badge/featurelib)](https://pepy.tech/project/featurelib)

Featurelib is a python library containing a collection of carefully designed tools for separating functionality from the main underlying class. It allows creation of Feature classes that are typically different than any normal class in python. A Feature class contains a partial implementation which will then be inherited by the main class for it access it. This severely changes the game-plan for maintaining relatively larger projects by increasing readability and decreasing clutter and at the same time providing a better view over future updates and extensibility.

A full comprehensive documentation can be found at [d33p0st.in/docs/featurelib](https://d33p0st.in/docs/featurelib).

## Installation

```zsh
pip install featurelib
```
fourier-mellin 0.2.0
Image Registration with Fourier Mellin using OpenCV
Requires Python: >=3.7

# Fourier-Mellin Python Library using OpenCV

This repository implements the Fourier-Mellin transform for image registration and video stabilization using semilog polar coordinates with OpenCV. The implementation is written in C++, but python bindings are provided. For information about the pipeline, see [this article](https://ieeexplore.ieee.org/document/506761). Tested on Ubuntu 20.04.

### Disclaimer

This repository is an unstable release and not intended for production. Many other repositories have implemented the Fourier-Mellin transform, for example [imreg_fmt by sthoduka](https://github.com/sthoduka/imreg_fmt) or [fourier-mellin by polakluk](https://github.com/polakluk/fourier-mellin).

Note that the image registration only works effectively for Eucledian/similar transformations without affine or perspective distortions.

## Video Stabilization

https://github.com/brht0/fourier-mellin/assets/90235713/c5524042-6bc6-46b5-837e-adb62ddcf9b1

Original video can be found [on Youtube](https://www.youtube.com/watch?v=mQxnB2X26CI) (No affiliation)

## Image Registration

![lena_transform_demo](https://github.com/brht0/fourier-mellin/assets/90235713/9db0cc26-581f-40db-b34c-3516e759f960)

Image registration with a transformed image, overlayed.

## Installation with `git clone`

It is recommended to use a python virtual environment. The repository will be added to PyPI in time.

```
# inside your own project
python3 -m venv .venv
source .venv/bin/activate
pip install git+https://github.com/brht0/fourier-mellin
```

## Examples

Many examples, such as video stabilization, are included inside the `examples/` subdirectory. The following example registers two images.

```python
import cv2
import numpy as np
import fourier_mellin

reference = cv2.imread('lenna.png')
transformed = cv2.imread('lenna_transformed.png')

rows, cols = reference.shape[:2]
fm = fourier_mellin.FourierMellin(cols, rows)

transformed_reference, transform = fm.register_image(reference, transformed)
overlay = cv2.addWeighted(transformed, 0.5, transformed_reference, 0.5, 0.0, dtype=cv2.CV_32F)

cv2.imwrite("overlay.jpg", overlay)
cv2.imwrite("transformed.jpg", transformed)
```

## Building without pip

Building without pip is not required for use with python. Building without pip requires installing additional dependencies, such as pybind11. This step may be skipped, in case only python bindings are used.

```
cmake -B build/release -S . -DCMAKE_BUILD_TYPE=Release
cmake --build build/release -j 8
```

## Todo

- Register images directly from files
- Benchmarking
- Optimization
- CUDA with OpenCV
- remove filters, as cv::phaseCorrelate already applies Hanning Window
- Documentation
- Proper threading support
- angles beyond -90 to 90 deg
- updated readme with up to date information
- pure python version that for windows/macos
- memory problem when passing in reference to some functions, where image is replaced (clearer documentation?)
- link time optimizer flto