id
int64 1
2
| content
stringclasses 2
values |
---|---|
1 | def fibonacci(n):
if n <= 1:
return n
else:
return fibonacci(n-1) + fibonacci(n-2)
|
2 | def ending_to_langs(ending):
ending = "." + ending.lower()
langs = []
with open("langs_extension.json", "rb") as infile:
ending_map = infile.read()
ending_map = json.loads(ending_map)
for row in ending_map:
if "extensions" in row.keys() and ending in row["extensions"]:
langs.append(row["name"])
return langs
|