Spaces:
Sleeping
Sleeping
File size: 1,808 Bytes
3f05ff2 |
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
from dataclasses import dataclass
lang_map = {
"java": "Java",
"cpp": "C++",
"go": "Go",
"cs": "C#",
"d": "D",
"jl": "Julia",
"js": "JavaScript",
"php": "PHP",
"pl": "Perl",
"py": "Python",
"r": "R",
"lua": "Lua",
"rb": "Ruby",
"rkt": "Racket",
"rs": "Rust",
"scala": "Scala",
"sh": "Shell",
"swift": "Swift",
"ts": "TypeScript"
}
@dataclass
class ColumnContent:
name: str
type: str
displayed_by_default: bool
hidden: bool = False
def fields(raw_class):
return [
v for k, v in raw_class.__dict__.items() if k[:2] != "__" and k[-2:] != "__"
]
@dataclass(frozen=True)
class AutoEvalColumn: # Auto evals column
model = ColumnContent("Model", "markdown", True)
size = ColumnContent("Size", "number", True)
average = ColumnContent("Average", "number", True)
l_0 = ColumnContent("Java", "number", True)
l_1 = ColumnContent("C++", "number", True)
l_2 = ColumnContent("C#", "number", True)
l_3 = ColumnContent("D", "number", True)
l_4 = ColumnContent("Go", "number", True)
l_5 = ColumnContent("Julia", "number", True)
l_6 = ColumnContent("JavaScript", "number", True)
l_7 = ColumnContent("Lua", "number", True)
l_8 = ColumnContent("PHP", "number", True)
l_9 = ColumnContent("Perl", "number", True)
l_10 = ColumnContent("Python", "number", True)
l_11 = ColumnContent("R", "number", True)
l_12 = ColumnContent("Ruby", "number", True)
l_13 = ColumnContent("Racket", "number", True)
l_14 = ColumnContent("Rust", "number", True)
l_15 = ColumnContent("Scala", "number", True)
l_16 = ColumnContent("Shell", "number", True)
l_17 = ColumnContent("Swift", "number", True)
l_18 = ColumnContent("TypeScript", "number", True)
|