Search notes:

Perl module Math::Random

use warnings;
use strict;
use utf8;

use Math::Random;
use List::Util    'max';    # https://github.com/ReneNyffenegger/PerlModules/tree/master/List/Util

my $λ     =     41;
my $tests = 100000;
my %result;
my $screen_width = 200;


for (1 .. $tests) {
    my $x = Math::Random::random_poisson(undef, $λ); # When called in a scalar context, generates and returns only one such outcome as a scalar, regardless of the value of $n (first paramter

    $result{$x}++;
}

my $max_number = max map { $result{$_} } keys %result;

# Output the graph
print("\n");
for my $key (sort { $a <=> $b } (keys(%result))) {
    my $len = int($screen_width * $result{$key}/$max_number);
    print(':', '*' x $len, "\n");
}


Github repository PerlModules, path: /Math/Random/script.pl
Perl modules.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1741107395, '3.147.80.179', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Perl/modules/Math/Random/index(64): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78