master > master: code - python code umgezogen
This commit is contained in:
parent
f01710b445
commit
37dea15b2b
@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# EXPORTS
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
from code.algorithms.search.sequential import SequentialSearch;
|
||||
from code.algorithms.search.binary import BinarySearch;
|
||||
from code.algorithms.search.interpol import InterpolationSearch;
|
||||
from code.algorithms.search.jump import JumpSearchLinear;
|
||||
from code.algorithms.search.jump import JumpSearchExponentiell;
|
||||
from code.algorithms.search.ith_smallest import FindIthSmallest;
|
||||
from code.algorithms.search.ith_smallest import FindIthSmallestDC;
|
||||
from code.algorithms.search.poison import FindPoison;
|
||||
from code.algorithms.search.poison import FindPoisonFast;
|
@ -1,3 +1,4 @@
|
||||
pip>=21.3.1
|
||||
argparse>=1.4.0
|
||||
pyyaml>=5.4.1
|
||||
typing>=3.7.4.3
|
@ -5,5 +5,5 @@
|
||||
# EXPORTS
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
from code.algorithms.search.exports import *;
|
||||
from code.algorithms.sum.exports import *;
|
||||
from src.algorithms.search.exports import *;
|
||||
from src.algorithms.sum.exports import *;
|
@ -7,8 +7,8 @@
|
||||
|
||||
import functools;
|
||||
|
||||
from code.core.log import *;
|
||||
from code.setup.display import *;
|
||||
from src.core.log import *;
|
||||
from src.setup.display import *;
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# CLASSES
|
@ -5,11 +5,11 @@
|
||||
# IMPORTS
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
from local.maths import *;
|
||||
from local.typing import *;
|
||||
from src.local.maths import *;
|
||||
from src.local.typing import *;
|
||||
|
||||
from code.core.log import *;
|
||||
from code.algorithms.methods import *;
|
||||
from src.core.log import *;
|
||||
from src.algorithms.methods import *;
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# GLOBAL VARIABLES/CONSTANTS
|
16
code/python/src/algorithms/search/exports.py
Normal file
16
code/python/src/algorithms/search/exports.py
Normal file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# EXPORTS
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
from src.algorithms.search.sequential import SequentialSearch;
|
||||
from src.algorithms.search.binary import BinarySearch;
|
||||
from src.algorithms.search.interpol import InterpolationSearch;
|
||||
from src.algorithms.search.jump import JumpSearchLinear;
|
||||
from src.algorithms.search.jump import JumpSearchExponentiell;
|
||||
from src.algorithms.search.ith_smallest import FindIthSmallest;
|
||||
from src.algorithms.search.ith_smallest import FindIthSmallestDC;
|
||||
from src.algorithms.search.poison import FindPoison;
|
||||
from src.algorithms.search.poison import FindPoisonFast;
|
@ -5,11 +5,11 @@
|
||||
# IMPORTS
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
from local.maths import *;
|
||||
from local.typing import *;
|
||||
from src.local.maths import *;
|
||||
from src.local.typing import *;
|
||||
|
||||
from code.core.log import *;
|
||||
from code.algorithms.methods import *;
|
||||
from src.core.log import *;
|
||||
from src.algorithms.methods import *;
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# GLOBAL VARIABLES/CONSTANTS
|
@ -5,12 +5,12 @@
|
||||
# IMPORTS
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
from local.maths import *;
|
||||
from local.typing import *;
|
||||
from src.local.maths import *;
|
||||
from src.local.typing import *;
|
||||
|
||||
from code.core.log import *;
|
||||
from code.algorithms.search.sequential import SequentialSearch;
|
||||
from code.algorithms.methods import *;
|
||||
from src.core.log import *;
|
||||
from src.algorithms.search.sequential import SequentialSearch;
|
||||
from src.algorithms.methods import *;
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# GLOBAL VARIABLES/CONSTANTS
|
@ -5,12 +5,12 @@
|
||||
# IMPORTS
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
from local.maths import *;
|
||||
from local.typing import *;
|
||||
from src.local.maths import *;
|
||||
from src.local.typing import *;
|
||||
|
||||
from code.core.log import *;
|
||||
from code.algorithms.search.sequential import SequentialSearch;
|
||||
from code.algorithms.methods import *;
|
||||
from src.core.log import *;
|
||||
from src.algorithms.search.sequential import SequentialSearch;
|
||||
from src.algorithms.methods import *;
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# GLOBAL VARIABLES/CONSTANTS
|
@ -5,11 +5,11 @@
|
||||
# IMPORTS
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
from local.maths import *;
|
||||
from local.typing import *;
|
||||
from src.local.maths import *;
|
||||
from src.local.typing import *;
|
||||
|
||||
from code.core.log import *;
|
||||
from code.algorithms.methods import *;
|
||||
from src.core.log import *;
|
||||
from src.algorithms.methods import *;
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# GLOBAL VARIABLES/CONSTANTS
|
@ -5,11 +5,11 @@
|
||||
# IMPORTS
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
from local.maths import *;
|
||||
from local.typing import *;
|
||||
from src.local.maths import *;
|
||||
from src.local.typing import *;
|
||||
|
||||
from code.core.log import *;
|
||||
from code.algorithms.methods import *;
|
||||
from src.core.log import *;
|
||||
from src.algorithms.methods import *;
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# GLOBAL VARIABLES/CONSTANTS
|
@ -5,5 +5,5 @@
|
||||
# EXPORTS
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
from code.algorithms.sum.maxsubsum import MaxSubSum;
|
||||
from code.algorithms.sum.maxsubsum import MaxSubSumDC;
|
||||
from src.algorithms.sum.maxsubsum import MaxSubSum;
|
||||
from src.algorithms.sum.maxsubsum import MaxSubSumDC;
|
@ -5,11 +5,11 @@
|
||||
# IMPORTS
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
from local.maths import *;
|
||||
from local.typing import *;
|
||||
from src.local.maths import *;
|
||||
from src.local.typing import *;
|
||||
|
||||
from code.core.log import *;
|
||||
from code.algorithms.methods import *;
|
||||
from src.core.log import *;
|
||||
from src.algorithms.methods import *;
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# GLOBAL VARIABLES/CONSTANTS
|
@ -5,8 +5,8 @@
|
||||
# IMPORTS
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
from code.local.typing import *;
|
||||
from code.local.config import *;
|
||||
from src.local.typing import *;
|
||||
from src.local.config import *;
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# GLOBAL VARIABLES
|
@ -5,14 +5,14 @@
|
||||
# IMPORTS
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
from code.local.io import *;
|
||||
from code.local.misc import *;
|
||||
from code.local.system import *;
|
||||
from code.local.typing import *;
|
||||
from src.local.io import *;
|
||||
from src.local.misc import *;
|
||||
from src.local.system import *;
|
||||
from src.local.typing import *;
|
||||
|
||||
from datetime import timedelta;
|
||||
|
||||
from code.core.metrics import *;
|
||||
from src.core.metrics import *;
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# GLOBAL VARIABLES
|
@ -8,13 +8,14 @@
|
||||
import os;
|
||||
import sys;
|
||||
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))));
|
||||
sys.path.insert(0, os.path.abspath(os.path.join(os.path.abspath(__file__), '..', '..')));
|
||||
os.chdir(os.path.abspath(os.path.join(os.path.abspath(__file__), '..', '..', '..', '..')));
|
||||
|
||||
from code.core.log import *;
|
||||
from code.core.config import *;
|
||||
from code.setup.display import *;
|
||||
from code.setup.cli import *;
|
||||
from code.algorithms.exports import *;
|
||||
from src.core.log import *;
|
||||
from src.core.config import *;
|
||||
from src.setup.display import *;
|
||||
from src.setup.cli import *;
|
||||
from src.algorithms.exports import *;
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# GLOBAL VARIABLES/CONSTANTS
|
||||
@ -30,7 +31,7 @@ def enter(quiet: bool, debug: bool, mode: str, path: Any, **_):
|
||||
SetQuietMode(quiet);
|
||||
SetDebugMode(debug);
|
||||
configpath = path if isinstance(path, str) else PATH_TO_CONFIG;
|
||||
if mode == 'all':
|
||||
if mode in 'run':
|
||||
LoopThroughCases(path=configpath);
|
||||
else:
|
||||
DisplayHelpMessage();
|
@ -5,9 +5,9 @@
|
||||
# IMPORTS
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
from code.local.typing import *;
|
||||
from src.local.typing import *;
|
||||
|
||||
from code.core.log import *;
|
||||
from src.core.log import *;
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# GLOBAL VARIABLES
|
||||
@ -30,7 +30,7 @@ def GetArgumentParser() -> argparse.ArgumentParser:
|
||||
'''),
|
||||
formatter_class=argparse.RawTextHelpFormatter,
|
||||
);
|
||||
parser.add_argument('mode', nargs=1, choices=['all'], help='all = Führt alle Testfälle in der config.yml Datei durch.');
|
||||
parser.add_argument('mode', nargs=1, choices=['run'], help='run = Führt alle Testfälle in der config.yml Datei durch.');
|
||||
parser.add_argument('--path', nargs=1, type=str, help='Pfad zur alternativen Configdatei.');
|
||||
parser.add_argument('--debug', action='store_true', help='Debugging Messages stummschalten.')
|
||||
parser.add_argument('-q', '--quiet', action='store_true', help='Alle console-messages bis auf Errors stummschalten.')
|
@ -5,10 +5,10 @@
|
||||
# IMPORTS
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
from code.local.typing import *;
|
||||
from src.local.typing import *;
|
||||
|
||||
from code.core.log import *;
|
||||
from code.setup.cli import GetArgumentParser;
|
||||
from src.core.log import *;
|
||||
from src.setup.cli import GetArgumentParser;
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# METHODS display help
|
Loading…
Reference in New Issue
Block a user