Timus's blog

By Timus, 12 years ago, translation, In English

Hello,

I have decided to filter problems on CF (e.g. only Div. 1 A tasks). There is no such function in the problemset. So I decided to write a small script. I am going to share it with you: GitHub

It is very easy to use it: python filter.py (Requires Python 2.7, requests, json). You can change the language of the script to English (comment the line #7 and uncomment the line #8). Script creates some files (problems.list, contests.list etc). I've made it to decrease the load to Codeforces. Only tasks in "Div. 1 Only" or "Div. 2 Only" (with standart CF rules) are considered.

The following page will be opened at the end:

I don't want to make changes to this script. Please feel free to perform any kind of changes:)

  • Vote: I like it
  • +165
  • Vote: I do not like it

| Write comment?
»
12 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Thanks for the script, I am having a little problem.
After execution completes ,I get the page like this(picture attached), with Problem titles as
"Трамвай" for Tram. Is this some Unicode problem??
I am using Ubuntu 14.04 64-bit.

»
12 years ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

That's what I really needed :) Thank you!

»
12 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I downloaded Python 2.7, how do I get requests and json if I am using windows?

»
7 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

It seems that this script does not work anymore. I start to get the following error since recently.

Handle: lzhang Loading submissions for handle lzhang ... Traceback (most recent call last): File "filter.py", line 123, in problems_status = get_problems_status(submissions) File "filter.py", line 92, in get_problems_status verdict = submission["verdict"] KeyError: 'verdict'

I guess there is an update in codeforces website that breaks the script?