semvec/pypi-packages huggingface dataset:
DockerGames 1.0.0a1
Easily create game servers using Docker and Python.
Requires Python: >=3.6
Keywords: automation,game,multiplayer,server,cloud

# Docker Game Servers

## Configuration

- Install Docker: you can find the instructions for 
   installing Docker on the [official website](https://docs.docker.com/get-docker/).
- Ensure you have [Python](https://www.python.org/downloads/) 3.x on your system by running `python --version`.

## Running a Game Server

1. Install this package
```shell
$ pip install docker-games
```
2. Create your server's configuration in a new Python file
3. Enjoy!

### Minecraft

```python
from docker_games import Minecraft

minecraft = Minecraft('creepers_go_boom', '2GB', '/home/stefano/mc_data')
minecraft.add_ports(25565, 25565)
minecraft.accept_license()  # <-- accept Minecraft's EULA
minecraft.online_mode()     # <-- server checks connecting players against Minecraft account database

minecraft.start()
```

Docker image: https://hub.docker.com/r/itzg/minecraft-server

### Factorio

```python
from docker_games import Factorio

factorio = Factorio('flying_robots', '/home/stefano/factorio_data')
factorio.add_ports(34197, '34197/udp')
factorio.add_ports(27015, '27015/tcp')

factorio.start()
```

Docker image: https://hub.docker.com/r/factoriotools/factorio

### TeamSpeak

```python
from docker_games import TeamSpeak

teamspeak = TeamSpeak('tsserver', '/tmp/ts_data')
teamspeak.add_ports(9987, '9987/udp')
teamspeak.add_ports(10011, 10011)
teamspeak.add_ports(30033, 30033)
teamspeak.accept_license()  # <-- accept TeamSpeak's license

teamspeak.start()
```

Docker image: https://hub.docker.com/_/teamspeak 

## Contributing

Contributions are very welcome!

If you want to improve this project, or add more server, fork the repo and submit a pull request.
easy-tf-log 1.12
TensorFlow logging made easy
Keywords: tensorflow graph graphs graphing

# Easy TensorFlow Logging

**Note: NOT compatible with TensorFlow 2!** A pull request fixing this would be very gratefully accepted :)

Are you prototyping something and want to be able to _magically_ graph some value
without going through all the usual steps to set up TensorFlow logging properly?

`easy_tf_log` is a simple module to do just that.

```
from easy_tf_log import tflog
```

then you can do

```
for i in range(10):
    tflog('really_interesting_variable_name', i)
```

and you'll find a directory `logs` that you can point TensorBoard to

`$ tensorboard --logdir logs`

to get

![](https://github.com/mrahtz/easy-tf-log/blob/master/tensorboard_screenshot.png)

See [`demo.py`](demo.py) for a full demo.

Based on logging code from OpenAI's [baselines](https://github.com/openai/baselines).

## Installation

`pip install easy-tf-log`

Note that TensorFlow must be installed separately.

## Documentation

`easy-tf-log` supports logging using either a global logger or an instantiated logger object.

The global logger is good for very quick prototypes, but for anything more complicated,
you'll probably want to instantiate your own `Logger` object.

### Global logger

* `easy_tf_log.tflog(key, value, step=None)`
  * Logs `value` (int or float) under the name `key` (string).
  * `step` (int) sets the step associated with `value` explicitly.
    If not specified, the step will increment on each call.
* `easy_tf_log.set_dir(log_dir)`
  * Sets the global logger to log to the specified directory.
  * `log_dir` can be an absolute or a relative path.
* `easy_tf_log.set_writer(writer)`
  * Sets the global logger to log using the specified `tf.summary.FileWriter` instance.
  
By default (i.e. if `set_dir` is not called), the global logger logs to a `logs` directory
automatically created in the working directory.

### Logger object

* `logger = easy_tf_log.Logger(log_dir=None, writer=None)`
  * Create a `Logger`.
  * `log_dir`: an absolute of relative path specifying the directory to log to.
  * `writer`: an existing `tf.summary.FileWriter` instance to use for logging.
  * If neither `log_dir` nor `writer` are specified, the logger will log to a `logs` directory in the
    working directory. If both are specified, the constructor will raise a `ValueError`.
* `logger.log_key_value(key, value, step=None)`
  * See `tflog`.
* `logger.log_list_stats(key, values_list)`
  * Log the minimum, maximum, mean, and standard deviation of `values_list` (a list of ints or floats).
* `logger.measure_rate(key, value)`
  * Log the rate at which `value` (int or float) changes per second.
  * The first call internally stores the time of the first value;
    the second call logs the change between the second value and the first value divided by the
    time between the calls; etc.
* `logger.set_dir(log_dir)`
  * See `easy_tf_log.set_dir(log_dir)`.
* `logger.set_writer(writer)`
  * See `easy_tf_log.set_writer(writer)`.
* `logger.close()`
  * Flush logs and close the log file handle.