[Vienna-pm] Termin fürs Treffen

Peter J. Holzer hjp-vienna-pm-list at hjp.at
Tue Mar 9 03:10:49 PST 2010


On 2010-03-05 15:48:43 +0100, Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 wrote:
> Es wurde beantragt, nochmal einen besseren Termin zu finden. Es war wohl ein 
> Fehler, über gewisse vorausgewählte Tage abzustimmen. Stattdessen kopiert 
> bitte den folgenden Abschnitt in die Antwort und füllt ihn aus, so dass die 
> relativen Vorlieben von jedem berücksichtigt werden können. Der erste Dienstag 
> und zweite Mittwoch kommen erst gar nicht in Frage, weil da unsere 
> Aufschließer nicht vorhanden sind.

Kleine Zwischenauswertung:

Minimum

   Mo Di Mi Do Fr
1  -- XX -- -  -- 
2  -- -- XX -  -- 
3  -- -- -- -  -- 
4  -- -- -- -  -- 


Median

   Mo Di Mi Do Fr
1  o  XX -  o  -  
2  o  o  XX o  -  
3  o  o  -  o  -  
4  o  o  -  o  -  


Summen

    Mo  Di  Mi  Do  Fr
1   -4 -90 -18  -1 -22 
2   -5  -5 -90  -1 -20 
3   -5  -5 -20  -1 -20 
4   -5  -5 -16  -1 -20 

(für die Summen habe ich negative Scores stärker gewichtet als positive - siehe Script)

Bis jetzt scheint der Donnerstag der klare Gewinner zu sein, er
schneidet bei jeder Berechnungsmethode am besten ab.

	hp

-- 
   _  | Peter J. Holzer    | Openmoko has already embedded
|_|_) | Sysadmin WSR       | voting system.
| |   | hjp at hjp.at         | Named "If you want it -- write it"
__/   | http://www.hjp.at/ |  -- Ilja O. on community at lists.openmoko.org
-------------- next part --------------
#!/usr/bin/perl
use warnings;
use strict;
use Data::Dumper;

my @votes;
for my $filename (@ARGV) {
    open (my $fh, '<', $filename) or die "cannot open $filename: $!";
    while (<$fh>) {
        if (/(\d)\s+(.*)/) {
            my $week = $1;
            my @days = split(/\s+/, $2);
            for my $day (0 .. 4) {
                push @{ $votes[$week][$day] }, $days[$day];
            }
        }
    }
}

my %scores = (
    '++' => 2,
    '+'  => 1,
    'o'  => 0,
    '-'  => -2,
    '--' => -4,
    'XX' => -10,
);

print "Minimum\n\n";

print "   Mo Di Mi Do Fr\n";
for my $week (1 .. 4) {
    print "$week  ";
    for my $day (0 .. 4) {
        my $min = '++';
        for my $vote (@{ $votes[$week][$day] }) {
            $min = $vote if $scores{$vote} < $scores{$min};
        }
        printf "%-2s ", $min;
    }
    print "\n";
}
print "\n\n";

print "Median\n\n";

print "   Mo Di Mi Do Fr\n";
for my $week (1 .. 4) {
    print "$week  ";
    for my $day (0 .. 4) {
        my @votes = sort { $scores{$a} <=> $scores{$b} } @{ $votes[$week][$day] };
        printf "%-2s ", $votes[$#votes/2];
    }
    print "\n";
}
print "\n\n";

print "Summen\n\n";

print "    Mo  Di  Mi  Do  Fr\n";
for my $week (1 .. 4) {
    print "$week  ";
    for my $day (0 .. 4) {
        my $sum = 0;
        for my $vote (@{ $votes[$week][$day] }) {
            $sum += $scores{$vote};
        }
        printf "%3d ", $sum;
    }
    print "\n";
}
print "\n\n";
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.pm.org/pipermail/vienna-pm/attachments/20100309/86bc57b8/attachment.bin>


More information about the Vienna-pm mailing list