semvec/pypi-packages huggingface dataset:
MoskaEngine 0.1.16
A card game engine for the card game Moska. Contains game engine, players, simulation tools, and human interface.
Requires Python: <=3.11.3,>=3.6

# MoskaEngine
A repository containing a card game and simulation engine for the card game "Moska". This repository was created as part of a BSc thesis at the University of LUT, Finland. The repository contains subpackages and modules to further study the card game of Moska and develop new AI agents. It allows efficient simulations, benchmarks, data gathering, and playing as a human.

The thesis can be read from: https://urn.fi/URN:NBN:fi-fe2023051644576

Development ideas and TODO: Ask me!

[This repository](https://github.com/LeeviKamarainen/Moska) by Leevi is under development, and will be a web application for playing Moska online! Currently, a web application is running at https://moska-online.com/, but it is a very crude version, which was only used to gather data from human players to the thesis.

Install by running:
`pip install MoskaEngine`

## Usage
To play a standard game (same as in https://moska-online.com/) in your terminal, you can create the following script:
```python
from MoskaEngine.Play.play_in_terminal import play_standard_game

# This doesn't take any arguments.
if __name__ == '__main__':
    play_game()
```

To use the game engine, for example, in a web application, you can use the following code:
```python
import sys
from MoskaEngine.Play.play_in_browser import run_as_command_line_program

# This command line program accepts the following arguments:
# --name <player_name> (default: "Human"), this is used to create a folder for the player.
# --gameid <game_id> (default: 0), this is used to determine the game id and to correctly store log files. The next game's id can be retrieved with MoskaEngine.Play.play_in_browser.get_next_game_id(<your-folder>)
# --test (default: False), if set to True, the game will be played with 4 AI agents, and no human.
if __name__ == '__main__':
    run_as_command_line_program(sys.argv)
```

Further customization is very much possible, but requires some knowledge of the MoskaEngine. Futher documentation might be added in the future.
bbp-pipeline-validator 0.3.2
A pipeline validator for Blue Brain Project

# Pipeline Validator


## Install

You can install the file by using `pip install "pipeline-validator"`


## Examples

You can use the validator in the following way:

```python
from pipeline_validator.pipeline_validator import pipeline_validator

path_to_file = "./my_config.json"
token = "THIS_IS_MY_NEXUS_TOKEN"
whitelisted_vars = ["var1", "var2"]

pipeline_validator(path_to_file, token, whitelisted_vars)
```

where:

- `path_to_file` is the relative path to the configuration
- `token` is a valid nexus token
- `whitelisted_vars` is an array of accepted variables


## Configuration Format

The JSON configuration file should be in the following format:

```json
{
  "rules":[
    {
      "rule": "<NAME_OF_RULE_1>",
      "execute":
        [
          {
            "brainRegion": "http://api.brain-map.org/api/v2/data/Structure/<BRAIN_REGION_ID_1>",
            "container": "docker://<PATH_TO_DOCKER_IMAGE>",
            "command": "<THE COMMAND TO BE EXECUTED>"
          },
          {
            "brainRegion": "http://api.brain-map.org/api/v2/data/Structure/<BRAIN_REGION_ID_2>",
            "container": "docker://<PATH_TO_DOCKER_IMAGE>",
            "command": "<THE COMMAND TO BE EXECUTED>"
          }
        ]
    },
    {
      "rule": "<NAME_OF_RULE_2>",
      "execute":
        [
          {
            "brainRegion": "http://api.brain-map.org/api/v2/data/Structure/<BRAIN_REGION_ID_1>",
            "container": "docker://<PATH_TO_DOCKER_IMAGE>",
            "command": "<THE COMMAND TO BE EXECUTED>"
          },
          {
            "brainRegion": "http://api.brain-map.org/api/v2/data/Structure/<BRAIN_REGION_ID_2>",
            "container": "docker://<PATH_TO_DOCKER_IMAGE>",
            "command": "<THE COMMAND TO BE EXECUTED>"
          }
        ]
    }
  ]
}
```


## Validation Criteria

The following criteria need to be met in order for the configuration to be validated:

- The configuration need to follow the above JSON schema
- Brain region ID should be valid (exist in brain region ontology)
- Within each rule, each brain region need to be followed by brain region that are not related or that they are descendants in the ontology
- For each command, the variables passed need to be part of the whitelisted variables


## Funding & Acknowledgment

The development of this software was supported by funding to the Blue Brain Project, a 
research center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss 
government’s ETH Board of the Swiss Federal Institutes of Technology.

Copyright © 2023-2024 Blue Brain Project/EPFL