CodeChef Rating Predictor using Python3

Can someone generate the file for division 2. Mine is processing very slowly with a large number of network errors between the actual parsing.

Distributed web scraping could result in DoS.
I would suggest to do it once just after the contest by someone interested and post it as a topic in here.
Predicting rating changes during the contest is not so fair.
That might be the reason why CodeChef restricted its API.

1 Like

yes, plz post list of div2 too

Hello Everyone, Me and @anon73162591 have worked on a much faster and efficient approach to this. I am yet to integrate the changes in the main codebase. I was working on something else but I will make the changes before this weekend for sure. Also the we have replaced PyQt with normal python requests so after the next updates the Network error issue should also be resolved.

2 Likes

How do you bypass ā€˜hold right there sparkyā€™ page?

When will cook off rating be updated?

The new method wonā€™t exactly parse/scrape the ranklist from web.

1 Like

when do you guys push the updated code in the github repository?

@ankurkayal by Friday this week

Oh cool!

1 Like

I have made the required changes. Now it works a lot faster and contests with around 3000 participants can be done within 4-5 mins.

P.S.
If anyone can help me parse the ranklist for a given contest without using PyQt please comment.
I cannot run multiple threads with PyQt WebEngine for some reason.

Also I would like to thank @anon73162591 and @anon96721856 for helping me with this project.

3 Likes

Where can i find the new predictor as you have not updated it on github yet?

Itā€™s available on github.

You donā€™t need to run for every contest. For the start, you can add cron jobs to add 3 monthly contests of codechef such that they are added in contest list every month automatically and old data is deleted. You need to delete old data for few reasons like you donā€™t want to waste your processing power for old contests and moreover most online free DBs like mLab have limit of 512Mb or less so you canā€™t store that many contests.

Hereā€™s how my cron jobs were for another predictor.

Here is the reason - https://blog.codechef.com/2020/01/20/api/

1 Like

Iā€™m facing a few problems, all imports related to PyQt5 arenā€™t working, Iā€™ve tried out most of the fixes suggested on stackoverflow, and still couldnā€™t get it to work.

Iā€™ve wasted enough time on it already, could you help me with this:

Traceback (most recent call last):
  File "main.py", line 6, in <module>
    from ranklist_parser import RankListParser
  File "/home/i_64/codechef_rating_v0-master/ranklist_parser.py", line 6, in <module>
    from page import Page
  File "/home/i_64/codechef_rating_v0-master/page.py", line 2, in <module>
    from PyQt5.QtWebEngineWidgets import QWebEnginePage
ModuleNotFoundError: No module named 'PyQt5'

Iā€™ve triedinstalling and uninstalling the packages, and I found out these modules, which python canā€™t find have been moved to separate packages, soI tried installing that too, but it didnā€™t work.

If someone gets this script to work, just let me know, or atleast send the csv for current contest.

Thanks :slight_smile:

Its not working as i am not able to find my name in generated list.

I canā€™t get mine even working. Did you got errors?

How did you get it to work, or even forget that

Could you just post the CSV here please?

sorry i deleted it.