semvec/pypi-packages huggingface dataset:
pytorch-parquet-loader 0.1.1
A library for loading large Parquet files as an IterableDataset in PyTorch using Dask.
Requires Python: >=3.9

# PyTorch Parquet Loader

`pytorch_parquet_loader` is a Python library for loading large Parquet files as PyTorch `DataLoader` objects, optimized for memory efficiency using Dask.

## Features

- Efficiently loads large Parquet files into PyTorch DataLoader.
- Automatically handles `object` (string) and `date32[day]` data types by encoding them to numeric values.
- Compatible with both numeric and categorical data in a format compatible with PyTorch.

## Installation

### Prerequisites
Ensure you have Python 3.9 or higher installed.

### Install the Library

To install the package from PyPI:

```bash
pip install pytorch_parquet_loader
```

## Testing

To run the test, you can the below script:
```python
from pytorch_parquet_loader import load_parquet_as_dataloader

# Path to your Parquet file
file_path = "path/to/your_large_file.parquet"

# Load Parquet file as a DataLoader
dataloader = load_parquet_as_dataloader(file_path, batch_size=32, num_workers=0)

# Iterate over the DataLoader
for batch in dataloader:
    print(batch)  # Each batch is a PyTorch tensor
```
ytb2subtitles 2024.10.27
🦜 Youtube to Audio by Andrew A Levin
Requires Python: >=3.8
Keywords: ytb2audio

# YouTube Subtitles Fetcher

`YouTube Subtitles Fetcher` is a command-line tool that retrieves subtitles (with optional translations) from YouTube videos. This tool is ideal for quickly extracting YouTube transcripts with support for multiple languages.

## Features

- Fetches subtitles for a given YouTube video URL
- Supports translations into a specified language (if available)
- Command-line interface for easy integration into scripts or workflows

## Installation

First, install the package via pip:

```bash
pip install ytb2subtitles
```

## Usage

Use the command-line tool to fetch subtitles by providing a YouTube URL and optionally, a language code.

Command-Line Example

To retrieve subtitles from a YouTube video:


ytb2subtitles https://www.youtube.com/watch?v=example_video_id

To retrieve subtitles in a specific language:

ytb2subtitles https://www.youtube.com/watch?v=example_video_id --language en

Code Example

You can also import this tool as a module in your Python code:

from ytb2subtitles import get_subtitles

url = "https://www.youtube.com/watch?v=example_video_id"
subtitles = get_subtitles(url, lang="en")
print(subtitles)

Command-Line Arguments

	•	url (required): The YouTube video URL.
	•	--language or --lang (optional): The language code for subtitles (default is the original language).

Requirements

	•	Python 3.x
	•	pytube
	•	youtube-transcript-api

Contributing

We welcome contributions! If you find a bug or have an idea for a feature, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.