Timus's blog

By Timus, 4 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

»
4 years ago, # |
  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.

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it +8 Vote: I do not like it

    I think you haven't changed domain(in script) to .com and you see problem names in russian

    • »
      »
      »
      4 years ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      I have changed to "com", and Tram in Russian isТрамвай.
      There are some words in English also on this page along with those Unique ones.

      • »
        »
        »
        »
        4 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Oh, I see. I checked it and problem is in browser. I set 'utf-8' in chromium settings and now everything works fine for russian.
        Also I think you've changes domain, but after script has already cached problem names in russian:)

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +4 Vote: I do not like it

    Offtop. How did you change the interface of Ubuntu?

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

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

»
4 years ago, # |
  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?

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    you should install pip2.7 first (HOWTO)

    then execute "C:\python27\pip2.7 install requests" where C:\python27 is the directory with python installed

    as far as i know json is included into python2.7 default modules

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

What should I type in when it appears "Handle: "??