complete-shuffle-1.1.2


توضیحات

Complete shuffling of lists with true random or pseudo random sequences.
ویژگی مقدار
سیستم عامل -
نام فایل complete-shuffle-1.1.2
نام complete-shuffle
نسخه کتابخانه 1.1.2
نگهدارنده []
ایمیل نگهدارنده []
نویسنده sosei
ایمیل نویسنده fss.sosei@gmail.com
آدرس صفحه اصلی https://github.com/fsssosei/complete_shuffle
آدرس اینترنتی https://pypi.org/project/complete-shuffle/
مجوز GNU Affero General Public License v3
# complete_shuffle ![PyPI](https://img.shields.io/pypi/v/complete_shuffle?color=red) ![PyPI - Status](https://img.shields.io/pypi/status/complete_shuffle) ![GitHub Release Date](https://img.shields.io/github/release-date/fsssosei/complete_shuffle) [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/fsssosei/complete_shuffle.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/fsssosei/complete_shuffle/context:python) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/bf34f8d12be84b4492a5a3709df0aae5)](https://www.codacy.com/manual/fsssosei/complete_shuffle?utm_source=github.com&utm_medium=referral&utm_content=fsssosei/complete_shuffle&utm_campaign=Badge_Grade) ![PyPI - Downloads](https://img.shields.io/pypi/dw/complete_shuffle?label=PyPI%20-%20Downloads) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/complete_shuffle) ![PyPI - License](https://img.shields.io/pypi/l/complete_shuffle) *Complete shuffling of lists with true random or pseudo random sequences.* Multiple external true random sources can be accessed to shuffle the list. In addition to the shuffle function, there are also random cyclic permutation functions, and the derangement function. ## Installation Installation can be done through pip. You must have python version >= 3.8 pip install complete-shuffle ## Usage The statement to import the package: from complete_shuffle_package import * Example: >>> from gmpy2 import bit_mask as gmpy2_bit_mask >>> prng_period = calculate_number_of_shuffles_required(12, 'prng_period') >>> seed = 170141183460469231731687303715884105727 & gmpy2_bit_mask((prng_period - 1).bit_length()) #The entropy of the seed must not be less than the number of permutations in the list.(Calculate with "calculate_number_of_shuffles_required" function) >>> sequence_list = list(range(12)) >>> pr_complete_shuffle(sequence_list, seed) >>> sequence_list [6, 0, 9, 11, 2, 1, 7, 5, 3, 10, 4, 8] >>> sequence_list = list(range(12)) >>> pr_complete_cyclic_permutation(sequence_list, seed) >>> sequence_list [6, 11, 0, 9, 2, 1, 7, 5, 3, 10, 4, 8] >>> sequence_list = list(range(12)) >>> pr_complete_derangement(sequence_list, seed) >>> sequence_list [6, 0, 9, 11, 2, 1, 7, 5, 3, 10, 4, 8]


نیازمندی

مقدار نام
>=2.0.8 gmpy2
>=1.1.0 pure-nrng
>=2.9.0 pure-prng


زبان مورد نیاز

مقدار نام
>=3.8 Python


نحوه نصب


نصب پکیج whl complete-shuffle-1.1.2:

    pip install complete-shuffle-1.1.2.whl


نصب پکیج tar.gz complete-shuffle-1.1.2:

    pip install complete-shuffle-1.1.2.tar.gz