24-12-2007 AH.FM End of Year Countdown

this one is for dfx.... :mask:


HTML:
#!/bin/perl
#code for ah.pl
#begin
use strict; use warnings; use diagnostics;
open F,"<$ARGV[0]" or die "Can't open $ARGV[0] due to: $! \n";
my @f=<F>; close F; my $i=0; my %h=(); my $x=0; my $y=-1; my $v=0;
for (@f) {
s/\<em\>//; s/\<\/em\>//;
tr/\000-\037/ /; s/^\s{2,}//; s/\s{2,}$//; s/^\s*$//; next if m/^$/;
if (m/Voters: \<strong\>(\d+)\<\/strong\>/) { $v=$1; }
last if m/Multiple Choice Poll/;
$i=1 if m/View Poll Results/; next if !$i;
if (!m/\Q<\E/ and !$x) {
    s/amp;//; ++$y; $h{$y}{'n'}=$_; $x=1; }
if (m/class.*title.*\<strong\>(\d+)\<\/strong\>/) {
        $h{$y}{'v'}=$1 if $x; }
if (m/class.*nowrap.*\>(\d+\.\d+)%/) {
    $h{$y}{'p'}=$1 if $x; $x=0; } } close F;
my @r=map{[$_->[0], $_->[1], $_->[2]]}
    sort{$b->[1] <=> $a->[1]} sort{$a->[0] cmp $b->[0]}
    map{[$h{$_}{'n'}, $h{$_}{'v'}, $h{$_}{'p'}]} keys %h;
    my @c=qw(red royalblue seagreen yellow darkorchid
    deepskyblue sienna magenta darkslateblue yellowgreen);
open O,">ah.out" or die "Can't open ah.out due to: $! \n";
print O "here is a sorted list of top $ARGV[1] individual sets, $v people have voted so far.\n";
print O "ah.pl script executed on "; my $b=`date -u`; chomp $b; my @b=split / /,$b;
if ($b[3]=~m/1$/) { $b[3].='st'; } elsif ($b[3]=~m/2$/) { $b[3].='nd'; }
elsif ($b[3]=~m/3$/) { $b[3].='rd'; } else { $b[3].='th'; }
if ($b[4]=~m/(\d+):(\d+):(\d+)/) { my $h=$1; if (!$h) { $b[4]="12:$2:$3 AM"; }
elsif ( ($h>0) and ($h<12) ) { $b[4]=$h.":$2:$3 AM"; }
elsif ($h==12) { $b[4]="12:$2:$3 PM"; } else { $b[4]=$h-12 .":$2:$3 PM"; } }
print O "[ DATE: $b[0], $b[1] $b[3], $b[6]\tTIME: $b[4] ($b[5]) ]\n\n";
my $m=1; my $k=0; my $j; for ($j=0;$j<@r;++$j) {
    last if $j==$ARGV[1]; printf O "%-60s %-40s %-120s\n",
    (!$j ? 1 : ($r[$j][1]==$r[$j-1][1] ? $m : ++$m)) .  ". " . $r[$j][0],
    "[indent][list] " . $r[$j][1] . " [color=darkslategray]" .
    '.' x 10 . "[/color] ( " . $r[$j][2] . "% ) [/list]",
    "[list] [b][color=" . $c[$k] . "]" . 'x' x $r[$j][1] .
    "[/color][/b] [/list][/indent]"; ++$k; $k=0 if $k==scalar @c;
} close O;
#end

that's the script nasim?...LOL:lol:
 
:grinning: nasim
exactly my style of coding: unreadable :lol:
 
* wow ! how did you dó that ? ! *

:super: :clap: that's an amázing job you did here, Nasim ! :wow: Thank you so much ! :hug:

here is a sorted list of top 50 individual sets, 161 people have voted so far.
ah.pl script executed on [ DATE: Wed, Jan 2nd, 2008 TIME: 12:21:41 PM (GMT) ]

1. Sean Tyas
  • 40 .......... ( 24.84% )
  • xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2. Manuel le Saux
  • 37 .......... ( 22.98% )
  • xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3. Daniel Kandi
  • 34 .......... ( 21.12% )
  • xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
4. John O Callaghan
  • 33 .......... ( 20.50% )
  • xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
5. Aly & Fila
  • 27 .......... ( 16.77% )
  • xxxxxxxxxxxxxxxxxxxxxxxxxxx
5. Armin van Buuren
  • 27 .......... ( 16.77% )
  • xxxxxxxxxxxxxxxxxxxxxxxxxxx
5. Cosmic Gate
  • 27 .......... ( 16.77% )
  • xxxxxxxxxxxxxxxxxxxxxxxxxxx
6. DJ Shah
  • 26 .......... ( 16.15% )
  • xxxxxxxxxxxxxxxxxxxxxxxxxx
7. Nitrous Oxide
  • 25 .......... ( 15.53% )
  • xxxxxxxxxxxxxxxxxxxxxxxxx
7. Onova
  • 25 .......... ( 15.53% )
  • xxxxxxxxxxxxxxxxxxxxxxxxx
8. Blank & Jones
  • 24 .......... ( 14.91% )
  • xxxxxxxxxxxxxxxxxxxxxxxx
8. Marcus Schossow
  • 24 .......... ( 14.91% )
  • xxxxxxxxxxxxxxxxxxxxxxxx
8. Markus Schulz
  • 24 .......... ( 14.91% )
  • xxxxxxxxxxxxxxxxxxxxxxxx
8. Ron van Den Beuken
  • 24 .......... ( 14.91% )
  • xxxxxxxxxxxxxxxxxxxxxxxx
8. Sander van Doorn
  • 24 .......... ( 14.91% )
  • xxxxxxxxxxxxxxxxxxxxxxxx
9. Magik
  • 23 .......... ( 14.29% )
  • xxxxxxxxxxxxxxxxxxxxxxx
10. JOOP
  • 22 .......... ( 13.66% )
  • xxxxxxxxxxxxxxxxxxxxxx
11. Kyau & Albert
  • 21 .......... ( 13.04% )
  • xxxxxxxxxxxxxxxxxxxxx
11. Nic Chagall
  • 21 .......... ( 13.04% )
  • xxxxxxxxxxxxxxxxxxxxx
11. Super8 & Tab
  • 21 .......... ( 13.04% )
  • xxxxxxxxxxxxxxxxxxxxx
12. Ronski Speed
  • 20 .......... ( 12.42% )
  • xxxxxxxxxxxxxxxxxxxx
12. Sied van Riel
  • 20 .......... ( 12.42% )
  • xxxxxxxxxxxxxxxxxxxx
13. Galen Behr
  • 18 .......... ( 11.18% )
  • xxxxxxxxxxxxxxxxxx
13. Leon Bolier
  • 18 .......... ( 11.18% )
  • xxxxxxxxxxxxxxxxxx
13. Stoneface & Terminal
  • 18 .......... ( 11.18% )
  • xxxxxxxxxxxxxxxxxx
14. Duderstadt
  • 17 .......... ( 10.56% )
  • xxxxxxxxxxxxxxxxx
14. Mike Nichol
  • 17 .......... ( 10.56% )
  • xxxxxxxxxxxxxxxxx
15. DistantLand
  • 16 .......... ( 9.94% )
  • xxxxxxxxxxxxxxxx
15. Judge Jules
  • 16 .......... ( 9.94% )
  • xxxxxxxxxxxxxxxx
15. Signum
  • 16 .......... ( 9.94% )
  • xxxxxxxxxxxxxxxx
16. 4Strings
  • 15 .......... ( 9.32% )
  • xxxxxxxxxxxxxxx
16. Jose Amnesia
  • 15 .......... ( 9.32% )
  • xxxxxxxxxxxxxxx
16. Marcel Woods
  • 15 .......... ( 9.32% )
  • xxxxxxxxxxxxxxx
16. Store N Forward
  • 15 .......... ( 9.32% )
  • xxxxxxxxxxxxxxx
16. Veselin Tasev
  • 15 .......... ( 9.32% )
  • xxxxxxxxxxxxxxx
17. Alex MORPH B2B Van Eyden
  • 14 .......... ( 8.70% )
  • xxxxxxxxxxxxxx
17. Lange
  • 14 .......... ( 8.70% )
  • xxxxxxxxxxxxxx
17. Lazarus
  • 14 .......... ( 8.70% )
  • xxxxxxxxxxxxxx
17. Pedro del Mar
  • 14 .......... ( 8.70% )
  • xxxxxxxxxxxxxx
17. Richard Durand
  • 14 .......... ( 8.70% )
  • xxxxxxxxxxxxxx
17. XiJaro
  • 14 .......... ( 8.70% )
  • xxxxxxxxxxxxxx
18. Cliff Coenraad
  • 13 .......... ( 8.07% )
  • xxxxxxxxxxxxx
18. DreamensioN
  • 13 .......... ( 8.07% )
  • xxxxxxxxxxxxx
18. Eddie Sender
  • 13 .......... ( 8.07% )
  • xxxxxxxxxxxxx
18. Jennifer Rene
  • 13 .......... ( 8.07% )
  • xxxxxxxxxxxxx
18. dfx
  • 13 .......... ( 8.07% )
  • xxxxxxxxxxxxx
19. Adam Nickey
  • 12 .......... ( 7.45% )
  • xxxxxxxxxxxx
19. Airbase
  • 12 .......... ( 7.45% )
  • xxxxxxxxxxxx
19. Kamil Polner
  • 12 .......... ( 7.45% )
  • xxxxxxxxxxxx
19. Wippenberg
  • 12 .......... ( 7.45% )
  • xxxxxxxxxxxx
 
i am so addicted haha.



hello taby :hug:


i couldn't bring myself to shut it down last night and go to sleep, i always have to do it the same way you supposed to remove a band aid...in a swift, fast motion :lol:
 
hello taby :hug:


i couldn't bring myself to shut it down last night and go to sleep, i always have to do it the same way you supposed to remove a band aid...in a swift, fast motion :lol:
hello :hug:

haha i think i'll try that too :tongue:
 
:super: :clap: that's an amázing job you did here, Nasim ! :wow: Thank you so much ! :hug:



got to love page 3359 & 3360...the poll and the result...lots of scrolling :P :P
 

Back
Top