semvec/pypi-packages huggingface dataset:
gym-snake-game 0.1.2
Snake game for OpenAI Gym
License: MIT
Requires Python: >=3.0
Keywords: ai,rl,snake

# Snake game for OpenAI Gym
![Python versions](https://img.shields.io/pypi/pyversions/gym-snake-game)
[![PyPI](https://img.shields.io/pypi/v/gym-snake-game)](https://pypi.org/project/gym-snake-game/)
[![License](https://img.shields.io/github/license/NaLooo/gym-snake-game)](https://github.com/NaLooo/gym-snake-game/blob/main/LICENSE)

 Snake game for OpenAI gym


## Quick Start

```python
import gym_snake_game
import gym

# both work
env = gym.make('Snake-v0', render_mode='human')
env = gym_snake_game.make('Snake-v0', render_mode='human')
env.reset()

# for human playing
env.play()

# for ai playing
while True:
    obs, reward, done, truncated, info = env.step(env.action_space.sample())
    if done:
        break
env.close()

```

**Ming Yu**
reploncli 0.9.4
REPL extension to CLI apps
License: MIT
Requires Python: >=3.6,<4.0
Keywords: repl,cli,command line

# REPL on CLI

REPL extension to CLI apps

### Example

```python
import sys
from reploncli import reploncli

import my_cli_function, show_help

# turn on REPL mode if the first command line argument is 'repl'
lets_start_in_repl_mode = (sys.argv[1:] or [''])[0] == "repl"

reploncli(my_cli_function, lets_start_in_repl_mode, show_help, ">>> ")
```

### reploncli()

Signature:
```python
def reploncli(cli_function, repl_mode=None, help=None, prompt=""):
    ...
```

If `repl_mode is True` then REPL mode starts.

### Wrap your CLI entry point

Create `cli_function` by wrapping your CLI entry point that accepts one optional argument with `args` to use as a replacement for `sys.argv` if given.  
Otherwise process `sys.argv` as normal.

### Shell commands

If an input in REPL mode starts with `.` then it's run by `os.system()` after removing that dot.
flake8-forbidden-func 0.1.0
An extension for flake8 that forbids some functions in some modules.
License: MIT
Requires Python: >=3.7
Keywords: flake8

# flake8-forbidden-func

An extension for flake8 that forbids some functions in some modules.

## Installation

```terminal
pip install flake8-forbidden-func
```

## Example

```python

# users/views.py
from users import User
import datetime


def test_view():
    print(datetime.datetime.now())
    faz = User.objects.all().annotate().filter(a=2)
    baz = bar_func()

    if faz == baz:
        fuz = q.filter(a=1)
        return fuz.bar()
```

```
# setup.cfg
[flake8]
forbidden-functions =
    *.views: *.filter, views module should not use ORM filter
    *: datetime.datetime.now, we use django utils
allowed-functions =
    *.selectors: *.objects.*, only selectors module should use ORM
```

Usage:

```terminal
$ flake8 users/views.py
users/views.py:6:11: CFF001 datetime.datetime.now call is forbidden,since we use django utils.
users/views.py:7:11: CFF001 *.objects.* call is forbidden, since only selectors module should use ORM.
users/views.py:7:11: CFF001 *.objects.* call is forbidden, since only selectors module should use ORM.
users/views.py:7:11: CFF001 *.objects.* call is forbidden, since only selectors module should use ORM.
users/views.py:11:15: CFF001 *.filter call is forbidden, since views module should not use ORM filter.
```

Tested on Python 3.7+ and flake8 4.0+.

## Error codes

| Error code |                            Description                             |
|:----------:|:------------------------------------------------------------------:|
|   CFF001   |                  call is forbidden, since reason                   |
|   CFF000   | happens when we get unhandled exception during the linting process |