semvec/pypi-packages huggingface dataset:
measurement-stats 0.3.0
Measurement statistics with uncertainties and error propagation
License: MIT
Keywords: measurements statistics uncertainty error propagation

Measurement Statistics
======================

A statistical package for measurement and population statistics that
incorporate measurement uncertainties and error propagation.

Installation::

    pip install measurement_stats


Error Propagation
-----------------

Say, for example, that we have measured a rectangle to be 11 +/- 0.4 centimeters
wide and 8 +/- 0.3 centimeters long. We can then calculate the area with
uncertainty as follows::

    from measurement_stats import ValueUncertainty

    width = ValueUncertainty(11, 0.4)
    length = ValueUncertainty(8, 0.3)

    area = length * width

    print('AREA:', area.label)
    # $ AREA: 88 +/- 5


For a more complicated example, consider the canonical physics 101 experiment
of trying to calculate the acceleration due to gravity using a pendulum. If a
student has setup a pendulum with a measured length of 92.95 centimeters and an
uncertainty of 0.1 centimeters and measured a period of that pendulum to be
1.936 seconds with an uncertainty of 0.004 seconds, the acceleration due to
gravity, with propagated uncertainty, can be determined as follows::

    from measurement_stats import ValueUncertainty

    l = ValueUncertainty(92.95, 0.1)
    T = ValueUncertainty(1.936, 0.004)

    g = 4.0 * (math.pi ** 2) * l / (T ** 2)

    print('Acceleration Due To Gravity:', g.label)
    # $ Acceleration Due To Gravity: 979 +/- 4
astarlib 1.0.5
A* search algorithm implemented in Cython
License: MIT
Requires Python: >=2.7

