Sig with multiple stats

Message boards : Number crunching : Sig with multiple stats
Message board moderation

To post messages, you must log in.

AuthorMessage
eberndl
Avatar

Send message
Joined: 12 Oct 01
Posts: 539
Credit: 619,111
RAC: 3
Canada
Message 12906 - Posted: 28 Jul 2004, 0:46:46 UTC

I was wondering if anyone has figured out how to make a sig that will list my stats for both SAH and PAH (and Pirates/Einstein when that gets up), as well as the total number of cobblestones crunched. I think I saw one of the Knights with something like that. Can anyone help me?
ID: 12906 · Report as offensive
Profile AthlonRob
Volunteer developer
Avatar

Send message
Joined: 18 May 99
Posts: 378
Credit: 7,041
RAC: 0
United States
Message 12935 - Posted: 28 Jul 2004, 1:56:51 UTC - in response to Message 12906.  

> I was wondering if anyone has figured out how to make a sig that will list my
> stats for both SAH and PAH (and Pirates/Einstein when that gets up), as well
> as the total number of cobblestones crunched. I think I saw one of the
> Knights with something like that. Can anyone help me?

I've thought about writing such a beast... but haven't figured out yet how best to go about it. Perhaps specifying a userid, a project, and that the database should look up the CPID and return all projects the user is in... I don't know.

I also don't know how best to display such a thing.

I'm sure Janus will probably come up with something sooner or later. :-)

Rob
ID: 12935 · Report as offensive
John McLeod VII
Volunteer developer
Volunteer tester
Avatar

Send message
Joined: 15 Jul 99
Posts: 24806
Credit: 790,712
RAC: 0
United States
Message 12957 - Posted: 28 Jul 2004, 3:23:16 UTC - in response to Message 12935.  

> > I was wondering if anyone has figured out how to make a sig that will
> list my
> > stats for both SAH and PAH (and Pirates/Einstein when that gets up), as
> well
> > as the total number of cobblestones crunched. I think I saw one of the
> > Knights with something like that. Can anyone help me?
>
> I've thought about writing such a beast... but haven't figured out yet how
> best to go about it. Perhaps specifying a userid, a project, and that the
> database should look up the CPID and return all projects the user is in... I
> don't know.
>
> I also don't know how best to display such a thing.
>
I don't know how to display it, but the technique for getting the stats was as you guessed. The user supplies a Project, and an ID for that project, and the stats site looks up the CPID. Then using that CPID, it looks up the stats in all of the projects that it knows about. The sig would probably end up looking like a table.

ID: 12957 · Report as offensive
Profile AthlonRob
Volunteer developer
Avatar

Send message
Joined: 18 May 99
Posts: 378
Credit: 7,041
RAC: 0
United States
Message 12970 - Posted: 28 Jul 2004, 4:32:53 UTC - in response to Message 12957.  

> I don't know how to display it, but the technique for getting the stats was as
> you guessed. The user supplies a Project, and an ID for that project, and the
> stats site looks up the CPID. Then using that CPID, it looks up the stats in
> all of the projects that it knows about. The sig would probably end up
> looking like a table.

Yeah... alternatively they could just provide the CPID... or in case the CPID isn't working, perhaps a registration database like Neil uses for individual sites, except you'd be able to add UIDs for each project and it worked that way.

I hate the idea of a table... but yeah, that might be the way to do it.

Rob
ID: 12970 · Report as offensive
Darren
Volunteer tester
Avatar

Send message
Joined: 2 Jul 99
Posts: 259
Credit: 280,503
RAC: 0
United States
Message 12973 - Posted: 28 Jul 2004, 4:41:15 UTC

I think the original poster is just talking about something like what MajorKong uses. Doesn't look like a table at all, just a single simple sig image showing both project he participates in.

You can see his posts here, and see what his sig file looks like:

http://setiweb.ssl.berkeley.edu/forum_user_posts.php?userid=66994


ID: 12973 · Report as offensive
Profile AthlonRob
Volunteer developer
Avatar

