semvec/pypi-packages huggingface dataset:
sparcli 0.1.3
Visualize metrics as text in real-time (sparklines)
License: MIT
Requires Python: >=3.6,<4.0
Keywords: console,sparkline,data,visualization

# Sparcli

Sparcli is a library for visualising metrics on the command line.

Use this library to see the shape of data during execution of data pipelines, simulators and other long-running programs. Each metric is displayed as a sparkline that updates as the data changes. Sparcli is thread-safe and non-blocking.

![Build](https://github.com/z0u/sparcli/workflows/Build/badge.svg)
![Publish](https://github.com/z0u/sparcli/workflows/Publish/badge.svg)
![Canary build](https://github.com/z0u/sparcli/workflows/Canary%20build/badge.svg)


## Usage

Sparcli is [available on pypi](https://pypi.org/project/sparcli/):

```sh
pip install sparcli
```

You can wrap an iterable that produces scalars:

```python
import sparcli, time

for y in sparcli.gen(ys, name="y"):
    do_something(y)
```

You can produce metrics using a context manager:

```python
with sparcli.ctx() as ctx:
    for a, b in do_something_else():
        ctx.record(a=a, b=b)
```

You can also manage the context manually. Just don't forget to close it:

```python
class MyMetricsPlugin:
    def start(self):
        self.ctx = sparcli.context()

    def callback(self, metrics: Dict[str, Real]):
        self.ctx.record(**metrics)

    def stop(self):
        self.ctx.close()

some_library.register_plugin(MyPlugin())
```


## Development

```sh
pip install --user py-make poetry
poetry install
pymake all
```

```sh
poetry run python demo.py
```
mkdocs-code-runner 0.0.1
Mkdocs plugin for converting JavaScript code into runnable scripts.
License: MIT
Requires Python: >=3.6,<4.0

<p align="center">
  <h1>mkdocs-code-runner</h1>
</p>
<p align="center">
  <img src="https://img.shields.io/pypi/v/mkdocs-code-runner" alt="PyPI Version">
  <img src="https://img.shields.io/github/license/wolfgangwazzlestrauss/mkdocs-code-runner" alt="License">
  <img src="https://github.com/wolfgangwazzlestrauss/mkdocs-code-runner/workflows/build/badge.svg" alt="Build Status">
  <img src="https://img.shields.io/github/repo-size/wolfgangwazzlestrauss/mkdocs-code-runner" alt="Repository Size">
</p>

mkdocs-code-runner is an [MkDocs](https://www.mkdocs.org/) plugin which converts Javascript code
blocks in Markdown files into runnable scripts for your browser.


## Getting Started

### Installation

mkdocs-code-runner can be installed for Python 3.6+ with

```bash
pip install --user mkdocs-code-runner
```


## Contributing

For guidance on setting up a development environment and making a contribution to mkdocs-code-runner,
see the [contributing guide](CONTRIBUTING.md).


## License

Distributed under the terms of the [MIT license](LICENSE.md), mkdocs-code-runner is
free and open source software.