-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from codeclassroom/dev
version 1.0
- Loading branch information
Showing
15 changed files
with
291 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,24 @@ | ||
from coderunner import coderunner | ||
import pprint | ||
import os | ||
|
||
from dotenv import load_dotenv | ||
load_dotenv() | ||
|
||
source_code = "testfiles/" + "test_python_input.py" | ||
language = "Python3" | ||
output = "testfiles/output/" + "output2.txt" | ||
Input = "testfiles/input/" + "input.txt" | ||
|
||
API_KEY = os.environ["API_KEY"] | ||
|
||
r = coderunner.code(source_code, language, output, Input) | ||
|
||
r2 = coderunner.code("print(\"yo\")", "Python3", "YO", path=False) | ||
# Necessary step to initialize API keys & URL | ||
r.api(key=API_KEY) | ||
|
||
# run the code | ||
r.run() | ||
|
||
print("Run r :") | ||
print("Running r :") | ||
print("Status : " + r.getStatus()) | ||
|
||
r2.run() | ||
|
||
print("Run r2 :") | ||
print("Status : " + r2.getStatus()) | ||
|
||
# check if any error occured | ||
if r.getError() is not None: | ||
pprint.pprint("Error : " + r.getError()) | ||
else: | ||
print("Standard Output : ") | ||
pprint.pprint(r.getOutput()) | ||
print("Execution Time : " + r.getTime()) | ||
print("Memory : " + str(r.getMemory())) | ||
print("Output : " + r.getOutput()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
# Shell Script to Publish a Python Package | ||
find_setup_py(){ | ||
|
Oops, something went wrong.