Grade a solution using baekjoon online sample inputs and outputs.
Project description
bjgrader
bjgrader 는 백준 알고리즘 사이트의 문제 별 sample input & output 을 바탕으로 손쉽게 채점해주는 라이브러리 입니다.
원하는 곳에서 bjgrader를 이용하여 파일을 생성 후, 알고리즘 풀이를 작성한 뒤, bjgrader로 채점하시면 됩니다.
requests와 beautifulsoup4를 바탕으로 sample input과 sample output을 가져와 채점하기에, 공개되지 않은 입력에 대해서는 채점하지 않습니다.
Installation
pip install bjgrader
Usage
Create a solution file
python -m bjgrader -c file_name.py
Solve a problem
파일 생성 명령어를 통해 나온 파일의 템플릿은 아래와 같습니다.
# Do not modify name of parameter and function ('URL', 'solution')
URL = ''
# input_data: sample input
def solution(input_datat):
answer = 0
return answer
URL에 풀고자 하는 백준 문제의 url 주소를 입력하고, solution 함수에 풀이과정을 작성하시면 됩니다.
Grade the solution file
python -m bjgrader -n file_name.py
위의 명령어를 통해 해당 문제의 풀이과정을 테스트를 진행합니다. 10초 이상 걸리는 솔루션에 대해서는 Timeout을 반환합니다.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bjgrader-0.0.5.tar.gz.
File metadata
- Download URL: bjgrader-0.0.5.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e47b0c3367384da88c0fdeda83f8a25984d3bc95e8709d55cb978f44dc2975f
|
|
| MD5 |
64135c84a5f1772d325619372e50911f
|
|
| BLAKE2b-256 |
b412dcac7886a8b0c203c75532c0dfe266c8d8da5ca397222fbcf9ed41fdc8be
|
File details
Details for the file bjgrader-0.0.5-py3-none-any.whl.
File metadata
- Download URL: bjgrader-0.0.5-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f7dc45b060dd5303e309b70a07b98bd882ecc7446168cdd2966046919caa322
|
|
| MD5 |
802e623ca1f193f70ebb883094f89724
|
|
| BLAKE2b-256 |
2ff727f5122245ee8c7bc509e338e53c1292befb70d9872c8bff5f2b0cdf32db
|