|
1 | | -# CodeRunner π |
2 | | -> [Judge0 API](https://api.judge0.com/) Interface written in Python |
| 1 | +# Initial page |
3 | 2 |
|
4 | | - |
5 | | -[](https://travis-ci.org/codeclassroom/CodeRunner) |
6 | | -[](https://github.com/codeclassroom/CodeRunner/blob/master/LICENSE) |
7 | | -[](https://github.com/codeclassroom/CodeRunner/issues) |
8 | | -[](http://makeapullrequest.com) |
9 | | - |
10 | | - |
11 | | -### Prerequisites |
12 | | -1. Python 3.6+ |
13 | | -2. virtualenv |
14 | | - |
15 | | -### Installation |
16 | | -1. Create virtual environment. |
17 | | -```bash |
18 | | -virtualenv -p python3 venv && cd venv && source bin/activate |
19 | | -``` |
20 | | -2. Clone the repository. |
21 | | -```bash |
22 | | -git https://github.com/codeclassroom/CodeRunner.git |
23 | | -``` |
24 | | -3. Install Dependencies. |
25 | | -```bash |
26 | | -pip install -r requirements.txt |
27 | | -``` |
28 | | -4. Run tests. |
29 | | -```bash |
30 | | -python3 tests.py |
31 | | -``` |
32 | | - |
33 | | -### Usage |
34 | | -- Install the package. |
35 | | -```bash |
36 | | -pip install coderunner |
37 | | -``` |
38 | | - |
39 | | -```python |
40 | | -import coderunner |
41 | | -import pprint |
42 | | - |
43 | | -program_name = "testfiles/" + "test_python.py" |
44 | | -language = "Python" |
45 | | -output = "testfiles/" + "output2.txt" |
46 | | -Input = "testfiles/" + "input.txt" |
47 | | -r = coderunner.Run(program_name, language, output, Input) |
48 | | - |
49 | | -print("Status : " + r.getStatus()) |
50 | | -if r.getError() != None: |
51 | | - pprint.pprint("Error : " + r.getError()) |
52 | | -else: |
53 | | - print("Standard Output : ") |
54 | | - pprint.pprint(r.getStandardOutput()) |
55 | | -print("Execution Time : " + r.getTime()) |
56 | | -print("Memory : " + str(r.getMemory())) |
57 | | -``` |
58 | | - |
59 | | - |
60 | | -### Pointers β |
61 | | -- In a `Java` program the class name should always be ***`Main`***. |
62 | | -- Currently supported languages : |
63 | | - - C (gcc 7.2.0) |
64 | | - - C++ (g++ 7.2.0) |
65 | | - - Java (OpenJDK 8) |
66 | | - - Python (3.6.0) |
67 | | - |
68 | | - |
69 | | - |
70 | | -### Author |
71 | | - |
72 | | -π₯ **Bhupesh Varshney** |
73 | | - |
74 | | -- Twitter: [@bhupeshimself](https://twitter.com/bhupeshimself) |
75 | | -- DEV: [bhupesh](https://dev.to/bhupesh) |
76 | | - |
77 | | -## π License |
78 | | - |
79 | | -This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. |
80 | | - |
81 | | -## π Contributing |
82 | | - |
83 | | -Please read the [CONTRIBUTING](CONTRIBUTING.md) file for the process of submitting pull requests to us. |
0 commit comments