semvec/pypi-packages huggingface dataset:
django-dev-email 1.0.2
Send all mail to a desired address during development
License: MIT

Django Development Email
========================

This was developed as an alternative to having small if checks to send all mail to a development
 address.  We initially wanted to just override the ``_send`` method, but since it's marked as private,
 we decided to copy the class and rewrite the parts I needed.  We are certainly open to other ways
  and methods of implementing this.

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

    pip install django-dev-email

Add the class to your ``EMAIL_BACKEND`` setting
 
 	EMAIL_BACKEND = 'dev_email.backends.development.EmailBackend'
 	
Add the email address to your settings file

	DEV_EMAIL = 'yourdevaddress@whatever.com'
	
	
Suggestions, Bugs, Comments?  Open a Github issue.

What's Next?
------------
asyncwsgi 0.1.0
Async WSGI support for tornado and asyncio
License: MIT

asyncwsgi
==========
``asyncwsgi`` is a simple package for tornado and asyncio(WIP) to enable the
use of the WSGI interface asynchronously. Behind the scenes ``greenlet`` is
used to pause and resume each request.


Usage
------
#. Decorate functions that require async with ``asyncwsgi.coroutine``
#. Use ``asyncwsgi.wrap`` to wrap the WSGI container.
#. Run the event loop using ``asyncwsgi.run``



Examples
---------

Django ::

    @asyncwsgi.coroutine
    def my_view(request):
        http_client = AsyncHTTPClient()
        response = yield http_client.fetch('http://www.google.com/')
        return render(request, 'my_view.html', {'code': response.code})

    ...
    # Patch django to run on tornado's event loop
    def run(host, port, app, **options):
        container = asyncwsgi.wrap(WSGIContainer(app))
        http_server = HTTPServer(container)
        http_server.listen(port, host)
        asyncwsgi.run(IOLoop.current())

    if __name__ == "__main__":
        ...
        from django.core.management.commands import runserver
        runserver.run = run

Bottle ::

    import asyncwsgi
    import bottle
    from tornado.httpclient import AsyncHTTPClient
    from tornado.wsgi import WSGIContainer
    from tornado.httpserver import HTTPServer
    from tornado.ioloop import IOLoop

    @bottle.get('/')
    @asyncwsgi.coroutine
    def index():
        http_client = AsyncHTTPClient()
        response = yield http_client.fetch('http://www.google.com/')
        return 'Status: %d' % response.code

    container = asyncwsgi.wrap(WSGIContainer(bottle.default_app()))
    http_server = HTTPServer(container)
    http_server.listen(8080)
    asyncwsgi.run(IOLoop.current())


Installation
-------------
``pip install asyncwsgi``


Todo
-----
* asyncio not fully supported


License
--------
MIT licensed. See LICENSE for details.
pythonlangutil 0.1
Utilities for Python programmers with background in other languages.
License: MIT
Keywords: language util overload access modifier private singleton

==========================
Python Languauge Utilities
==========================

This library provides utilities to use features of other languages in Python.

.. image:: https://badge.fury.io/py/pythonlangutil.svg
    :target: http://badge.fury.io/py/pythonlangutil
    
.. image:: https://travis-ci.org/ehsan-keshavarzian/pythonlangutil.svg?branch=master
        :target: https://travis-ci.org/ehsan-keshavarzian/pythonlangutil

You can find a functional example of each feature in the examples directory. Test cases in tests directory run on top of 
these examples to ensure the functionality.

Access Modifiers
----------------

To identify a variable as private:::

   from pythonlangutil.access_modifiers import private_variable
    
   class PrivateVariableTest(object):
      def __init__(self):
          self.id = "123"
          
      @private_variable('id')
      def __setattr__(self, *args, **kwargs):
          return object.__setattr__(self, *args, **kwargs)
      
      def insider(self):
          self.id = "321"
          
To identify a method as private:::

   from pythonlangutil.access_modifiers import private_function
    
   class PrivateFunctionTest(object):
      def __init__(self):
          pass
      
      @private_function
      def private_method(self):
          return 'called from inside my own class'
      
      def insider(self):
          return self.private_method()
    
