semvec/pypi-packages huggingface dataset:
outsourcer 0.0.1
Build and test your Python examples
License: MIT License
Requires Python: >=3.6
Keywords: code-generation

# Outsourcer

A micro library for generating Python source code.


## Installation

```console
pip install outsourcer
```

Outsourcer requires Python 3.6 or later.


## Why does this exist?

Sometimes you have to generate some Python code, and sometimes it's a bit too
complicated for using string templates. This is a small library you can use in
those cases.


## Example

### Hello, World

```python
>>> from outsourcer import sym
>>> sym.print('hello, world')
print('hello, world')
```

This example uses `sym` to create a code fragment.

### Control Flow

Here's a longer example:

```python
>>> from outsourcer import CodeBuilder, sym
>>> b = CodeBuilder()
>>> item = sym.item
>>> with b.FOR(item, in_=sym.some_collection):
...     with b.IF(item % 2 == 0):
...         b += sym.print('even')
...     with b.ELSE():
...         b += sym.skipped.append(item)
...
>>> print(b.source_code())
for item in some_collection:
    if ((item % 2) == 0):
        print('even')
    else:
        skipped.append(item)
```
google-tr-free 0.0.7
google translate for free
License: MIT License
Keywords: machine translation,free,scraping

# google-tr-free

Google translate for free -- local cache and throttling (averag 1.5 calls/s, first 1000 calls exempted).. Let's hope it lasts.

### Installation

```pip install -U google-tr-free```

or

* Install (pip or whatever) necessary requirements, e.g. ```
pip install requests_cache js2py``` or ```
pip install -r requirements.txt```
* Drop the file google_tr.py in any folder in your PYTHONPATH (check with import sys; print(sys.path)
* or clone the repo (e.g., ```git clone https://github.com/ffreemt/google-tr-free.git``` or download https://github.com/ffreemt/google-tr-free/archive/master.zip and unzip) and change to the google-tr-free folder and do a ```
python setup.py develop```

### Usage

```
from google_tr import google_tr
print(google_tr('hello world'))  # ->'你好，世界'
print(google_tr('hello world', to_lang='de'))  # ->'Hallo Welt'
print(google_tr('hello world', to_lang='fr'))  # ->'Bonjour le monde'
print(google_tr('hello world', to_lang='ja'))  # ->'こんにちは世界'
```

### Acknowledgments

* Thanks to everyone whose code was used