+
Skip to content

sleepymole/vjudge

Repository files navigation

vjudge

A virtual judge based on scu and hdu online judge.

Prerequisite

  • redis
  • python (3.7+)
  • database (sqlite3 or mysql)

Quick Start

  1. Clone the repository.
git clone https://github.com/gozssky/vjudge.git
  1. Install dependencies. It's recommended to use a virtual environment like virtualenv.
pip install -r requirements.txt
  1. Prepare a configuration file in working directory.

config-example.yml is a sample configuration file. You can copy it to config.yaml and modify it.

  1. Initialize the database.
python init_db.py
  1. Start the server.
python run.py

You can access the server at http://localhost:8080/. The default password for admin is 123456. Please change it immediately.

Note that only moderate or higher role can register new users. You must login to admin or user with moderator role first, and then open http://localhost:8000/auth/register to register a new user. It's ugly. We will support a better way like invitation code in the future.

Background Jobs

There are three background jobs in server.

  • refresh_problem_all: This job is used to refresh problem data from scu and hdu online judge. It is scheduled to run every day at 13:13 and 22:13 in UTC.

  • update_problem_all: This job is used to update problem data in database. It is scheduled to run every day at 13:29 and 22:29 in UTC.

  • refresh_recent_contest: This job is used to refresh recent contest data from hdu online judge. It is scheduled to run every 5 minutes.

These scheduled jobs are not able to configure by config file yet. If you want to change the schedule, you can modify the AppConfig in config.py.

About

SCU Virtual Judge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载