semvec/pypi-packages huggingface dataset:
autosub-baidu 0.2.0
Auto-generates subtitles for any video or audio file. (Using Baidu AIP)
Requires Python: >=3.6

# Autosub-baidu
  
### Auto-generated subtitles for any video

[Autosub](https://github.com/agermanidis/autosub) 是用于自动语音识别和字幕生成的实用程序。

但是这个项目已经不再维护了，而且在中国使用有些困难。
于是我克隆了这个项目的代码，在内部把Google Web Speech API替换为了[百度短语音识别API](https://ai.baidu.com/tech/speech/asr) 。

项目结构也做出了一些修改，使其即可以在命令行使用，也可以在其他代码中导入使用（主要目的是方便在代码中使用）。语言也改为了仅支持中文。

运行参数有些不一样，要想顺利使用这个新项目你必须提供`API_KEY`、`SECRET_KEY`和`APP_ID`。这里贴出了一些链接，可以跟随这些链接去自行探索：
1. [短语音识别标准版产品首页](https://ai.baidu.com/tech/speech/asr)
2. [百度AI开放平台语音技术新手入门](https://ai.baidu.com/ai-doc/SPEECH/qknh9i8ed) （通过阅读可以了解如何获得`API_KEY`、`SECRET_KEY`和`APP_ID`）

---

[Autosub](https://github.com/agermanidis/autosub) is a utility for automatic speech recognition and subtitle generation.

But this project is no longer maintained, and it is somewhat difficult to use in China.
So I cloned the code of this project and replaced Google Web Speech API with Baidu Short Speech Recognition API internally.

Now Autosub-baidu only supports Chinese.

### Installation

1. Install [ffmpeg](https://www.ffmpeg.org/).
2. Run `pip install autosub-baidu`.

### Usage

```
python -m autosubb -h
usage: __main__.py [-h] [-C CONCURRENCY] [-o OUTPUT] [-F FORMAT] [-L LANG] [-K API_KEY] [-S SECRET_KEY] [-A APP_ID]
                   [--list-formats] [--list-languages]
                   [source_path]

positional arguments:
  source_path           Path to the video or audio file to subtitle

optional arguments:
  -h, --help            show this help message and exit
  -C CONCURRENCY, --concurrency CONCURRENCY
                        Number of concurrent API requests to make
  -o OUTPUT, --output OUTPUT
                        Output path for subtitles (by default, subtitles are saved in the same directory and name as
                        the source path)
  -F FORMAT, --format FORMAT
                        Destination subtitle format
  -L LANG, --lang LANG  Language spoken in source file. default 1537.
  -K API_KEY, --api-key API_KEY
                        The Baidu Cloud API key to be used.
  -S SECRET_KEY, --secret-key SECRET_KEY
                        The Baidu Cloud Secret Key to be used.
  -A APP_ID, --app-id APP_ID
                        The Baidu Cloud AppID to be used.
  --list-formats        List all available subtitle formats
  --list-languages      List all available source/destination languages
```

### License

MIT
mvstd 1.0.4
Rename files using a standard format
Requires Python: >=3.6

mvstd
=====

[![PyPI version](https://badge.fury.io/py/mvstd.svg)](https://badge.fury.io/py/mvstd)
[![Build Status](https://travis-ci.org/jncraton/mvstd.svg?branch=master)](https://travis-ci.org/jncraton/mvstd)

Renames a file using a standard format

Installation
------------

The program can be installed using pip:

```
pip3 install mvstd
```

Usage
-----

```
usage: mvstd [-h] [--numeric] [--reverse] files [files ...]

Rename files to a standard format

positional arguments:
  files          List of files

optional arguments:
  -h, --help     show this help message and exit
  --numeric, -n  Rename file numerically after sorting alphabetically
  --reverse, -r  Reverse sort order prior to renaming
```
smahat 0.0.1
Smahat Time Series Encoding
Requires Python: >=3.8

# Smahat Time Series Encoding

Smahat allows to encode a sequence of integer values using a fixed (for all values) number of bits but minimal with regards to the data range. For example: for a series of boolean values only one bit is needed, for a series of integer percentages 7 bits are needed, etc.

Smahat is useful when:
- Time series is integer-valued. (It doesn't work with floats :))
- The range of the data is known in advance (if not streaming, this is not necessary).
- The data range is relatively small.
- The data does not have properties that would make other compression algorithms useful, or these other algorithms have an unacceptable cost for the use case.

Smahat can also be used as a baseline to calculate the true compression ratio of a compression algorithm on data of a certain nature.

## Installation

To install the latest release:
```
$ pip install smahat
```

You can also build a local package and install it:
```
$ make build
$ pip install dist/*.whl
```

## Usage

Import `smahat` module.

```python
>>> import smahat
```

Data to encode.

```python
>>> values = [12, 0, 17, 15, 78, 10]
```

### Encoding

You can use `encode_next` to encode one value by one:

```python
>>> encoder = smahat.Encoder(min_value=0, max_value=100, strategy='saturate')
>>> for v in values:
...     encoder.encode_next(v)
>>> content = encoder.get_encoded()
>>> content
{'encoded': b'\x18\x00\x88\xf9\xc2\x80', 'shift': 0, 'n_bits_per_value': 7, 'n_padding_bits': 6}
```

Or you can use `Encoder.encode_all` to encode all values (range min and max will be inferred from values if not provided):
```python
>>> content = smahat.Encoder.encode_all(values, min_value=0, max_value=100, strategy='saturate')
>>> content
{'encoded': b'\x18\x00\x88\xf9\xc2\x80', 'shift': 0, 'n_bits_per_value': 7, 'n_padding_bits': 6}
```

### Decoding

To decode use `Decoder.decode_all`.

```python
>>> smahat.Decoder.decode_all(content)
[12, 0, 17, 15, 78, 10]
```

## Encoding result

The result of the encoding of a sequence of values using Smahat is a `SmahatContent` dictionary containing the `encoded` data, plus three fields : `shift` is used to bring the data range to start from zero (values are shifted and encoded in pure binary), `n_bits_per_value` indicates the number of bits used to encode each value, `n_padding_bits` (between 0 and 7) indicates the number of unused padding bits within the last byte.

```python
class SmahatContent(TypedDict):
    encoded: bytes
    shift: int
    n_bits_per_value: int
    n_padding_bits: int
```

If you want to use this library for message exchanges, you can serialize the result of the encoding as you like (JSON, protobuf, etc.)

## Contribute

```
$ git clone https://github.com/ghilesmeddour/smahat-time-series-encoding.git
$ cd smahat-time-series-compression
```

```
make format
make dead-code-check
make test
make type-check
make coverage
make build
```

### TODOs

- [ ] Add unit tests.
- [ ] Improve doc.
smart-path 1.0.1
Smart dispatch between pathlib.Path and s3path.S3Path. It was borrowed from the project by EMTF: emtf@megvii.com
Requires Python: >=3.5

# smart_path

Dispatch to `pathlib.Path` if a local file system path is given,
or `s3path.S3Path` if the given path is prefixed with
`s3://`

## Example

### Basic

```python
from smart_path import smart_path
from pathlib import Path
from s3path import S3Path


# A local path on file system
path_local = smart_path("/tmp/t")
assert isinstance(path_local, Path)


# A s3 path on oss
path_brainpp_oss = smart_path("s3://public-datasets-contrib/", endpoint_url='s3.amazonaws.com')
assert isinstance(path_local, S3Path)
```

### Stub Mode

```python
from smart_path import smart_path


# Stub mode works like the symbolic link in Unix. The source path can be either
# on local file system or brain++ oss, so do the target path. Stub Mode is
# excepted to be helpful when we need to store a large file on oss and pretend 
# it is on local file system.
#
# In stub mode, smart_path writes to two destinations:
# 1. The string "hello-world" is written to `s3://somewhere/on/oss`
# 2. The path "s3://somewhere/on/oss" is written to `corresponding/local/path`
path = smart_path('s3://somewhere/on/oss', stub='corresponding/local/path')
path.write_text('hello-world')
# smart_path knows it is a stub file
stub = smart_path('corresponding/local/path')
print(stub.read_text())  # prints "hello-world"

```

## Installation

```bash
pip install -e git://github.com/wanzysky/smart_path.git#egg=smart_path
# Or from PyPI
pip install smart_path
```

# Notice:

*The entire project is borrowed from EMTF: EMTF-at-megvii-dot-com.*
tox-timemachine 0.1
Run tox on a date in the past

About tox-timemachine
=====================

Installing
----------

To install::

    pip install tox-timemachine

Using
-----

This plugin provides a ``--time-travel`` command-line option that takes either
a date in YYYY-MM-DD format or a date and time in YYYY-MM-DDTHH-MM-SS format,
and will internally use a proxy PyPI server that does not include packages
released after this date (using the pypi-timemachine package). For instance::

    tox --time-travel=2018-02-03T12:33:02-e py37-test

will run tox as if it was being run on that date as far as PyPI is concerned.

Bisection (experimental)
------------------------

This package also provides a command to automatically bisect between two dates
to pinpoint when a tox build started failing::

    tox-timemachine-bisect 2021-01-01 2021-08-10 -r -e py38-test -- -k test_coadd_solar_map

The format is::

    tox-timemachine-bisect start_date end_date <tox arguments>

This is still very experimental and does not yet explicitly say which package update
caused the issue (for now one needs to diff the log files) but this should be
made more user-friendly in future.

Caveats
-------

This plugin will not work properly if you use the ``-i/--index-url`` option
manually when calling tox. In addition, this will only work with pip-based
installs, and will not work with e.g. `tox-conda
<https://github.com/tox-dev/tox-conda>`_.