semvec/pypi-packages huggingface dataset:
pypapago 0.1.1.1
[Unofficial] Python wrapper for Papago translation service
License: MIT

# pypapago [![codecov](https://codecov.io/gh/Beomi/pypapago/branch/master/graph/badge.svg)](https://codecov.io/gh/Beomi/pypapago)

Unofficial python wrapper for [papago translate service](https://papago.naver.com).

## Install

```bash
pip install -U pypapago
```

## Usage

### Basic usage (English to Korean)

```python
from pypapago import Translator

translator = Translator()

result = translator.translate('I am GROOT')
print(result) # 나는 그루트다
```

### Set Source/Target Language

```python
from pypapago import Translator

translator = Translator()

result = translator.translate(
    '카카오는 파파고를 좋아해',
    source='ko',
    target='en',
)
print(result) # Kakao likes papago.
```

#### Supported Language Codes

Code | Desc 
--|--
ko | Korean
en | English
ja | Japanese
zh-CN | Chinese
zh-TW | Chinese traditional
es | Spanish
fr | French
vi | Vietnamese
th | Thai
id | Indonesia


### Bulk Translation

Parallel bulk translation with Multiprocessing.

```python
from pypapago import Translator

translator = Translator()

result = translator.bulk_translate(['apple', 'banana'])
print(result) # ['사과', '바나나']
```

You can also set how many workers to run manually.

(The more workers make your code faster but requires more system resources.)

Default to CPU Cores (HyperThreading = x2)

- ex) Run with 2cores

```python
from pypapago import Translator

translator = Translator()

result = translator.bulk_translate(
    ['apple', 'banana'], 
    workers=2
)
print(result) # ['사과', '바나나']
```

### Verbose output

If you need raw result from papago API, you can set `verbose` to `True`.

```python
from pypapago import Translator

translator = Translator()

result = translator.translate('I am GROOT', verbose=True)
print(result) # RAW JSON Result
#{'delay': 400,
# 'delaySmt': 400,
# 'dict': {'items': [{'entry': '<b>I</b>',
# ...
# 'translatedText': '나는 그루트다'}
#}
```

Detail results may change.
gurobi-machines-plugin 0.7.0
check gurobi machines actives for long time
License: MIT

Gurobi monitoring plugin
========================

Checks an url raise an alert if some problem is found.
Uses curl with all its power, so you can extend your check with all curl options.

`VERSION  <burp_reports/VERSION>`__

Install
=======

Linux::

    sudo pip3 install gurobi_machines_plugin --upgrade

Also is possible to use::

    sudo python3 -m pip install gurobi_machines_plugin --upgrade

On windows with python3.5::

    pip install gurobi_machines_plugin --upgrade

For proxies add::

    --proxy='http://user:passw@server:port'

Usage
=====

Use the command line::

    > gurobi_machines_plugin --help
      usage: gurobi_machines_plugin [-h] [-u [URL]] [-e [EXTRA_ARGS]] 
                                    [--client_id [CLIENT_ID]]
                                    [--client_secret [CLIENT_SECRET]]
                                    [--outdated_minutes [OUTDATED_MINUTES]]

        optional arguments:
                            -h, --help            show this help message and exit
                            -u [URL], --url [URL]
                                                    url to check
                            -e [EXTRA_ARGS], --extra_args [EXTRA_ARGS]
                                                    extra args to add to curl, see curl manpage
                            --client_id [CLIENT_ID]
                                                    Header client_id
                            --client_secret [CLIENT_SECRET]
                                                    Header client_secret
                            --outdated_minutes [OUTDATED_MINUTES]
                                                    Minutes to consider outdated

Example usage
=============

Example basic usage::

    > gurobi_machines_plugin --url 'https://cloud.gurobi.com/api/v2/pools/{PoolID}/machines' 
                             --client_id '{client_id}' --client_secret '{client_secret}' --outdated_minute 60

Nagios config
=============

Example command::

    define command{
        command_name  check_gurobi_machines
        command_line  /usr/local/bin/gurobi_machines_plugin --url '$ARG1$' --client_id '$ARG2$' --client_secret '$ARG3$' --outdated_minute $ARG4$  $ARG5$
    }

Example service::

    define service {
            host_name                       SERVERX
            service_description             service_name
            check_command                   check_gurobi_machines!https://cloud.gurobi.com/api/v2/pools/{PoolID}/machines!{client_id}!{client_secret}!60
            use				                generic-service
            notes                           some useful notes
    }

You can use ansible role that already has the installation and command: https://github.com/CoffeeITWorks/ansible_nagios4_server_plugins

TODO
====

* Use hash passwords
* Add Unit tests?