semvec/pypi-packages huggingface dataset:
hflocal 0.1.0
A library to save, load, and use Hugging Face models locally.
Requires Python: >=3.6

# hflocal

`hflocal` is a Python library designed to simplify the process of saving, loading, and using Hugging Face models locally. This library provides a user-friendly interface for handling pre-trained models from the Hugging Face repository.

## Author

**Anish KM**
- GitHub: [@AnishKMBtech](https://github.com/AnishKMBtech)

## Features

- Save pre-trained models and tokenizers to a local directory
- Load pre-trained models and tokenizers from a local directory
- Use models with a simple pipeline interface for various NLP tasks

## Installation

You can install the `hflocal` library using pip:

```bash
pip install hflocal
```

## Usage

### Saving a Model

To save a pre-trained model and its tokenizer to a local directory, use the `save_model` function:

```python
from hflocal import save_model

# Save the 'bert-base-uncased' model to the './saved_model' directory
save_model('bert-base-uncased', './saved_model')
```

### Loading a Model

To load a pre-trained model and its tokenizer from a local directory, use the `load_model` function:

```python
from hflocal import load_model

# Load the model and tokenizer from the './saved_model' directory
model, tokenizer = load_model('./saved_model')
```

### Using the Model Pipeline

To use a model with a simple pipeline interface for various NLP tasks, use the `ModelPipeline` class:

```python
from hflocal import ModelPipeline

# Initialize the pipeline with the saved model
pipeline = ModelPipeline('./saved_model')

# Use the pipeline for inference
result = pipeline("Your input text here")
print(result)
```

## Development

### Setting Up the Development Environment

1. Clone the repository:
```bash
git clone https://github.com/AnishKMBtech/hflocal.git
cd hflocal
```

2. Create a virtual environment and activate it:
```bash
python -m venv venv
# On Unix/macOS:
source venv/bin/activate
# On Windows:
venv\Scripts\activate
```

3. Install the required dependencies:
```bash
pip install -r requirements.txt
```

## Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

## License

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

## Acknowledgements

- Hugging Face for providing the pre-trained models and tokenizers
- Transformers library for the model and tokenizer implementations
flask-dynamic-router 0.1.0
A Flask extension for dynamic and automatic route registration
Requires Python: >=3.7

# Flask Dynamic Router

A Flask extension that provides automatic and dynamic route registration for Flask applications.

## Installation

```bash
pip install flask-dynamic-router
```

## How to Use

### Basic Setup

```python
from flask import Flask
from flask_dynamic_router import DynamicRouter

# Create Flask app
app = Flask(__name__)

# Initialize the router
router = DynamicRouter(app)

# Register routes from a directory
router.register_routes('routes')

if __name__ == '__main__':
    app.run()
```

### Route Examples

1. **Basic Route** (`routes/Root/__init__.py`):
```python
from flask import Blueprint

main = Blueprint('root', __name__)

@main.route('/')
def index():
    return {'message': 'Welcome to the API'}
```

2. **Dynamic Parameter** (`routes/Users/[userID]/__init__.py`):
```python
from flask import Blueprint

main = Blueprint('user_detail', __name__)

@main.route('/')
def get_user(user_id):
    return {'message': f'User details for ID: {user_id}'}

@main.route('/profile')
def get_profile(user_id):
    return {'message': f'Profile for user ID: {user_id}'}
```

3. **Nested Routes** (`routes/Products/[productID]/reviews/__init__.py`):
```python
from flask import Blueprint

main = Blueprint('product_reviews', __name__)

@main.route('/')
def get_reviews(product_id):
    return {'message': f'Reviews for product ID: {product_id}'}
```

### Configuration Options

```python
# Make routes case-insensitive
app.config['DYNAMIC_ROUTER_CASE_SENSITIVE'] = False

# Add a global prefix to all routes
app.config['DYNAMIC_ROUTER_URL_PREFIX'] = '/api/v1'
```

## Directory Structure

The router follows a convention-based approach where your directory structure maps directly to URL routes:

```
📦 routes
├── 📂 Root
│   ├── 📄 __init__.py          ➜  🌐 /
│   ├── 📂 version
│   │   └── 📄 __init__.py      ➜  🌐 /version
│   └── 📂 about
│       └── 📄 __init__.py      ➜  🌐 /about
│
├── 📂 Users
│   ├── 📄 __init__.py          ➜  🌐 /users
│   ├── 📂 [userID]             ➜  💫 Dynamic Parameter
│   │   ├── 📄 __init__.py      ➜  🌐 /users/<user_id>
│   │   └── 📂 profile
│   │       └── 📄 __init__.py  ➜  🌐 /users/<user_id>/profile
│   └── 📂 settings
│       └── 📄 __init__.py      ➜  🌐 /users/settings
│
└── 📂 Products
    ├── 📄 __init__.py          ➜  🌐 /products
    └── 📂 [productID]          ➜  💫 Dynamic Parameter
        └── 📄 __init__.py      ➜  🌐 /products/<product_id>
```

## Route Mapping Examples

| Directory Structure | Generated Route | Type |
|--------------------|-----------------|------|
| `Root/__init__.py` | `/` | Static Route |
| `Users/__init__.py` | `/users` | Static Route |
| `Users/[userID]/__init__.py` | `/users/<user_id>` | Dynamic Route |
| `Products/[productID]/__init__.py` | `/products/<product_id>` | Dynamic Route |

## Dynamic Parameters

Dynamic parameters are defined using square brackets in directory names:
- 📂 `[userID]` ➜ `<user_id>`
- 📂 `[productID]` ➜ `<product_id>`
- 📂 `[categoryName]` ➜ `<category_name>`

## License

This project is licensed under the MIT License - see the LICENSE file for details.
spotpapers 0.1.1
Simple CLI tool to get Windows spotlight wallpapers.
Requires Python: >=3.8

# SpotPapers

SpotPapers is a Python application that retrieves wallpapers from the Windows Spotlight feature and saves them to a specified folder.

## Features

- Fetches wallpapers from the Windows Spotlight location.
- Saves wallpapers to a user-defined folder.

## Installing & Setup

- Install spotpapers

    ```bash
    pip install spotpapers
    ```

- Pass the API for AI Renaming (air) with the flag `--air` or setting the environment varable `GROQ_API_KEY`

## Working

1. Running the application

    ```bash
    spotpapers
    ```

    >[!TIP]  
    > Try using the `--help` flag to get more info.

2. The wallpapers will be fetched from the following location:

    ```text
    C:\Users\user\AppData\Local\Packages\Microsoft.Windows ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets
    ```

3. The wallpapers will be saved to the `Pictures\Spotlight Wallpapers` folder.

## Contributing

Contributions are welcome! Please open an issue or submit a pull request.

1. Clone the repository:

    ```bash
    git clone https://github.com/Glitchyi/spotpapers
    ```

2. Navigate to the project directory:

    ```bash
    cd spotpapers
    ```

3. Create a virtual environment:

    ```bash
    python -m venv .env
    ```

4. Activate the virtual environment:

    ```bash
    source .env/Scripts/activate
    ```

5. Install the required dependencies:

    ```bash
    pip install -e .
    ```

## License

This project is licensed under the MIT License.

## Contact

For any questions or suggestions, please contact `advaith@glitchy.systems`.