semvec/pypi-packages huggingface dataset:
superconf18-midibadge 0.2.0
Generate Basic code for the Hackaday Superconf 2018 Badge from a MIDI file
License: MIT
Requires Python: >=3.6,<4.0
Keywords: badgelife,superconference

superconf18-midibadge
=====================


Generate Basic code for the Hackaday Superconf 2018 Badge from a MIDI file


## Quickstart

Install:

```
pip install superconf18_midibadge
```

See what tracks are in a MIDI file:

```
midiinfo --help
usage: midiinfo [-h] inpath

Prints a table of tracks in the given MIDI file.

positional arguments:
  inpath      Input MIDI file

optional arguments:
  -h, --help  show this help message and exit
```

```
midiinfo example.mid
These tracks in MIDI file example.mid contain sound:

  #  Tones   Track Name
---  ------  ------------------------------
  1     143  Lead Vox
  2     139  Lead Vox 2
  3    1921  Piano
  4     481  Bass
  5     780  Strings
  6     263  Choir
  7     155  Brass
  8     138  Horn
  9     274  Lead Guitr
 10     274  Lead GtEko
 11      76  Orc Hit
 12    1115  Drums
 13     179  Timpani
```

Split a MIDI file to listen to individual tracks:

```
midisplit --help
usage: midisplit [-h] [--out OUTPATH] inpath

Split a single MIDI file into multiple MIDI files, one for each track.

positional arguments:
  inpath         Input MIDI file

optional arguments:
  -h, --help     show this help message and exit
  --out OUTPATH  Output folder for single-track MIDI files (defaults to
                 current directory)
```

Create a BASIC file from three tracks in a MIDI file:

```
midi2basic --help
usage: midi2basic [-h] inpath outpath

Creates BASIC file form three tracks of a MIDI file.

positional arguments:
  inpath      Input MIDI file
  outpath     Output BASIC file

optional arguments:
  -h, --help  show this help message and exit
```
django-mptt-comments 0.1.0
writting...
License: MIT
Keywords: django-mptt-comments

=============================
django-mptt-comments
=============================

.. image:: https://badge.fury.io/py/django-mptt-comments.svg
    :target: https://badge.fury.io/py/django-mptt-comments

.. image:: https://travis-ci.org/zmrenwu/django-mptt-comments.svg?branch=master
    :target: https://travis-ci.org/zmrenwu/django-mptt-comments

.. image:: https://codecov.io/gh/zmrenwu/django-mptt-comments/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/zmrenwu/django-mptt-comments

writting...

Documentation
-------------

The full documentation is at https://django-mptt-comments.readthedocs.io.

Quickstart
----------

Install django-mptt-comments::

    pip install django-mptt-comments

Add it to your `INSTALLED_APPS`:

.. code-block:: python

    INSTALLED_APPS = (
        ...
        'django_mptt_comments.apps.DjangoMpttCommentsConfig',
        ...
    )

Add django-mptt-comments's URL patterns:

.. code-block:: python

    from django_mptt_comments import urls as django_mptt_comments_urls


    urlpatterns = [
        ...
        url(r'^', include(django_mptt_comments_urls)),
        ...
    ]

Features
--------

* TODO

Running Tests
-------------

Does the code actually work?

::

    source <YOURVIRTUALENV>/bin/activate
    (myenv) $ pip install tox
    (myenv) $ tox

Credits
-------

Tools used in rendering this package:

*  Cookiecutter_
*  `cookiecutter-djangopackage`_

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage




History
-------

0.1.0 (2018-07-14)
++++++++++++++++++

* First release on PyPI.
security-interface 0.1.0
Security Interface for you project.
License: MIT

.. image:: https://img.shields.io/travis/com/bruziev/security_interface.svg?style=flat-square
        :target: https://travis-ci.com/bruziev/security_interface
.. image:: https://img.shields.io/codecov/c/github/bruziev/security_interface.svg?style=flat-square
        :target: https://codecov.io/gh/bruziev/security_interface


Security Interface
==================

This library provides easy API for authentication and authorization.

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

Install with the following command::

    $ pip install security_interface


Usage
-----

First of all you need implement ``IdentityPolicyInterface``
and ``AuthorizationPolicyInterface`` interfaces. For example we can implement JWT Security::

   import jwt
   from security_interface import IdentityPolicyInterface, AuthorizationPolicyInterface

   class JwtIdentityPolicy(IdentityPolicyInterface):
       def __init__(self, secret, algorithm="HS256"):
           self.algorithm = algorithm
           self.secret = secret

       async def identify(self, identity):
           if jwt is None:
               raise TypeError("Please install PyJWT")
           try:
               return jwt.decode(
                   identity,
                   self.secret,
                   algorithms=[self.algorithm],
                   options={"verify_exp": True, "verify_iat": True},
               )
           except Exception as e:
               return None

   class JwtAuthPolicy(AuthorizationPolicyInterface):
       async def can(self, identity, permission):
           return permission in identity["scope"]


Create security instance with our implementation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::

   from security_interface.api import Security
   jwt_identity = JwtIdentityPolicy("SECRET")
   jwt_auth_policy = JwtAuthPolicy()
   security = Security(jwt_identity, jwt_auth_policy)
   # Checking claim
   security.identify(CLAIM)
   # Checking permission
   security.can(CLAIM, "read")
   security.can(CLAIM, "write")

For full implementation see `DEMO <https://github.com/bruziev/security_interface/tree/master/demo>`_