mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > FactorDB

Reply
 
Thread Tools
Old 2013-10-10, 15:26   #1519
RichD
 
RichD's Avatar
 
Sep 2008
Kansas

337610 Posts
Default No prp < 300 Worker

The small prp worker hasn't been active for a couple days.
RichD is offline   Reply With Quote
Old 2013-10-26, 00:31   #1520
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

11×347 Posts
Default

Is there a way to get an .elf file without causing the db to do an entire check of all the existing entries prior to supplying it? Or, possibly an .elf file of only the last line, since Aliqueit can work from there?

Specific example:

I request the .elf for 4788 - about 13 minutes later, I receive the .elf.
I run Aliqueit to clean out any small/medium factors and come up with a current cofactor (Cxxx).
I factor the current Cxxx.
I supply the factors to the db.
If I check the last 20 lines (or, just the last line) via the web page, the factors have been processed.
If I now ask for a new .elf, the db goes off for another 13+ minutes:
Code:
--2013-10-25 20:04:00--  http://www.factordb.com/elf.php?seq=4788&type=1
Resolving www.factordb.com (www.factordb.com)... 176.9.39.214
Connecting to www.factordb.com (www.factordb.com)|176.9.39.214|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: `alq_4788.elf'

    [             <=>                       ] 989,858      357K/s   in 2.7s    

2013-10-25 20:17:05 (357 KB/s) - `alq_4788.elf' saved [989858]
I know I could go to the trouble of saving the html page and clearing out all the extraneous html code to reconstruct the needed line, but there should be an easier way. There probably is one that I'm unaware of. That is the object of my search.

Thanks for any help.
EdH is offline   Reply With Quote
Old 2013-10-26, 03:43   #1521
schickel
 
schickel's Avatar
 
"Frank <^>"
Dec 2004
CDP Janesville

41128 Posts
Default

Quote:
Originally Posted by EdH View Post
Is there a way to get an .elf file without causing the db to do an entire check of all the existing entries prior to supplying it? Or, possibly an .elf file of only the last line, since Aliqueit can work from there?

Specific example:

I request the .elf for 4788 - about 13 minutes later, I receive the .elf.

[snip]
No, as far as plain text goes, you're limited to getting the whole file. Not sure why it would take 13 minutes, though. Doing it through my web browser, it takes ~3 minutes after clicking on "Download .elf file" to produce a prompt to save the resulting file. You might try it "by hand" to see how long it takes that way....
schickel is offline   Reply With Quote
Old 2013-10-26, 04:28   #1522
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

11·347 Posts
Default

Quote:
Originally Posted by schickel View Post
No, as far as plain text goes, you're limited to getting the whole file. Not sure why it would take 13 minutes, though. Doing it through my web browser, it takes ~3 minutes after clicking on "Download .elf file" to produce a prompt to save the resulting file. You might try it "by hand" to see how long it takes that way....
It took just less than 3 minutes by browser click here as well and when I tried it via a terminal, it took about the same:
Code:
  wget 'http://www.factordb.com/elf.php?seq=4788&type=1' -O alq_4788.elf
--2013-10-26 00:08:15--  http://www.factordb.com/elf.php?seq=4788&type=1
Resolving www.factordb.com (www.factordb.com)... 176.9.39.214
Connecting to www.factordb.com (www.factordb.com)|176.9.39.214|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: `alq_4788.elf'

    [            <=>                        ] 989,858      403K/s   in 2.4s    

2013-10-26 00:10:50 (403 KB/s) - `alq_4788.elf' saved [989858]
I suppose I hit the db at a bad time for a while today, but still, if a single line could be retrieved, it would save a lot of db work. I suppose the ~3 minutes is somewhat taken up translating everything to the text format, but a single line should take next to nothing.

I'll probably go ahead and write something to parse the html code for a single line retrieval. Although it will be a pain, once it's done, I should be able to cut down the wait and the db use. And, I need more work with my regex studies.

Thanks for all the help...

Last fiddled with by EdH on 2013-10-26 at 04:28 Reason: added Thanks
EdH is offline   Reply With Quote
Old 2013-10-27, 14:42   #1523
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

11×347 Posts
Default

I wrote a script that now functions in a couple seconds, if that long. Here's what it does:

1. retrieves the html of the last line of an aliquot sequence
2. harvests the id of the final cofactor, since the display of that cofactor is compressed: NNNN...NN
3. retrieves the html of the id from above
4. harvests the cofactor

It hits the db twice now, instead of once, but each hit is so brief, it should be well less load than having the db go through an entire sequence creating an .elf.
EdH is offline   Reply With Quote
Old 2013-10-28, 03:12   #1524
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

