A full fledged working website made using django framework aimed at able to show list of Practice Questions for enhancing Competitive Coding skills and rank the registered users based on the number of Questions solved by them. Specific ranks are not given, so that it encourages students to not secure good rank but allowing them to focus more on the question solving part.
- Django V3.0
- Python V3.8
- JavaScript
- BootStrap V4.5
- Cron [ Software utility in UNIX-like computer operating systems which sets up a cron job ]
- Get yourself registered and only #AhmedabadUniversity Students are allowed to register.
- Solve handpicked #Codeforces questions by our brilliant committee members.
- See your name on the leaderboard and keep track of the number of questions solved.
- As we were supposed to deploy this whole django project, and lederboard needs to be refreshed every 10 minutes which was not possible to do it because of long response time of the leaderboard update algorithm (because it checks all submissions of all the users and then count the accepted verdicts in all the submissions and all this takes place for more than 90 users).
We have brought whole time consuming process of leaderboard updation to our local system and then updating the django backend which in turn reflect changes on to the website.
-
Cron job is a time-based job scheduler in Unix-like computer operating systems.
-
Below are the steps to setup cron job.
- First write below to open system file (edit this file to introduce tasks to be run by cron) in nano editor
crontab -e
- Then, add below line to run it periodically (runs every 10 minutes)
*/10 * * * * python /path/to/cron/job/file/fetch_user.py >> /path/to/log/file/logfile.log
- Whole above shown process takes place on the local system [ through running fetch_user.py file ] and the cron job is set which repeats the process.