Giter VIP home page Giter VIP logo

dmoj / online-judge Goto Github PK

View Code? Open in Web Editor NEW
912.0 21.0 354.0 14.13 MB

A modern open-source online judge and contest platform system.

Home Page: https://dmoj.ca

License: GNU Affero General Public License v3.0

HTML 23.58% Python 67.88% CSS 0.35% JavaScript 2.98% Shell 0.04% SCSS 5.17%
python dmoj dmoj-judge programming-contests programming-challenge coding-interviews coding-competitions online-judge

online-judge's Introduction


DMOJ: Modern Online Judge

Build Status License

A modern open-source online judge and contest platform system. It has been used to host thousands of competitions, including several national olympiads.

See it live at dmoj.ca!

Features

  • Support for over 60 language runtimes
  • Highly robust judging system:
    • Supports interactive and signature-graded tasks
    • Supports runtime data generators and custom output validators
    • Specifying per-language resource limits
    • Capable of scaling to hundreds of judging servers
  • Extremely configurable contest system:
    • Supports ICPC/IOI/AtCoder/ECOO formats out-of-the-box
    • System testing supported
    • Hidden scoreboards and virtual participation
    • Elo-MMR-style rating
    • Plagiarism detection via Stanford MOSS
    • Restricting contest access to particular organizations or users
  • Rich problem statements, with support for LaTeX math and diagrams
    • Automatic PDF generation for easy distribution
    • Built-in support for editorials
  • Live updates for submissions
  • Internationalized site interface
  • Home page blog and activity stream
  • Fine-grained permission control for staff
  • OAuth login with Google, Facebook, and Github
  • Two-factor authentication support

Installation

Check out the install documentation at docs.dmoj.ca. Feel free to reach out to us on Discord if you have any questions.

Screenshots

Sleek problem statements

Problems are written in Markdown, with LaTeX-enabled math and figures, as well as syntax highlighting. Problem statements can be saved to PDF for ease of distribution to contestants.

Submit in over 60 languages

Contestants may submit in over 60 programming languages with syntax highlighting. Problem authors can restrict problems to specific languages, and set language-specific resource limits.

Live submission status

Submission pages feature live updates, and submissions may be aborted by both submission authors and administrators. Compilation errors and warnings for a number of languages feature color highlighting.

Global, per-problem, and per-contest submission lists are live-updating, and can be filtered by status and language.

Extensible contest system

Contests feature an optional rating system, and can be configured to run in any timeframe. Users are also able to participate virtually after the contest ends. ICPC, IOI, AtCoder, and ECOO contest formats are supported out-of-the-box, and new formats can be added with custom code.

Contests may be limited to particular organizations, or require access codes to join. Hidden scoreboards are supported. The contest system integrates with Stanford MOSS to provide plagiarism checking. Editorial support is built-in, and editorials are automatically published once a contest ends.

Home page blog and activity stream

Announcements from administrators, ongoing contests, recent comments and new problems are easily accessible from the home page.

Internationalized interface

Use the site in whatever language you're most comfortable in โ€” visit translate.dmoj.ca to check the translation status of your preferred language. Problem authors can provide statements in multiple languages, and DMOJ will display the most relevant one to a reader.

Highly featured administration interface

The DMOJ admin interface is highly versatile, and can be efficiently used for anything from managing users to authoring problem statements.

Supported languages

Check out DMOJ/judge-server for more judging backend details.

Supported languages include:

  • C++ 11/14/17/20 (GCC and Clang)
  • C 99/11
  • Java 8-22
  • Python 2/3
  • PyPy 2/3
  • Pascal
  • Mono C#/F#/VB

The judge can also grade in the languages listed below:

  • Ada
  • Algol 68
  • AWK
  • COBOL
  • D
  • Dart
  • Fortran
  • Forth
  • Go
  • Groovy
  • GAS x86/x64/ARM
  • Haskell
  • INTERCAL
  • Kotlin
  • Lua
  • LLVM IR
  • NASM x86/x64
  • Objective-C
  • OCaml
  • Perl
  • PHP
  • Pike
  • Prolog
  • Racket
  • Ruby
  • Rust
  • Scala
  • Chicken Scheme
  • sed
  • Steel Bank Common Lisp
  • Swift
  • Tcl
  • Turing
  • V8 JavaScript
  • Brain****
  • Zig

