semvec/pypi-packages huggingface dataset:
MPSPEnv 0.1.5
A reinforcement learning environment for the Multi Port Stowage Planning problem

This package implements the mathematical model of the "Multi Port Stowage Planning" (MPSP) problem, introduced in [Avriel et al. 1998](https://www.researchgate.net/publication/242916342_Stowage_planning_for_container_ships_to_reduce_the_number_of_shifts), as a reinforcement learning environment using the [Gymnasium API](https://gymnasium.farama.org/api/env/).

The Env class has the following input parameters:

- **R** (int): number of rows
- **C** (int): number of columns
- **N** (int): number of ports

The env observations consist of a dictionary with the one hot encoded bay, and the upper triangular part of the transportation matrix as a flattened array.

![](https://raw.githubusercontent.com/hojmax/MPSPEnv/main/env.png)
_Screenshot from the environment. The left matrix is the bay, and the right matrix is the transportation matrix. "x" denotes blocking containers. The reward decreases by one for each reshuffle necessitated by the agents stowage plan._

Note that since the mathematical model disregards any stability constraints, the env automatically swaps the column order in a lexocographic manor, based on the containers in the columns. This reduces the state space, by a factor of almost $C!$. Furthmore, the transportation matrix, is reshifted up and to the left, for each port, to reduce the state space even further. This means that from the point of view of the agent, it never leaves the first port.

When using the environment, you should call `env.close()` before exiting your program, to avoid memory leaks.

Minimal usage with [Stable Baselines](https://stable-baselines.readthedocs.io/en/master/):

```python
from MPSPEnv import Env
from sb3_contrib.ppo_mask import MaskablePPO

train_env = Env(R=8, C=4, N=5)

model = MaskablePPO(
    "MultiInputPolicy",
    train_env
)

model.learn(
    total_timesteps=1e6,
    progress_bar=True
)

train_env.close()
```

If you wish to try the env yourself, placing containers using keys 0-3 and removing containers using keys 4-7, you can use the following script:

```python
from MPSPEnv import Env
import pygame, numpy as np


def get_action_from_key(key):
    return key - pygame.K_0 if pygame.K_0 <= key <= pygame.K_7 else None


if __name__ == "__main__":
    env = Env(3, 4, 6)
    env.reset()

    while True:
        env.render()

        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                env.close()
                exit()
            elif (
                event.type == pygame.KEYDOWN
                and (action := get_action_from_key(event.key)) is not None
            ):
                _, reward, done, _, _ = env.step(action)
                if done:
                    env.render()
                    pygame.time.wait(1000)
                    env.close()
                    exit()

        pygame.time.wait(10)
```
Package-mkm77 0.1
A basic mathematical operation package
Keywords: python, maths

Package_mkm77
================

A basic mathematical operation package.

Installation
------------

You can install this package using pip:

```sh
pip install Package_mkm7

Usage
-----

Here is an example of how to use the functions in this package:

```python
import Package_mkm77

result_add = Package_mkm77.add(5, 3)
result_subtract = Package_mkm77.subtract(5, 3)
result_multiply = Package_mkm77.multiply(5, 3)
result_divide = Package_mkm77.divide(5, 3)
result_remainder = Package_mkm77.remainder(5, 3)
result_exponent = Package_mkm77.exponent(5, 3)

print(result_add)         # Output: 8
print(result_subtract)    # Output: 2
print(result_multiply)    # Output: 15
print(result_divide)      # Output: 1.6666666666666667
print(result_remainder)   # Output: 2
print(result_exponent)    # Output: 125



Functions
add(a, b): Function to sum two numbers.
subtract(a, b): Function to subtract two numbers.
multiply(a, b): Function to multiply two numbers.
divide(a, b): Function to divide two numbers.
remainder(a, b): Function to get the remainder.
exponent(a, b): Function to calculate a to the power of b.


Author
Mukesh

Version
0.1
LearningNashQLearning 0.12
A simple NashQ-learning implementation in Python
Requires Python: >=3.9

# LearningNashQLearning

This is an educational project to see the inner workings of the Nash-Q Learning algorithm. The Nash-Q Learning algorithm is a multi-agent reinforcement learning algorithm that is designed to learn Nash equilibria in general-sum stochastic games. This project is designed to be educational and is not intended to be used in production environments.

## What's in here?

You can find the following subpackages in this project:

- **Model**: Contains the implementation of the Nash-Q Learning algorithm as well as a wide range of classes to define Stochastic Games.
- **View**: Contains the implementation of a wide variety of widgets to visualize the Nash-Q Learning algorithm. They are designed to be used in python Notebooks via the ipythonwidgets library.
evalai 1.3.18
Use EvalAI through command line interface

# EvalAI-CLI

<b>Official Command Line utility to use EvalAI in your terminal.</b>

EvalAI-CLI is designed to extend the functionality of the EvalAI web application to command line to make the platform more accessible and terminal-friendly to its users.

------------------------------------------------------------------------------------------

[![Join the chat at https://gitter.im/Cloud-CV/EvalAI](https://badges.gitter.im/Cloud-CV/EvalAI.svg)](https://gitter.im/Cloud-CV/EvalAI?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://travis-ci.org/Cloud-CV/evalai-cli.svg?branch=master)](https://travis-ci.org/Cloud-CV/evalai-cli)
[![Coverage Status](https://coveralls.io/repos/github/Cloud-CV/evalai-cli/badge.svg?branch=master)](https://coveralls.io/github/Cloud-CV/evalai-cli?branch=master)
[![Documentation Status](https://readthedocs.org/projects/markdown-guide/badge/?version=latest)](https://cli.eval.ai/)

## Installation

EvalAI-CLI and its required dependencies can be installed using pip:
```sh
pip install evalai
```
Once EvalAI-CLI is installed, check out the [usage documentation](https://cli.eval.ai/).

## Contributing Guidelines

If you are interested in contributing to EvalAI-CLI, follow our [contribution guidelines](https://github.com/Cloud-CV/evalai-cli/blob/master/.github/CONTRIBUTING.md).

## Development Setup

1. Setup the development environment for EvalAI and make sure that it is running perfectly.

2. Clone the evalai-cli repository to your machine via git

    ```bash
    git clone https://github.com/Cloud-CV/evalai-cli.git evalai-cli
    ```

3. Create a virtual environment

    ```bash
    cd evalai-cli
    virtualenv -p python3 venv
    source venv/bin/activate
    ```

4. Install the package locally

    ```bash
    pip install -e .
    ```
 
5. Change the evalai-cli host to make request to local EvalAI server running on `http://localhost:8000` by running:
   
   ```bash
   evalai host -sh http://localhost:8000
   ```


6. Login to cli using the command ``` evalai login```
Two users will be created by default which are listed below -

    ```bash
    Host User - username: host, password: password
    Participant User - username: participant, password: password
    ```
pdfebook 0.1.4
A tool to produce a PDF ebook from an cover image and interior PDF
Requires Python: >=3.12

# pdfebook

A tool to produce a PDF ebook from a cover image and interior PDF,
or a ZIP archive containing a PDF ebook and an EPUB.

## Installation

Python 3.12 or better is expected.

```bash
pip install pdfebook
```

## Usage

To produce just a PDF:

```bash
pdfebook \
    --cover cover.jpg \
    --interior interior.pdf \
    --author "An Author" \
    --title "Title of Book" \
    --outfile ebook.pdf
```

You can include a back cover, too:

```bash
pdfebook \
    --cover cover.jpg \
    --interior interior.pdf \
    --author "An Author" \
    --title "Title of Book" \
    --back back_cover.jpg \
    --outfile ebook.pdf
```

Or, if you have an EPUB, you can create a ZIP file with both formats:

```bash
pdfebook \
    --cover cover.jpg \
    --interior interior.jpg \
    --author "Quite N. Author" \
    --title "That Book" \
    --outfile "that_book.zip"
```

In the latter case, the resulting ZIP file will contain a directory,
`that_book`, itself containing files `that_book.pdf` and `that_book.epub`.
fighting-sound 0.5
A sound library for DareFightingICE with OpenAL backend
Requires Python: >=3.10

# pyftg-sound

## Prerequisites

__Install OpenAL Soft__

- For Linux (Ubuntu, other distros should be similar)
```
sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install libopenal-dev makehrtf openal-info
```

- For MacOS
```
brew install openal-soft
echo 'export DYLD_LIBRARY_PATH="/opt/homebrew/opt/openal-soft/lib:$DYLD_LIBRARY_PATH"' >> ~/.zshrc
```