Datasets:
Modalities:
Image
Formats:
imagefolder
Languages:
English
Size:
< 1K
Tags:
Large Language Models
LLM Evaluation
Sequential Reasoning
Scaling Laws
Synthetic Benchmarks
Commonsense Reasoning
License:
Upload rooms.py
Browse files- scripts /rooms.py +27 -0
scripts /rooms.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import string
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
def generate_letter_number_list():
|
| 5 |
+
# spreadsheet style column names A-Z, AA-AB-ZZ, AAA-AAB-ZZZ, etc.
|
| 6 |
+
result = [letter for letter in string.ascii_uppercase]
|
| 7 |
+
for letter in string.ascii_uppercase:
|
| 8 |
+
for letter2 in string.ascii_uppercase:
|
| 9 |
+
result.append(f"{letter}{letter2}")
|
| 10 |
+
return result
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
class NameGenerator:
|
| 14 |
+
def __init__(self, N, M):
|
| 15 |
+
self.COLNAMES = generate_letter_number_list()
|
| 16 |
+
self.Col = lambda x: self.COLNAMES[x]
|
| 17 |
+
self.N = N
|
| 18 |
+
self.M = M
|
| 19 |
+
|
| 20 |
+
def get_name(self, cell):
|
| 21 |
+
return f"{self.Col(cell[0])}{self.M - cell[1]}"
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
if __name__ == "__main__":
|
| 25 |
+
name_generator = NameGenerator()
|
| 26 |
+
cell = (100, 200)
|
| 27 |
+
print(name_generator.get_name(cell))
|