semvec/pypi-packages huggingface dataset:
nekpy 0.0.4
Nek-related utilities in python
License: MIT
Keywords: nek5000

nekpy
======

|Build Status| |Version Status| |Downloads|

Nek-related utilities in Python.

Tools
-------
`nekpy.tools` supports common pre- and post-processing tasks, such as populating `SIZE`, `rea`, and `usr` files and calling `makenek`. 
For the special case of single boxes, `nekpy.tools` can also generate meshes and map file.

Configuration
-------------

`nekpy` reads the paths to simulation and tools installations from the `~/.nekpy.json` file, which is created with default values if not present.


LICENSE
-------

MIT. See `License File <https://github.com/maxhutch/nekpy/blob/master/LICENSE>`__.

.. _documentation: http://dask.pydata.org/en/latest/
.. |Build Status| image:: https://travis-ci.org/maxhutch/nekpy.svg
   :target: https://travis-ci.org/maxhutch/nekpy
.. |Version Status| image:: https://img.shields.io/pypi/v/nekpy.svg
   :target: https://pypi.python.org/pypi/nekpy/
.. |Downloads| image:: https://img.shields.io/pypi/dm/nekpy.svg
   :target: https://pypi.python.org/pypi/nekpy/
trackmaster 0.1.1
Interface for controlling Trackmaster treadmills
License: MIT
Keywords: treadmill trackmaster serial

Python interface to Trackmaster treadmill
=========================================

Control a Trackmaster treadmill from Python, over a serial interface.
Tested with Python 2.7 and 3.4.

To install::

    pip install trackmaster

Example::

    from time import sleep
    from trackmaster import Treadmill

    t = Treadmill('/dev/ttyUSB0')

    t.speed = 6
    sleep(60)
    t.incline = 5
    sleep(60)
    t.incline = 10
    sleep(60)
    t.incline = 15
    sleep(5 * 60)
    t.auto_stop()
deckor 0.0.1
A python module of useful decorators
License: MIT

=======
Deckor
=======

Decorate your functions and with 'deckor'ators. A module created while learning decorators.

Installation
=============

    pip install deckor


Decorators Supported:
======================

* timer : Measure execution time of functions

    @deckor.timer
    def fact(x):
        if x <= 0:
            return 1
        return x*fact(x-1)

* cacheit : Cache intermediate results

    @deckor.cacheit
    def fact(x):
        if x <= 0:
            return 1
        return x*fact(x-1)

* trace : Print the pretty recursion trace

    @deckor.trace
    def fib(x):
        if x < 2:
            return x
        return fib(x-1)+fib(x-2)

    fib(10)

    Now, try trace with cacheit

    @deckor.cacheit
    @deckor.trace
    def fib(x):
        if x < 2:
            return x
        return fib(x-1)+fib(x-2)

    fib(10)

* with_retries : function signature: with_retries(tries=5, delay=0, increment=0). Try execution of function with retries. Retry'tries' no of times. Delay of 'delay' seconds between retries. Increase the delay by 'increment' between retries

    @with_retries(5)
    def random_f():
        try: r = requests.get("random")
        except: return

* syncronize : Provides very basic syncronization. Note: Not free from race condition only for basic usage

    import threading
    
    lock = threading.Lock()
    sample_list = []

    @deckor.syncronize(lock)
    def sample(sample_list):
        sample_list.append(1)

    #sample list is modified only after lock is acquired
    #so, mdification is sample_list os thread safe
debug_context_manager 0.1
super simple context manager to print debug message
License: MIT
Keywords: debug

Debug Context Manager
=====================

Super simple context manager to wrap a block of code with a debug
message.

Usage
=====

.. code:: python

    from debug_context_manager import debug

    with debug("Doing this stuff"):
        # some code

    with debug("Doing other stuff", "and finished!"):
        # other code
natural 0.2.0
Convert data to their natural (human-readable) format
License: MIT
Keywords: natural data date file number size

Example Usage
=============

Basic usage::

    >>> from natural.file import accessed
    >>> print accessed(__file__)
    just now

We speak your language (with `your support`_)::

    >>> import locale
    >>> locale.setlocale(locale.LC_MESSAGES, 'nl_NL')
    >>> print accessed(__file__)
    zojuist

Bugs/Features
=============

You can issue a ticket in GitHub: https://github.com/tehmaze/natural/issues

Documentation
=============

The project documentation can be found at http://natural.rtfd.org/

.. _your support: http://natural.readthedocs.org/en/latest/locales.html