11×347 Posts
Default

There has been some interest in the aforementioned script, so I'm providing it here for review and any correction/advancement it may need. It is currently a bash function and is presented that way (sorry, no internal comments):
Code:
function getnum {
  wget 'http://www.factordb.com/sequences.php?se1&aq='$alqnum'&type=1&action=last' -O temp$alqnumll
  exec <"temp$alqnumll"
  while read line
   do
    case $line in
    *"=110000"*) position=1
    while [ $position -gt 0 ]
     do
      line=${line:${position}+3}
      position=`expr index "$line" ?`
     done
    idline=$line;;
    esac
   done
  position=`expr index "$idline" \"`
  idline=${idline:0:${position}-1}

wget 'http://www.factordb.com/index.php?id='${idline} -O temp$alqnumcf
exec <"temp${alqnumcf}"
while read line
  do
    case $line in
    *"query"*) line=${line:42}
    position=`expr index "$line" =`
    line=${line:$position+1}
    line=${line:0:${#line}-2}
    ecmIn=$line;;
    esac
  done
echo ${ecmIn} >${direct}ecmIn 
}
The following is an example bash script:
Code:
#!/bin/bash

alqnum=4788

function getnum {
...
}

getnum
echo $ecmIn
alqnum is set (in this example, to 4788
getnum is called
--the fist section queries the db for the last line, which is returned as an html page into the file temp4788ll, which is then parsed for the id of the last cofactor, which is then fed to the second section
--the second section queries the db for the number associated with the id from the first section, with this html page returned as temp4788cf, which is then parsed for the cofactor itself

In my example the cofactor is sent to a file named ecmIn and echoed to the screen.

All comments welcome...
EdH is offline   Reply With Quote
Old 2013-10-28, 18:39   #1525
RichD
 
RichD's Avatar
 
Sep 2008
Kansas

24·211 Posts
Default

A plain text file for an expanded number, without having to parse the html code, one could use:

Code:
http://factordb.com/getnumber.php?id=<id_num>
Also, for reporting factors, report format 3 is quicker (assuming base 10).

Code:
--post-data=report=<factor>&format=3 http://factordb.com/index.php?id=<id_num>
RichD is offline   Reply With Quote
Old 2013-10-28, 20:20   #1526
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

11×347 Posts
Default

Quote:
Originally Posted by RichD View Post
A plain text file for an expanded number, without having to parse the html code, one could use:

Code:
http://factordb.com/getnumber.php?id=<id_num>
Also, for reporting factors, report format 3 is quicker (assuming base 10).

Code:
--post-data=report=<factor>&format=3 http://factordb.com/index.php?id=<id_num>
Now, you tell me.

Thanks! This will help a lot. Where can I get a "list" or such of all the things I can do with the db? Is this a .php thing and if I learn all about .php, I'll know all these things?
EdH is offline   Reply With Quote
Old 2013-10-29, 22:08   #1527
RichD
 
RichD's Avatar
 
Sep 2008
Kansas

24×211 Posts
Default

Quote:
Originally Posted by EdH View Post
Now, you tell me.

Thanks! This will help a lot. Where can I get a "list" or such of all the things I can do with the db? Is this a .php thing and if I learn all about .php, I'll know all these things?
How did I know you were going to say that!!

The complete subset is posted in this forum.

Seriously, I think someone else has asked the same thing but Syd is too busy and barely has time to keep his site running, though admirably I would have to say.
RichD is offline   Reply With Quote
Old 2013-11-08, 19:41   #1528
danaj
 
"Dana Jacobsen"
Feb 2011
Bangkok, TH

22·227 Posts
Default

It looks like 1100000000259766196 has a verified certificate but is still marked as a PRP. I've reverified the certificate with two different verifiers, so that doesn't seem to be a problem.
danaj is offline   Reply With Quote
Old 2013-12-24, 21:06   #1529
richs
 
richs's Avatar
 
"Rich"
Aug 2002
Benicia, California

130610 Posts
Default

Some clown has been flooding the database with hundreds of composites all containing the factor 99999999999999999999999999999999999999999999959.
richs is online now   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Database for k-b-b's: 3.14159 Miscellaneous Math 325 2016-04-09 17:45
Factoring database issues Mini-Geek Factoring 5 2009-07-01 11:51
database.zip HiddenWarrior Data 1 2004-03-29 03:53
Database layout Prime95 PrimeNet 1 2003-01-18 00:49
Is there a performance database? Joe O Lounge 35 2002-09-06 20:19

All times are UTC. The time now is 12:02.


Sat Jul 17 12:02:33 UTC 2021 up 50 days, 9:49, 1 user, load averages: 1.46, 1.37, 1.31

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.