semvec/pypi-packages huggingface dataset:
mmaze 0.1.4
Generating and solving maze
Requires Python: >=3.6

# MMaze

A python maze generator and solver.

## Usage

Generating a maze with specific width and height. Print on screen directly.

```python
import mmaze

m = mmaze.generate(width=3, height=3)
print(m)

"""
||||||||||||||
||      ||  ||
||||||  ||  ||
||  ||      ||
||  ||||||  ||
||          ||
||||||||||||||
"""
```

Plot the maze to image.

```python
import mmaze

m = mmaze.generate(width=3, height=3)
m.plot()
```

<img src="https://raw.githubusercontent.com/MorvanZhou/mmaze/master/demo33.png" alt="drawing" width="180"/>

Get solution and plot on screen:

```python
import mmaze

m = mmaze.generate(width=3, height=3)
solutions = m.solve(start=(0, 0), end=(2, 2))
print(m.tostring(solution=solutions[0], start=(0, 0), end=(2, 2)))

"""
||||||||||||||
||S ********||
||  ||||||**||
||  ||    **||
||  ||||||**||
||  ||    E ||
||||||||||||||
"""
```

Generate a solution and plot to an image.

```python
import mmaze

m = mmaze.generate(width=10, height=10)
solutions = m.solve(start=(0, 0), end=(9, 9))
m.plot(solution=solutions[0], start=(0, 0), end=(9, 9))
```

<img src="https://raw.githubusercontent.com/MorvanZhou/mmaze/master/demo.png" alt="drawing" width="300"/>

To make a symmetric maze by passing a symmetry method. Note that width or height must be odd number when you want to
solve the generated maze.

In this repo, only backtracking / growingtree / huntandkill / prims algorithms can generate symmetric maze.

```python
import mmaze

start = (0, 0)
end = (10, 10)
m = mmaze.generate(width=11, height=11, symmetry="horizontal")
solutions = m.solve(start=start, end=end)
m.plot(solution=solutions[0], start=start, end=end)
```

<img src="https://raw.githubusercontent.com/MorvanZhou/mmaze/master/demo_symmetry.png" alt="drawing" width="300"/>

## Install

```
pip install mmaze
```

## More demo use cases

Demo can be found in test file: [tests](https://github.com/MorvanZhou/mmaze/blob/master/tests/mmaze_test.py)
rm-trash 1.0.2
🗑 Safe(r) deletion of files from the macOS command line
Requires Python: >=3.8,<4.0

# rm-trash

[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/celsiusnarhwal/rm-trash?logo=github&color=orange&logoColor=white&style=for-the-badge)](https://github.com/celsiusnarhwal/rm-trash/releases)

rm-trash is a macOS command-line utility that moves files and directories to the Trash.
Unlike [similar](https://github.com/ali-rantakari/trash) [tools](https://github.com/sindresorhus/macos-trash),
rm-trash intends to be a complete alternative to `rm` and `rmdir`, to the extent that you could use aliases
to have rm-trash replace them both.

rm-trash works by communicating with Finder
through [AppleScript](https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html),
so it's no different from moving files to the Trash
from within Finder itself.

## Installation

Install rm-trash with [Homebrew](https://brew.sh) via
the [Houkago Tea Tap](https://github.com/celsiusnarhwal/homebrew-htt).

```bash
brew tap celsiusnarhwal/htt
brew install rm-trash
```

## Usage

Invoke rm-trash with the `trash` command, which will become available after installation.

```bash
trash --help
```

will tell you everything you need to know.

## Replacing `rm` and `rmdir`

If you wish, you can replace `rm` and `rmdir` with aliases to `trash`.

```bash
alias rm="trash trash"
alias rmdir="trash dir"
```

`trash` supports all options of both commands. Run `trash --help` for details.

## Limitations

rm-trash refuses to as root when [System Integrity Protection](https://support.apple.com/en-us/HT204899) (SIP) is
disabled.
You can still run rm-trash as a non-root user when SIP is disabled, or as any user when SIP is enabled. This limitation
is intended to prevent you from accidentally trashing files and directories that are typically protected by SIP.

If you must remove files as root while SIP is disabled, you can always fall back to `rm`.

## License

rm-trash is licensed under the [MIT License](LICENSE.md).