semvec/pypi-packages huggingface dataset:
django-torrent-stream 0.9.3
Wraps the Torrent Stream http://torrentstream.org/
License: BSD
Keywords: django,torrent,torrent stream

django-torrent-stream
=====================

Wraps the Torrent Stream http://torrentstream.org/

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

Install a `stable version <http://pypi.python.org/pypi/django-torrent-stream>`_::

    pip install django-torrent-stream

Or install an alpha version::

    pip install -e git://github.com/adw0rd/django-torrent-stream.git#egg=torrent_stream


Add to ``settings.py``::

    INSTALLED_APPS = (
        ...
        'torrent_stream'
    )
    
    TORRENT_STREAM_AFFILIATE_KEY = "<HASH>"
    TORRENT_STREAM_ZONE_ID = <DIGIT>
    
    # You can specify size of player
    TORRENT_STREAM_PLAYER = {
        'width': '650px',
        'height': '342px',
    }

These ``KEY`` and ``ID`` you can get on a page http://acestream.net/affiliate/

Add to ``urls.py``::

    urlpatterns += patterns(
        ...
        url(r'^ts/', include('torrent_stream.urls'))
    )

For inclusion the ``torrent_stream.views``. Remember, you can change the prefix ``r'ts/'`` on anything.

Usage
---------

For example, you have a model Torrent::

    class Torrent(models.Model):
        name = models.CharField(max_length=300, blank=True)
        content = models.FileField(upload_to="torrents/torrents", blank=True)


You can display the button, when clicked, will be available to the player::

    {% load torrent_stream %}
    {% torrent_stream_button torrent.filename %}

Result:

----

.. image:: https://raw.github.com/adw0rd/django-torrent-stream/master/screenshots/button_player_.png
    :target: http://kinsburg.tv/en/films/5430-puteshestvie-na-lunu/

----

Or you can display a player at once::

    {% load torrent_stream %}
    {% torrent_stream_player torrent.filename %}

How to get CONTENT_ID
------------------------

Sometimes you need to get ``CONTENT_ID``, you can do so::

    from app.models import Torrent
    from torrent_stream.helpers import get_content_id

    torrent_obj = Torrent.objects.get(pk=42)

    # Enough to transmit the content of the torrent file
    content_id = get_content_id(torrent_obj.content.read())

    # Or you can also pass the name of the torrent, and the duration to display the data in the player
    content_id = get_content_id(torrent_obj.content.read(), torrent_obj.name, duration_in_seconds)
baciphacs 1.0
Bar Charts In Pure HTML And CSS
License: BSD
Keywords: bar charts HTML CSS

This library is designed for the kind of (desesperate) situation where
you want to display bar charts but with the constraint that your HTML
document must not depend on additional files or remote webservices.

baciphacs will use basic HTML code with some bits of CSS style embeded
in tags, to display a reasonably readable chart.

If you need pretty or advanced graphs and don't have any strict
constraints on your HTML's dependency, many libraries exists that
generate much much better looking graphs.

baciphacs is licensed under the 2 close BSD License,
and more detailed information about it can be found at
GitHub: 

https://github.com/tibonihoo/baciphacs.

It is tested on Travis-CI: 

https://travis-ci.org/tibonihoo/baciphacs


Example for horizontal bar charts
---------------------------------

Code sample::

  from baciphacs import DataSample
  from baciphacs import GenerateHTMLHorizontalBarChart

  data = [("ba",3,2),("c",6,1),("i",2,1),("p",4,1),("h",4,1),("a",3,1),("cs",3,2)]
  dataSamples = [DataSample._make(t) for t in data]
  print GenerateHTMLHorizontalBarChart(dataSamples,numStdev=2,color="blue")


The Python code above will generate an HTML snippet that renders like a bar chart: 

http://htmlpreview.github.io/?https://github.com/tibonihoo/baciphacs/blob/master/doc/index.html
django-board 0.2.1
A Django app for managing an organisation's board members page.
License: BSD

django-board
============

A pluggable Django app for managing board members of an
organisation. Board members have titles, mini-biographies, and photos.

Installation is simple::

    pip install django-board

Getting started
---------------

Add the following to your ``INSTALLED_APPS``:

 * ``sorl.thumbnail`` (if not already present);
 * ``board``.

Sync database changes, using::

    python manage.py syncdb

django-board ships with no views, templates or URLs. To include a list
of board members in a template, use the template tag ``board_members``::


    {% load board_tags %}
    {% board_members as members %}

    {% if members %}
    <ul>
      {% for member in members %}
      <li>{{ member.name }}</li>
      {% endfor %}
    </ul>
    {% endif %}


Running the tests
-----------------

You can run the test suite using::

    python manage.py test board