semvec/pypi-packages huggingface dataset:
semantic-chunking 0.1.1
A Python library for semantic text chunking using Sentence Transformers.
Requires Python: >=3.8

# Semantic Chunking

Semantic Chunking is a Python library for segmenting text into meaningful chunks using embeddings from Sentence Transformers.

## Features

- Splits text into semantic chunks using cosine similarity
- Configurable chunk size and similarity thresholds
- Based on `sentence-transformers`

## Installation

```bash
pip install semantic-chunking
```

### USAGE

```python

from semantic_chunking import SemanticChunker

def test_semantic_chunker():
    text = """Machine learning is a subset of artificial intelligence that focuses on the use of data and algorithms to imitate the way that humans learn.
    Deep learning is a more specialized version of machine learning that uses neural networks with multiple layers.
    These advanced algorithms can process complex patterns and make intelligent decisions with minimal human intervention.
    The applications of machine learning are vast, ranging from image recognition to natural language processing."""

    chunker = SemanticChunker(model_name='all-MiniLM-L6-v2', max_chunk_size=128, similarity_threshold=0.3)
    chunks = chunker.semantic_chunk(text)

    print("Semantic Chunks:")
    for i, chunk in enumerate(chunks, 1):
        print(f"Chunk {i}: {chunk}")
        print(f"Words: {len(chunk.split())}\n")

# Uncomment to test
test_semantic_chunker()
```
wattercrawl-plugin 0.0.1
This project used for writing wattercrawl plugin for scrapy
Requires Python: >=3.11

# Wattercrawl Plugin

[![PyPI version](https://badge.fury.io/py/wattercrawl-plugin.svg)](https://badge.fury.io/py/wattercrawl-plugin)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Description

Wattercrawl plugin is a Python package that provides a base for creating plugins for the Wattercrawl web crawling framework. It offers abstract classes and interfaces to standardize plugin development.

## Installation

You can install the Wattercrawl plugin package using pip:

```bash
pip install wattercrawl-plugin
```
Usage
To create a new plugin for Wattercrawl, you need to extend the base classes provided by this package. Here's a basic guide on how to create a new plugin:

Import the necessary classes:

```python
from watercrawl_plugin import AbstractPlugin, AbstractPipelinePlugin, AbstractInputValidator
```
Create your plugin class by extending AbstractPlugin:


```python
class MyPlugin(AbstractPlugin):
    @classmethod
    def get_name(cls) -> str:
        return "MyPlugin"

    @classmethod
    def get_description(cls) -> str:
        return "This is my custom plugin for Wattercrawl"

    @classmethod
    def get_version(cls) -> str:
        return "0.1.0"

    @classmethod
    def get_author(cls) -> str:
        return "Your Name"

    @classmethod
    def get_pipeline_class(cls):
        return MyPipelinePlugin

    @classmethod
    def get_input_validator(cls):
        return MyInputValidator
```


Create a pipeline plugin by extending AbstractPipelinePlugin:

```python
class MyPipelinePlugin(AbstractPipelinePlugin):
    def process_item(self):
        # Implement your item processing logic here
        # You can access self.item, self.spider, self.crawler_service, and self.helpers
        pass
```

Create an input validator by extending AbstractInputValidator:

```python
class MyInputValidator(AbstractInputValidator):
    def validate(self):
        # Implement your input validation logic here
        # You can access self.crawler_service, self.helpers, and self.errors
        pass
```

## API Reference
For detailed information about the base classes and their methods, refer to the source code in src/watercrawl_plugin/base.py.

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

## License
This project is licensed under the MIT License - see the LICENSE file for details.
microjwt 0.1.0
A simple HMAC-based JWT implementation for MicroPython
Requires Python: >=3.6


# MicroJWT

**MicroJWT** is a simple implementation of JSON Web Tokens (JWT) specifically designed for use in **MicroPython**. This project utilizes **HMAC-SHA256** for signing tokens and employs basic user information (such as username and role) within the token itself. It allows you to create secure authentication systems on embedded systems, especially microcontrollers running MicroPython, like **ESP8266**, **ESP32**, and other similar devices.

## Goal of the Project

The goal of **MicroJWT** is to provide a lightweight, easy-to-use JWT solution for embedded systems and microcontrollers. With MicroPython being a minimalistic environment, this package aims to deliver a robust authentication mechanism without requiring heavy resources, making it ideal for IoT devices and embedded applications.

JWT is commonly used in web applications for stateless authentication. **MicroJWT** brings this functionality to the world of embedded systems, allowing your devices to securely authenticate with external systems or APIs.

## Features

- **HMAC-SHA256 Signing**: Provides a secure way of signing and verifying tokens using HMAC and SHA-256.
- **Lightweight**: Designed with minimal overhead, making it suitable for resource-constrained devices.
- **Compatibility**: Works seamlessly with MicroPython, making it compatible with popular microcontrollers like ESP8266, ESP32, and others.
- **Security**: Supports secure token creation and verification, including expiration time (exp) to prevent token replay attacks.

## Installation

To install **MicroJWT**, you can use `pip`:

 for MicroPython, use the appropriate package manager like `upip` to install directly on your microcontroller.

```bash
upip install microjwt
```

## Usage

Here is an example of how to create and verify a JWT token:

```python
from microjwt.core import microjwt


# Define the secret key
secret_key = "my_secret_key"

# Create a JWT token
token = microjwt.create_token("Arman", "admin", secret_key)

# Verify the token
is_valid = microjwt.verify_token(token, secret_key)

if is_valid:
    print("The token is valid.")
else:
    print("The token is invalid.")
```



## License

This project is licensed under the MIT License.

## Test Images

![Token in Session](./tests/cookie.png)

![Token in Test-file](./tests/test.png)
python-window-recorder 1.0
Background window recorder

### window-recorder
Background window recorder

Installation:
`pip install python-window-recorder`

```
from window-recorder import Recorder
from time import sleep

recorder = Recorder('New Tab - Google Chrome')
print('Starting recording')
recorder.start(folder='recordings', filename='test')
sleep(3)
print('Stopping recording')
recorder.stop()
> Video saved as test_2024-06-29 19-08-11.mp4
```