semvec/pypi-packages huggingface dataset:
mediamosa 0.0.5
A high-level API interface for MediaMosa.
License: BSD

================
python-mediamosa
================

mediamosa is a python wrapper for accessing a mediamosa
(http://www.mediamosa.org) api.

------------
Installation
------------

Install mediamosa as follows:

::

   pip install mediamosa

---------------
Getting Started
---------------

Start by creating a connection to a mediamosa api.

.. code:: python

    >>> from mediamosa.api import MediaMosaAPI
    >>> api = MediaMosaAPI('http://apivideo.ugent.be')
    >>> api.authenticate('USERNAME', 'PASSWORD')
    True

the .authentication() method returns a boolean indicating if the
username and password were accepted by the server.

You can now query your assets

.. code:: python

    >>> api.asset_list()
    [<mediamosa.resources.Asset GAKkgcmMPaIZdMl3dczqUESA>,
    <mediamosa.resources.Asset KWdqPljZge6ESLWbPdEEcG0j>,
    <mediamosa.resources.Asset d1bbGsmEjXmeSfM8PGT5uRjB>,
    <mediamosa.resources.Asset uKgRwHGTidLLiTiSUQu26buN>,
    <mediamosa.resources.Asset x2XRGwefXfNvoRNYLJjfWS5O>,
    <mediamosa.resources.Asset ONZDQiGfhTf8OcsKumKISpOy>,
    <mediamosa.resources.Asset A1lkCZclpXaWSLE9RPK4Pthk>,
    <mediamosa.resources.Asset A2TmfbWMcMU6r8jWHOS2JEsf>,
    <mediamosa.resources.Asset B7zsZXLvnnLCCIyJOrCQxxRl>,
    <mediamosa.resources.Asset C2VNSEfaeMc7ToOeirEqiztz>, ...]

Each direct child of an <item> can be accessed as an attribute:

.. code:: python

    >>> asset = api.asset_list()[0]
    >>> asset.dublin_core.get('title')
    u'big buck bunny '

You can also indiviually request specific assets by querying the api
object:

.. code:: python

    >>> api.asset('ONZDQiGfhTf8OcsKumKISpOy')
    <mediamosa.resources.Asset ONZDQiGfhTf8OcsKumKISpOy>


Mediafiles connected to the asset can also be queried:

.. code:: python

    >>> asset.list_mediafiles()
    [<mediamosa.resources.Mediafile (mp4) Yb8peCXknRXIhimONUUzkuBT>]
    >>> mediafile = asset.list_mediafiles()[0]
    >>> mediafile.filename
    u'bigbuckbunny30sec.mp4'
    >>> mediafile.is_downloadable
    True

You can also individually request mediafiles by querying the api
object:

.. code:: python

    >>> api.mediafile('Yb8peCXknRXIhimONUUzkuBT')
    <mediamosa.resources.Mediafile (mp4) Yb8peCXknRXIhimONUUzkuBT>


Playing a mediafile is done as follows:

.. code:: python

    >>> mediafile.play()
    u'<script type="text/javascript">...'

This will by default return javascript code necessary to play the
mediafile.

------
Errors
------

If anything goes wrong with executing the queries, the API will throw
a mediamosa.api.ApiException.

-------------------------
Bugs and Feature requests
-------------------------

.. warning::
   The API wrapper is in early stages of development and will require a few
   more iterations to be considered stable

For help, issues and feature requests, please go to http://www.github.com/UGentPortaal/python-mediamosa.

------------
Contributing
------------

Pull requests may be submitted to the develop branch at our github
project. Make sure the code and functionality are sufficiently
documented.
alpaca 1.0.0
UNKNOWN
License: BSD

alpaca-llama
============
# alpaca
将一个描述词法的正则表达式转换成最小化的DFA，以dot语言形式输出。

# llama
将描述语法的范式转换成分析转换表，以图形的方式输出，同时能够根据不同的语法分析算法检查范式的定义错误，并且能够修正错误。

详情请参考[alpace-llama wiki](https://github.com/activesys/alpaca-llama/wiki)。
django-lineage 0.2.0
Lightweight template tags for neater hierarchical navigation
License: BSD

Django Lineage
==============

Handling which navigation element is active in a particular template can become
annoying. Template blocks can be defined and later overriden to "activate" a
class on a particular navigational element, **but thats gets ugly!**

**Lineage makes things neater** by defining your conditions centrally, and it
looks like this::

  {% load lineage %}
  
  <ul>
      <li class="{% ancestor '/home/' %}"><a href="/home/">Home</a></li>
      <li class="{% ancestor '/blog/' %}"><a href="/blog/">Blog</a></li>
      <li class="{% ancestor '/about/' %}"><a href="/about/">About</a></li>
  </ul>

When an ``ancestor`` tag is evaludated, it compares it's argument to the page URL.
If the argument string matches the start of the current pages URL, it outputs
"active". **It's that simple!**

Read on for accepted arguments:

Installation
------------

Install using pip:

    pip install django-lineage

Add ``'lineage'`` to ``INSTALLED_APPS`` in ``settings.py``::

  INSTALLED_APPS = (
      'lineage',
  )

Usage
-----

The ``ancestor`` tag needs to, of course, be loaded into your template:

    {% load lineage %}

The simplest way to use Lineage is the aformentioned ``ancestor`` tag. Again if
the argument matches the start of the page URL it outputs "active", this should
handle most use cases::

  {% ancestor '/arbitrary/path/' %}

But wait... ``ancestor`` can also handle variables, filters and all that stuff::

  {% ancestor some_variable|somefilter %}

Or even full blown ``url`` tag type reverse resolution (Behind the scenes the
``url`` tag derives our expected argument - a URL path string.)

  {% ancestor 'core:model_detail' model.pk %}

Active?
~~~~~~~

By default ``ancestor`` outputs "active" if it's argument matches the start of
the page URL. You can globally set the output of the ``ancestor`` tag by adding
``LINEAGE_ANCESTOR_PHRASE = 'newphrase'`` to ``settings.py``

Advanced
~~~~~~~~

If fine-grain control is what your after, you'll be looking for the
``ifancestor/endifancestor`` combo::

  {% ifancestor 'pattern_name' %}
      This text here is only renderd if the
      URL argument is an ancestor.
  {% endifancestor %}

It accepts the same exact arguments as ``ancestor``, but allows you to define,
on a per definition basis, what the output will be.


Assumptions
-----------

Lineage depends on sensible URL hierarchies, because it compares paths using
regex matching. The ``{% ifancestor '/base/' %}`` block will be true if the
current URL begins with that URL. For example ``/base/`` and ``/base/section/page/``
return true, but ``/other/path/`` and ``/base`` (missing trailing slash) will not.

``request`` must be present in the request context, since it's used to determine
the current URL. Django has `a context preprocessor`__ that can insert it for
you.

.. _ContextProcessors: https://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-context-processors-request

__ ContextProcessors_