[![Build Status](https://travis-ci.org/initbar/astarlib.svg?branch=master)](https://travis-ci.org/initbar/astarlib)

# astarlib

**astarlib** is a [Cython ("C-Extensions for Python")](https://cython.org) implementation of the [A\* search algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm) on a [graph](https://en.wikipedia.org/wiki/Graph_(discrete_mathematics)) or a [2-dimensional polygon space](https://en.wikipedia.org/wiki/Polygon) packaged into a reusable library. It was originally implemented as my [battlesnake.io](https://play.battlesnake.io) bot's navigation system (e.g. finding minimum path around enemy bots).

## Example

To find A\* paths in a 2D polygon, you need to initialize an `aStar()` object with a "map" of the traversing space.

**Note**: all elements of a given `array` will be automatically normalized to boolean states. After normalization, elements that are `True` are considered traversable and `False` are treated as untraversable (e.g. obstacle).

```python
>> from astarlib import aStar
>> area = aStar(array=[
  [1, 1, 1, 1, 1, 1],  # see `normalization`
  [0, 1, 0, 1, 1, 1],
  [0, 0, 0, 0, 0, 1],
  [1, 1, 1, 1, 1, 1],
  [0, 1, 0, 1, 0, 1],
  [0, 0, 1, 1, 1, 1],
])
```

And then simply set the start/destination information to find a valid path and cost of the path. In a [snake game](https://en.wikipedia.org/wiki/Snake_(video_game_genre)), "start" is the head of a snake and "end" is an apple.

```python
>> area.find_path(start=(0, 0), end=(area.height-1, area.width-1))
(
  ((0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (1, 5), (2, 5), (3, 5), (4, 5), (5, 5)),
  11
)
```

Since the initial "map" is preserved, you can also invoke `.find_path()` multiple times for different traversal paths.

```python
>> area.find_path(start=(0, 0), end=(0, 1))
(
  ((0, 0), (0, 1)),
  2
)
```

If there is no path, `PathNotFoundException` will be raised.

```python
>> area.find_path(start=(0, 0), end=(1, 0))  # `PathNotFoundException`
```

## Build

Local build for development requires [some dependencies](./setup.py) to compile C extensions.

```bash
~$ make
```

## Installation

For `stable` channel:

```bash
~$ pip install astarlib==1.0.0
```

For `edge` channel:

```bash
~$ # sudo apt install gcc python-dev
~$ pip install git+https://github.com/initbar/astarlib.git
```

## Tests

```bash
~$ # pip install pytest
~$ make test
```

## Documentations

See [documentations](./docs).

## License

**astarlib** is licensed under [MIT License](./LICENSE).
prettierfier 1.0.3
Intelligently pretty-print HTML/XML with inline tags.
License: MIT
Keywords: html xml formatting prettify

# prettierfier
While I love [Beautiful Soup](https://www.crummy.com/software/BeautifulSoup/bs4/doc/) as a parser, `BeautifulSoup.prettify()` adds a linebreak between *every* tag. 
This results in unwanted white space between tags that should be inline, like `<sup>`, `<a>`, `<span>`, etc:

```
<p>Introducing GitHub<sup>&reg;</sup></p>
```
<p>Introducing GitHub<sup>&reg;</sup></p>

vs.

```
<p>
    Introducing GitHub
    <sup>
        &reg;
    </sup>
</p>
```
<p>
    Introducing GitHub
    <sup>
        &reg;
    </sup>
</p>

This module parses HTML/XML as a raw string to more intelligently format tags.

## Installation

You have two options:
1. `pip install prettierfier` in your command line
2. Copy the contents of [prettierfier.py](prettierfier.py) to your own module.

This module is built with just the Python Standard Library and contains no external third-party dependencies.

## Functions

**prettify_xml**(*xml_string, indent=2, debug=False*)

* Can be used with no prior formatting.

```
    Args:
        xml_string (str): XML text to prettify.
        indent (int, optional): Set size of XML tag indents.

    Test-only args:
        debug (bool, optional): Show results of each regexp application.

    Returns:
        str: Prettified XML.
```

**prettify_html**(*html_string, debug=False*)

* Originally created to process `BeautifulSoup.prettify()` output.
* Does not add or remove regular line breaks. Can be used with regular HTML if it already has the newlines you want to keep.

```
    Args:
        html_string (str): HTML string to parse.

    Test-only args:
        debug (bool, optional): Show results of each regexp application.

    Returns:
        str: Prettified HTML.
```

## Example

```
import prettierfier

ugly_html = """<p>
    Introducing GitHub
    <sup>
        &reg;
    </sup>
</p>"""

pretty_html = prettierfier.prettify_html(ugly_html)
print(pretty_html) 

# Output
>>> <p>Introducing GitHub<sup>&reg;</sup></p>
```

### Links

* [GitHub](https://github.com/annedo/prettierfier)
* [PyPi](https://pypi.org/project/prettierfier/)
flask-test-requests-client 0.2.1
A Flask test client which replicates the requests interface.
License: MIT

Instead of using the flask test client, you can use this package
which does a similar job. This wrapper to the flask test client has an API based on the
'requests' HTTP client library. This means that you can write tests or monitoring which
works with either requests (for when you want to test against a real web server) and this
package, for when you want to run your tests using the built-in capabilities of flask.
sv-geometry 0.1.3
A collection of functions for bidimensional and tridimensional arithmetic geometry.
License: MIT

# SV Geometry

[![CircleCI](https://circleci.com/gh/ihavenonickname/sv-geometry.svg?style=svg)](https://circleci.com/gh/ihavenonickname/sv-geometry)

A collection of functions for bidimensional and tridimensional arithmetic geometry.

## Installing

    pip install sv-geometry

## Relevant links:

* Official page on PyPI: https://pypi.org/project/sv-geometry/
* Issue tracker: https://github.com/ihavenonickname/sv-geometry/issues
evo-pyzipper 0.3.2
AES encryption for zipfile. Including Callback.
License: MIT
Requires Python: >=3.4
Keywords: zip aes encrypt decrypt

.. image:: https://img.shields.io/pypi/v/pyzipper.svg
        :target: https://pypi.org/project/pyzipper/
        :alt: Current Version on PyPi

.. image:: https://img.shields.io/pypi/pyversions/pyzipper.svg
        :target: https://pypi.org/project/pyzipper/
        :alt: Supported Python Versions

.. image:: https://img.shields.io/travis/danifus/pyzipper.svg
        :target: https://travis-ci.org/danifus/pyzipper
        :alt: Travis build (Linux/OsX)


pyzipper
========

A 100% API compatible replacement for Python's ``zipfile`` that can read and write AES encrypted zip files.
Callback function added to extracting zipfiles

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

.. code-block:: bash

   pip install pyzipper


Usage
-----

.. code-block:: python

   import pyzipper

   secret_password = b'lost art of keeping a secret'

   with pyzipper.AESZipFile('new_test.zip',
                            'w',
                            compression=pyzipper.ZIP_LZMA,
                            encryption=pyzipper.WZ_AES) as zf:
       zf.setpassword(secret_password)
       zf.writestr('test.txt', "What ever you do, don't tell anyone!")

   with pyzipper.AESZipFile('new_test.zip') as zf:
       zf.setpassword(secret_password)
       my_secrets = zf.read('test.txt')


AES Strength
------------

The strength of the AES encryption can be configure to be 128, 192 or 256 bits.
By default it is 256 bits. Use the ``setencryption()`` method to specify the
encryption kwargs:

.. code-block:: python

   import pyzipper

   secret_password = b'lost art of keeping a secret'

   with pyzipper.AESZipFile('new_test.zip',
                            'w',
                            compression=pyzipper.ZIP_LZMA) as zf:
       zf.setpassword(secret_password)
       zf.setencryption(pyzipper.WZ_AES, nbits=128)
       zf.writestr('test.txt', "What ever you do, don't tell anyone!")

   with pyzipper.AESZipFile('new_test.zip') as zf:
       zf.setpassword(secret_password)
       my_secrets = zf.read('test.txt')

Documentation
-------------

Official Python ZipFile documentation is available here: https://docs.python.org/3/library/zipfile.html

Credits
-------

The docs skeleton was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage