semvec/pypi-packages huggingface dataset:
chunkifyr 0.1.2
Your ultimate toolkit for text chunking.
Requires Python: >=3.9

# Chunkifyr 📜🔪

**Chunkifyr** is a powerful and flexible text chunking library designed to split and chunk text into meaningful segments. Whether you're processing large documents, preparing data for NLP tasks, or simply need to manage text in manageable chunks, Chunkifyr provides a range of customizable chunking strategies.

## Features ✨

- **Language Model Chunking**: Leverage the context understanding of languag models to chunk text based on semantic understanding.
- **Syntactic Chunking**: Break down text into syntactically meaningful segments, preserving grammatical structures.
- **Spacy-Enhanced Chunking**: Integrate with SpaCy for both semantic and syntactic chunking, taking advantage of SpaCy's powerful NLP pipeline.
- **Customizable Settings**: Easily adjust chunk sizes, overlap percentages, and more to fit your specific needs.
- **Robust and Fast**: Efficiently handles large texts, ensuring your workflow remains smooth and responsive.

## Installation 🛠️

Install Chunkifyr via pip:

```bash
pip install chunkifyr
```
```Note: Python 3.8+ is required.```

## Usage 🚀

Here’s a quick example using **LMChunker** to get you started:

```py
from chunkifyr import LMChunker
from openai import OpenAI

# this creds can be replaced with your local oai server creds, if your running local OAI server. (llama_cpp, llamafile, ollama)
client = OpenAI(api_key="YOUR_API_KEY", base_url="DEPLOYMENT_URL") 

chunker = LMChunker(model="gpt-3.5-turbo-0125", client=client)
chunks = chunker.from_file('path_to_your_text_file.txt')

for i, chunk in enumerate(chunks, 1):
    print(f"Chunk {i}: {chunk.text}")
    print(f"Chunk {i} description: {chunk.meta.description}")
    print()
```
This example demonstrates how to use the LMChunker with an OpenAI client to break a text file into meaningful chunks. Each chunk also includes a description generated by the model. (which can be further used as metadata when embedding)

## Available Chunkers

- **LMChunker:** Utilizes pre-trained language models for contextual chunking.
- **SimpleSemanticChunker:** Groups similar splits together for basic semantic chunking.
- **SimpleSyntacticChunker:** Simple syntactic chunking with desired chunk size, overlap and seperator. (very similar to langchain character splitter)
- **SemanticChunker**: Groups text semantically using the Adjacent Sentence Clustering process with a configurable similarity threshold.
- **SyntacticChunker:** Chunks text based on syntactic structures using customizable tokenization (supports hf_tokenizer, tiktoken).
More soon... (Regex based, etc)

## Contributing 🤝

Contributions are welcome! If you have ideas for improving Chunkifyr or encounter any issues, feel free to submit a pull request or open an issue.

## License 📄

