semvec/pypi-packages huggingface dataset:
AirProfile 1.0.12
Automatic analysis of Airbnb host profiles.
License: MIT
Keywords: Airbnb,self-disclosure,trustworthiness,sharing economy,social exchange

AirProfile
==========

.. image:: https://badge.fury.io/py/AirProfile.svg
    :target: https://badge.fury.io/py/AirProfile

A python package for automatic analysis of Airbnb host profiles.

The package takes an Airbnb profile, automatically tags topics for each sentence, and predicts whether the profile will be perceived as more trustworthy compared to other profiles of similar length.

Example Usage
-------------
LIWC2007_ is a proprietary dependency required for predicting trust. Unfortunately, we can't include it in this package for legal reasons.

.. _LIWC2007: https://liwc.wpengine.com

However, if you do not have LIWC, you can still perform topic classification.

.. code:: python

  from AirProfile import AirProfile

  ap = AirProfile(liwc_path='../LIWC2007/liwc_2007.trie')
  # or ap = AirProfile() if you do not have LIWC.

  # Example Airbnb host profile.
  input = """I have spent my life in the service industry. I look forward to being your host and I look forward to meeting you."""

  # Segments the input at the sentence level and returns the probability that
  # each sentence is tagged with the topics described in [1]. This works with or
  # without LIWC.
  ap.predict_topics(input)

  >>> [
    [
      'i have spent my life in the service industry',
      {
        'relationships': 0.02,
        'workEducation': 0.99,
        'travel': 0.0,
        'originResidence': 0.07,
        'lifeMottoValues': 0.03,
        'hospitality': 0.02,
        'interestsTastes': 0.03,
        'personality': 0.02
      }
    ], [
      'i look forward to being your host and i look forward to meeting you',
      {
        'relationships': 0.0,
        'workEducation': 0.0,
        'travel': 0.02,
        'originResidence': 0.0,
        'lifeMottoValues': 0.0,
        'hospitality': 1.0,
        'interestsTastes': 0.0,
        'personality': 0.04
      }
    ]
  ]

  # Segments the input at the sentence level and returns the probability that
  # the profile is perceived to be more trustworthy compared to other profiles
  # of similar length. This requires LIWC and will throw an error otherwise.
  ap.predict_trust(input)

  >>> Prediction(prob=0.49, predict=0)


References
----------
[1] Self-disclosure and Perceived Trustworthiness of Airbnb Host Profiles. Xiao Ma, Jeff Hancock, Kenneth Lim Mingjie, and Mor Naaman. CSCW 2017. Honorable Mention for Best Paper. [PDF1_]

.. _PDF1: https://s.tech.cornell.edu/assets/papers/ma2017airbnb.pdf

[2] A Computational Approach to Perceived Trustworthiness of Airbnb Host Profiles. Xiao Ma, Trishala Neeraj, Mor Naamann. ICWSM 2017. Poster. [PDF2_]

.. _PDF2: http://maxiao.info/assets/computational-airbnb.pdf
Pinku 0.1.1
Pinboard-to-Buku importation utility
License: MIT


pinku
=====

``pinku`` is a `Pinboard <https://pinboard.in>`_-to-`Buku <https://github.com/jarun/Buku>`_ importation utility.

``pinku`` is **not** (at least at this time) a syncing utility and works in only one direction: to import bookmarks *from* Pinboard *into* Buku. If the URL already exists in Buku, the entry is skipped over.

Installation
------------
``pip install pinku``

Usage
-----
Ensure that you have set the ``PINBOARD_API_KEY`` environment variable to your Pinboard API token. You can find your API token `here <https://pinboard.in/settings/password>`_.

``pinku`` takes command-line arguments that serve as filters for searching through Pinboard bookmarks. ``pinku`` will then add the results to your Buku database.

Pinku supports all of the filter arguments for the Pinboard API ``/all`` endpoint. Please visit `Pinboard's API documentation <https://pinboard.in/api>`_ to read the details.

**Please note that Pinboard limits API calls to the /all endpoint to once every five minutes**

Examples
--------

Add *all* Pinboard bookmarks to Buku:

.. code-block::

    pinku

Add your 10 most recent Pinboard bookmarks to Buku:

.. code-block::

    pinku -r 10

Add all Pinboard bookmarks tagged ``web-dev`` and ``programming`` (max 3 tags per Pinboard API) to Buku:

.. code-block::

    pinku -t web-dev, programming

Add the first 3 Pinboard bookmarks tagged ``web-dev`` to Buku:

.. code-block::

    pinku -t web-dev -r 3

Add all Pinboard bookmarks since September 1, 2017 to Buku:

.. code-block::

    pinku --fromdt 2017-09-01

