semvec/pypi-packages huggingface dataset:
querysquirrel 0.1.13
A library for building and testing NLP models with PyTorch and Transformers.
Requires Python: >=3.8

<p align="left">
  <img src="https://raw.githubusercontent.com/willarmstrong1/querysquirrel_library/main/6827b781-7dda-4eec-8174-59aab08cbd5b.webp" alt="QuerySquirrel Logo" width="400"/>
</p>


# QuerySquirrel
QuerySquirrel is a Python library for building, training, and testing NLP models using PyTorch and the Hugging Face Transformers library. It simplifies model development by providing high-level utilities for data handling, model training, evaluation, and fine-tuning.
---

## Table of Contents
- [Features](#features)
- [Installation](#installation)
  - [Install from PyPI](#install-from-pypi)
  - [Dependencies](#dependencies)
- [Usage](#usage)
  - [Quick Start](#quick-start)
- [Contributing](#contributing)
- [License](#license)

---

## Features
- **Easy Dataset Handling**: Load and preprocess text data efficiently.
- **Model Training and Fine-tuning**: Train Transformer-based models with minimal code.
- **Evaluation Metrics**: Built-in utilities for assessing model performance.
- **Custom Model Support**: Extend existing models or integrate your own architectures.
- **Integration with PyTorch and Transformers**: Seamless use of popular NLP frameworks.

## Installation
To install QuerySquirrel on your local machine, follow these steps:

### Install from PyPI
Run the following command to install QuerySquirrel via pip:

```sh
pip install querysquirrel
```
### Dependencies
QuerySquirrel requires Python 3.7+ and the following libraries:
- PyTorch
- Transformers (Hugging Face)
- Datasets
- NumPy
- scikit-learn
- torch
- torch.nn
- torch.nn.functional
- torch.optim
- tqdm
- torch.utils.data
- sklearn.metrics
- sklearn.preprocessing
- transformers
- sentence-transformers
- math
- os
- collections
- pandas
- pyarrow
- dask.dataframe
- numpy
- Counter (from collections)
- seaborn
- matplotlib

## Usage
Once installed, you can import QuerySquirrel in your Python projects like this:

```python
from querysquirrel import myfunctions as qs
```

### Quick Start
Here's an example of how to use QuerySquirrel to train a text classification model:

```python
import querysquirrel
from querysquirrel import myfunctions as qs

# Load dataset
data = qs.load_dataset("imdb")

# Preprocess data
data = qs.tokenize(data, model_name="bert-base-uncased")

# Train model
model = qs.train(data, model_name="bert-base-uncased", epochs=3)

# Evaluate model
results = qs.evaluate(model, data["test"])
print("Evaluation Results:", results)
```

## Contributing
We welcome contributions! To contribute:

1. Fork the repository.
2. Create a feature branch.
3. Make your changes and write tests.
4. Submit a pull request.

## License
QuerySquirrel is released under the MIT License.
django-postgres-backup-ganaf 0.1.2
A Django app to backup PostgreSQL databases to S3
Requires Python: >=3.8

# Django PostgreSQL Backup

A reusable Django app to automatically backup PostgreSQL databases to S3.

## Features

- Scheduled or manual backups of PostgreSQL databases
- S3 storage of backups
- Automatic cleanup of old backups
- Configurable scheduling

## Installation

```bash
pip install django-postgres-backup
```

Or add to your requirements.txt:

```
django-postgres-backup==0.1.0
```

## Configuration

Add to your `INSTALLED_APPS` in settings.py:

```python
INSTALLED_APPS = [
    # other apps
    'django_backup',
]
```

Configure your settings.py with the following settings:

```python
# Database settings
DB_HOST = 'localhost'
DB_PORT = '5432'
DB_NAME = 'your_database'
DB_USER = 'postgres'
DB_PASSWORD = 'your_password'

# S3 settings
AWS_STORAGE_BUCKET_NAME = 'your-bucket-name'
AWS_ACCESS_KEY_ID = 'your-access-key'
AWS_SECRET_ACCESS_KEY = 'your-secret-key'

# Backup settings
BACKUP_DIR = 'database_backups'
BACKUP_SCHEDULER_ENABLED = True  # Set to False to disable automatic backups
BACKUP_UPLOAD_TO_S3 = True       # Set to False to disable S3 upload
BACKUP_CLEANUP_ENABLED = True    # Set to False to disable automatic cleanup
BACKUP_KEEP_COUNT = 2            # Number of backups to keep

# Optional: Server ownership settings
IS_LOCAL = False                # Set to True for local development
SERVER_USER = 'www-data'        # User who should own backup files
SERVER_GROUP = 'www-data'       # Group who should own backup files

# Backup schedule (uses APScheduler cron syntax)
BACKUP_SCHEDULE = {
    'hour': '0',     # Run at midnight
    'minute': '0',
}
```

## Usage

### Automatic Backups

If `BACKUP_SCHEDULER_ENABLED` is set to `True`, backups will run automatically according to your schedule.

### Manual Backups

Run a backup manually:

```bash
python manage.py run_backup
```

Options:
- `--upload`: Force upload to S3 (even if disabled in settings)
- `--cleanup`: Force cleanup of old backups
- `--keep-count=N`: Specify number of backups to keep when cleaning up

## How It Works

1. The app creates backups using PostgreSQL's pg_dump tool
2. If pg_dump is not available, it falls back to using a Docker container
3. Backups are stored locally in the directory specified by `BACKUP_DIR`
4. If enabled, backups are uploaded to the S3 bucket
5. Old backups are cleaned up, keeping only the most recent ones

## License

MIT
efmtool-link 0.0.9
Exposes various efmtool functionality in Python.
Requires Python: >=3.8

# efmtool_link
Framework for calling selected functions of efmtool (https://csb.ethz.ch/tools/software/efmtool.html) from Python.

Installation:
Clone the repository, go into the top efmtool_link directory and install into your current Python environment with:

pip install .

Tip: If you use the -e option during installation then updates from a 'git pull' are at once available in your Python envrionment without the need for a reinstallation.

Example:
The efmtool_link.ipynb Jupyter notebook demonstrates some use cases of this package.
pyrometry 0.0.2
Flame graph comparison library
Requires Python: >=3.8

# pyrometry

This library provides a Python implementation of the paper [On the Algebraic
Properties of Flame Graphs][paper] for the comparison and decomposition of
flame graphs.


## Usage

To parse a flame graph from a collapsed stacks format, use `FlameGraph.load`
from `pyrometry.flamegraph`.

To perform the differential analysis of two samples of flame graphs, collect
them in two lists, and then use e.g. `decompose_4way` from `pyrometry.analysis`
to get the flame graphs of appeared, disappeared, grown and shrunk stacks.


[paper]: https://arxiv.org/pdf/2301.08941