Блог пользователя Mindeveloped

Автор Mindeveloped, история, 5 часов назад, По-английски

I made my own script to filter problems in CF problemset. If such script with same function already exists you can ignore my post or downvote it.

This is a python 3 script that fetches all problems from CF problemset and allows custom filtering. It supports custom filter criteria in python expression format. After you input the filter function, it filters the problems and choose a random one. More details can be found in spoilers below.

Filter Expression
Code
  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

»
3 часа назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

It does works well but sometimes it shows me this image

else it works fine sometimes

image

  • »
    »
    3 часа назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    can you show what is your filter expression in the first case

    • »
      »
      »
      107 минут назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      I don't remember the exact filter expression.But this happens quite freqently image Also sometimes it gives the output after a lot of errors image

      • »
        »
        »
        »
        101 минуту назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        Um. It seems that the pyjson module has some problems analyzing the json object received from Codeforces AI and making random fields None. What version of Python are you using now? Is there any problem with your internet connection (in case the data received might be altered)? I'm using Python 3.12 official distribution with pip install pyjson and never encountered this problem.

        • »
          »
          »
          »
          »
          97 минут назад, # ^ |
          Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

          I am using 3.12.2

          image

          • »
            »
            »
            »
            »
            »
            93 минуты назад, # ^ |
              Проголосовать: нравится 0 Проголосовать: не нравится

            Then I have no idea.

  • »
    »
    3 часа назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    inspired me to add an error handling in the evaluating part, thanks