semvec/pypi-packages huggingface dataset:
mashlib 0.1.9
Common library tools for Moonshine AI
License: MIT
Requires Python: <4.0,>=3.10
Keywords: moonshine, library

<br />
<p align="center">
    <a href="https://github.com/moonshinelabs-ai/moonshine">
      <img src="https://moonshine-assets.s3.us-west-2.amazonaws.com/mash_full_logo_light.png" width="50%"/>
    </a>
</p>

<h2><p align="center">Shared utility functions powering Moonshine tools.</p></h2>

<p align="center">
    <a href="https://moonshine-mash.readthedocs.io/en/latest/">
        <img alt="Documentation" src="https://readthedocs.org/projects/moonshine-mash/badge/?version=latest">
    </a>
    <a href="https://pypi.org/project/moonshinelabs-ai/">
        <img alt="PyPi Version" src="https://img.shields.io/pypi/pyversions/mashlib">
    </a>
    <a href="https://pypi.org/project/mashlib/">
        <img alt="PyPi Package Version" src="https://img.shields.io/pypi/v/mashlib">
    </a>
    <a href="https://pepy.tech/project/mashlib/">
        <img alt="PyPi Downloads" src="https://static.pepy.tech/personalized-badge/mashlib?period=month&units=international_system&left_color=grey&right_color=blue&left_text=Downloads/month">
    </a>
    <a href="https://join.slack.com/t/moonshinecommunity/shared_invite/zt-1rg1vnvmt-pleUR7TducaDiAhcmnqAQQ">
        <img alt="Chat on Slack" src="https://img.shields.io/badge/slack-chat-2eb67d.svg?logo=slack">
    </a>
    <a href="https://github.com/moonshinelabs-ai/moonshine/blob/main/LICENSE">
        <img alt="License" src="https://img.shields.io/badge/license-MIT-green">
    </a>
</p>
<br />

## What is Mash?
Mash is a straightforward utility library for common tasks in computer vision and deep model training. The library was broken out of previous Moonshine projects like Moonshine and Zeroshot.

## What can Mash Do?
Mash broadly supports a few utilities, but the main ones are:

1. Easy image conversion: simply call `to_pil`, `to_numpy`, and `to_tensor` to convert image formats. Accepts other images, URLs, or local files.
2. Image processing files: convenience functions like `crop_to_multiple_of_dimensions` for transformer based patch models like ViT.
3. Console UI: for long running jobs, a fullscreen console utility that has a progress bar at the bottom and text logging.
4. Cloud functions: use `glob` or `exists` on AWS or GCS links.

For a complete list of functions, see [the documentation](https://moonshine-mash.readthedocs.io/en/latest/index.html)

## Installation
To install via pip:

`pip install mashlib`

## Usage
To use:

```python
# Import base package
import mash

# Import image processing
import mash.images as mi
image = mi.to_numpy("/path/to/image.png")
```
scav 1.2
SCAV: Safety Concept Activation Vector Jailbreak Framework
License: MIT

This is the code for our NeurIPS 2024 paper *<strong>Uncovering Safety Risks of Large Language Models through Concept Activation Vector</strong>*.

## Disclaimer

This project may lead to attacks on LLMs and is intended for academic research use only. It is prohibited for illegal purposes. The authors have shared the vulnerabilities with OpenAI and Microsoft.
sphinx-feature-flags 1.0.9
This Sphinx extension allows for the `feature-flag` directive to hide/show content based on build-time flags.
License: MIT
Requires Python: >=3.10

# Sphinx Extension: Feature Flags

<!-- Badges go here on the same line; PyPi doesn't support `\` or single-multi-line (it'll stack vertically) -->
[![PyPI](https://img.shields.io/pypi/v/sphinx-feature-flags)](https://pypi.org/project/sphinx-feature-flags/) [![PyPI - License](https://img.shields.io/pypi/l/sphinx-feature-flags)](https://opensource.org/licenses/MIT)

## Description

This Sphinx extension allows for the `feature-flag` directive to show (if `True`) or fallback (if `False` and
using the `:fallback:` option).

## Setup

1. Add the following to your `conf.py`:

    ```python
    import sys, os
    
    sys.path.append(os.path.abspath(os.path.join('_extensions', 'sphinx_feature_flags')))
    extensions = ['sphinx_feature_flags']
    
    feature_flags = {
        'production-stage': False,  # Example
    }
    ```

## Usage

In any `.rst` file, wrap the `feature-flag` directive around any block:

    ```rst
    .. feature-flag:: dev-debug-mode
    
       This only shows if production-stage = True; it can be an entire toctree, too!
    
    .. feature-flag:: dev-debug-mode
       :fallback:
    
       This only shows if production-stage = False.
    ```

## Requirements

- Python>=3.6
- Sphinx>=1.8

This may work with older versions, but has not been tested.

## Entry Point

See `setup(app)` definition at `sphinx_feature_flags.py`.

## Tested in

- Windows 11 via PowerShell 7
- Ubuntu 22.04 via ReadTheDocs (RTD) CI

## Notes

- `__init__.py` is required for both external pathing and to treat the directory as a pkg
sphinx-image-min 1.0.9
This Sphinx extension allows for automatically minimizing build dir images, most useful when only used for CI.
License: MIT
Requires Python: >=3.10

# Sphinx Extension: Image Minimizer

<!-- Badges go here on the same line; PyPi doesn't support `\` or single-multi-line (it'll stack vertically) -->
[![PyPI](https://img.shields.io/pypi/v/sphinx-image-min)](https://pypi.org/project/sphinx-image-min/) [![PyPI - License](https://img.shields.io/pypi/l/sphinx-image-min)](https://opensource.org/licenses/MIT)

## Description

This Sphinx extension allows for automatically minimizing build dir images, most useful when only used for CI.

## Setup

1. Add the following to your `conf.py`:

    ```python
    import sys, os
    
    # Sphinx Minimizer [Optional] Options
    image_min_max_width = 1080  # Default
    ```

## Usage

After a build is complete, images in `build/_images/` will be compressed (lossless, if png). 

## Requirements

- Python>=3.6
- Sphinx>=1.8
- pillow>=10.4.0

This may work with older versions, but has not been tested.

## Entry Point

See `setup(app)` definition at `sphinx_image_min.py`.

## Tested in

- Windows 11 via PowerShell 7
- Ubuntu 22.04 via ReadTheDocs (RTD) CI

## Notes

- `__init__.py` is required for both external pathing and to treat the directory as a pkg