semvec/pypi-packages huggingface dataset:
hqueue 0.2.0
asyncio.Queue with history
License: BSD
Keywords: asyncio,deque,queue,history

========
Overview
========



``asyncio.Queue`` with history::

Objects put on a ``HistoryQueue`` are gathered in tuples,
with the first element being the next item on the queue,
followed by items add previously.

``HistoryQueue`` can also be thought of as as asynchronous ``collections.deque``,
with ``put`` analogous to ``deque.appendleft``
and ``get`` returning the entire deque (as a tuple).

    >>> from hqueue import HistoryQueue
    >>> hq = HistoryQueue(history_size=2)
    >>> hq.put_nowait(0)
    >>> hq.put_nowait(1)
    >>> hq.get_nowait()
    (0,)
    >>> hq.get_nowait()
    (1, 0)
    >>> hq.put_nowait(2)
    >>> hq.put_nowait(3)
    >>> hq.put_nowait(4)
    >>> hq.get_nowait()
    (2, 1, 0)
    >>> hq.get_nowait()
    (3, 2, 1)

For ease of illustration, in the above examples we use ``put_nowait`` and ``get_nowait``,
the synchronous counterparts of ``put`` and ``wait``, respectively.
In a coroutine, ``await put()`` could be used to block until the queue is not full,
and ``await get()`` to block until there is an item in the queue.

See Also
--------
``asyncio.Queue``
``collections.deque``



Changelog
=========

0.1.0 (2016-06-28)
------------------

* First prototype.

0.2.0 (2016-07-01)
------------------

* First release on PyPI.
contourviz 0.2.4
A package that charts musical contours into a web-based interactive using music21 and D3.js.
License: BSD
Keywords: music21 music analysis javascript data visualization

ContourViz
--------

This package uses music21 to process musical notation and creates a web-based visual
representation of the melodic contour within the browser. It creates a stand-alone
website within the current working directory called 'results'. It then serves this
folder locally within the web browser, offering contour maps of either a single melody
or all of the notation files within the passed folder path.

To install:

    >>> pip install contourviz

To use on the command line:

    >>> # Navigate to an empty directory (or at least one without a folder called 'results')
    >>> # Create a chart of multiple melodic contours
    >>> chart-contours '/path/to/directory/full/of/xml/or/mxl/files'
    >>>
    >>> # Create a chart of a single melodic contour
    >>> chart-single-contour '/path/to/file.xml'

For use within the Python interpreter:

    >>> # Navigate to an empty directory (or at least one without a folder called 'results')
    >>> testFile = '/path/to/file.xml'
    >>> testPath = '/path/to/directory/full/of/xml/or/mxl/files'
    >>>
    >>> # Create a single contour line from a given file
    >>> createDataFromFile(testFile)
    >>>
    >>> # Create a set of contour lines from all files in a given directory
    >>> createDataFromDirectory(testPath)

In progress updates and known issues include the following:

* It currently only works with single line (monophonic) melodies.
* The frequency labels draw from a logarithmic reading of each note's frequency, not note names.
* When using the interpreter: after serving the file, the Python script does not return to the correct working directory. This may require exiting and reentering the interpreter or navigating the command line to repeat the process.