Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 20 09:22
    josalhor closed #1123
  • Nov 20 09:22
    josalhor commented #1123
  • Nov 20 08:49
    wil93 commented #1123
  • Nov 19 16:53
    codecov[bot] commented #1143
  • Nov 19 16:52
    codecov[bot] commented #1143
  • Nov 19 16:43
    stefano-maggiolo edited #1143
  • Nov 19 16:43
    wil93 opened #1143
  • Nov 11 18:20
    edomora97 edited #1142
  • Nov 11 17:54
    codecov[bot] commented #1142
  • Nov 11 17:52
    codecov[bot] commented #1142
  • Nov 11 17:43
    stefano-maggiolo edited #1142
  • Nov 11 17:42
    edomora97 opened #1142
  • Oct 30 13:18
    codecov[bot] commented #1141
  • Oct 30 13:16
    codecov[bot] commented #1141
  • Oct 30 13:04
    codecov[bot] commented #1141
  • Oct 30 13:04
    edomora97 synchronize #1141
  • Oct 30 08:54
    codecov[bot] commented #1141
  • Oct 30 08:52
    codecov[bot] commented #1141
  • Oct 30 08:42
    codecov[bot] commented #1141
  • Oct 30 08:42
    edomora97 synchronize #1141
Mark Dustin
@mark_dustin_gitlab
I have to setup a cms, i have nothing but heroku, the time is so less, I'm getting no idea, how and where to start. I know this is so dumb and stupid. But please, i'm feeling helpless. Can anybody help me out with a guideline?
Stefano Maggiolo
@stefano-maggiolo
just to make sure, you're talking about CMS, a grader for programming competition or a cms (content management system)?
if the former, please follow https://cms.readthedocs.io/en/v1.4/, if the latter you're in the wrong place
Mark Dustin
@mark_dustin_gitlab
no sir i'm talking about cms which is used in ioi, yes
Stefano Maggiolo
@stefano-maggiolo
ok, sorry about that
then please try to follow the documentation
Mark Dustin
@mark_dustin_gitlab
i read all this, but i think heroku platform is bit different, isn't it?
Stefano Maggiolo
@stefano-maggiolo
I never tried it, but I think I remember somebody using it
anyway, I expect that if you're careful enough to make sure the versions of python and packages are as expected, it should be fine
Edoardo Morassutto
@edomora97
@stefano-maggiolo good idea mocking getaddrinfo as well, implemented and added to the pull-request. Now all the tests pass!
Stefano Maggiolo
@stefano-maggiolo
great
Huseyn Hajiyev
@computerbox_gitlab
hi ! sorry for interrupt . can someone provide me an example how to write checker ?
checker is comparator for output in cms

include <bits/stdc++.h>

include "testlib.h"

using namespace std;

string a, b;

bool is_contains(string a, string b) {
string s = b + "#" + a;
int n = (int) s.length();
vector<int> pi (n);
for (int i=1; i<n; ++i) { int j = pi[i-1]; while (j > 0 && s[i] != s[j])
j = pi[j-1];
if (s[i] == s[j]) ++j;
pi[i] = j;
if (j == b.length()) return true;
}
return false;
}

inline string readAndCheckAnswer(InStream& in) {
string result = in.readLine("[a-z]{1,200000}");
if (is_contains(result, a) && is_contains(result, b)) {
return result;
} else {
in.quitf(_wa, "Output doesn't contain one of the strings.");
}
}

int main(int argc, char* argv[]) {
registerTestlibCmd(argc, argv);
a = inf.readLine();
b = inf.readLine();
string ja = readAndCheckAnswer(ans);
string pa = readAndCheckAnswer(ouf);
if (ja.length() == pa.length()) {
quitf(_ok, "Participant answer: %s", pa.c_str());
} else {
quitf(_ok, "Jury answer: %s\nParticipant answer: %s", ja.c_str(), pa.c_str());
}
}

something like this is right ?
Andrey Vihrov
@andreyv
If you upload the checker manually and it doesn't work, then check that you use CMS's patched version and build with -DCMS
Huseyn Hajiyev
@computerbox_gitlab
thanks
IlleQuiProgrammat
@IlleQuiProgrammat
Hey so I'm currently attempting to set up my contest server and I've been running into a few issues
  • stats are not updating on the admin page
  • the ranking server doesn't want to accept the login
