SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

perl-Acme-CPANModules-PickingRandomItemsFromList rpm build for : openSUSE Tumbleweed. For other distributions click perl-Acme-CPANModules-PickingRandomItemsFromList.

Name : perl-Acme-CPANModules-PickingRandomItemsFromList
Version : 0.005 Vendor : obs://build_opensuse_org/devel:languages:perl
Release : 1.9 Date : 2024-08-05 17:56:20
Group : Unspecified Source RPM : perl-Acme-CPANModules-PickingRandomItemsFromList-0.005-1.9.src.rpm
Size : 0.03 MB
Packager : (none)
Summary : List of modules to pick random items from a list
Description :
If you are picking random lines from a file, there\'s a separate CPANModules
list for it: Acme::CPANModules::PickingRandomLinesFromFile.

*1. Picking a single item, with equal probability*

If you only want to pick a single item, with equal probability, you can
simply get a random element from an array using the \'$ary[rand AATTary]\'
idiom.

*2. Picking multiple items, with equal probability*

*2a. Picking multiple items, with equal probability, duplicates allowed*

If you want to allow duplicates, you can repeatedly pick random elements
from an array using the \'$ary[rand AATTary]\' idiom.

*2b. Picking multiple items, with equal probability, duplicates not
allowed*

If you do not want to allow duplicates, there are several alternatives:

List::Util (from version 1.54, 2020-02-02) provides \'sample()\'. If you use
an older version, you can use \'shuffle()\' then get as many number of
samples as you need from the first elements of the array using slice
(\'AATTshuffled[0..$num_wanted-1]\') or \'head()\'.

List::MoreUtils also provides \'samples()\'.

Keywords: sample, sampling.

*3. Picking item(s), with weights*

If you want to assign different weights to different items (so one item
might be picked more likely), you can use one of these modules:

Array::Sample::WeightedRandom offers sampling without replacement (not
allowing duplicates) or with replacement (allowing duplicates).

Random::Skew.

Data::Random::Weighted currently can only pick a single item.

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-A/openSUSE_Tumbleweed/noarch

Content of RPM  Provides Requires

Download
ftp.icm.edu.pl  perl-Acme-CPANModules-PickingRandomItemsFromList-0.005-1.9.noarch.rpm
     

Provides :
perl(Acme::CPANModules::PickingRandomItemsFromList)
perl-Acme-CPANModules-PickingRandomItemsFromList

Requires :
perl(:MODULE_COMPAT_5.40.0)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsZstd) <= 5.4.18-1


Content of RPM :
/usr/lib/perl5/vendor_perl/5.40.0/Acme
/usr/lib/perl5/vendor_perl/5.40.0/Acme/CPANModules
/usr/lib/perl5/vendor_perl/5.40.0/Acme/CPANModules/PickingRandomItemsFromList.pm
/usr/share/doc/packages/perl-Acme-CPANModules-PickingRandomItemsFromList
/usr/share/doc/packages/perl-Acme-CPANModules-PickingRandomItemsFromList/Changes
/usr/share/doc/packages/perl-Acme-CPANModules-PickingRandomItemsFromList/README
/usr/share/licenses/perl-Acme-CPANModules-PickingRandomItemsFromList
/usr/share/licenses/perl-Acme-CPANModules-PickingRandomItemsFromList/LICENSE
/usr/share/man/man3/Acme::CPANModules::PickingRandomItemsFromList.3pm.gz

 
ICM