Giter VIP home page Giter VIP logo

cprep's People

Contributors

bicsi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cprep's Issues

Changing code template

Is there any way to change the default code of gen.cpp and sol.cpp without going to the source code? Would be great if there is a command allowing users to config them.

Something like cprep config-template -g path_to_gen -s path_to_sol.

Customable naming

Currently, all test cases are named in one format test$$.in. However, it's quite hard to track which one is in which subtask or which one is an edge case. For example, it is great if we can name them like big$$.in and small$$.in with some configs. I would prefer if the configs are put in tests.sh because it's much easier to manage all test cases there. It already has the hashtag line to separate subtasks, what about putting another line right below for the name (use the default config if empty)?

TLE not working

In Windows 10, it doesn't give TLE status if a solution passes time limit (it works in Ubuntu though). It is a Python problem as stated here. I tried running the subprocess.run() with timeout and it does not work. It works if not set shell=True in subprocess.run().

Not working in windows

Here is the log, seems like an encoding error. (Windows 10)

$ cprep generate
Discovered files:
 - gen.cpp  (generator)
 - sol.cpp  (solution)
 - tests.sh (tests)

Compiling all files...
 - gen.cpp Traceback (most recent call last):
  File "d:\programdata\miniconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "d:\programdata\miniconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "D:\ProgramData\Miniconda3\Scripts\cprep.exe\__main__.py", line 7, in <module>
  File "d:\programdata\miniconda3\lib\site-packages\cprep_cli\__main__.py", line 54, in main
    args.run(cfg, args)
  File "d:\programdata\miniconda3\lib\site-packages\cprep_cli\commands\generate.py", line 15, in run
    pipelines.compile_files(files, cfg)
  File "d:\programdata\miniconda3\lib\site-packages\cprep_cli\pipelines.py", line 74, in compile_files
    print(line)
  File "d:\programdata\miniconda3\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2713' in position 5: character maps to <undefined>

Feature plans

  • Pre-testing command; we want model solutions to be correct, so run a lot of small tests with a generator just to test that
  • Integration with autotest
  • Support for other languages (Python generators)
  • Support for custom checkers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.