semvec/pypi-packages huggingface dataset:
pyclits 0.2
Python Climate Time Series package
License: MIT
Keywords: time series analysis climate data

pyCliTS
==========

What is pyCliTS?
--------------------
Python Climate Time Series package is open-source python package for easy manipulation with climatic geo-spatial time series such as the reanalysis or CMIP5 outputs, which are usually distributed as netCDF4 files. The package includes functions for:  

* manipulating the data [temporal and spatial slicing, interpolating, subtracting the climatological cycle = anomalising, normalising, filtering, subsampling, etc.] 
* computing continuous complex wavelet transform [CCWT]
* constructing spatio-temporal surrogate data using Monte-Carlo approach [Fourier transform surrogates, amplitude adjusted FT, iterative amplitude adjusted FT, autoregressive surrogates using the VAR(p) model, multifractal surrogates] 
* computing Singular Spectrum Analysis
* computing mutual information and conditional mutual information [using equidistant, equiquantal binning and k-nearest neighbour algorithms] 
* constructing an empirical model from spatio-temporal data based on idea of LIMs [linear inverse modelling].

Uses fast numpy, scipy and scikit-learn libraries and offers multi-thread computations when possible [e.g. computing wavelet transform per grid point].


Documentation
-------------
Instead of proper documentation [I plan to add it later though!], I created a few examples on how to work with basic class ``DataField``, ``SurrogateField``, ``SSA`` and other functions. These can be found in examples folder. The folder also contain climate data to work on, all of them are publicly available and inside example_data folder, you can find disclaimer with links to the datasets.


Dependencies
------------
``pyclits`` relies on the following open source packages

**Required**:

* `numpy <https://github.com/numpy/numpy>`_
* `scipy <https://github.com/scipy/scipy>`_

**Recommended**:

* `sklearn <https://github.com/scikit-learn/scikit-learn>`_  
* `cython <https://github.com/cython/cython>`_  
* `matplotlib <https://github.com/matplotlib/matplotlib>`_  
* `netCDF4 <https://github.com/Unidata/netcdf4-python>`_  
* `basemap toolkit <https://github.com/matplotlib/basemap>`_ 
* `pywavelets <https://github.com/PyWavelets/pywt>`_
* `pathos multiprocessing <https://github.com/uqfoundation/pathos>`_ (for improved multiprocessing capabilities) 

(All of them are installed via pip automatically when installing this package, except basemap, since it is not on PyPI. Basemap still can be installed via pip using ``pip install git+https://github.com/matplotlib/basemap.git``)


Contributing
------------
All contributions are welcome! Just drop me an email or pull request.


Versions
--------
* 0.1: initial version
* 0.2: various minor bug fixes, added VARIMAX rotation as optional parameter in pca_components() method of DataField


License information
-------------------
``pyclits`` is MIT-licensed, for more information see the file LICENSE.txt
Honeybadger-Extensions 0.1.2
Honeybadger extension that can log exceptions raised by Flask or Celery, adding more context than the original  honeybadger python library.
License: MIT


Honeybadger-Extensions
======================

|CircleCI|

**Honeybadger-Extensions** extend current `Honeybadger Python library`_ to better support `Celery`_ & `Flask`_.

It offers:

- Improved reporting, including details for component, action etc.
- Easier Honeybadger via Flask's or Celery's configuration object.
- (Optional) Automatic reporting of errors detected by Celery or Flask.


Features
--------

Honeybadger-Extensions provides the ``install_celery_handler()`` function which can be used
at any time which can be used to initialize both Honeybadger & allow improved Honeybadger reporting. It also offers the
``HoneybadgerFlask`` Flask extension that adds more information to Honeybadger logging, as well as automatic logging of
errors raised in the view functions.

Example 1: Initialize Celery
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In the following example, we will use the ``install_celery_handler`` to setup Honeybadger reporting.

.. code:: python

    from celery import Celery
    from honeybadger_extensions import install_celery_handler

    celery = Celery(__name__)
    celery.config_from_object({
        'HONEYBADGER_API_KEY': '<your key>',
        'HONEYBADGER_ENVIRONMENT': 'development'
    })

    install_celery_handler(config=celery.conf, report_exceptions=True)


Example 2: Initialize Flask
~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can use HoneybadgerFlask extension to load Honeybadger configuration from Flask configuration object.

.. code:: python

    from flask import Flask, jsonify
    from honeybadger_extensions import HoneybadgerFlask

    app = Flask(__name__)
    app.config['HONEYBADGER_ENVIRONMENT'] = 'development'
    app.config['HONEYBADGER_API_KEY'] = '<your key>'
    app.config['HONEYBADGER_EXCLUDE_HEADERS'] = 'Authorization, Proxy-Authorization, X-Custom-Key'
    app.config['HONEYBADGER_PARAMS_FILTERS'] = 'password, secret, credit-card'

    # Setup Honeybadger and listen for exceptions
    HoneybadgerFlask(app, report_exceptions=True)

    @app.route('/')
    def index():
        a = int(request.args.get('a'))
        b = int(request.args.get('b'))

        logger.info('Dividing two numbers {} {}'.format(a, b))
        return jsonify({'result': a / b})

Installation
------------
The easiest way to install it is using ``pip`` from PyPI

.. code:: bash

    pip install Honeybadger-Extensions


License
-------

See the `LICENSE`_ file for license rights and limitations (MIT).

.. _Honeybadger Python Library: https://github.com/honeybadger-io/honeybadger-python
.. _Flask: http://flask.pocoo.org/
.. _Celery: http://www.celeryproject.org/
.. _LICENSE: https://github.com/Workable/honeybadger-extensions/blob/master/LICENSE.md
.. |CircleCI| image:: https://img.shields.io/circleci/project/github/Workable/honeybadger-extensions.svg
   :target: https://circleci.com/gh/Workable/honeybadger-extensions