semvec/pypi-packages huggingface dataset:
rpn 1.0
Reverse Polish Notation calculator.
License: MIT
Keywords: math calculator rpn arithmetic

RPN
===

Reverse Polish Notation calculator for Python.

Binary Operators
----------------

* ``+``: addition
* ``-``: subtraction
* ``*``: multiplication
* ``/``: true division
* ``%``: modulo
* ``//``: floor division
* ``**``: exponentation

Unary Operators
---------------

* ``abs``: absolute value
* ``sqrt``: square root
* ``ceil``: rounding up
* ``floor``: rounding down

Examples
--------

::
    import decimal

    import rpn 
    result = rpn.solve_rpn('3.4 -3 abs + 100 sqrt -')
    print(result) # 3.6

    try:
        rpn.solve_rpn('3 3 3 +')
        rpn.solve_rpn('3 +')
        rpn.solve_rpn('abs')
        rpn.solve_rpn('3 a +')
    except RPNError:
        ...

    try:
        rpn.solve_rpn('0 5 /')
    except decimal.DivisionByZero:
        ...

    try:
        rpn.solve_rpn('-5 sqrt')
    except decimal.InvalidOperation:
        ...

    try:
        rpn.solve_rpn('9999999999999 9999999999999 **')
    except decimal.Overflow:
        ...

CLI Usage
---------

::
    $ rpn "1 2 + 8 -"
    $ 5
django-exception-blame 0.1.1
Show blame in a exception.
License: MIT

django-exception-blame
======================

A django middleware for exception blaming

## Overview

Basically it looks in the exception traceback and search for the line number of the first file of your reopsitory that raised the exception. It uses git to blame the author of that file and line number, then adds the info to the request metadata with key `BLAMED_DEVELOPER`.

Only for use with `DEBUG=True`

## Installation

Install using `pip`

    pip install django-exception-blame

## Configuration

Add the following to your `settings.py` module:

Add the middleware to your `MIDDLEWARE_CLASSES` setting

    MIDDLEWARE_CLASSES = [
        ...
        'exceptionblame.middleware.ExceptionBlameMiddleware',
    ]

Configure the repository root.

    EXCEPTION_BLAME = {
        'REPO_DIR': '/your/repository/dir'
    }

## License

This project is licensed under the MIT License - see the `LICENSE` file for details
SwampDragon-live 0.0.7a0
SwampDragon-live is an extension to Django and SwampDragon which adds support for live updating Django template snippets on model changes.
License: MIT

[SwampDragon-live](https://github.com/mback2k/swampdragon-live) is an
extension to [Django](https://www.djangoproject.com/) and
[SwampDragon](http://swampdragon.net/) with SwampDragon-auth and django-redis
which adds support for live updating Django template snippets on model changes.

Installation
------------
Install the latest version from pypi.python.org:

    pip install SwampDragon-live

Install the development version by cloning the source from github.com:

    pip install git+https://github.com/mback2k/swampdragon-live.git

Configuration
-------------
Add the package to your `INSTALLED_APPS`:

    INSTALLED_APPS += (
        'swampdragon',
        'swampdragon_live',
    )

Example
-------
Make sure to use django-redis as a Cache backend named 'swampdragon-live' or 'default':

    CACHES = {
        'swampdragon-live': {
            'BACKEND': 'django_redis.cache.RedisCache',
            'LOCATION': 'redis://localhost:6379/0',
            'OPTIONS': {
                'CLIENT_CLASS': 'django_redis.client.DefaultClient',
            }
        }
    }

Make sure to add the following line to your Django settings file:

    SWAMP_DRAGON_CONNECTION = ('swampdragon_auth.socketconnection.HttpDataConnection', '/data')

Load the required JavaScript template-tags within your Django template:

    {% load swampdragon_tags %}
    {% load swampdragon_live %}

Add the required JavaScript to your Django template:

    {% swampdragon_settings %}
    <script type="text/javascript" src="{{ STATIC_URL }}swampdragon/js/dist/swampdragon.min.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}swampdragon/js/live/swampdragon.live.js"></script>

Use the include_live template-tag instead of the default include template-tag,
with rows being a Django database QuerySet to listen for added, changed, deleted instances:

    {% include_live 'table' 'includes/table_body.html' rows=rows perms=perms %}

Use the include_live template-tag instead of the default include template-tag,
with row being a single Django database Model instance to listen for changes:

    {% include_live 'table-row' 'includes/row_cols.html' row=row perms=perms %}

Use the swampdragon_live variable within the included template to add the
required classes to the root-tag of this template, e.g. the first tag-node:

    <tr class="{{ swampdragon_live }}">...</tr>

You can check if your template is being live rendered by a content pusher by
using the context variable `is_swampdragon_live` like this:

    {% if is_swampdragon_live %}
    <style onload="alert('Hello World!');"></style>
    {% endif %}

A real-world example can be found in the Django project WebGCal:
* https://github.com/mback2k/django-webgcal/blob/master/webgcal/apps/webgcal/templates/show_dashboard.html
* https://github.com/mback2k/django-webgcal/tree/master/webgcal/apps/webgcal/templates/includes

License
-------
* Released under MIT License
* Copyright (c) 2015-2016 Marc Hoersken <info@marc-hoersken.de>