Send message
Joined: 18 May 99
Posts: 378
Credit: 7,041
RAC: 0
United States
Message 12979 - Posted: 28 Jul 2004, 4:58:13 UTC - in response to Message 12973.  

> I think the original poster is just talking about something like what
> MajorKong uses. Doesn't look like a table at all, just a single simple sig
> image showing both project he participates in.
>
> You can see his posts here, and see what his sig file looks like:
>
> http://setiweb.ssl.berkeley.edu/forum_user_posts.php?userid=66994

Yeah, I think he told me it was a perl script. It's pretty simple and I think he generates it via a cron job... just a static image generated every n minutes.

Rob
ID: 12979 · Report as offensive
Profile KWSN - MajorKong
Volunteer tester
Avatar

Send message
Joined: 5 Jan 00
Posts: 2892
Credit: 1,499,890
RAC: 0
United States
Message 12987 - Posted: 28 Jul 2004, 5:23:35 UTC - in response to Message 12906.  
Last modified: 28 Jul 2004, 5:42:22 UTC

> I was wondering if anyone has figured out how to make a sig that will list my
> stats for both SAH and PAH (and Pirates/Einstein when that gets up), as well
> as the total number of cobblestones crunched. I think I saw one of the
> Knights with something like that. Can anyone help me?
>
>

I wrote it myself. Its a short perl script. I load my 'my account' pages into a variable, parse out the information I need from the rest of the HTML, do the required math, build the graphics file, and ftp it up to a location on some web space i have access to. I run the script on one of my linux boxes. I run it manually, for now, because S@H and Predictor@Home are not up a lot of the time, and credits are a bit slow in arriving... But, once things settle down, I'll put it in a crontab for periodic execution.

Perl modules I use:
LWP::Simple (to fetch the webpages),
GD (specifically GD::Image to construct the graphics file),
and Net::FTP (to ftp the image up to my web space).

The parseing logic is rather simple:

$thedoc = "";
$thedoc = get("$sahurl");
$thedoc =~ s///gs; # this one is hosed. forum won't display backslashes.
# but it strips out all the HTML tags.
$thedoc =~ s/.*Total/Total/s;
$thedoc =~ s/SETI.*//gs;
$thedoc =~ s/.*credit//;
$thedoc =~ s/.*credit//;
($sahtotal, $sahrac) = split /n/, $thedoc;
$totaltotal = $pahtotal + $sahtotal;
$totalrac = $pahrac + $sahrac;

This is just about everything for the S@H data.

EDIT: URRGH! This board mangled some of my regexps.. Sorry.

I *could* use a 'background' image with the image I generate with GD::Image (its rather easy), but I have decided to be 'nice' to people (for now) and skip it. Total size of my graphic without the background is only about 0.77 KB, hence rather quick to load, even for those on dialup.

I use perl on linux for this, however, using something like ActivePerl, it should be rather easy to do under Windoze as well.

This is a rather EASY perl script, and with the hints/help I have given you shouldn't take you much time at all to cobble together. Mine is only 82 lines, and that includes comments and a LOT of whitespace. Hope this helps.


------------
KWSN-MajorKong
KWSN Forum Admin (retired)
http://www.kwsnforum.com

BOINC Beta tester

ID: 12987 · Report as offensive
John McLeod VII
Volunteer developer
Volunteer tester
Avatar

Send message
Joined: 15 Jul 99
Posts: 24806
Credit: 790,712
RAC: 0
United States
Message 13065 - Posted: 28 Jul 2004, 12:21:59 UTC - in response to Message 12970.  

> Yeah... alternatively they could just provide the CPID... or in case the CPID
> isn't working, perhaps a registration database like Neil uses for individual
> sites, except you'd be able to add UIDs for each project and it worked that
> way.
>
Unfortunately, the CPID can change. Every time that you join a project, that project proposes a CPID. The algorythm that chooses which CPID to use takes the max of all of the proposed CPIDs, and propogates that to all the connected machines/projects that are using the same email address.

ID: 13065 · Report as offensive

Message boards : Number crunching : Sig with multiple stats


 
©2024 University of California
 
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.