semvec/pypi-packages huggingface dataset:
tgext.matplotrender 0.0.1
Renderer to expose matplotlib figures
License: MIT
Keywords: turbogears2.extension

About tgext.matplotrender
-------------------------

.. image:: https://travis-ci.org/amol-/tgext.matplotrender.png
    :target: https://travis-ci.org/amol-/tgext.matplotrender

.. image:: https://coveralls.io/repos/amol-/tgext.matplotrender/badge.png
    :target: https://coveralls.io/r/amol-/tgext.matplotrender

.. image:: https://img.shields.io/:license-mit-blue.svg?style=flat-square
    :target: https://pypi.python.org/pypi/tgext.matplotrender

tgext.matplotrender is a TurboGears2 extension that provides a Rendering Engine
for MatplotLib Figures.

Installing
----------

tgext.matplotrender can be installed from pypi::

    pip install tgext.matplotrender

should just work for most of the users.

Enabling
--------

To enable tgext.matplotrender add the ``matplotfig`` renderer to your
configuration:

.. code-block:: python

    base_config.renderers.append('matplotfig')

and plug the rendering engine inside your ``config/app_cfg.py``:

.. code-block:: python

    import tgext.matplotrender
    tgext.matplotrender.plugme(base_config)

Usage
-----

Using tgext.matplotrender is as simple as exposing an action with
the ``matplotfig`` template and returning the figure itself inside
the ``fig`` key of action returned dictionary.

Given the following figure:

.. code-block:: python

    def _make_fig():
        fig = matplotlib.figure.Figure(figsize=(9, 6))
        fig.Name = "Sinewave"
        ax = fig.add_subplot(111)
        ax.set_xlabel("angle")
        ax.set_ylabel("amplitude")
        t = numpy.arange(0.0, 2.0, 0.01)
        s1 = numpy.sin(2 * numpy.pi * t)
        ax.plot(t, s1, color="k")
        return fig

It can be exposed through TurboGears actions as:

.. code-block:: python

    class RootController(TGController):
        @expose('matplotfig')
        def figure(self, *args, **kwargs):
            return dict(fig=_make_fig())

        @expose('matplotfig', render_params=dict(dpi=36))
        def lowres(self, *args, **kwargs):
            return dict(fig=_make_fig())

        @expose('matplotfig')
        def customres(self, *args, **kwargs):
            options = {}
            try:
                options['dpi'] = int(kwargs['dpi'])
            except:
                pass
            return dict(fig=_make_fig(), **options)

Any other value provided in the dictionary will be used as
a ``print_figure`` argument in ``matplotlib``
accumulator 0.3
A framework for the accumulation of occurrences with subjects.
License: MIT
Keywords: accumulator state event occurrence subject log financial cost stock asset

Accumulator
===========

| Copyright (c) 2015 Rafael da Silva Rocha
| https://github.com/rochars/accumulator

--------------

|Build| |Coverage Status| |Code Climate| |License| |Python Versions|


Installation
------------

$ pip install accumulator


Compatibility
-------------

Accumulator is compatible with Python 2.7, 3.3, 3.4 and 3.5.


Version
-------

The current version is 0.3 alpha.


License
-------

Copyright (c) 2015 Rafael da Silva Rocha

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
“Software”), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.



.. |Build| image:: https://api.travis-ci.org/rochars/accumulator.png
   :target: https://travis-ci.org/rochars/accumulator
.. |Coverage Status| image:: https://coveralls.io/repos/rochars/accumulator/badge.svg?branch=master&service=github
   :target: https://coveralls.io/github/rochars/accumulator?branch=master
.. |License| image:: https://img.shields.io/pypi/l/accumulator.png
   :target: https://opensource.org/licenses/MIT
.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/accumulator.png
   :target: https://pypi.python.org/pypi/accumulator/
.. |Code Climate| image:: https://codeclimate.com/github/rochars/accumulator/badges/gpa.png
   :target: https://codeclimate.com/github/rochars/accumulator