-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.py
More file actions
38 lines (37 loc) · 1.03 KB
/
config.py
File metadata and controls
38 lines (37 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
LANGUAGE_CONFIG = {
"python": {
"image" : "python:3.12-slim",
"command" : lambda filename : ["python", filename],
"filename" : "main.py"
},
"nodejs" : {
"image" : "node:18-alpine",
"command" : lambda filename : ["node" , filename],
"filename" : "main.js"
},
"java" : {
"image" : "openjdk:17-alpine",
"command" : lambda filename : [
"sh", "-c",
f"javac {filename} && java {filename.replace('.java', '')}"
],
"filename" : "Main.java"
},
"c" : {
"image" : "gcc:latest",
"command" : lambda filename : [
"sh", "-c",
f"gcc {filename} -o main.out && ./main.out"
],
"filename" : "main.c"
},
"cpp" : {
"image" : "gcc:latest",
"command" : lambda filename : [
"sh", "-c",
f"g++ {filename} -o main.out && ./main.out"
],
"filename" : "main.cpp"
},
}
EXECUTION_TIME_LIMIT=60 # Maximum execution time limit