semvec/pypi-packages huggingface dataset:
rubyapps 0.1.3
A package that includes various tools, including a color extractor
Requires Python: >=3.6

# stubbingmytoe

`stubbingmytoe` is a Python package that includes various tools, including a color extractor that processes images to extract the most common colors and generate visual representations.

## Installation

To install the package, use pip:

```sh
pip3 install stubbingmytoe
```

## Dependencies

The package requires the following dependencies:

- opencv-python
- numpy
- scikit-learn
- tqdm
- matplotlib
- jinja2

These dependencies will be installed automatically when you install the package.

## Usage

### Color Extractor

The color extractor processes images to extract the most common colors and generate visual representations of those colors. Here's how to use it:

#### Example Usage

```python
from rubyapps.color_extractor.extractor import proccessImage

image_path = './dataset/starry_night.jpg'
proccessImage(image_path, 'starrynight', resolution=5, cycles=20, depth=1000, multiplier=5)
```

#### Parameters

- `image_path` (str): Path to the image file.
- `name` (str): Name of the project or image being processed.
- `resolution` (int): Number of colors to extract in each clustering step (default is 5).
- `cycles` (int): Number of secondary clustering cycles to perform (default is 10).
- `depth` (int): Number of initial clustering iterations (default is 100).
- `multiplier` (int): Multiplier for the number of colors to extract in the initial clustering step (default is 1).

### Functions

- `most_common_colors(color_list, res)`: Returns the most common colors from a list.
- `preprocess_image(image_path)`: Preprocesses an image for color extraction.
- `proccess_pixels(hex_colors, res)`: Processes a list of hexadecimal color values.
- `extract_colors(pixels, num_colors=5)`: Extracts a specified number of colors from an image.
- `plot_colors(color_tuples, save_path=None)`: Plots the extracted colors.
- `apply_effect(colors, effect)`: Applies an effect to the extracted colors (e.g., 'vivid', 'pastels').
- `initial_cluster(image_path, effect='standard', suffix=None, name='default', res=5, multiplier=1)`: Performs the initial color clustering on an image.
- `secondary_cluster(hex, effect='standard', suffix=None, name='default', res=5)`: Performs secondary clustering on a list of colors.
- `cache(path, package)`: Caches intermediate results.
- `rgb_to_hex(rgb)`: Converts an RGB color to its hexadecimal representation.
- `render_html(image_path, final, output_path='output.html')`: Renders the final color results to an HTML file.
- `proccessImage(image_path, name, resolution=5, cycles=10, depth=100, multiplier=1)`: Main function to process an image and extract colors.

### Command Line Interface (CLI)

You can also use the color extractor from the command line. The `proccessImage` function is exposed as a CLI command.

```sh
color_extractor <image_path> <name> [resolution] [cycles] [depth] [multiplier]
```

Example:

```sh
color_extractor ./dataset/starry_night.jpg starrynight 5 20 1000 5
```

## License

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

## Author

Your Name (your.email@example.com)
audiopython 0.0.22
A package with functionality for offline audio processing
Requires Python: >=3.8

# audiopython

## Introduction
This is a Python library for working with audio. It comes in two flavors - a regular Python version called `pyaudiopython`, contained in the `pyaudiopython` directory, and a Cython version called `caudiopython`, contained in the `caudiopython` directory. There is a separate directory called `audiopython` that is set up for building a package - at the moment, this directory contains a copy of the Cython version.

You can install this library from PyPi by running the command `pip install audiopython`. This will install the Cython version, which is only compiled for Windows at the moment. You can also build the package yourself on your own computer if you wish. Or you can use individual modules in the `pyaudiopython` or `caudiopython` directories.

The package is divided into 8 modules:

### `audiopython.analysis`
Tools for spectral analysis and analysis of audio waveforms. Many of these tools are based on formulas from Florian Eyben's "Real-Time Speech and Music Classification," published by Springer in 2016. Among other things, this module computes spectral centroid, entropy, slope, and flatness.

### `audiopython.audiofile`
This module is for reading and writing audio files, using either the `pedalboard` library or using (slower) code provided here.

### `audiopython.granulator`
Funtionality for grain extraction

### `audiopython.operations`
This module has various operations that can be performed on audio, such as spectral frame swapping, equal energy forcing, dc bias removal, and beat envelope generation.

### `audiopython.plot`
Plotting functionality for audio and spectrum

### `audiopython.sampler`
Tools for extracting samples from audio

### `audiopython.spectrum`
Tools for spectral analysis

### `audiopython.synthesis`
Tools for generating simple waveforms

## Dependencies
You will need the following Python libraries: `matplotlib`, `numpy`, `pedalboard`, `regex`, `scipy`. You will also need `Cython` if you want to build the Cython version.

## Building
To build this package, run `python -m build`.