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

Автор Egor, история, 23 месяца назад, По-английски

Hello!

I am introducing a new tool for competitive programming—submitter. It does just that, submits your solution to supported online judges and displays results, all (mostly) from the comfort of your command line. I've completely rewritten it to get rid of using Selenium.

Installation

Pre-built binaries

Grab the latest binary for your platform from the releases page:

  • Linux (Debian/Ubuntu): submitter_<version>_amd64.deb — sudo dpkg -i submitter_*.deb
  • macOS (Apple Silicon): submitter-<version>-aarch64-macos.dmg — open and copy submitter to a directory on your PATH. The binary is unsigned; on first launch, right-click → Open to bypass Gatekeeper.
  • Windows: submitter-<version>-x86_64-windows.exe — place anywhere on your PATH.

From source

You would need rust

cargo install --git https://github.com/EgorKulikov/submitter

Usage

submitter <task url> <language> <path to solution>
submitter login <site>

Credentials are prompted on first use and saved for subsequent runs. Use submitter login <site> before a contest starts to pre-authenticate.

Supported sites

At the moment the following is supported:

  • Codeforces (you need to submit with opened window, but then status is displayed in console)
  • AtCoder (you need to submit with opened window, but then status is displayed in console)
  • Luogu (you need to submit with opened window, but then status is displayed in console)
  • Codechef
  • Yandex Contest
  • Universal Cup/UOJ
  • Toph.co
  • EOlymp
  • Kattis
  • CodeRun
  • KEP.uz
  • Repovive
  • Проголосовать: нравится
  • +193
  • Проголосовать: не нравится

»
23 месяца назад, скрыть # |
 
Проголосовать: нравится +46 Проголосовать: не нравится

Over-engineering at its finest

»
23 месяца назад, скрыть # |
 
Проголосовать: нравится +28 Проголосовать: не нравится

Is it really more convenient to paste url to terminal than to submit via website?

»
23 месяца назад, скрыть # |
 
Проголосовать: нравится +43 Проголосовать: не нравится

By the way, I forgot to write why I wanted such a tool. I usually use 2 screens for competitive programming, one for browser and one for ide. I do not want to shuffle browsers, so I can keep an eye on the results of the submit while reading the next problem, so I much prefer for the result of the submit to be shown in terminal, which is part of my ide layout.

»
23 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

cool

»
23 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

why would i use the tool over submitting myself?

»
23 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

That's really cool, especially the fact that you did this for all these different websites. Thank you so much!!

»
23 месяца назад, скрыть # |
 
Проголосовать: нравится +24 Проголосовать: не нравится

Whoever uses it, be careful: it is much easier to accidentally submit something you didn't want to with this thing than without (for example, by pressing <Up> <Up> <Up> <Up> <Up> <Return> in the terminal with an incorrect number of <Up>s)

»
23 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

will it work during the live contest??

»
23 месяца назад, скрыть # |
← Rev. 24  
Проголосовать: нравится 0 Проголосовать: не нравится

[deleted]

»
23 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Support for toph.co is added

»
22 месяца назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +3 Проголосовать: не нравится

New version that is much better about dealing with various errors (compilation errors, you already submitted this code, contest ended, source limit exceeded, etc.). Also a link to the submission is now printed to terminal for convenience.

»
22 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

New version:

  • Support for changes in codeforces pages format
  • Show submit URLs at the first opportunity for codeforces and atcoder
  • Removing some debug screenshots/saving the page source
»
19 месяцев назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

Support for luogu is removed due to cloudflare captcha during submission process

»
19 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

i can't see what exactly you are currently using, but cp booster has something similar using playwright. It also faces the same issue with capta, except that it faces it every time :(

however, these are some ways to bypass capta using playwright https://www.reddit.com/r/learnpython/comments/1hxs4lf/bypassing_cloudflare_when_using_python_playwright/ https://www.zenrows.com/blog/playwright-cloudflare-bypass

the second link might be outdated as cloudfare doesn't really rely on capta and can detect you trying to use a botting browser as in the case of cpbooster.

This is all an uphill battle unless maybe if you can make a playwright code that uses the user's current browser, the user should be able to solve any capta and make it work.

But again as cloudfare relies on a lot more than just capta, maybe none of this works

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

    CF part is currently dead after mirror was disabled. I do not think I will try to do workarounds atm. Instead I wrote tool that prints results of your submits to console with similar functionality using CF api — the only difference is you will have to submit through web interface. I wrote above about my motivation for submitting tool, and that watches tool fits that motivation. I will publish that shortly (and will update submitter to remove cf support)

»
17 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

When it comes to Rust are there any benefits of using this submitter over the rust-competitive-helper builtin submitter.

»
7 месяцев назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Auto comment: topic has been updated by Egor (previous revision, new revision, compare).

»
7 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

is there a function or similar tool to grab cf testcases?
without manually clicking "copy", so I don't lose aura

»
7 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

If you have competitive companion, neovim with the competitest plugin and this it will work pretty nicely, you can set up a keymap that finds the url itself, I’m gonna give it a try right now (not that it will actually help to be a better programmer, but it’s nice)

»
7 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by Egor (previous revision, new revision, compare).

»
7 месяцев назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

I've added atcoder support, similar to how codeforces is done

»
7 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by Egor (previous revision, new revision, compare).

»
7 месяцев назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

Added atcoder-like treatment for luogu. Also disable qoj, as it was not actually working due to cloudflare

»
5 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by Egor (previous revision, new revision, compare).

»
5 месяцев назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

Added support for CodeRun and kep.uz. Also added a releases page so you can have it even without installing rust

»
4 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by Egor (previous revision, new revision, compare).

»
4 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Added Repovive support

»
4 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

bro even included toph :skull: