semvec/pypi-packages huggingface dataset:
external 0.0.1
Run tasks on external processes to overcome Python's global interpreter lock.
License: MIT
Keywords: external multiprocessing

Run tasks on external processes to overcome Python's global interpreter lock.

> Inspired by [google-research/batch-ppo](https://github.com/google-research/batch-ppo) [`ExternalProcess`](https://github.com/google-research/batch-ppo/blob/3d09705977bae4e7c3eb20339a3b384d2a5531e4/agents/tools/wrappers.py#L303)

## Installation

```sh
pip install external
```

## Usage

```py
import external

@external
class Counter():

    def __init__(self, count=0):
        self.count = count

    def increment(self):
        self.count += 1

with Counter(count=1) as c:
    assert c.count.get() == 1
    c.increment()
    assert c.count.get() == 2
    try:
        c.decrement()
    except AttributeError as e:
        print(e)  # 'Counter' object has no attribute 'decrement'
    assert c.count.get() == 2
```
random-dog 1.0.2
Modul/Command Line Tool to get dog images
License: MIT
Keywords: dog fun

# random-dog

random-dog is a module for getting dog images, it uses dogAPI: https://dog.ceo/dog-api/
The module creation was inspired by random-cat module (https://github.com/gravmatt/random-cat)

**Python 2 and 3 compatible**

## Installation

Install through **pip**.

```
$ pip install random-dog
```

or get from source

```
$ git clone https://github.com/Prasnal/random-dog
$ cd random-dog
$ python setup.py install
```

## Usage

The dog module has just one function **getDog()** with two optional arguments.

### Arguments

**directory** - default is the current directory

**filename** - default is a unique id

```
import dog

# dog.getDog(directory=None, filename=None)

dog.getDog(directory='/users/tor', filename='dog')

# /users/tor/dog.jpg
```

The function return the image name (absolute path if directory is specified) of the image.

### Command Line

You can also request an image on the terminal.

```
$ randomdog [file]

# Example:

$ randomdog /users/tor/dog.jpg
```

The argument _file_ is optional.

The command return the filename/absolute path of the image to the standard output (stdout).

### Licence

The MIT License (MIT)