semvec/pypi-packages huggingface dataset:
keras-ernie 1.0.7
Keras ERNIE
License: MIT

# keras ERNIE

Pre-trained ERNIE models could be loaded for feature extraction and prediction.

## Install
```bash
pip install keras-ernie
```

## Usage

* [Download pre-trained ERNIE models](#Download-Pre-trained-ERNIE-Models)
* [Load the pre-trained ERNIE models](#Load-Pre-trained-ERNIE-Models)
* [Convert pre-trained ERNIE model to Tensor model](#Convert-Pre-trained-ERNIE-Model-To-Tensor-Model)

### Download Pre-trained ERNIE Models

Notes: Currently, only the following models are supported.

| Model                                              | Description                                                 |
| :------------------------------------------------- | :----------------------------------------------------------- |
| [ERNIE 1.0 Base for Chinese](https://baidu-nlp.bj.bcebos.com/ERNIE_stable-1.0.1.tar.gz)       | with params, config and vocabs|
| [ERNIE 1.0 Base for Chinese(max-len-512)](https://ernie.bj.bcebos.com/ERNIE_1.0_max-len-512.tar.gz)    | with params, config and vocabs|
| [ERNIE 2.0 Base for English](https://ernie.bj.bcebos.com/ERNIE_Base_en_stable-2.0.0.tar.gz)   | with params, config and vocabs |


### Load Pre-trained ERNIE Models

```python
import os
from keras_ernie import load_from_checkpoint

ernie_path = "/root/ERNIE_stable-1.0.1"
init_checkpoint = os.path.join(ernie_path, 'params')
ernie_config_path = os.path.join(ernie_path, 'ernie_config.json')
ernie_vocab_path = os.path.join(ernie_path, 'vocab.txt')
ernie_version = "stable-1.0.1"

model = load_from_checkpoint(init_checkpoint, ernie_config_path, ernie_vocab_path, ernie_version,
            max_seq_len=128, num_labels=2, use_fp16=False, training=False, seq_len=None, name='ernie')
model.summary()
```

### Convert Pre-trained ERNIE Model To Tensor Model
```python
import os
from keras_ernie import ErnieArgs
from keras_ernie import convert_paddle_to_tensor

ernie_path = "/root/ERNIE_stable-1.0.1"
init_checkpoint = os.path.join(ernie_path, 'params')
ernie_config_path = os.path.join(ernie_path, 'ernie_config.json')
ernie_vocab_path = os.path.join(ernie_path, 'vocab.txt')
tensor_checkpoints_dir = "/root/checkpoints"

args = ErnieArgs(init_checkpoint, ernie_config_path, ernie_vocab_path,
        max_seq_len=128, num_labels=2, use_fp16=False)

convert_paddle_to_tensor(args, tensor_checkpoints_dir)
```
rsvpmeetup 0.5
A Module to Automatically rsvp yes to events in configured events for meetup.com
License: MIT
Requires Python: >=3.3

Meetup-RSVP
=====================


A Python client for AutoRSVPing into Meetup Events.
Supports Python 3

Guide
===============

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

Assuming you have python already, install the package using ``pip``:

.. code-block:: bash

    $ pip install rsvpmeetup


Required
--------------------------------------
Requires a working username password of meetup to be configured
Requires user to be member of the group to be rsvpd into



Configuration
--------------------------------------
Create a secret.json file of the format

.. code-block:: json

    {
    "email": "sample@sample.com",
    "password": "passwordhere",
    "mail_id": "sample2@sample2.com",
    "mail_password":"password2"
    }

Here :
"email","password" --> your login credentials to meetup


"mail_id","mail_password" --> login to email to use for emailing on Succesful RSVP

*Less Secure Access Needs to be activated for mail_id to be used to send emails from*
https://myaccount.google.com/lesssecureapps

and a groups.json file of the format

.. code-block:: json

    {
        "groups":
        [
            {
                "urlname": "group url name here,sample below",
                "endDate":"Date in YYY-MM-DD , till when to Search for events",
                "allow_waitlist":"whether to allow for waitlist or not",
                "event_limit":"how many events to rsvp/waitlist for",
                "guest":"How many guests to allow for"
            },

            {
                "urlname": "slow-spokes",
                "allow_waitlist":true,
                "event_limit":4,
                "endDate":"2020-12-30",
                "guest":1
            }
        ]
    }


Note : both the above files must be in the same directory
Then load the configuration with

.. code-block:: bash

    rsvpcron --config $(pwd)

or

.. code-block:: bash

    rsvpcron --config path


Running
--------------------------------------


Simply run the following command from bash

.. code-block:: bash

    rsvpcron --run


For a dry run (Lists all RSVPs/Waitlists that would happen in actual run)

.. code-block:: bash

    rsvpcron --dry-run


Additional options

.. code-block:: bash

    --mail
    Mails from configured id against 'mail_id' key in secret.json to user email address (configured against 'email' key)
    Will contain all actions taken by script

Shout-out to `@cfsmp3 <https://github.com/cfsmp3>`_ , for the ideas for mailing , dry-runnning ,and adding additional configurations!

*Note : You may need to manually login a few times on error BotError being raised , It implies that the login was not successful
And most probably captcha detection has been enabled*