INNER CODE UNIT · Python

get_available_algorithms

nachifur/MulimgViewer · src/mulimgviewer/src/custom_func/main.py:11

def get_available_algorithms():
    algorithms = []
    custom_func_dir = Path(__file__).parent
    for item in custom_func_dir.iterdir():
        if item.is_dir() and item.name != "__pycache__":
            main_file = item / "main.py"
            if main_file.exists():
                algorithms.append(item.name)
    ordered_algorithms = []
    for default_alg in DEFAULT_ALGORITHMS:
        if default_alg in algorithms:
            ordered_algorithms.append(default_alg)
    for alg in algorithms:
        if alg not in DEFAULT_ALGORITHMS:
            ordered_algorithms.append(alg)
    return ordered_algorithms

def load_algorithm_functions(algorithm_type):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…