semvec/pypi-packages huggingface dataset:
janggi 1.0.5
Python library for Korean chess Janggi
Requires Python: >=3.6

# PyJanggi

<img width="400" alt="Screen Shot 2022-06-13 at 6 04 29 PM" src="https://user-images.githubusercontent.com/46757971/173320609-075acc71-0f0a-47d6-9082-2418ca2775e8.png">

PyJanggi is a Python library for a Korean chess called [Janggi](https://en.wikipedia.org/wiki/Janggi).
It provides functionalities to simulate a game, maintain a game board, list all possible moves, make a move, and validate a move.

## Documentation
Check out the [GitHub Page](https://sungho-cho.github.io/pyjanggi/) for package documentation.

## Getting Started

### Using PyJanggi in Your Package

1. Install package via pip:
    `pip install janggi`

2. Import in your Python module:
    `import janggi`

    You can also import inner modules:
    `from janggi import JanggiGame, generate_random_game`

3. Call methods to the `JanggiGame` class instance to play the game.

    3 public methods are:
    - `make_action(self, origin: Location, dest: Location) -> Tuple[float, bool]`
    - `get_all_actions(self) -> List[Tuple[Location, Location]]`
    - `get_all_destinations(self, origin: Location) -> List[Location]`

    Check out the [Documentation](#documentation) section for more details

    You can also check out the [gym-janggi](https://github.com/sungho-cho/gym-janggi/blob/main/gym_janggi/envs/janggi.py) repository to learn how PyJanggi package can be utilized.

### Testing Functionality
PyJanggi is originally designed to be imported by other packages and provide Janggi game logic and classes, but if you want to check if the PyJanggi package is working, you can follow these steps:

1. Clone the repository:

    `git clone https://github.com/sungho-cho/pyjanggi.git`

2. Install dependencies:

    `pip install -r requirements.txt`

3. Run `main.py`:

    `python janggi/main.py`

    If you see the UI window and can navigate with left and right arrow keys, your PyJanggi package is working!



## Releases
Check out the [PyPi Package](https://pypi.org/project/janggi) for releases.

## License
This package is licensed under the [MIT License](LICENSE).
cursor 1.3.5
A small Python package to hide or show the terminal cursor
Keywords: cursor,terminal,hide,show

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)

![PyPI version](https://badge.fury.io/py/cursor.svg)

# cursor 
A small Python package to hide or show the terminal cursor.
Works on Linux and Windows, on both Python 2 and Python 3.

![demonstration](http://i.imgur.com/2iXviMi.gif)

## Disclaimer
The code is almost entirely a copy of
[James Spencer's](http://stackoverflow.com/u/1375885/) 
[answer on StackOverflow](http://stackoverflow.com/a/10455937/1096437).


## Installation
The preferred way of installing `cursor` is via `pip`.
You can install `pip` with your package manager:

#### On Ubuntu:
    
    sudo apt-get install python-pip
    pip install --user cursor

#### On Arch:
    
    git clone https://aur.archlinux.org/python-cursor.git
    cd python-cursor
    makepkg -si

## Usage

```python
import cursor
cursor.hide() ## Hides the cursor
cursor.show() ## Shows the cursor
```


Note that the cursor will stay hidden until you call `cursor.show()` — 
even after exiting your python script!

Because of that, `pip` will install two scripts, which can be run
from the command line: `cursor_hide` and `cursor_show`.

An alternative is using the `HiddenCursor()` class in conjunction
with Python's `with` statement. This will make sure that the cursor
is shown again after running your code, even if exceptions are
raised:

```python
import cursor
with cursor.HiddenCursor():     ## Cursor will stay hidden
    import time                 ## while code is being executed;
    for a in range(1,100):      ## afterwards it will show up again
        print(a)
        time.sleep(0.05)
    
```

You could also use Python's `atexit` module:

```python
import cursor
import atexit
import time

atexit.register(cursor.show)    ## Make sure cursor.show() is called
                                ## when exiting

cursor.hide()                   ## Hides cursor
for a in range(1,100):
    print(a)
    time.sleep(0.05)
exit()                          ## Cursor will show again
```

## Contributors
[Manraj Singh](https://github.com/ManrajGrover): allowed setting
a customisable stream 

[Alexander Seiler](https://github.com/goggle): packaging for Arch

Patrik Kopkan: packaging for Fedora


## Projects using `cursor`
[`halo`](https://github.com/ManrajGrover/halo): beautiful 
terminal spinners in Python

[`pipenv`](https://github.com/pypa/pipenv): a tool that aims to bring the best of all packaging worlds to the Python world