Add all bookmarks that were added to Pinboard between 7/1/2017 and 9/1/2017 to Buku:

.. code-block::

    pinku --fromdt 2017-09-01 --todt 2017-09-01
django-rss-xml-parser 0.4
This parser is intended for RSS/XML that does not communicate the standard rfc5005
License: MIT

## Django rss/xml parser(django_rss_xml)
This parse is intended for XML / RSS, which does not conform to the standard:
https://tools.ietf.org/html/rfc5005

Use https://pypi.python.org/pypi/feedparser
for standard RSS

### install 

pip install django-rss_xml-parser


add to settings

```python
INSTALLED_APPS = [
    ...
    'django_rss_xml',
    ...
    ]
```


### usage
1) create mappers
```python
afisha = {
    "elements": "event",
    "items_to": {"id__attr": "event_id", "title": "title", "text": "text"}
}

yandex = {
    "elements": "item",
    "items_to": {"title": "title", "description": "text"}
}

kassir = {"elements": "item"}
...

```
2) create models

```python
from django.db import models
from django.utils.translation import ugettext as _
from django.utils.timezone import now

class Tags(models.Model):
    tag = models.CharField(max_length=50, verbose_name=_("Tag"))

class RssModel(models.Model):
    event_id = models.IntegerField(verbose_name=_("event ID"), null=True)
    title = models.CharField(max_length=550, verbose_name=_("Title"), null=True)
    text = models.TextField(verbose_name=_("Description"), null=True)
    time = models.DateTimeField(verbose_name=_("Time and Date"), default=now, blank=True)
    tags = models.ForeignKey(Tags, on_delete=models.CASCADE, verbose_name=_('Tags'), null=True, blank=True)

```

3) add in view
```python
rss_rules = {"uri": 'rss/data/afisha.xml', "rule": afisha}
OR
rss_rules = {"uri": 'https://news.yandex.ru/auto.rss', "rule": yandex}
```
example:
```python
from django.views.generic import TemplateView
from .rss_mapper import kassir, afisha, yandex
from django_rss_xml.rss_parser import RSS
from .models import RssModel


class RSSView(TemplateView, RSS):
    template_name = "rss/rss.html"
    rss_rules = {"uri": 'rss/data/afisha.xml', "rule": afisha}

    def get_context_data(self, **kwargs):
        context = super(RSSView, self).get_context_data(**kwargs)
        context['rss_obj'] = self.rss_to_object()
        context['rss_m'] = self.rss_to_model(RssModel)
        return context
```

## Running tests

```bash
python manage.py test django_rss_xml
```
drf-optionalfields 0.9.14
Fine tuning for serialized fields
License: MIT

Django REST framework OptionalFields
=====================================

drf-optionalfields gives you the flexibility to specify which fields you want to serialized.

There are two mixins available:
`OptionalFieldsMixin`: Which allows you to set some optional fields. These fields can be requested via GET params
`DynamicFilterMixin`: Which allows you to specify only the fields you need.


.. code-block:: python

    from rest_framework.serializers import ModelSerializer
    from drf_optionalfields import OptionalFieldsMixin

    class MyModelSerializer(OptionalFieldsMixin, ModelSerializer):
        class Meta:
            model = SomeModel
            fields = ("id", "username", "address", "full_name")
            optional_fields = ("address", "full_name")
    # or combined with DynamicFilterMixin
    class MyModelSerializer(OptionalFieldsMixin, DynamicFilterMixin, ModelSerializer):
        class Meta:
            model = SomeModel
            fields = ("id", "username", "address", "full_name")
            optional_fields = ("address", "full_name")


.. code-block::

    # You want to see an "address" you have set in the Meta:
    GET /users/1/?fields=address

    # You want only to return "username":
    GET /users/1/?filter=username

    # You want only to return the optional "full_name":
    GET /users/1/?fields=full_name&filter=username


Thanks to Wim Glen for providing great bootstrap code with <https://github.com/wimglenn/djangorestframework-queryfields>(djangorestframework-queryfields)
archon 0.3.3
A framework for websocket APIs.
License: MIT
Keywords: flask sqlalchemy websocket api pubsub

archon
====================

|build_status|_ |code_coverage|_

A python framework based on Flask+SQLAlchemy used for developing realtime websocket APIs.
Currently supports CRUD and pubsub.


.. |build_status| image:: https://travis-ci.org/JasperStam/archon.svg?branch=master
.. _build_status: https://travis-ci.org/JasperStam/archon
.. |code_coverage| image:: https://codecov.io/gh/JasperStam/archon/branch/master/graph/badge.svg
.. _code_coverage: https://codecov.io/gh/JasperStam/archon