semvec/pypi-packages huggingface dataset:
python-tictactoe 0.0.7
A tic-tac-toe library that supports different sizes and dimensions and how many marks in a row to win
Requires Python: >=3.6
Keywords: tic-tac-toe,tictactoe,game

# python-tictactoe
[![PyPI version](https://badge.fury.io/py/python-tictactoe.svg)](https://badge.fury.io/py/python-tictactoe)
[![Tests](https://github.com/AttackingOrDefending/python-tictactoe/actions/workflows/tests.yml/badge.svg)](https://github.com/AttackingOrDefending/python-tictactoe/actions/workflows/tests.yml)
[![Build](https://github.com/AttackingOrDefending/python-tictactoe/actions/workflows/build.yml/badge.svg)](https://github.com/AttackingOrDefending/python-tictactoe/actions/workflows/build.yml)
[![Mypy](https://github.com/AttackingOrDefending/python-tictactoe/actions/workflows/mypy.yml/badge.svg)](https://github.com/AttackingOrDefending/python-tictactoe/actions/workflows/mypy.yml)
[![codecov](https://codecov.io/gh/AttackingOrDefending/python-tictactoe/branch/main/graph/badge.svg?token=7N5LHRA3OC)](https://codecov.io/gh/AttackingOrDefending/python-tictactoe)

A tic-tac-toe library that supports different sizes and dimensions and how many marks in a row to win.

Installing
----------

Download and install the latest release:

    pip install python-tictactoe

## Features

* Includes mypy typings.

* Different board sizes
```python
from tictactoe import Board

board = Board(dimensions=(4, 5))
```
* More than 2 dimensions
```python
from tictactoe import Board

board = Board(dimensions=(6, 2, 5, 8))
```
* More than 3 in a row to win
```python
from tictactoe import Board

board = Board(dimensions=(10, 10, 10), x_in_a_row=8)
```
* See the board
```python
from tictactoe import Board

board = Board(dimensions=(2, 2, 2), x_in_a_row=2)
board.push((0, 0, 0))
board.push((0, 1, 0))
print(board)

"""
 X |   
-------
 O |   
-------
-------
   |   
-------
   |   
"""
```
* Generate endgame tablebases
```python
from tictactoe.egtb import Generator
import functools, operator

dimensions = (4, 3)
total_squares = functools.reduce(operator.mul, dimensions)
for index in reversed(range(total_squares + 1)):
    Generator(dimensions, 3, index)
```
* Read endgame tablebases
```python
from tictactoe.egtb import Reader
from tictactoe import Board

reader = Reader((3, 3), 3, 2)
board = Board((3, 3), 3)
board.push((0, 0))
board.push((0, 1))
print(reader.index(board))
```

## License
python-tictactoe is licensed under the MIT License. Check out LICENSE for the full text.
interruptible-list 0.2
Build a list from a iterable, interruptible by KeyboardInterrupt (SIGINT), and monitorable by SIGUSR1 and SIGUSR2.
Requires Python: >=3.6

A interruptible list
====================

Build a list from a iterable, interruptible by KeyboardInterrupt (SIGINT), and
monitorable by SIGUSR1 and SIGUSR2.

The function `interruptible_list` act as list() constructor, and build a list from
an iterable, except:
  - When a SIGINT (CTRL-C, KeyboardInterrupt) is received, the construction
    is stopped, and the current list is returned.
  - When a SIGUSR1 is received, the last item is pickled in a file or a callback
    is called on the last item, and the construction of the list continues.
  - When a SIGUSR2 is received, the whole current list is pickled in an file or
    a callback is called on the whole current list, and the construction of the
    list continues.

Examples
--------

All examples are illustrated with a slow version of `range(60)`.

```python
import time

def mygen():
    for i in range(60):
        time.sleep(1)
        yield i
```

 - Basic interruptible list:
    ```python
    from interruptible_list import interruptible_list

    L = interruptible_list(mygen())
    ```

 - With callback on `SIGUSR1` to display the last item on `stderr`
    ```python
    import sys
    from interruptible_list import interruptible_list

    def mycallback(x):
        print(x, file=sys.stderr)

    L = interruptible_list(mygen(), callback_last=mycallback)
    ```

 - With callback on `SIGUSR2` to display the mean on the current list on `stderr`:
    ```python
    import sys
    from interruptible_list import interruptible_list

    def mycallback_mean(thelist):
        mean = sum(thelist)/len(thelist)
        print(mean, file=sys.stderr)

    L = interruptible_list(mygen(), callback_whole=mycallback_mean)
    ```

 - With save on `SIGUSR1` and `SIGUSR2`. Last item (`USR1`) or the whole current list
   (`USR2`) is pickled when the signal is received.
    ```python
    from interruptible_list import interruptible_list

    L = interruptible_list(mygen(), save_last=True, save_whole=True)
    ```
run-logger 0.1.8
A utility for logging runs.
Requires Python: >=3.8,<4.0

# Welcome to run-logger

A"run" is a long-running process that depends on a set of parameters and outputs results in the form of logs.
This library has three primary functions:

1. Storing run logs in a database.
2. Storing metadata associated with each run in a database (e.g. for the purposes of reproducibility).
3. Managing parameters.

# Installation

```bash
pip install run-logger
```

# [Documentation](https://run-logger.readthedocs.io/en/latest/index.html)