semvec/pypi-packages huggingface dataset:
multiprocessing-utils 0.4
Multiprocessing utils (shared locks and thread locals)
License: MIT

============================
python-multiprocessing-utils
============================

Multiprocessing utilities

************
Shared locks
************

"Shared" version of the standard ``Lock()`` and ``RLock()`` classes found in
the ``multiprocessing``/``threading`` modules.

Shared locks can be acquired in two modes, shared and exclusive.

Any number of processes/threads can acquire the lock in shared mode.

Only one process/thread can acquire the lock in exclusive mode.

A process/thread attempting to exclusively acquire the lock will block
until the lock has been released by all other threads/processes.

A process/thread attempting to shared acquire the lock will only block
while there is an exclusive lock.

This is a little like database locks, which can be acquired for shared reading,
or exclusive writing.

::

    lock = multiprocessing_utils.SharedLock()

    def exclusive_worker():
        with lock.exclusive():
            # this code will only run when no other
            # process/thread in a lock context

    def shared_worker():
        with lock:
            # this code will run so long as no
            # thread/process holds an exclusive lock

***************************************
multiprocess-safe ``threading.local()``
***************************************

A process (and thread) safe version of ``threading.local()``

::

    l = multiprocessing_utils.local()
    l.x = 1

    def f():
        try:
            print(l.x)
        except Attribute:
            print("x not set")
    f()                                        # prints "1"
    threading.Thread(target=f).start()         # prints "x not set"
    multiprocessing.Process(target=f).start()  # prints "x not set"

Difference to standard ``threading.local()``
--------------------------------------------

A standard ``threading.local()`` instance created before forking (via
``os.fork()`` or ``multiprocessing.Process()``) will be "local" as expected
and the new process will have access to any data set before the fork.

Using a standard ``threading.local()`` in the example above would yield:

::

    f()                                        # prints "1"
    threading.Thread(target=f).start()         # prints "x not set"
    multiprocessing.Process(target=f).start()  # prints "1" :(
aliyun-voice 1.0.2
SDK for Aliyun tts service
License: MIT
Keywords: aliyun voice tts sdk

阿里云 智能语音 SDK
===================

Python 语言版本

`Go版本`_

--------------

Install

::

    pip install aliyun_voice

TTS 【语音合成服务】
--------------------

Voice(ACCESS\_ID, ACCESS\_KEY)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

阿里云认证。

::

    from aliyun_voice.voice import Voice
    auth = Voice(ALIYUNACCESSID, ALIYUNACCESSKEY)

auth.get\_voice(text, \*\*tts\_params)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

获取语音文件字节数组，或抛出错误。

auth.save\_voice(text, dist, \*\*tts\_params)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

存储语音文件到指定目录【dist】，或抛出错误。

auth.tts\_params
~~~~~~~~~~~~~~~~

设置语音文件属性,参考：https://help.aliyun.com/document\_detail/52793.html?spm=5176.doc30422.6.587.Z6Muvv

Test
----

.. code:: shell

    python -m unittest discover -v

.. _Go版本: https://github.com/huyinghuan/aliyun-voice
reportify 1.3.0
Generate report-like documents from Jupyter notebooks
License: MIT
Keywords: jupyter report data-science analytics

# Reportify

## Installation

Assuming you have pip installed, you can run

```bash
pip install reportify --user
```

Omit `--user` if you are running in a Python virtual environment, but otherwise keep it: don't use sudo, it's dangerous because it modifies the Python environment that your operating system may rely on.

If you aren't running in a Python virtual environment, you may need to add `~/.local/bin` to your `PATH` environment variable. This can be done by editing your shell initialization script, usually `~/.bashrc`. (The tilde character '~' will expand to the path to your home directory). Add the following line to the end of that file:

```bash
export PATH=~/.local/bin:$PATH
```

Now check that the `reportify` script is available by trying `reportify --help`. If you see usage information, everything went fine. If you get something like 'command not found', then everything went not fine.

## Usage

To see arguments, run `reportify --help`.

Inside the repository's `examples` directory is an example notebook, `example.ipynb`, on which you can try reportify:

```bash
reportify example.ipynb
```

this should output a file, `example.html`, in the current directory.