semvec/pypi-packages huggingface dataset:
paiagym 0.0.4
A platform to run Gymnasium or PettingZoo games with AI.
Requires Python: >=3.8

# PAIAGym

A platform to run Gymnasium or PettingZoo games with AI.

## Installation

```
pip install paiagym
```

## Usage

Install a game:
```
paiagym install <game_name>
```

Uninstall a game:
```
paiagym uninstall <game_name>
```

Run the inferencing with given information by the environment variable:
```
paiagym run
```

Run the inferencing with given script path:
```
paiagym run <game_name> -i <script_path>
```

Run the training with given information by the environment variable:
```
paiagym train
```

Run the training with given script path:
```
paiagym train <game_name> -i <script_path>
```

List all added games:
```
paiagym ls
```

List all available games:
```
paiagym ls -a
```

List games in development:
```
paiagym ls -m dev
```

List games in production:
```
paiagym ls -m prod
```

## Usage for Container

You can checkout the Dockerfile for the Docker container.

To build the Docker image:
```
docker build -t paiagym:base . --no-cache
```

If you are using Linux server, run before starting the container (install and config X server with NVIDIA Driver):
```
sudo sh display.sh
```
display.sh can be found at [display.sh](https://github.com/PAIA-Playful-AI-Arena/paiagym/blob/master/display.sh).

To start the container:
```
docker run -it --rm --gpus all -v /tmp/.X11-unix:/tmp/.X11-unix paiagym:base
```
wagtail-shortcode 1.0.3
Draftail Shortcode Entity, adds link-like shortcodes to Draftail.
Requires Python: >=3.8

# Wagtail shortcode

Wagtail shortcode adds a custom Draftail enitity to provide a custom linktype ("shortcode"), giving you the ability to assign values in a similar way to normal links as well as decide how they should be rendered on the page.

[![License: BSD-3-Clause](https://img.shields.io/badge/License-BSD--3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![PyPI version](https://badge.fury.io/py/wagtail-shortcode.svg)](https://badge.fury.io/py/wagtail-shortcode)
[![shortcode CI](https://github.com/Morsey187/wagtail-shortcode/actions/workflows/test.yml/badge.svg)](https://github.com/Morsey187/wagtail-shortcode/actions/workflows/test.yml)


## Installation

- `python -m pip install wagtail-shortcode`
- ...


Add `'wagtail_shortcode'` to `INSTALLED_APPS`.

Register a [LinkHandler](https://docs.wagtail.org/en/stable/extending/rich_text_internals.html#rewrite-handlers), to control how the new linktype renders on the front-end (`|richtext` filter).

LinkHandlers must be registered within a wagtail_hooks.py file under an app directory and use an identifier matching `SHORTCODE_ANCHOR_TARGET_IDENTIFIER`, for example:

```python
# ./utils_app/wwgtail_hooks.py
from django.utils.html import escape
from wagtail import hooks
from wagtail.rich_text import LinkHandler
from wagtail_shortcode.handlers import SHORTCODE_ANCHOR_TARGET_IDENTIFIER


class CustomShortcodeLinkHandler(LinkHandler):
    identifier = SHORTCODE_ANCHOR_TARGET_IDENTIFIER

    @classmethod
    def expand_db_attributes(cls, attrs):
        href = attrs["shortcode"]
        # Do something clever
        return '<a href="%s">' % escape(href)


@hooks.register("register_rich_text_features")
def register_shortcode_link(features):
    features.register_link_type(CustomShortcodeLinkHandler)
```

Add `shortcode` to the `features` argument of any rich text field where you have overridden the default feature list:

```python
class Header(models.Model):
    content = RichTextField(
        features=["shortcode", "h2", "h3", "bold", "italic", "link"]
    )
```


## Configuration

### Updating the window prompt's help-text

When adding shortcode within the editor, a window prompt will appear, the text within this prompt can be customised by providing a value for `SHORTCODE_HELP_TEXT` within your project's settings file. This can be helpful as to inform editors of the expected behaviour of your custom LinkHandler.

`SHORTCODE_HELP_TEXT="Enter a shortcode value"`

The window.prompt function is a JavaScript method which supports basic text formatting using special characters, as such a newline character can be included using `\n` if needed.


## Contributing

[See docs](./CONTRIBUTING.md).
dg-probability 1.0
Gaussian and Binomial distributions

# **Gaussian and Binomial Distributions**
This package contains code to perform basic mathematical operations on Gaussian and Binomial distributions. Operations include finding the mean and standard deviation (of both sample and population), plotting histograms for Gaussian distribution and plotting frequncy bar charts for Binomial distributions.

## Dummy input data
For Gaussian distribution, you can test the package using the following dummy input data.

```text
1
3
99
100
120
32
330
23
76
44
31
```

Here's some dummy data for a Binomial distribution. It contains the outcomes of 13 trials. A '0' denotes failure and a '1' denotes success.

```text
0
1
1
1
1
1
0
1
0
1
0
1
0
```

## Test the code
Copy the following code snippet in a `.py` file and execute it.

```python
from dg_probability import Gaussian

gaussian = Gaussian(10,5)
print(f"Gaussian mean = {gaussian.mean}")
print(f"Gaussian standard deviation = {gaussian.stdev}")
```

This snippet is for the Binomial module.

```python
from dg_probability import Binomial

binomial = Binomial(0.25,60)
print(f"Binomian mean = {binomial.mean}")
print(f"Binomian standard deviation = {binomial.stdev}")
```

# Test the entire Binomial distribution module
Here's how you can test the entire Binomial distribution module using the dummy data shown in the 'Input data' section. Create a file called `data_binomial.txt` and add the dummy data for Binomial distribution to it. Save this file in the same directory where your code is.

```python
# ignore if module is already imported
from dg_probability import Binomial

binomial = Binomial()
binomial.read_data_file('data_binomial.txt')
binomial.calculate_mean()
binomial.calculate_stdev()
binomial.replace_stats_with_data()
binomial.plot_bar()
binomial.plot_bar_pdf()
```

The methods for Gaussian distribution are similar.

## Contributions
There is not `CONTRIBUTIONS.md` file yet but you are welcome to create PRs :)

### Source code
https://github.com/dg1223/object-oriented-programming/tree/main/upload_to_pypi