semvec/pypi-packages huggingface dataset:
j2scr 1.0.1
Convenience wrapper around Jinja for scripts
License: MIT
Requires Python: >=3.7

# j2scr: Avoid Jinja2 boilerplate for small scripts
This is a very simple package that wraps Jinja2.
The purpose is to avoid boilerplate for micro-scripts that use jinja.
This is achieved by setting a default jinja environment, and a loader searching relatively (unless
an absolute path is given), and providing utility functions `render`, `render_to_file`, and
`set_options`.

Use as such:

```python
from j2scr import render, render_to_file, set_options

# You can render into a variable
string_with_content = render("../my_template.txt.j2", var=2, var2='Michael')
# Or into a file
render_to_file("../my_template.txt.j2", "my_content.txt" var=2, var2='Michael')

# You can change the loader/environment parameters (do it before rendering, of course):
set_options(encoding="latin-1", trim_blocks=True)
# Alternatively the environment and loaders are available as attributes.
```

If for some reason you want the minimalism of `j2scr` but without the global settings (eg. for a
class), you can use the `j2scr.J2Scr` class which works the same way but has it's own env and loader.
atom-alter-api 0.1.4
An unofficial python library for communication with the Atomars and Alterdice exchanges API
License: MIT
Requires Python: >=3.6

======================
Atomars Alterdice API
======================

.. image:: https://img.shields.io/badge/python-3.6-blue.svg
    :target: https://www.python.org/downloads/release/python-360/
    :alt: Python3.6



This is an unofficial python API for Atomars and Alterdice exchanges.

Install
-----------------------

Install using pip

.. code:: bash

    $ pip install atom-alter-api


Usage
---------
Note: Many of the functions in the API are async. So you have to use await or ensure_future etc... To use the API in another python program, first import asyncio and the API, then login using your username and password, then call whatever function you would like. Because the API is asyncio, we will need to do this within a class so that we can "await" for functions to complete. Here is a simple example to get the balances:

    .. code:: python

        import asyncio
        from atom_alter_API.api import AtomarsAlterdiceAPI

        class TestClass():

            def __init__(self):
                self.api = AtomarsAlterdiceAPI(API_login_username, API_login_password)

            async def run(self):
                await self.api.login()
                balances = await self.api.get_balances()
                print(balances)

        if __name__ == "__main__":

            testClass = TestClass()
            asyncio.ensure_future(testClass.run())

            loop = asyncio.get_event_loop()
            loop.run_forever()
            loop.close()



See the docs folder for more info. Also see tests for some more code examples.


Install for development
-----------------------

1)  Clone this repo

    .. code:: bash

        $ cd ~/
        $ git clone https://github.com/hyperevo/Atomars-alterdice-API


2)  Install using pip

    .. code:: bash

        $ cd Atomars-alterdice-API
        $ pip3 install -e .
snake-gym 1.8
Gym environment for Snake
License: MIT

# Snake-Gym
[![Downloads](https://pepy.tech/badge/snake-gym)](https://pepy.tech/project/snake-gym)
[![PyPi Version](https://img.shields.io/pypi/v/snake-gym.svg)](https://pypi.python.org/pypi/snake-gym)
[![Python Compatibility](https://img.shields.io/pypi/pyversions/snake-gym.svg)](https://pypi.python.org/pypi/snake-gym)
[![License](https://img.shields.io/pypi/l/snake-gym.svg)](https://pypi.python.org/pypi/snake-gym)<br>

Contains a gym environment for the classic game snake.

## Implementing
* `env.render()` is not implemented, running it will raise `NotImplementedError`.
* `env.reset()` opens the GUI for the game. 
* `env.fps` contains the fps to run the game at. You can set it using:
    ```python
    env.fps = 60
    ```
## Installation
For the latest installation, run
```bash
git clone https://github.com/vivek3141/snake-ai
pip install -e .
```
You can install the latest release by
```bash
pip install snake-gym
```

## Creating The Environment
The environment can be created by doing the following:
```python
import gym
import snake_gym
env = gym.make("snake-v0")
```

## Environments
* `snake-v0` Returns a 150x150 RGB image in the form of a numpy array for the observations
* `snake-tiled-v0` Returns a 10x10 matrix for the observations. 
    * `0` is empty space
    * `1` is the snake
    * `2` is the food