semvec/pypi-packages huggingface dataset:
django-mp-shop 3.8
Django shop apps
License: MIT

## MP-Shop

**Installation**
```
pip install django-mp-shop
```

### shop.currencies

**Installation**

Add currencies to settings.py:

```
from shop.currencies.constants import CURRENCY_UAH, CURRENCY_EUR, CURRENCY_USD

INSTALLED_APPS = [
	...,
	'shop.currencies'
]

CURRENCIES = (
    (CURRENCY_UAH, _('UAH')),
    (CURRENCY_USD, _('USD')),
    (CURRENCY_EUR, _('EUR')),
)
```

**Convert price**

```
from shop.currencies.models import ExchangeRate

# returns: 2700.0
ExchangeRate.convert(100, CURRENCY_USD, CURRENCY_UAH)

# returns: 2700.00
ExchangeRate.convert(100, CURRENCY_USD, CURRENCY_UAH, format_price=True)

# returns: 2700.00 UAH
ExchangeRate.convert(100, CURRENCY_USD, CURRENCY_UAH, printable=True)
```

**Get exchange rates**

```
from shop.currencies.models import ExchangeRate

# returns: {2: 27.10, 3: 29.00}
ExchangeRate.get_exchange_rates()
```

**Save default currency to session**

Add currencies to urls.py:

```
urlpatterns = [
    url(r'^currencies/', include('shop.currencies.urls', namespace='currencies')),
]
```

To get currency form, use 'get_currency_form' template tag:

```
{% load currencies %}

{% get_currency_form as form %}

<form method="post" action="{% url 'currencies:set-currency' %}?next={{ request.get_full_path }}">
	{% csrf_token %}
	
	{{ form }}
	
	<button type="submit">Change currency</button>
</form>
```

Get default currency from session:

```
from shop.currencies.settings import CURRENCY_SESSION_KEY

currency = request.session[CURRENCY_SESSION_KEY]
```
lshknn 0.1.2
k nearest neighbor (KNN) graphs via Pearson correlation distance and local sensitive hashing (LSH).
License: MIT

k nearest neighbor (KNN) graphs via Pearson correlation distance and local sensitive hashing (LSH).

- **Development**: https://github.com/iosonofabio/lshknn
- **Authors**: Fabio Zanini and Paolo Carnevali
- **License**: MIT
- **Copyright**: Fabio Zanini and Chan Zuckerberg Initiative

.. code-block:: python

    import numpy as np
    import lshknn

    # Make mock data
    # 2 features (rows), 4 samples (columns)
    data = np.array(
            [[1, 0, 1, 0],
             [0, 1, 0, 1]],
            dtype=np.float64)

    # Instantiate class
    c = lshknn.Lshknn(
            data=data,
            k=1,
            threshold=0.2,
            m=10,
            slice_length=4)

    # Call subroutine
    knn, similarity, n_neighbors = c()

    # Check result
    assert (knn == [[2], [3], [0], [1]]).all()
yandexwebmaster 0.0.2
YandexWebmaster API
License: MIT
Keywords: yandex webmaster

YandexWebmaster
===============

Get token on https://oauth.yandex.ru/authorize?response_type=token&client_id=%7Bclient_id%7D

Usage Example
=============

from yandexwebmaster import YandexWebmaster

token = 'M1bNXqEKl3rCp64XrPb8WW5GckFXnyNZdMAY16w' y = YandexWebmaster(client_token=token) print(y.get_hosts()) host_id = y.host('site.com')
#or host_id = 'http:site.com:80'

print(y.get_host_summary(host_id))
excel-csv-helpers 0.0.1
This package will help you for reading/writing excel or csv files with multiple options
License: MIT
Keywords: Excel/CSV Reader Writer

This project will help you reading/writing excel or csv files with multiple options.

Following options supported:

* Reading excel/csv file with all coulmns
* Reading excel/csv file with all coulmns with specific rows by giving starting and ending row numbers
* Writing excel/csv file by giving column headers
* Reading excel/csv file with specific columns