This project is licensed under the MIT License - see the [LICENSE](https://github.com/xdevfaheem/chunkifyr/blob/main/LICENSE) file for details.
pdf2slides 0.1.0
Convert a PDF file into editable slides in .pptx format

## Project Description

`pdf2slides` is an open-source Python library designed for efficient conversion of PDF files into editable slides. With just three lines of code, it supports both machine-generated PDF files with selectable text and scanned PDF files, although the latter is currently experimental. The library outputs slides in the `.pptx` format, making it a versatile tool for automating presentation creation and handling various types of PDF content. Ideal for integrating into applications or scripts, `pdf2slides` offers a straightforward solution for transforming PDF documents into PowerPoint presentations.

## Installation

To install `pdf2slides`, use pip:

```bash
pip install pdf2slides
```

## Usage

```python
from pdf2slides import Converter

# Create an instance of Converter
converter = Converter()

# Convert a PDF file to slides
converter.convert('input_file.pdf', 'output_file.pptx')
```

## Advanced Usage

You can customize the `Converter` instance with various parameters:

1. **Specifying a Default Font**: Use this parameter to set a font for OCR'ed text. The font must be installed on your system.

```python
from pdf2slides import Converter

converter = Converter(default_font='Arial')
converter.convert('input_file.pdf', 'output_file_with_arial_font.pptx')
```

2. **Enabling OCR Mode**: Enable OCR for converting scanned PDFs. This feature is experimental and is not recommended for use with PDF files known to have selectable text.


```python
from pdf2slides import Converter

converter = Converter(enable_ocr=True)
converter.convert('scanned_file.pdf', 'output_file.pptx')
```

3. **Enforcing Default Font**: Ensure the output slides use the default font, even when the input file is not scanned.

```python
from pdf2slides import Converter

converter = Converter(default_font='Arial', enforce_default_font=True)
converter.convert('not_scanned_file.pdf', 'output_file_with_arial_font.pptx')
```

4. **Manually Setting Image Retention Level**: Adjust the threshold for keeping pure-text images when OCR is enabled.

```python
from pdf2slides import Converter

# Set the image retention level to a lower value when non-editable text remains in the output as images.
converter = Converter(enable_ocr=True, image_retention_level=0.3)
converter.convert('scanned_file.pdf', 'output_file.pptx')
```

5. **Multilingual Support**: Specify the language for OCR processing. The default setting supports English and Chinese. For a list of supported languages, see [PaddleOCR Multi-language Model](https://github.com/PaddlePaddle/PaddleOCR/blob/main/doc/doc_en/multi_languages_en.md).

```python
from pdf2slides import Converter

converter = Converter(enable_ocr=True, lang='fr')
converter.convert('scanned_file_in_french.pdf', 'output_file.pptx')
```

## License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
jayna 0.1.2
A jayna package
Requires Python: >=3.6

### jayna
```
 _____       /\        __   __    _   _       /\
|___  |     /  \       \ \ / /   | \ | |     /  \
    | |    / /\ \       \ V /    |  \| |    / /\ \
_   | |   / ____ \       \ /     | . ` |   / ____ \
| |_/ |  /_/    \_\       |      | |\  |  /_/    \_\
|_____|                   |      |_| \_|
```
shortlinks 0.1.1
Self hostable url shortener
Requires Python: <4.0,>=3.12

# Shortlinks

Shortlinks is a self-hostable URL shortener built using Python. It's a self-contained package that can be easily installed via PyPI and run on your local machine or deployed on a server. This lightweight and efficient tool allows you to create and manage shortened URLs with custom expiration times.

## Features

- Create shortened URLs quickly and easily
- Set custom expiration times for links (30 seconds, 60 seconds, 3 minutes, or never expire)
- Self-hosted solution for better privacy and control
- Simple and intuitive web interface
- Fast and efficient redirection

## Requirements

- Python 3.7+
- pip (Python package manager)

## Installation

Shortlinks is available on PyPI and can be installed with pip:

```
pip install shortlinks
```

This command will install Shortlinks and all its dependencies.

## Usage

To run the Shortlinks server, simply use the following command:

```
shortlinks run
```

By default, the server will run on `http://localhost:8000`.

Open your web browser and go to `http://localhost:8000` to access the Shortlinks interface.

## Configuration (Optional)

You can customize the host and port by passing arguments when running the server:

```
shortlinks run
```

This will run the server on all available network interfaces on port 5000.

## Using Shortlinks

1. Enter the long URL you want to shorten in the input field.
2. Select an expiration time from the dropdown menu.
3. Click the "Generate" button to create a shortened URL.
4. Copy the shortened URL and share it as needed.

## Deployment

To deploy Shortlinks on a server:

1. Install Shortlinks on your server using pip.
2. Run the Shortlinks server using the `shortlinks run` command.
3. Set up a reverse proxy (e.g., Nginx or Apache) to forward requests to the Shortlinks application.
4. Configure your firewall to allow traffic on the desired port.
5. (Optional) Set up SSL/TLS for secure connections.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

---

For more information or support, please open an issue on the GitHub repository.
QDraco 0.1
A library for validating user inputs to prevent common security vulnerabilities.
Requires Python: >=3.6

# QDraco

QDraco is a Python library designed to validate user inputs against common security vulnerabilities. This library helps in preventing various types of attacks such as SQL Injection, Cross-Site Scripting (XSS), Command Injection, Path Traversal, and others. It is a valuable tool for developers looking to enhance the security of their applications by validating potentially malicious inputs.


## Features

SQL Injection Prevention: Detects and prevents SQL injection attempts.
XSS (Cross-Site Scripting) Prevention: Identifies and blocks XSS attack patterns.
Command Injection Prevention: Protects against shell command injections.
Path Traversal Prevention: Safeguards against attempts to access unauthorized files and directories.
Remote and Local File Inclusion (RFI/LFI) Prevention: Blocks attempts to include remote or local files.
Remote Code Execution (RCE) Prevention: Detects patterns that could lead to code execution on the server.
Open Redirect Prevention: Prevents open redirect attacks.
CSRF (Cross-Site Request Forgery) Prevention: Identifies potential CSRF attack vectors.





## Installation
To install QDraco, you can use pip:

```bash
pip install QDraco
```

### Usage


Here is an example of how to use QDraco to validate different types of user inputs:

```python
from QDraco import InputValidator

validator = InputValidator()

# Example inputs to validate
sql_input = "SELECT * FROM users WHERE id = 1"
xss_input = '<script>alert("XSS")</script>'
command_input = "rm -rf /"
path_input = "../../etc/passwd"
csrf_input = '<form action="submit.php" method="post"><input type="hidden" name="csrf_token" value="..."></form>'
rfi_input = "http://example.com/shell.txt"
lfi_input = "../../../../../etc/passwd"
rce_input = "system('ls');"
open_redirect_input = "window.location='http://evil.com';"

# Validate inputs
print("SQL Injection Safe:", validator.validate_sql_input(sql_input))
print("XSS Safe:", validator.validate_html_input(xss_input))
print("Command Injection Safe:", validator.validate_command_input(command_input))
print("Path Traversal Safe:", validator.validate_path_traversal(path_input))
print("CSRF Safe:", validator.validate_csrf_input(csrf_input))
print("RFI Safe:", validator.validate_rfi_input(rfi_input))
print("LFI Safe:", validator.validate_lfi_input(lfi_input))
print("RCE Safe:", validator.validate_rce_input(rce_input))
print("Open Redirect Safe:", validator.validate_open_redirect_input(open_redirect_input))

```


### License


This project is licensed under the MIT License. See the LICENSE file for more details.

### Contact

If you have any questions or feedback, please feel free to reach out.

### Contributing

Contributions to QDraco are welcome! Whether it's a bug report, new feature, correction, or any other type of contribution, please feel free to open an issue or submit a pull request on the GitHub repository.