corrlib/corrlib/tools.py
Justus Kuhlmann d137f67e10
All checks were successful
Pytest / pytest (3.12) (push) Successful in 50s
Pytest / pytest (3.13) (push) Successful in 49s
Pytest / pytest (3.14) (push) Successful in 49s
Pytest / pytest (3.12) (pull_request) Successful in 48s
Pytest / pytest (3.13) (pull_request) Successful in 49s
Pytest / pytest (3.14) (pull_request) Successful in 50s
ruff compatible to YTT,E,W,F
2025-12-02 10:28:22 +01:00

28 lines
518 B
Python

import os
import datalad.api as dl
def str2list(string: str):
return string.split(",")
def list2str(mylist):
s = ",".join(mylist)
return s
cached: bool = True
def m2k(m: float) -> float:
return 1/(2*m+8)
def k2m(k: float) -> float:
return (1/(2*k))-4
def get_file(path: str, file: str):
if file == "backlogger.db":
print("Downloading database...")
else:
print("Downloading data...")
dl.get(os.path.join(path, file), dataset=path)
print("> downloaded file")