Ravi1G / codejam-commandline

Automatically exported from code.google.com/p/codejam-commandline
Apache License 2.0
0 stars 0 forks source link

How about adding an option to download the example input and output given with the problems? #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This can be done rather simply by adding two files in the server

example.in and example.out and adding an option to download them from the 
script, that way the whole stage can be automated something like this

iterate on stages
    get example.in and downed_example.out

    while not passed stage (example.out != downed_example.out)
        run the code

    get small.in run script and submit small.out and source
    get large.in run script and submit large.out and source

print a nice message to say the contest is over

Original issue reported on code.google.com by veltzerd...@gmail.com on 9 May 2011 at 11:30

GoogleCodeExporter commented 9 years ago
The idea is good, but this will require some changes in the server, which are 
very unlikely to happen mid-tournament. If I get the needed changes in the 
server to do this I'll take some time to write a pair of scripts to do this, 
however, very low priority for now.

Original comment by jor...@google.com on 10 May 2011 at 1:27

GoogleCodeExporter commented 9 years ago

Original comment by jor...@google.com on 10 May 2011 at 2:04

GoogleCodeExporter commented 9 years ago
Instead of changing server-side, perhaps this could be accomplished by scraping 
the problem description page?
(I had a look and it's AJAX rather than a static page, but it's all the same)

Original comment by rani....@gmail.com on 17 May 2011 at 11:24

GoogleCodeExporter commented 9 years ago
Thats what I did but it means JQuery JSON to PHP server running some simple PHP 
file writing code, Don't trust those JQuery file writing hack plugins. (I also 
scrape the contest URL on the way updating the config file)

I mean, its about 15 lines of code all in all but its not very easy to operate 
and far from elegant, don't know any simpler way of doing this though.

Original comment by veltzerd...@gmail.com on 17 May 2011 at 12:37

GoogleCodeExporter commented 9 years ago
I'm reluctant to scrape the dashboard or the problem statements for 
information, one of the big improvements that I did when I came to Google was 
to get rid of all scraping code and only using JSON to transfer information. If 
you want you can implement the scraping yourself, you can use 
lib.http_interface to get something from the server.

Original comment by jor...@google.com on 17 May 2011 at 8:57

GoogleCodeExporter commented 9 years ago
Issue 10 has been merged into this issue.

Original comment by jor...@google.com on 21 May 2011 at 4:39

GoogleCodeExporter commented 9 years ago
Why is this more than adding an example in and out files to the database and 
adding a command-line option to the download python script?

Original comment by veltzerd...@gmail.com on 29 Apr 2012 at 9:14