(error code 400)
many thanks
FYI everything is on one box
Stefano Maggiolo
@stefano-maggiolo
@IlleQuiProgrammat my money on you using Python 3.5
update to 3.6 and it should work
99044079
@99044079
Hi all
sudo cmsInitDB don't working
help me
[SQL: '\nCREATE TABLE datasets (\n\tid SERIAL NOT NULL, \n\ttask_id INTEGER NOT NULL, \n\tdescription VARCHAR NOT NULL, \n\tautojudge BOOLEAN NOT NULL, \n\ttime_limit FLOAT CHECK (time_limit > 0), \n\tmemory_limit BIGINT CHECK (memory_limit > 0), \n\ttask_type VARCHAR NOT NULL, \n\ttask_type_parameters JSONB NOT NULL, \n\tscore_type VARCHAR NOT NULL, \n\tscore_type_parameters JSONB NOT NULL, \n\tPRIMARY KEY (id), \n\tUNIQUE (task_id, description), \n\tUNIQUE (id, task_id), \n\tFOREIGN KEY(task_id) REFERENCES tasks (id) ON DELETE CASCADE ON UPDATE CASCADE\n)\n\n']
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
context)
File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/default.py", line 470, in do_execute
cursor.execute(statement, parameters)
psycopg2.ProgrammingError: type "jsonb" does not exist
LINE 10: task_type_parameters JSONB NOT NULL,
99044079
@99044079
cms is working. However, there is an error adding a task
please help me
Stefano Maggiolo
@stefano-maggiolo
what version of postgres do you have?
jsonb only exists in version 9.4
Andrey Vihrov
@andreyv
Any hope in getting this merged? cms-dev/cms-dev.github.io#15
Edoardo Morassutto
@edomora97
hey! another patch for you cms-dev/cms#1142
Today there was the first round of OIS (the Italian Olympiads in Teams) and for the first time we had to split the contest between first 2 years and last 3 of high school. We used multicontest in order to share the workers between the two contests, but ProxyService messed things up a bit. The rankings were live but without some submissions, after some debugging we found out that PS was not filtering well the submissions of his contest, and because of that it was sending invalid data to RWS, the details are explained in the pull-request.
Not 100% sure this is the correct fix, but we had to hide the ranking for quite a while because of the mistakes there were... If you have better solutions I'm all ears!
Edoardo Morassutto
@edomora97
Oh, so it was a "known" problem. Too late I suppose? In any case my patch should be less intrusive, even if less powerful
Andrey Vihrov
@andreyv
Sure, just adding that link for context
Edoardo Morassutto
@edomora97
yeah thanks for that, didn't know about that PR. I referenced it from mine for completeness too
Mihail Croitor
@mcroitor
hey, hello! i need your help: the AWS doesnt see any service started. I've checked opened ports:
netstat -plunt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:28000         0.0.0.0:*               LISTEN      32097/python3
tcp        0      0 127.0.0.1:25123         0.0.0.0:*               LISTEN      32127/python3
tcp        0      0 127.0.0.1:21000         0.0.0.0:*               LISTEN      32125/python3
tcp        0      0 127.0.0.1:25000         0.0.0.0:*               LISTEN      32126/python3
tcp        0      0 127.0.0.1:21100         0.0.0.0:*               LISTEN      29756/python3
tcp        0      0 127.0.0.1:26000         0.0.0.0:*               LISTEN      32130/python3
tcp        0      0 127.0.0.1:22000         0.0.0.0:*               LISTEN      32124/python3
tcp        0      0 127.0.0.1:26001         0.0.0.0:*               LISTEN      32131/python3
tcp        0      0 127.0.0.1:26002         0.0.0.0:*               LISTEN      32132/python3
tcp        0      0 127.0.0.1:26003         0.0.0.0:*               LISTEN      32133/python3
tcp        0      0 127.0.0.1:28500         0.0.0.0:*               LISTEN      32129/python3
tcp        0      0 127.0.0.1:26004         0.0.0.0:*               LISTEN      32134/python3
tcp        0      0 127.0.0.1:26005         0.0.0.0:*               LISTEN      32135/python3
tcp        0      0 127.0.0.1:26006         0.0.0.0:*               LISTEN      32136/python3
tcp        0      0 127.0.0.1:26007         0.0.0.0:*               LISTEN      32137/python3
tcp        0      0 127.0.0.1:28600         0.0.0.0:*               LISTEN      32128/python3
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      1500/postgres
tcp6       0      0 :::8888                 :::*                    LISTEN      32125/python3
tcp6       0      0 ::1:5432                :::*                    LISTEN      1500/postgres
tcp6       0      0 :::8889                 :::*                    LISTEN      29756/python3
As you can see, AWS works with IPv6, all other services is on IPv4. Is this the problem for connection establishing? If it is, how I can solve this? Thank you
Mihail Croitor
@mcroitor
thank you, i solved the problem. it was very sophisticated iptables default rules
Andrey Vihrov
@andreyv
I tested -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC with OpenJDK 11. In my experiments it seemed to perform slower than -XX:+UseSerialGC, and used twice as much memory. Not sure what's up with that when it's supposed to be faster.
colll78
@colll78
So cmsScoringService is supposed to update the contest webserver with the submissions scores correct?
For me, in the console it gives operation 'scoring submission x on dataset y' completed successfully
but the webserver still says score: N/A
Stefano Maggiolo
@stefano-maggiolo
might be that the contest configuration doesn't allow contestants to see the score
there's a ranking in AWS that should display all the scores