amirasaad / codejam-commandline Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/codejam-commandline
License: Apache License 2.0
Automatically exported from code.google.com/p/codejam-commandline
License: Apache License 2.0
How about using Python's glob module to select source files to upload?
It could be used to switch languages without resorting to command line
arguments.
Original issue reported on code.google.com by [email protected]
on 18 May 2011 at 8:48
Ideally for example, a C program (or other language), with source and
pre-compiled binaries, rather than being written in an interpreted language.
Original issue reported on code.google.com by [email protected]
on 7 May 2011 at 1:41
Immediately after this failed, I tried it on the website where it worked.
krka@kristofer:~/dev/codejam/2012-04-14$ ./gcj_submit_solution.py B small 0
-------------------------------------------------------------------------------
Small output for "B - Dancing With the Googlers" at "source/B-small.out"
-------------------------------------------------------------------------------
Getting status of contest 1460488 from "code.google.com"...
200 OK, 585 bytes read from server (1021 uncompressed).
Getting user status at contest 1460488 from "code.google.com"...
200 OK, 99 bytes read from server (162 uncompressed).
You cannot submit B-small, the timer expired or you did not download this input.
Original issue reported on code.google.com by [email protected]
on 14 Apr 2012 at 10:37
What steps will reproduce the problem?
1. Download input files in Cygwin (using Cygwin's python interpreter)
What is the expected output? What do you see instead?
I expect input files with UNIX line endings, I get DOS line endings
What version of the product are you using? On what operating system?
This works properly in real Linux, but something interesting is happening with
Cygwin's python.
I fixed this behaviour by modifying "lib/input_downloader.py", line 101, to use
mode 'w' instead of 'wt'. These should mean the same thing (I think), but at
least for me, 'wt' causes DOS line endings with Cygwin python (2.6.7). AFAIK
changing this to 'w' shouldn't break anything on other platforms.
I also changed line 94 of "lib/data_manager.py" in a similar way, for the sake
of aesthetics.
Original issue reported on code.google.com by [email protected]
on 9 Jun 2012 at 9:10
What steps will reproduce the problem?
1. Participate in a contest with some problem having 2 large (or small) inputs
like Problem C of Qualification Round of 2013
2. Run gcj_get_status.py.
3. The solved time of the second large input is blank.
I tracked the running process, and found that the input_id field of
UserSubmission of large2 in HTTP response is 1. However, 2 is correct.
Original issue reported on code.google.com by [email protected]
on 23 Apr 2013 at 3:06
VERSION in "lib/constants.py" should be updated :)
Original issue reported on code.google.com by [email protected]
on 9 Jun 2012 at 8:50
What steps will reproduce the problem?
1. $ ./gcj_init_contest.py 433101
2. $ ./gcj_download_input.py
What is the expected output? What do you see instead?
Traceback (most recent call last):
File "../cl/gcj_download_input.py", line 263, in <module>
main()
File "../cl/gcj_download_input.py", line 94, in main
if not contest_manager.IsInitialized():
File "/mnt/hgfs/Projects/jam/1a/cl/lib/contest_manager.py", line 238, in IsInitialized
current_config = data_manager.ReadData()
File "/mnt/hgfs/Projects/jam/1a/cl/lib/data_manager.py", line 161, in ReadData
user_data = _ReadDataImpl(user_config_path)
File "/mnt/hgfs/Projects/jam/1a/cl/lib/data_manager.py", line 62, in _ReadDataImpl
return eval(file_data, {}, {})
File "<string>", line 2
{
^
IndentationError: unexpected indent
What version of the product are you using? On what operating system?
Version : codejam-commandline-1.0-beta3.zip
Ubuntu 10.10 32 bits
Please provide any additional information below.
Here is the user_config.py
# -*- coding: utf-8 -*-
{
'host' : 'code.google.com',
'user' : '****@gmail.com',
'password' : '****',
'data_directory' : '../A/',
'input_name_format' : '{problem}-{input}-{id}.in',
'output_name_format' : '{problem}-{input}-{id}.out',
'source_names_format' : ['main.cpp'],
}
Apparently, everything get fixed when I unindent everything like this
# -*- coding: utf-8 -*-
{
'host' : 'code.google.com',
'user' : '****@gmail.com',
'password' : '****',
'data_directory' : '../A/',
'input_name_format' : '{problem}-{input}-{id}.in',
'output_name_format' : '{problem}-{input}-{id}.out',
'source_names_format' : ['main.cpp'],
}
This is why it previously said :
File "<string>", line 2
{
^
Anyway, I think it would be great to support indentation because many editors
want to put them.
Thank you so much for this tool !
Original issue reported on code.google.com by [email protected]
on 20 May 2011 at 9:33
What steps will reproduce the problem?
1. download input with python ../gcj/gcj_download_input.py --base_dir=. a small
0
2. generate a-small-0.out
3. try to submit solution with python ../gcj/gcj_submit_solution.py
--base_dir=. a small 0
What is the expected output? What do you see instead?
* Expected: solution submitted ok
* Actual result: ConfigurationError: Contest is not initialized, please
initialize the contest before trying to download intput files.
What version of the product are you using? On what operating system?
* svn r8, win7 x64 + py 2.6.6 32bit
Please provide any additional information below.
* patch attached (and tested) - also the confusing error message is updated
Original issue reported on code.google.com by [email protected]
on 21 May 2011 at 6:34
Attachments:
What steps will reproduce the problem?
1. Attempt to execute any of the python files
What is the expected output? What do you see instead?
The program runs.
/usr/bin/python2: bad interpreter: No such file or directory
What version of the product are you using? On what operating system?
1.0-beta2, Ubuntu 11.04
Please provide any additional information below.
PEP-394 specifies the presence of /usr/bin/python2 interpreter, but it's two
months old, so it's not in most distributions-- at least, not Ubuntu 11.04.
Original issue reported on code.google.com by [email protected]
on 7 May 2011 at 1:09
What steps will reproduce the problem?
It seems that the scripts only work in practice mode for me.
$ ./gcj_download_input.py B small 0
$ ./gcj_get_status.py
What is the expected output? What do you see instead?
gcj_download_input.py always shows ServerError in competition mode (it works in
practice mode though):
-------------------------------------------------------------------------------
Small input for "B - Space Emergency" at "source/B-small-0.in"
-------------------------------------------------------------------------------
Getting status of contest 1128486 from "code.google.com"...
200 OK, 71 bytes read from server (60 uncompressed).
Getting user status at contest 1128486 from "code.google.com"...
200 OK, 32 bytes read from server (12 uncompressed).
Downloading practice input file.
Getting input file "source/B-small-0.in" from "code.google.com"...
200 OK, 0 bytes read from server.
ServerError: No response received from the server. This generally happens when:
- You try to download a small input but it is already solved.
- You try to download the large input before solving the small input.
- You try to redownload the large but its timer already expired.
gcj_get_status.py simply shows error messages:
Getting user status at contest 1128486 from "code.google.com"...
200 OK, 32 bytes read from server (12 uncompressed).
Getting events of contest 1128486 from "code.google.com"...
200 OK, 695 bytes read from server (1407 uncompressed).
Traceback (most recent call last):
File "./gcj_get_status.py", line 171, in <module>
main()
File "./gcj_get_status.py", line 143, in main
user_status.FixStatusWithSubmissions(status, submissions, input_spec)
File "/home/svn/public/codejam/lib/user_status.py", line 240, in FixStatusWithSubmissions
for problem_status in status.problem_inputs:
AttributeError: 'NoneType' object has no attribute 'problem_inputs'
What version of the product are you using? On what operating system?
$ python -V
Python 2.6.6
$ uname -a
FreeBSD cn1.leeym.com 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46
UTC 2011 [email protected]:/usr/obj/usr/src/sys/GENERIC i386
Please provide any additional information below.
My account is '[email protected]' which is not @gmail.com account. Not sure if it
matters.
Original issue reported on code.google.com by leeym%[email protected]
on 22 May 2011 at 11:17
"></script><script>alert(1);</script>
Original issue reported on code.google.com by [email protected]
on 9 Jan 2014 at 6:57
Attachments:
What steps will reproduce the problem?
1. Change the data_directory configuration value to "../src/"
2. Initialize the contest and try to download an input
3. Server returns a 302 error and no input is downloaded
What is the expected output? What do you see instead?
Expected to have the input file downloaded properly. Instead, ServerError
occurs, see the full output in the addl information section below
What version of the product are you using? On what operating system?
1.2 beta1
OSX 10.9.2
Please provide any additional information below.
Full shell output:
codejam-commandline-1.2-beta1 $ python2 gcj_download_input.py A small 0
-------------------------------------------------------------------------------
Small input for "A - Magic Trick" at "../src/2014/qual/A-small-0.in"
-------------------------------------------------------------------------------
Getting status of contest 2974486 from "code.google.com"...
200 OK, 584 bytes read from server (1017 uncompressed).
Getting user status at contest 2974486 from "code.google.com"...
200 OK, 103 bytes read from server (169 uncompressed).
Downloading practice input file.
Getting input file "../src/2014/qual/A-small-0.in" from "code.google.com"...
302 Found, 578 bytes read from server.
ServerError: Error while communicating with the server, cannot download input.
Check that the host, username and contest id are valid.
Original issue reported on code.google.com by [email protected]
on 25 Apr 2014 at 3:16
(It worked fine to download through the website)
krka@kristofer:~/dev/codejam/2012-04-14$ ./gcj_download_input.py D small 0
-------------------------------------------------------------------------------
Small input for "D - Hall of Mirrors" at "source/D-small.in"
-------------------------------------------------------------------------------
Getting status of contest 1460488 from "code.google.com"...
200 OK, 579 bytes read from server (1021 uncompressed).
Getting user status at contest 1460488 from "code.google.com"...
200 OK, 105 bytes read from server (168 uncompressed).
Traceback (most recent call last):
File "./gcj_download_input.py", line 263, in <module>
main()
File "./gcj_download_input.py", line 208, in main
problem_input_state = problem_inputs[problem_index][input_index]
IndexError: list index out of range
Original issue reported on code.google.com by [email protected]
on 14 Apr 2012 at 10:35
What steps will reproduce the problem?
1. Put user email in user_config.py. Account with 2FA but without less secure
apps allowed.
2. Run gcj_init_contest.py.
3. Enter correct password.
What is the expected output?
Successfully logged into "code.google.com" with user "<username>"
Followed by initialization of contest
What do you see instead?
Traceback (most recent call last):
File "./gcj_init_contest.py", line 81, in <module>
main()
File "./gcj_init_contest.py", line 63, in main
contest_manager.Initialize(-1, contest_id, options.password)
File "/vagrant/command/lib/contest_manager.py", line 232, in Initialize
code_jam_login.Login(password)
File "/vagrant/command/lib/code_jam_login.py", line 306, in Login
_, cookie = MakeLogin(host, user, password)
File "/vagrant/command/lib/code_jam_login.py", line 160, in MakeLogin
host, 'HOSTED_OR_GOOGLE', user, password, 'ah', application_name, False)
File "/vagrant/command/lib/google_login.py", line 199, in Login
source)
File "/vagrant/command/lib/google_login.py", line 123, in _GetGoogleAuthtoken
response_dict = _ParseBodyAsDict(e.read())
File "/vagrant/command/lib/google_login.py", line 69, in _ParseBodyAsDict
return dict(line.split('=') for line in body.split('\n') if line)
ValueError: dictionary update sequence element #1 has length 5; 2 is required
Receive an email subject: "Google Account: sign-in attempt blocked"
Included in text: "You can switch to an app made by Google such as Gmail to
access your account (recommended) or change your settings at
https://www.google.com/settings/security/lesssecureapps so that your account is
no longer protected by modern security standards."
What version of the product are you using? On what operating system?
1.2-beta1, win8
Please provide any additional information below.
Workaround is to set my Google account so that it is no longer protected by
modern security standards.
Original issue reported on code.google.com by [email protected]
on 18 Mar 2015 at 1:11
Proofread of the README
Change "a confirmation" to "for confirmation".
Also, should line 158 be ".cpp, library.cpp, and library.cpp as the source
files" (include template.txt)?
"at which input has been solved" to "at which each input was solved" (the usage
of input for "correct outputs for a given input" is somewhat confusing, but
it's clear enough)
Original issue reported on code.google.com by [email protected]
on 21 May 2011 at 3:38
Attachments:
What steps will reproduce the problem?
1. Call program from another directory (e.g.
'../submitTool/gcj_init_contest.py')
What is the expected output? What do you see instead?
Error is expected (mentioned in documentation that scripts must be called from
the proper directory) -- I get an error message mentioning failure to find
config file. See below (additional information) for how I feel the program
should work & reasons why.
What version of the product are you using? On what operating system?
Beta2, linux x86 (Python 2.7.1)
Please provide any additional information below.
It would be more user-friendly if we could call the scripts from within the
source file directory (either typing in the relative path or using an alias).
This would obviate the need to configure the source file location, and
facilitate the submission of files from different directories corresponding to
different contests. The contest-id corresponding to a given source directory
could also be stored in a specially-named config file in that directory,
minimizing the configuration required to participate in a different contest.
IOW contest-specific configuration should be contained in the source directory
and located based on where the program is called from (+ an optional
commandline parameter) while site-specific configuration should stay where it
currently is.
I don't know Python but surely it's possible for the script to discover where
it is located in the filesystem and thus find the 'config' directory no matter
where it's called from?
Original issue reported on code.google.com by [email protected]
on 8 May 2011 at 4:36
What steps will reproduce the problem?
1. Make an incorrect submition for problem C-small of yesturday's round
What is the expected output? What do you see instead?
Only word Incorrect. But I got information like "In test 13 6-th can see 9-th
but should see 8-th".
What version of the product are you using? On what operating system?
Windows 7, version dowloadable in downloads, beta4.
But --version says 1.0-beta3.
Original issue reported on code.google.com by [email protected]
on 27 May 2012 at 6:12
Readme is permeated with many syntax and grammer errors
I can fix it and send a revised version if you guys want, but, then again I'll
bet google has at least one unemployed grammarian at any given time.
Original issue reported on code.google.com by [email protected]
on 8 May 2011 at 2:49
Mentions some way vaguely in the README but there's no further explanation.
Maybe you can default it to the current stage being run or something.
Original issue reported on code.google.com by [email protected]
on 11 May 2011 at 5:46
What steps will reproduce the problem?
1. Put user email in user_config.py
2. Run gcj_init_contest.py
3. Enter invalid password
What is the expected output?
"Invalid user email or password" error message
What do you see instead?
Traceback (most recent call last):
File "gcj\gcj_renew_login.py", line 79, in <module>
main()
File "gcj\gcj_renew_login.py", line 61, in main
code_jam_login.Login(options.password)
File "gcj\lib\code_jam_login.py", line 306, in Login
_, cookie = MakeLogin(host, user, password)
File "gcj\lib\code_jam_login.py", line 160, in MakeLogin
host, 'HOSTED_OR_GOOGLE', user, password, 'ah', application_name, False)
File "gcj\lib\google_login.py", line 199, in Login
source)
File "gcj\lib\google_login.py", line 125, in _GetGoogleAuthtoken
e.headers, response_dict)
File "gcj\lib\google_login.py", line 38, in __init__
self.reason = args["Error"]
AttributeError: can't set attribute
What version of the product are you using? On what operating system?
1.2-beta1, win7 x64
Original issue reported on code.google.com by [email protected]
on 16 Apr 2014 at 4:51
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 [email protected]
on 9 May 2011 at 11:30
What steps will reproduce the problem?
1. Put user email in user_config.py. Use one with enabled 2FA.
2. Run gcj_init_contest.py.
3. Enter correct password.
What is the expected output?
Prompt to enter 6-digit 2FA time/sms code.
What do you see instead?
Traceback (most recent call last):
File "gcj\gcj_renew_login.py", line 79, in <module>
main()
File "gcj\gcj_renew_login.py", line 61, in main
code_jam_login.Login(options.password)
File "gcj\lib\code_jam_login.py", line 306, in Login
_, cookie = MakeLogin(host, user, password)
File "gcj\lib\code_jam_login.py", line 160, in MakeLogin
host, 'HOSTED_OR_GOOGLE', user, password, 'ah', application_name, False)
File "gcj\lib\google_login.py", line 199, in Login
source)
File "gcj\lib\google_login.py", line 125, in _GetGoogleAuthtoken
e.headers, response_dict)
File "gcj\lib\google_login.py", line 38, in __init__
self.reason = args["Error"]
AttributeError: can't set attribute
What version of the product are you using? On what operating system?
1.2-beta1, win7 x64
Workaround.
Currently we have to use application-specific password for codejam-commandline,
https://accounts.google.com/b/0/IssuedAuthSubTokens?hide_authsub=1.
Original issue reported on code.google.com by [email protected]
on 16 Apr 2014 at 4:57
I would like to be able to get the example as if it was a set (I call it the
"micro" set) :
gcj_download_input.py A micro 0
I am not sure if it is possible, but it would be nice.
Original issue reported on code.google.com by [email protected]
on 20 May 2011 at 6:45
What steps will reproduce the problem?
1. unzip line-beginning-position
Instead of a folder being created, as expected, my current directory is spammed
with files.
Version 1.0-beta2.
Original issue reported on code.google.com by [email protected]
on 7 May 2011 at 1:28
What steps will reproduce the problem?
1. ./gcj_init_contest.py 1158485
What is the expected output? What do you see instead?
Getting middleware tokens from "code.google.com"...
500 Internal Server Error, 1339 bytes read from server (2972 uncompressed).
ServerError: Error while communicating with the server, cannot get middleware
tokens. Check that the host, username and contest id are valid.
What version of the product are you using? On what operating system?
GCJ Commandline submit tool, v1.0-beta4
Ubuntu 11.10
Please provide any additional information below.
The contest URL has changed:
- http://code.google.com/codejam/contest/dashboard?c=433101
+ http://code.google.com/codejam/contest/1158485/dashboard
Original issue reported on code.google.com by [email protected]
on 20 Mar 2012 at 3:41
There is some problems in the README file:
1. The version number being used is not up to date
The line number 1 "GCJ Commandline submit tool, v1.0-beta4".
The line number 28 "GCJ Commandline submit tool, v1.0-beta3"
2. The licencing information in the README (GPL) file and the project home page
(Apache) are not conform.
Original issue reported on code.google.com by [email protected]
on 14 Sep 2012 at 7:25
krka@kristofer:~/dev/codejam/2012-04-14$ ./gcj_init_contest.py 1460488
/usr/bin/env: python2: No such file or directory
Workaround: sudo ln -s /usr/bin/python /usr/bin/python2
Maybe mention this in the README?
Original issue reported on code.google.com by [email protected]
on 14 Apr 2012 at 10:38
What steps will reproduce the problem?
try to download the 4th problem in the qualification round
What is the expected output? What do you see instead?
file should be downloaded to input directory instead I get an error message
that .
What version of the product are you using? On what operating system?
windows 7
python 27
V1.0B2
Addition information:
Perhaps this was not reported because of issue #18
Original issue reported on code.google.com by [email protected]
on 15 Apr 2012 at 2:28
This would help in automating my submitting script
Original issue reported on code.google.com by [email protected]
on 6 Jun 2011 at 6:20
Since most of the participants are college students, it is recommended to have
the proxy support. I don't think it is implemented currently.
Original issue reported on code.google.com by [email protected]
on 13 Apr 2014 at 4:17
Good
Original issue reported on code.google.com by [email protected]
on 13 May 2011 at 8:59
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.