online-judge's People

Contributors

balint-r avatar carson-tang avatar dmoj-build avatar ehhthing avatar faiyaz26 avatar fataleagle avatar fherstk avatar flatpaper avatar fluix-dev avatar injust avatar int-y1 avatar jtyliu avatar kevinjycui avatar kiritofeng avatar leduythuccs avatar ninjaclasher avatar outloudvi avatar peiallen avatar phoenix1369 avatar puffyshoggoth avatar quantum5 avatar riolku avatar slightlyskepticalpotat avatar subramanian0 avatar vdanciu avatar walle256 avatar wesley-a-leung avatar xiaowuc1 avatar xyene avatar zecookiez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

online-judge's Issues

Judge Pools

Ability to specify which pool of judges should judge a particular problem, to ensure consistent timings.

Organization Rankings

May be we should add total points to organization page.

Total problem count is considered but implementation could not be efficient.

Rating and medals

Contest rating and/or medals would be a nice incentive for people to actually participate.

Show problem type checkbox on problem page

Checkbox defaulted to false to avoid spoils; useful for teachers. Checking it should add another column to the table.

That field is ManyToMany, implementation should not cause one query per row. That page is already slow enough as it with only one query for the entire table.

Dynamic Updates on Filtered Submission Views

Currently only the main submission view is auto updated. All other ones are not. This change requires the event server to send the problem and user id, in order that the JS can know which submissions to retrieve and add.

Event Socket Server Race

Closes file handles on error conditions despite being in use.

Traceback (most recent call last):

  File "/code/site/judge/bridge/judgelist.py", line 23, in _handle_free_judge
    judge.submit(id, problem, language, source)

  File "/code/site/judge/bridge/judgehandler.py", line 124, in submit
    'short-circuit': short,

  File "/code/site/event_socket_server/helpers.py", line 35, in send
    self._send(size_pack.pack(len(data)) + data, callback)

  File "/code/site/event_socket_server/handler.py", line 17, in _send
    return self.server.send(self, data, callback)

  File "/code/site/event_socket_server/base_server.py", line 146, in send
    self._send_queue[client.fileno()].append(SendMessage(data, callback))

  File "/code/site/event_socket_server/handler.py", line 11, in fileno
    return self._socket.fileno()

  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)

  File "/usr/lib/python2.7/socket.py", line 170, in _dummy
    raise error(EBADF, 'Bad file descriptor')

error: [Errno 9] Bad file descriptor

Fatal Judge Shutdown Error

Removing a dead judge should not involve taking down the bridge.

Traceback (most recent call last):

  File "/code/site/judge/bridge/judgehandler.py", line 165, in packet
    handler(data)

  File "/code/site/judge/bridge/judgecallback.py", line 85, in on_grading_end
    super(DjangoJudgeHandler, self).on_grading_end(packet)

  File "/code/site/judge/bridge/judgehandler.py", line 187, in on_grading_end
    self._free_self(packet)

  File "/code/site/judge/bridge/judgehandler.py", line 237, in _free_self
    self.server.judges.on_judge_free(self, packet['submission-id'])

  File "/code/site/judge/bridge/judgelist.py", line 57, in on_judge_free
    self._handle_free_judge(judge)

  File "/code/site/judge/bridge/judgelist.py", line 26, in _handle_free_judge
    self.judges.remove(judge)

KeyError: <judge.bridge.judgecallback.DjangoJudgeHandler object at 0x22a9e10>

Select2 widget width

Select2 widgets in the admin have the wrong width (compared to other widgets) and it is impossible to operate at the default width.

Django 1.7

We have been stuck on django 1.6 for far too long, mainly because openshift doesn't support python 2.7, prerequisite for django 1.7. But now we are no longer tied to openshift, we should try to upgrade to 1.7. At the very least, #29 can be completed.

License model

For wherever we need to link licenses, it would be good to have them on-site along with a link off-site to their official pages.

References #43

P or C submission state for processing/compiling

