semvec/pypi-packages huggingface dataset:
nn-metrics 1.0.0
A collection of neural network machine learning error metrics.
License: MIT
Keywords: nn neural-network metrics nn-metrics

# Example Usage
```
# Import the required functions from your package
from nn_metrics.metrics import (
    mean_absolute_percentage_error,
    mean_absolute_error,
    mean_squared_error,
    root_mean_squared_error,
    binary_cross_entropy,
    categorical_correntropy,
    sparse_categorical_crossentropy
)

# Example usage:
actual = [10, 20, 30, 40, 50]
predicted = [12, 18, 28, 41, 48]

# Calculate and print error metrics
print("Mean Absolute Percentage Error (MAPE):", mean_absolute_percentage_error(actual, predicted))
print("Mean Absolute Error (MAE):", mean_absolute_error(actual, predicted))
print("Mean Squared Error (MSE):", mean_squared_error(actual, predicted))
print("Root Mean Squared Error (RMSE):", root_mean_squared_error(actual, predicted))
```
terminal-sokoban 1.1.0
A terminal based Sokoban game interface
License: MIT
Requires Python: <3.13,>=3.12
Keywords: sokoban, terminal, console, game

# Terminal Sokoban

`sokoban` is a "graphical" command line program for playing the popular sokoban game in the terminal.

> Sokoban (倉庫番, Sōko-ban, lit. 'warehouse keeper'[1]) is a puzzle video game in which the player pushes boxes around in a warehouse, trying to get them to storage locations. The game was designed in 1981 by Hiroyuki Imabayashi, and first published in December 1982. - Wikipedia: http://en.wikipedia.org/wiki/

![demo.gif](https://github.com/IamAbbey/terminal-sokoban/assets/61361540/145628da-3050-4d72-8e21-d43ef47dba0f)

## Installation

`sokoban` is only compatible with `python3`, and can be installed through `pip`.

```bash
pip3 install terminal-sokoban
```

You should then be ready to go.

## Play 
Run `sokoban` to start playing the game.

```
sokoban
```

There are over `17,991` stages.

`sokoban` has been tested to work on Linux, Mac, and Windows computers.

### Instruction

- Use the arrow keys to move the player around.

- Use the (r) key to reverse a move.

- Use the (z) key to restart a stage.

- Use the (q) key to quit the game.


## Options

Specify which stage to play

```
sokoban 7
```

## Development
- Clone repository.
- Setup poetry and install dependencies.
- Load stage data using `python script/generate.py`.
- Run Game using play instructions above.

## Credits
- [Blessed](https://github.com/jquast/blessed)
- [cursewords](https://github.com/thisisparker/cursewords)
- Levels data from http://sourcecode.se/sokoban/
pyfuncpatmatch 0.1.0
Pattern matching (like haskell) for python fonctions
License: MIT
Requires Python: >=3.10

# pyfuncpatmatch

Pattern matching (like haskell) for python fonctions

## Install

```bash
pip install pyfuncpatmatch
```

## Usage

### Exemples

_For a full list of exemples and tests done, see:_ [main](./pyfuncpatmatch/__main__.py)

#### eq

```python
from pyfuncpatmatch import pm, _eq

@pm(lambda _: 0, _eq(0))
@pm(lambda _: 1, _eq(1))
def fib_rec(n: int):
    return fib_rec(n - 1) + fib_rec(n - 2)
```

#### gte, lte

```python
from pyfuncpatmatch import pm, _gte, _lte

@pm(lambda x: f"You are not a teen ({x})", _gte(18))
@pm(lambda x: f"You are not a teen ({x})", _lte(11))
def is_teen(x):
    return f"You are a teen ({x})"
```

#### and, lambda

```python
from pyfuncpatmatch import pm, _and, _lambda

@pm(
    lambda _: "FizzBuzz",
    _and(_lambda(lambda x: x % 3 == 0), _lambda(lambda x: x % 5 == 0)),
)
@pm(lambda _: "Fizz", _lambda(lambda x: x % 3 == 0))
@pm(lambda _: "Buzz", _lambda(lambda x: x % 5 == 0))
def fizzbuzz(x):
    return f"{x}"
```

#### empty, all, extract

```python
from pyfuncpatmatch import pm, pm_raise, _empty, __, _extract

# pm_raise is a function that raise the exception being passed
# -> lambda can't raise the expression directly
@pm(lambda _: pm_raise(ValueError("empty iterable")), _empty())
@pm(lambda splited: splited[0], _extract(__(), __()))
def head(x):
    raise SyntaxError(f"{x} is not iterable")

@pm(lambda splited: splited[1], _extract(__(), __()))
def tail(x):
    raise ValueError(f"{x} is not iterable")
```

#### Keyword Matching

Arguments and Keyword Arguments are passed to the callback the same way they
would have be passed to the initial function.

But when the callback is a lambda, it automatically transform keywords arguments
as arguments (because passing keyword arguments to lambda raise an exception).

This ensure that you can keep calling the initial function with arguments and
keywords arguments.

```python
from pyfuncpatmatch import pm, __, _or, _eq

@pm(lambda x, z: (x,z), x=__(), z=_or(_eq(2), _eq(5)))
@pm(lambda x, z: (x,z), __(), z=_eq(10))
def select(x, y, z):
    return (x, y, z)

# >>> select(1, 2, z=3)
# (1, 2, 3)
# >>> select(0, 1, 2)
# (0, 2)
# >>> select(1, 3, 10)
# (1, 10)
```