Skip to main content

Grade a solution using baekjoon online sample inputs and outputs.

Project description

bjgrader

bjgrader 는 백준 알고리즘 사이트의 문제 별 sample input & output 을 바탕으로 손쉽게 채점해주는 라이브러리 입니다.

원하는 곳에서 bjgrader를 이용하여 파일을 생성 후, 알고리즘 풀이를 작성한 뒤, bjgrader로 채점하시면 됩니다.

requestsbeautifulsoup4를 바탕으로 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', 'input_data', 'idx', result_dict)
URL = ''

# input_data: sample input
# idx: 
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

bjgrader-0.0.4.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bjgrader-0.0.4-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file bjgrader-0.0.4.tar.gz.

File metadata

  • Download URL: bjgrader-0.0.4.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

Hashes for bjgrader-0.0.4.tar.gz
Algorithm Hash digest
SHA256 4596f0160829b523e6158b0725ff4a54faec71bc5456e23d82d04300dbd6dea2
MD5 e944446c3eed1c8d1434d0e8e36a9ffd
BLAKE2b-256 04bfc500cf08b0521c12bd50ee8a4b3d3959d21416c5eb8161c097c80cec9379

See more details on using hashes here.

File details

Details for the file bjgrader-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: bjgrader-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.6

File hashes

Hashes for bjgrader-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3e92bbd5d3088c72904b22ca5df52d21fc861aab9d828cdc1c7b1603c30300e1
MD5 d38b85089af0b6c839edb55963e4ae59
BLAKE2b-256 bf5bfe49734177c859dbdd63a8d3b63f74b16ed01cc50c4ed3b26cd23298fea1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page