Creating Overloads
------------------

To create overloads:::

   from pythonlangutil.overload import Overload, signature

   class OverloadTest():
       def __init__(self):
           self.male_pref = "Mr. %s"
           self.female_pref = "Ms. %s"
           self.general_pref = "Dear %s"
       
       @Overload
       @signature("str", "bool")
       def my_method(self, name, male):
           if male:
               return self.male_pref % name 
           return self.female_pref % name
   
       @my_method.overload
       @signature("str")
       def my_method(self, name):
           return self.general_pref % name
       
       @my_method.overload
       @signature("int", "str")
       def my_method(self, times, name):
           return "\n".join([self.general_pref % name for i in range(times)])

Using Singleton Model
---------------------
It prevents the instantiation of the class. The only instance of the class will be accessible through
get_instance() method which will be added to class automatically.

To use singleton:::

   from pythonlangutil.singleton import Singleton

   @Singleton()
   class SingletonTest():
       def __init__(self):
           pass
signpdf 0.0.3
Utility for adding signatures images to PDF documents
License: MIT

signpdf
=======

A quick script to add signature images to PDFs, because I couldn't find
anything that worked well for the purpose under Linux.

Pros: should work with most PDFs, and with signatures as PNG's or JPG's.  It
preserves the incoming PDF's text format (e.g. doesn't convert every page to
images like some alternatives).

Cons: no gui yet.

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

Install with pip:

    pip install signpdf

Or from git:

    git clone https://github.com/yourcelf/signpdf
    cd signpdf
    virtualenv venv
    source venv/bin/activate
    pip install -r requirements.txt

Usage
-----

Sign the first page of "contract.pdf" with the signature "sig.png":

    signpdf contract.pdf sig.png --coords 1x100x100x150x40

Coordinates format is:  ``<pagenum>x<x-coord>x<y-coord>x<width>x<height>``.
 - ``<pagenum>`` the page number, count starts at 1.
 - ``<x-coord>`` horizontal distance from bottom-left corner in PDF units (1/72 inch).
 - ``<y-coord>`` vertical distance from bottom-left corner in PDF units (1/72 inch).
 - ``<width>`` width of signature in PDF units (1/72 inch).
 - ``<height>`` height of signature in PDF units (1/72 inch)

Other options:

 - ``--date`` Append a date to the right of the signature.
 - ``--output`` Destination filename.  Default is to append ``_signed`` to the incoming PDF name.

For more usage details, run ``signpdf --help``.
Mopidy-Grooveshark 1.0.4
Mopidy extension that plays sound from Grooveshark
License: MIT

# Mopidy-Grooveshark

Play music from Grooveshark on mopidy.

## Installation

Just run:

    $ pip install Mopidy-Grooveshark

## External libraries

We are using pygrooveshark, is inside the project because the original repository
is too big to add as a requirement.

    https://github.com/koehlma/pygrooveshark
naive-bayes 0.1.1
Naive Bayes Text Classification
License: MIT
Keywords: naive bayes text classification classifier

# Naive Bayes Text Classifier

Text classifier based on Naive Bayes.

## Instalation

```bash
$ pip install naive-bayes
```

## Usage example

```python
from naivebayes import NaiveBayesTextClassifier

classifier = NaiveBayesTextClassifier(
    categories=categories_list,
    stop_words=stopwords_list
)
classifier.train(train_docs, train_classes)
predicted_classes = classifier.classify(test_docs)
```

`NaiveBayesTextClassifier` is a simple wrapper around `scikit-learn` class `CountVectorizer`. You can put all arguments which support this class. For more information please check `scikit-learn` official documentation.

## More examples

Check examples at `examples` folder. Before run them, install requirements in this folder.

Clone repository from github

```bash
$ git clone git@github.com:itdxer/naive-bayes.git
$ cd naive-bayes/examples
$ pip install -r requirements.txt
```

And run some example

### Usenet 20 newsgroup

```bash
$ python 20newsgroup
```

### Kaggle IMDB reviews competition

```bash
$ python imdb_reviews
```