coderick14's blog

By coderick14, history, 7 years ago, In English

Hello everyone. I've been attending contests for a while now. In order to test my code against sample cases, I came up with a command line tool. It runs your code against the sample cases and shows the result (expected output versus user output) and verdict(AC, WA, TLE, RTE). All this without leaving the terminal. I would really appreciate if you try it out and give some feedback so that I can make it better.

You can prefetch your cases so that you can test them later offline. Or just test your code on the fly.

Install with pip install --user ACedIt

Examples
  • acedit -s codeforces -c 86 -p D -f (prefetch cases from problem 86-D)
  • acedit --set-default-site codeforces (so that you dont need to mention the site everytime)
  • acedit --run solve.cpp -c 835 -p D (run your code against the cases of 835-D)
  • acedit --run test.py -s codechef -c AUG17 -p CHEFFA (similar as above, but with Codechef)

For complete usage instructions, click here

Thanks a lot for your time!!

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

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

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

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

Just downloaded it looks great! Thanks!

Can you post some instructions on how to check the test cases for the practice questions on codechef or hackerrank?

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

I use cygwin with Windows and I get this error:
File "c:\cygwin64\tmp\pip-build-b7cb_s7g\acedit\acedit\install_entry.py", line 13, in run
from main import supported_sites
ImportError: No module named 'main'

Any idea how to fix it? :/

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

    You get that error when using Python 3.x, I fixed it using Python 2.7 instead. It's very likely you'll encounter more errors on Windows because the tool was written for Linux. The file "util.py" makes some calls to the OS with Linux syntax, just change them to Windows syntax, lines 314,315,316,330 to be precise. Also modify the g++ flags (same file) if necessary. Cheers!

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

    I've just added support for python3. If you pip install now, it should work. Added support for atcoder as well, but it's experimental.

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

How this will work with problem have multiple solutions ?!

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

    Sorry that it won't work for such problems. It becomes considerably harder to implement this.

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

cf tools does the same thing. It's easy to use. Just copy the code to the test case dir and run cf test.

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

Really great but Hightail works for me.

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

How can I run it for educational rounds in codeforces