Currently, even after the judge acknowledges the submission and starts handling it, until execution is ready, the submission is always in the QU state, making it hard to know what's actually happening, made worse by slow generators. Proposal is for judgecallback.py to override on_submission_acknowledged and perform required operations.

The current judge contain contains a state called compiled, which is never used and its name is misleading. A code of P is recommended because not all language compiles, and that it is no substring of any other code. Substring is bad because of this optimization:

if submission.status in 'QUGCEIEAB'

Free Start Auto-Start

Unchecking free start to put a free start in the upcoming contests section and checking it before anyone joins when it actually starts is really tedious.

Hacks

Ability to hack incorrect submissions on a contest and on the main judge.

After hacking, admin can choose to manually add hack to main tests. List of hacks page like submissions page would be good.

Logo standardization

Currently the DM::OJ banner displayed is text, and though a font is specified the banner looks horrible with some fonts (such as those where the J extends below the O by half its length). An image banner would work, but not handle resizing well.

Maybe a custom font?

Option to download user submission data

Though unlikely, it is possible that we may at any time lose portions of our database to unforeseen bugs. Or that we may be asked by regional contest organizers to remove their problems from the DMOJ if/when they develop their own OJ (funding et al.)

When this happens, it would be highly inconvenient to those who have submitted those problems to have to visit each problem and save their source. In general, a backup feature located on the users page would be useful in the long run.

It would operate with two options: Backup all and Backup best. Based on the option, a zip/tar file would be generated and the user would be able to download it. Very convenient!

This feature could be extended to include a Download option on submission pages.

Comments on Solutions or FlatPages in General

Possible implementation idea includes introducing a new Solution view, possibly with its own model, that leverages our commenting system.

Another idea could be replacement flatpage views and middleware which actually have working comments.

Either way the implementation shouldn't be too hard. (famous last words)

"Judge Seems Dead"

Random errors about judges being dead, e.g. Judge seems dead: Iodine: 49880. Happens after wrong acknowledge for this iodine case.

Different cause on Berlin:

INFO 2015-02-26 00:57:23,299 judgelist Queued submission: 48558
INFO 2015-02-26 00:57:26,220 judgelist Dispatched queued submission 48558: Berlin
ERROR 2015-02-26 00:58:04,988 judgehandler Judge seems dead: Berlin: 48558

Uncleaned `wbox` accounts

When wbox crashes, its generated accounts are never cleaned. They should be cleaned the next time the judge boots.

C:\Users\Tudor>net user

User accounts for \\BERLIN

-------------------------------------------------------------------------------
Administrator            Guest                    Tudor
-----------              wbox0000000000c6afaf     wbox0000000001871be0
wbox00000000018a93b8     wbox000000000191d021     wbox0000000001aa8ccc
wbox0000000001b196a0     wbox000000000ace72e2     wbox000000000b23e734
wbox000000000b296475     wbox000000000b324dc7     wbox000000000ba9c9f5
wbox000000000bb804e8     wbox000000000bbb3434
The command completed successfully.

Pagination of User and Problem Pages

As the size of these pages continue to grow, sooner or later they will impossible to send as one page. I suggest we start to encode various sorting options in the URL in anticipation of pagination, and may be experiment pagination on the users page.

Virtual Participation

For those people always complaining DMOPC starts too early, allow people to start at both a fixed time or at their own time. Possibly separate scoreboards for both kinds of people, or merge them both with a special indicator for virtual participants (like a small tick next to their handle). Check out virtual participation from http://codeforces.com/contests for ideas.

Admin Resubmit Other User's Submissions

I recall that @FatalEagle really wants to resubmit other people's submissions so he doesn't have to copy and paste. This could be arranged.

Implementation:

  • One resubmit_other permission.
  • The submit view should not 403 with that permission.
  • The UI shows resubmit for those with permission.

Editable comments and revisions

Since django-reversion is pulled in due to #29, we can now use it to implement comment editing and public history. This has in fact been long promised.

Remove legacy package name `dmopc`

Remove all instances of the string dmopc in the site since it's now the DMOJ, not just some code to run the monthly DMOPC contest.

Translation: massive s/dmopc/dmoj/g crusade.

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.