Coder Social home page Coder Social logo

Python support about hustoj HOT 19 CLOSED

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
Python support

from hustoj.

Comments (19)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
from judge_client.cc to web/status.php and others 
a lot of files need to be modify
i may do that later, but if you are in a hurry, try first update to the latest 
SVN version for Ruby and Bash support ,after that you can try to do that by 
refering to the ruby support code.

Original comment by [email protected] on 8 Feb 2011 at 3:36

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
Python should works now

if you'd like to know the procedure 
check wiki [AddProgrammingLanguage]

Original comment by [email protected] on 8 Feb 2011 at 6:47

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
How can i add mono c# to this system ?
I read wiki section but i couldn't understand the settings of the 
judge_client.cc Please describe it a bit more.

Original comment by hamidrezaabdi on 8 Feb 2011 at 9:55

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
1 you need a a+b program written in c#
2 you need to figure out which files is needed to run this program
3 using strace to collect all sys_calls needed by the program
4 edit judge_client.cc on all point listed in AddProgrammingLanguage

using root account to debug/step trace judge_client in codeblocks may help you 
on understanding the routine of judge_client.

if you have any questions , post it here with the code line number, i'll try to 
explain it or add comments to the code in svn.

Original comment by [email protected] on 8 Feb 2011 at 2:35

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
click on rXXX and then click diff will show the code added/modified exactly.

Original comment by [email protected] on 8 Feb 2011 at 2:37

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
the python language results wrong answer instead of compile error.
how can i solve this problem.

Original comment by hamidrezaabdi on 14 Feb 2011 at 12:00

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
i wonder if python is a compilable language ?

Original comment by [email protected] on 15 Feb 2011 at 4:19

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
hamidrezaabdi may want to detect syntax error in a submission file

You can check syntax of a python code following command line:
python -c "import py_compile,sys; sys.stderr=sys.stdout; 
py_compile.compile(r'Main.py')"

Original comment by method4libe on 15 Feb 2011 at 4:32

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
[deleted comment]

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
try r777

Original comment by [email protected] on 15 Feb 2011 at 6:16

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
Does it works well? It doesn't works well in my server.

Here's debug message of the judge_client(r777):

root@lavidaus:/home/judge/run0# judge_client 57316 0 /home/judge 0
sim=0
Main=Main.pytime: 3 mem: 640
status=0
mkdir: cannot create directory `/home/judge/run0//lib': File exists
mkdir: cannot create directory `/home/judge/run0//bin': File exists
cp: omitting directory `/lib/dbus-1.0'
cp: omitting directory `/lib/firmware'
cp: omitting directory `/lib/hdparm'
cp: omitting directory `/lib/init'
cp: omitting directory `/lib/lsb'
cp: omitting directory `/lib/modules'
cp: omitting directory `/lib/plymouth'
cp: omitting directory `/lib/security'
cp: omitting directory `/lib/terminfo'
cp: omitting directory `/lib/udev'
cp: omitting directory `/lib/ufw'
cp: omitting directory `/lib/xtables'
ln: creating symbolic link `/home/judge/run0//bin/sh': File exists
mkdir: cannot create directory `/home/judge/run0//usr': File exists
mkdir: cannot create directory `/home/judge/run0//usr/lib': File exists
init_call_counter:6
pid=21567 judging /home/judge/data/1000/test.in
[ERROR] A Not allowed system call: runid:57316 callid:14

WTERMSIG=9
Killed
mv: target `/home/judge/run0/log/' is not a directory
result=10

Original comment by method4libe on 17 Feb 2011 at 12:55

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
what code in the solution was written?
what distribution and python version are you running?
you might need to add coe in okcalls.h for 64-bits system, because i don't have 
a 64 bits system to debug with, ruby bash python do not support 64-bits yet.

Original comment by [email protected] on 17 Feb 2011 at 2:40

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
using strace to collect all sys_calls needed by the program
and add them into okcalls.h for 64bits
like:   callid:14
add to okcalls.h :
#ifdef __i386
....
#else
.....
int LANG_YV[256]={14,0};
int LANG_YC[256]={-1,0};
#endif

Original comment by [email protected] on 17 Feb 2011 at 6:31

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
[deleted comment]

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
[deleted comment]

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
just follow AddProgrammingLanguage 
do the first two steps

ON A 64-bits system

Original comment by [email protected] on 17 Feb 2011 at 2:17

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
I just applied the your method but It doesn't works.

I tried to find reason for the problem but I couldn't found resolution method.

anyway I just found size of user.out and error.out in runX directory were 0 
after judging process finished.

Original comment by method4libe on 1 Mar 2011 at 6:52

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
would you like to post your 64-bits version of okcalls.h here?
especially the section:
#else
...
int LANG_YV[256]={...,0};
int LANG_YC[256]={...,0};
#endif

and run debug again
judge_client 57316 0 /home/judge 0
post the output too

Original comment by [email protected] on 2 Mar 2011 at 12:13

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024

Original comment by [email protected] on 16 Jul 2011 at 3:06

  • Changed state: Done

from hustoj.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.