semvec/pypi-packages huggingface dataset:
django-sap 1.0.0
Integration Sap
License: MIT
Requires Python: >=3.7


# django-sap

## Starting
_These instructions will allow you to install the library in your python project._

### Current features

-   Send invoice reserve.
-   Send incoming payment.

### Pre-requisitos

-   Python >= 3.7
-   Django >= 3
-   requests >= 2
***
## Installation

1. To get the latest stable release from PyPi:
```
pip install django-sap
```
or

2. From a build
```
git clone https://gitlab.com/linets/ecommerce/oms/integrations/oms-sap
```

```
cd {{project}}
```

```
python setup.py sdist
```
and, install in your project django
```
pip install {{path}}/oms-sap/dist/{{tar.gz file}}
```

3. Settings in django project

```
DJANGO_SAP = {
    'SAP': {
        'BASE_URL': '<SAP_BASE_URL>',
        'USERNAME': '<SAP_USERNAME>',
        'PASSWORD': '<SAP_PASSWORD>',
        'COMPANY_DB': '<SAP_COMPANY_DB>',
        'SERIE': '<SAP_SERIE>',
        'CARD_CODE': '<SAP_CARD_CODE>',
        'WAREHOUSE_CODE': '<SAP_WAREHOUSE_CODE>',
        'TAX_CODE': '<SAP_TAX_CODE>',
        'COSTING_CODE': '<SAP_COSTING_CODE>',
        'COSTING_CODE2': '<SAP_COSTING_CODE2>',
        'COSTING_CODE3': '<SAP_COSTING_CODE3>',
        'INDICATOR': '<SAP_INDICATOR>',
        'RESERVE_INVOICE': '<SAP_RESERVE_INVOICE>',
        'U_TIPO_PED_WMS': '<SAP_U_TIPO_PED_WMS>',
    }
}
```

## Usage

1. Send invoice reserve:
```
from sap.handler import SapHandler

handler = SapHandler()

default_data = handler.default_payload_invoice_reserve(instance)
response = handler.send_invoice_reserve(default_data)
```


2. Send incoming payment:
```
from sap.handler import SapHandler

handler = SapHandler()

default_data = handler.default_payload_incoming_payment(instance)
response = handler.send_incoming_payment(default_data)
```
keras-lr-multiplier 0.9.0
Learning rate multiplier
License: MIT

# Keras LR Multiplier

[![Travis](https://travis-ci.org/CyberZHG/keras-lr-multiplier.svg)](https://travis-ci.org/CyberZHG/keras-lr-multiplier)
[![Coverage](https://coveralls.io/repos/github/CyberZHG/keras-lr-multiplier/badge.svg?branch=master)](https://coveralls.io/github/CyberZHG/keras-lr-multiplier)

**This repo is outdated and will no longer be maintained.**

Learning rate multiplier wrapper for optimizers.

## Install

```bash
pip install git+https://github.com/CyberZHG/keras-lr-multiplier.git
```

## Usage

### Basic

`LRMultiplier` is a wrapper for optimizers to assign different learning rates to specific layers (or weights). The first argument is the original optimizer which could be either an identifier (e.g. `'Adam'`) or an initialized object (e.g. `Adam(lr=1e-2)`). The second argument is a dict that maps prefixes to learning rate multipliers. The multiplier for a weight is the value mapped from the __longest matched prefix__ in the given dict, and the default multiplier `1.0` will be used if there is no prefix matched.

```python
from keras.models import Sequential
from keras.layers import Dense
from keras_lr_multiplier import LRMultiplier

model = Sequential()
model.add(Dense(
    units=5,
    input_shape=(5,),
    activation='tanh',
    name='Dense',
))
model.add(Dense(
    units=2,
    activation='softmax',
    name='Output',
))
model.compile(
    optimizer=LRMultiplier('adam', {'Dense': 0.5, 'Output': 1.5}),
    loss='sparse_categorical_crossentropy',
)
```

### Lambda

The multiplier can be a callable object. The input argument is the number of steps starting from 0.

```python
from keras import backend as K
from keras_lr_multiplier import LRMultiplier

LRMultiplier('adam', {'Dense': lambda t: 2.0 - K.minimum(1.9, t * 1e-4)})
```