semvec/pypi-packages huggingface dataset:
utils-core 0.1.2
General utilities on top of Python standard libraries
License: MIT
Requires Python: >=3.6
Keywords: general utilities for standard library

utils-core
===========

General utilities on top of Python standard libraries.

Examples for process-related utilities:

.. code-block:: python

    from utils.process import run, silent_run


    run('ls -l')
    out = run(['ls', '-l'], return_output=True)

    # Just runs without any output to stdout. Alias for: run(..., silent=True)
    silent_run('ls -l')

Examples for filesystem-related utilities:

.. code-block:: python

    import os

    from utils.fs import in_dir, in_temp_dir


    with in_temp_dir() as tmpdir:
        assert os.getcwd() == tmpdir

    with in_dir('/tmp'):
        assert os.getcwd() == '/tmp'


Links & Contact Info
====================

| PyPI Package: https://pypi.python.org/pypi/utils-core
| GitHub Source: https://github.com/maxzheng/utils-core
| Report Issues/Bugs: https://github.com/maxzheng/utils-core/issues
|
| Follow: https://twitter.com/MaxZhengX
| Connect: https://www.linkedin.com/in/maxzheng
| Contact: maxzheng.os @t gmail.com
decentralise 0.0.1
Make normally distributed parameters non-centered in Stan programs.
License: MIT
Requires Python: >=3.6

# decentralise
[![Build Status](https://travis-ci.org/anguswilliams91/decentralise.svg?branch=master)](https://travis-ci.org/anguswilliams91/decentralise)
[![codecov](https://codecov.io/gh/anguswilliams91/decentralise/branch/master/graph/badge.svg)](https://codecov.io/gh/anguswilliams91/decentralise)



Make (some) Stan programs non-centered automatically.

Inspired by reading [this paper](https://arxiv.org/abs/1906.03028).

## Installation

Requires python 3.6+.
Install with `pip`:

```bash
pip install decentralise
```

## Example

This package provides a command line tool: `decentralise`, which is used as follows:

```bash
decentralise <input-file> <output-destination>
```

It will take any normally distributed parameters that have variances that are themselves parameters, and reparameterise them to make them non-centered.
For example, the canonical eight schools code is:

```
data {
  int<lower=0> J; // number of schools
  vector[J] y; // estimated treatment effects
  vector<lower=0>[J] sigma; // s.e. of effect estimates
}
parameters {
  real mu;
  real<lower=0> tau;
  vector[J] theta;
}
model {
  theta ~ normal(mu, tau);
  y ~ normal(theta, sigma);
}
```

Once `decentralise` is applied, this program becomes

```
data {
  int<lower=0> J; // number of schools
  vector[J] y; // estimated treatment effects
  vector<lower=0>[J] sigma; // s.e. of effect estimates
}
parameters {
  real mu;
  real<lower=0> tau;
  vector[J] theta_std;
}
transformed parameters {
  vector[J] theta = mu + theta_std * tau;
}
model {
  theta_std ~ normal(0, 1);
  y ~ normal(theta, sigma);
}
```

I wrote this tool for fun, and have not thoroughly tested it.
For example, it will fail for any parameters whose sampling statements are not vectorised.
e.g.:
```
x ~ normal(mu, tau);
```
will work, but 
```
for i in (1:n) {
    x[i] ~ normal(mu, tau);
}
```
will not.
There are probably a ton of other cases where it will break that I have not anticipated, as well!
kakaotrans 0.1.2
[Unofficial] Kakaotrans: Kakao translate API for python
License: MIT
Requires Python: >=3

# Kakaotrans

Unofficial python API for [Kakao translate service](https://translate.kakao.com).

## Installation

```bash
$ pip install kakaotrans
```

## Usage

### Basic Usage

```python
>>> from kakaotrans import Translator
>>> translator = Translator()
>>> translator.translate("Try your best rather than be the best.")
# '최고가 되기보다는 최선을 다하라.'
>>> translator.translate("최고가 되기보다는 최선을 다하라.", src='kr', tgt='de')
# 'Tun Sie Ihr Bestes, anstatt das Beste zu sein.'
```

### Separate the query into multiple sentences

Translation query might include multiple sentences. If you set separate_lines=True, translator will automatically separate the query and return the list of multiple sentences.

```python
from kakaotrans import Translator

translator = Translator()

translator.translate("""지난해 3월 오픈한 카카오톡 주문하기는 현재까지 약 250만명의 회원을 확보했다.
            전 국민에게 친숙한 카카오톡 UI를 활용하기 때문에 별도의 앱을 설치할 필요 없이 카카오톡 내에서 모든 과정이 이뤄지는 것이 특징이다.""",
            src='kr', tgt='en', separate_lines=True)
# ['The ordering of KakaoTalk, which opened in March last year, has secured about 2.5 million members to date.', 'Because it uses KakaoTalk UI, which is familiar to the whole nation, it is characterized by all the processes in KakaoTalk without having to install a separate app.']
```

### Save translated result as file

```python
>>> from kakaotrans import Translator
>>> translator = Translator()
>>> translator.translate("Try your best rather than be the best.", save_as_file=True, file_name='result.txt')
```

## Reference

- [googletrans](https://github.com/ssut/py-googletrans)
- [pypapago](https://github.com/Beomi/pypapago)
pybacktrans 0.1.4
PyBacktrans: Python library for backtranslation
License: MIT
Requires Python: >=3

# Py-Backtrans

Python library for backtranslation

## Installation

```bash
$ pip install pybacktrans
```

## Usage

### Basic Usage

```python
>>> from pybacktrans import BackTranslator
>>> translator = BackTranslator()
>>> result = translator.backtranslate('Good Morning', src='en', mid='fr')
>>> result
# <BackTranslated src=en, mid=fr, text=Hello>
>>> result.src_text
# 'Good Morning'
>>> result.mid_text
# 'Bonjour'
>>> result.text
# 'Hello'
```

## Reference

- [googletrans](https://github.com/ssut/py-googletrans)
- [QANet](https://arxiv.org/abs/1804.09541)