semvec/pypi-packages huggingface dataset:
torch-edit-distance 0.4.0
PyTorch edit-distance functions
License: MIT

# PyTorch edit-distance functions

Useful functions for E2E Speech Recognition training with PyTorch and CUDA.

Here is a simple use case with Reinforcement Learning and RNN-T loss:

```python
blank = torch.tensor([0], dtype=torch.int).cuda()
space = torch.tensor([1], dtype=torch.int).cuda()

xs = model.greedy_decode(xs, sampled=True)

torch_edit_distance.remove_blank(xs, xn, blank)

rewards = 1 - torch_edit_distance.compute_wer(xs, ys, xn, yn, blank, space)

nll = rnnt_loss(zs, ys, xn, yn)

loss = nll * rewards
```

### levenshtein_distance

Levenshtein edit-distance with detailed statistics for ins/del/sub operations.

### collapse_repeated

Merge repeated tokens, useful for CTC-based model.

### remove_blank

Remove unnecessary blank tokens, useful for CTC, RNN-T, RNA models.

### strip_separator

Remove leading, trailing and repeated middle separators.

## Requirements

- C++11 compiler (tested with GCC 9.4.0).
- Python: 3.5, 3.6, 3.7, 3.8, 3.9 (tested with version 3.8).
- [PyTorch](http://pytorch.org/) >= 1.5.0 (tested with version 1.13.1+cu116).
- [CUDA Toolkit](https://developer.nvidia.com/cuda-zone) (tested with version 11.2).

## Install

There is no compiled version of the package. The following setup instructions compile the package from the source code locally.

### From Pypi

```bash
pip install torch_edit_distance
```

### From GitHub

```bash
git clone https://github.com/1ytic/pytorch-edit-distance
cd pytorch-edit-distance
python setup.py install
```

## Test

```bash
python -m torch_edit_distance.test
```
setupr 0.5.2
Setupr ships the Worldr infrastructure.
License: MIT
Requires Python: >=3.8,<3.12
Keywords: worldr

# Setupr, ships the Worldr infrastructure…

<img src="https://github.com/worldr/setupr/blob/main/docs/assets/logo.png" width=25% height=25% >

[![PyPi status](https://img.shields.io/pypi/status/Setupr)](https://img.shields.io/pypi/status/Setupr)
[![PyPi version](https://img.shields.io/pypi/v/setupr)](https://img.shields.io/pypi/v/setupr)
[![PyPi python versions](https://img.shields.io/pypi/pyversions/Setupr)](https://img.shields.io/pypi/pyversions/Setupr)
[![PyPi downloads](https://img.shields.io/pypi/dm/setupr)](https://img.shields.io/pypi/dm/Setupr)

[![Release](https://img.shields.io/github/v/release/worldr/setupr)](https://img.shields.io/github/v/release/worldr/setupr)
[![Build status](https://img.shields.io/github/actions/workflow/status/worldr/setupr/codeql.yml?branch=main)](https://img.shields.io/github/actions/workflow/status/worldr/setupr/codeql.yml?branch=main)
[![Commit activity](https://img.shields.io/github/commit-activity/m/worldr/setupr)](https://img.shields.io/github/commit-activity/m/worldr/setupr)
[![Code style with black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports with isort](https://img.shields.io/badge/%20imports-isort-%231674b1)](https://pycqa.github.io/isort/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com)

---

## Documentation

- [Installation](docs/installation.md)
- [Usage](docs/usage.md)
- [Development](docs/development.md)

---

## Quick install

```bash
python -m venv worldr
source ./worldr/bin/activate
pip install -U setupr
setupr --help
```

---

Repository initiated with [fpgmaas/cookiecutter-poetry](https://github.com/fpgmaas/cookiecutter-poetry).
slack-bolt-router 0.1.1
Slack Bolt Router
License: MIT
Requires Python: >=3.6,<4.0
Keywords: slack,slack-bolt,slack-bolt plugin,slack-bolt router

## slack-bolt-router

[![Python Versions](https://badgen.net/pypi/python/slack-bolt-router)](https://pypi.org/project/slack-bolt-router/)
[![Slack-Bolt Version](https://badgen.net/badge/icon/%5E1.10.0?icon=slack&label=slack-bolt)]()
[![Release](https://badgen.net/github/release/dmytrohoi/slack-bolt-router)](https://github.com/dmytrohoi/slack-bolt-router/releases)
[![License](https://badgen.net/github/license/dmytrohoi/slack-bolt-router)](https://github.com/dmytrohoi/slack-bolt-router/blob/master/LICENSE)

### Description

The slack-bolt-router package it is a helper utility that can collect and add
routes for the Slack Application.

Current compatible slack-bolt version is __1.10.0__.

_NOTE: This package may be affected by major updates to the Slack-bolt library,
and may not contain additional routes from a future release._

### Usage

Install from pip:

``` sh
python3 -m pip install slack-bolt-router
```

Import router to file with your handler functions:

```python
from slack_bolt_router import Router
```

Start to use routers in your bot application:
```python
router = Router()

@router.register(type="view")
def example_submit(ack):
    ack()

router.apply_to(app)
```

__[Examples of usage](https://github.com/dmytrohoi/slack-bolt-router/blob/master/examples)__

### Contribution

1. Clone repo
2. Run `poetry install`
3. Make some changes and commit to new branch
4. Create pull request and add some information about changes in PR
5. Add project author to PR Reviewers

### Author

_You can sponsorship this project by links in github repo._

Author personal website: https://hoid.dev

(c) Dmytro Hoi <code@dmytrohoi.com>, 2021 | MIT License
junit-xml 1.9
Creates JUnit XML test result documents that can be read by tools such as Jenkins
License: MIT

python-junit-xml
================
.. image:: https://travis-ci.org/kyrus/python-junit-xml.png?branch=master

About
-----

A Python module for creating JUnit XML test result documents that can be
read by tools such as Jenkins or Bamboo. If you are ever working with test tool or
test suite written in Python and want to take advantage of Jenkins' or Bamboo's
pretty graphs and test reporting capabilities, this module will let you
generate the XML test reports.

*As there is no definitive Jenkins JUnit XSD that I could find, the XML
documents created by this module support a schema based on Google
searches and the Jenkins JUnit XML reader source code. File a bug if
something doesn't work like you expect it to.
For Bamboo situation is the same.*

Installation
------------

Install using pip or easy_install:

::

	pip install junit-xml
	or
	easy_install junit-xml

You can also clone the Git repository from Github and install it manually:

::

    git clone https://github.com/kyrus/python-junit-xml.git
    python setup.py install

Using
-----

Create a test suite, add a test case, and print it to the screen:

.. code-block:: python

    from junit_xml import TestSuite, TestCase

    test_cases = [TestCase('Test1', 'some.class.name', 123.345, 'I am stdout!', 'I am stderr!')]
    ts = TestSuite("my test suite", test_cases)
    # pretty printing is on by default but can be disabled using prettyprint=False
    print(TestSuite.to_xml_string([ts]))

Produces the following output

.. code-block:: xml

    <?xml version="1.0" ?>
    <testsuites>
        <testsuite errors="0" failures="0" name="my test suite" tests="1">
            <testcase classname="some.class.name" name="Test1" time="123.345000">
                <system-out>
                    I am stdout!
                </system-out>
                <system-err>
                    I am stderr!
                </system-err>
            </testcase>
        </testsuite>
    </testsuites>

Writing XML to a file:

.. code-block:: python

    # you can also write the XML to a file and not pretty print it
    with open('output.xml', 'w') as f:
        TestSuite.to_file(f, [ts], prettyprint=False)

See the docs and unit tests for more examples.

NOTE: Unicode characters identified as "illegal or discouraged" are automatically
stripped from the XML string or file.

Running the tests
-----------------

::

    # activate your virtualenv
    pip install tox
    tox