diff --git a/Backend b/Backend deleted file mode 160000 index 1f0f14d..0000000 --- a/Backend +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1f0f14d6efa8c68ab71ba817ca53ba3466aeeabd diff --git a/Backend_correct/.gitignore b/Backend_correct/.gitignore new file mode 100644 index 0000000..3e85487 --- /dev/null +++ b/Backend_correct/.gitignore @@ -0,0 +1,632 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ + +.DS_STORE + +/dist/ +/bazel-out +/integration/bazel/bazel-* +*.log +/node_modules/ + +# CircleCI temporary file for cache key computation. +# See `save_month_to_file` in `.circleci/config.yml`. +month.txt + +# Include when developing application packages. +pubspec.lock +.c9 +.idea/ +.devcontainer/* +!.devcontainer/README.md +!.devcontainer/recommended-devcontainer.json +!.devcontainer/recommended-Dockerfile +.settings/ +.vscode/launch.json +.vscode/settings.json +.vscode/tasks.json +*.swo +*.swp +modules/.settings +modules/.vscode +.vimrc +.nvimrc + +# Don't check in secret files +*secret.js + +# Ignore npm/yarn debug log +npm-debug.log +yarn-error.log + +# build-analytics +.build-analytics + +# rollup-test output +/modules/rollup-test/dist/ + +# User specific bazel settings +.bazelrc.user + +# User specific ng-dev settings +.ng-dev.user* + +.notes.md +baseline.json + +# Ignore .history for the xyz.local-history VSCode extension +.history + +# Husky +.husky/_ +aio/content/examples/.DS_Store + + +# Ignore cache created with the Angular CLI. +.angular/ + +node_modules/ +.node_modules/ +built/* +tests/cases/rwc/* +tests/cases/perf/* +!tests/cases/webharness/compilerToString.js +test-args.txt +~*.docx +\#*\# +.\#* +tests/baselines/local/* +tests/baselines/local.old/* +tests/services/baselines/local/* +tests/baselines/prototyping/local/* +tests/baselines/rwc/* +tests/baselines/reference/projectOutput/* +tests/baselines/local/projectOutput/* +tests/baselines/reference/testresults.tap +tests/services/baselines/prototyping/local/* +tests/services/browser/typescriptServices.js +src/harness/*.js +src/compiler/diagnosticInformationMap.generated.ts +src/compiler/diagnosticMessages.generated.json +src/parser/diagnosticInformationMap.generated.ts +src/parser/diagnosticMessages.generated.json +rwc-report.html +*.swp +build.json +*.actual +tests/webTestServer.js +tests/webTestServer.js.map +tests/webhost/*.d.ts +tests/webhost/webtsc.js +tests/cases/**/*.js +tests/cases/**/*.js.map +*.config +scripts/eslint/built/ +scripts/debug.bat +scripts/run.bat +scripts/**/*.js +scripts/**/*.js.map +coverage/ +internal/ +**/.DS_Store +.settings +**/.vs +**/.vscode/* +!**/.vscode/tasks.json +!**/.vscode/settings.template.json +!**/.vscode/launch.template.json +!**/.vscode/extensions.json +!tests/cases/projects/projectOption/**/node_modules +!tests/cases/projects/NodeModulesSearch/**/* +!tests/baselines/reference/project/nodeModules*/**/* +.idea +yarn.lock +yarn-error.log +.parallelperf.* +tests/baselines/reference/dt +.failed-tests +TEST-results.xml +package-lock.json +.eslintcache +*v8.log +/lib/ + +# Editor temporary/working/backup files # +######################################### +.#* +[#]*# +*~ +*$ +*.bak +.idea/ +*.kdev4 +*.org +.project +.pydevproject +*.rej +.settings/ +.spyproject/ +.*.sw[nop] +.sw[nop] +*.tmp +*.vim +tags +.venv/ +venv/ +.theia/ +.vscode/ + +# Compiled source # +################### +*.a +*.com +*.class +*.dll +*.exe +*.l[ao] +*.o +*.o.d +*.py[ocd] +*.so +_configtest.c + +# Packages # +############ +# it's better to unpack these files and commit the raw source +# git has its own built in compression methods +*.7z +*.bz2 +*.bzip2 +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.tbz2 +*.tgz +*.zip + +# Python files # +################ +# build directory +build +# sphinx build directory +doc/_build +# cython files +cythonize.dat +# sdist directory +dist +# Egg metadata +*.egg-info +# tox testing tool +.tox +# The shelf plugin uses this dir +./.shelf +MANIFEST +# distutils configuration +site.cfg +setup.cfg +# other temporary files +.coverage +.deps +.libs +.eggs +pip-wheel-metadata + +# Meson # +######### +.mesonpy-native-file.ini +installdir/ +build-install/ +.mesonpy/ + +# doit +###### +.doit.db.dat +.doit.db.dir +.doit.db.db +.doit.db + +# Logs and databases # +###################### +*.log +*.sql +*.sqlite + +# pytest cache # +################ +.cache/ +.pytest_cache/ + +# mypy cache # +############## +.mypy_cache/ + +# linter # +########## +.ruff_cache/ +.pre-commit-workdir/ + +# Patches # +########### +*.patch +*.diff + +# OS generated files # +###################### +.directory +.fseventsd +.DS_Store* +.gdb_history +.VolumeIcon.icns +ehthumbs.db +Icon? +Thumbs.db +*.dSYM + +# Documentation generated files # +################################# +doc/frontpage/build +doc/source/reference/generated +**/.ipynb_checkpoints + +# Things specific to this project # +################################### +benchmarks/env +benchmarks/results +benchmarks/scipy +benchmarks/html +benchmarks/scipy-benchmarks +.openblas +scipy/_distributor_init_local.py +scipy/__config__.py +scipy/_lib/_ccallback_c.c +scipy/_lib/messagestream.c +scipy/_lib/src/messagestream_config.h +scipy/_lib/_test_deprecation_call.c +scipy/_lib/_test_deprecation_def.c +scipy/_lib/_test_deprecation_def.h +scipy/cluster/_vq.c +scipy/cluster/_hierarchy.c +scipy/cluster/_optimal_leaf_ordering.c +scipy/fftpack/_fftpackmodule.c +scipy/fftpack/convolvemodule.c +scipy/fftpack/convolve.c +scipy/fftpack/src/dct.c +scipy/fftpack/src/dst.c +scipy/integrate/_dopmodule.c +scipy/integrate/_lsodamodule.c +scipy/integrate/_vodemodule.c +scipy/integrate/_dop-f2pywrappers.f +scipy/integrate/_lsoda-f2pywrappers.f +scipy/integrate/_vode-f2pywrappers.f +scipy/interpolate/_rbfinterp_pythran.cpp +scipy/interpolate/_ppoly.c +scipy/interpolate/_rgi_cython.c +scipy/interpolate/_bspl.c +scipy/interpolate/interpnd.c +scipy/interpolate/src/dfitpack-f2pywrappers.f +scipy/interpolate/src/dfitpackmodule.c +scipy/io/_test_fortranmodule.c +scipy/io/matlab/_mio5_utils.c +scipy/io/matlab/_mio_utils.c +scipy/io/matlab/_streams.c +scipy/lib/blas/cblas.pyf +scipy/lib/blas/cblasmodule.c +scipy/lib/blas/fblas-f2pywrappers.f +scipy/lib/blas/fblas.pyf +scipy/lib/blas/fblasmodule.c +scipy/lib/blas/fblaswrap.f +scipy/lib/lapack/clapack.pyf +scipy/lib/lapack/clapackmodule.c +scipy/lib/lapack/flapack.pyf +scipy/lib/lapack/flapackmodule.c +scipy/linalg/_cblasmodule.c +scipy/linalg/_clapackmodule.c +scipy/linalg/_fblas-f2pywrappers.f +scipy/linalg/_fblasmodule.c +scipy/linalg/_flapack-f2pywrappers.f +scipy/linalg/_flapackmodule.c +scipy/linalg/_interpolativemodule.c +scipy/linalg/_solve_toeplitz.c +scipy/linalg/_decomp_update.c +scipy/linalg/_decomp_update.pyx +scipy/linalg/_cythonized_array_utils.c +scipy/linalg/_blas_subroutine_wrappers.f +scipy/linalg/_blas_subroutines.h +scipy/linalg/_lapack_subroutine_wrappers.f +scipy/linalg/_lapack_subroutines.h +scipy/linalg/cblas.pyf +scipy/linalg/clapack.pyf +scipy/linalg/cython_blas.c +scipy/linalg/cython_lapack.c +scipy/linalg/fblas.pyf +scipy/linalg/flapack.pyf +scipy/linalg/cython_blas.pxd +scipy/linalg/cython_blas.pyx +scipy/linalg/cython_lapack.pxd +scipy/linalg/cython_lapack.pyx +scipy/linalg/src/id_dist/src/*_subr_*.f +scipy/linalg/_matfuncs_sqrtm_triu.c +scipy/linalg/_matfuncs_sqrtm_triu.cpp +scipy/linalg/_matfuncs_expm.c +scipy/linalg/_matfuncs_expm.pyx +scipy/ndimage/src/_ni_label.c +scipy/ndimage/src/_cytest.c +scipy/optimize/_bglu_dense.c +scipy/optimize/cobyla/_cobylamodule.c +scipy/optimize/_group_columns.cpp +scipy/optimize/lbfgsb_src/_lbfgsbmodule.c +scipy/optimize/lbfgsb_src/_lbfgsb-f2pywrappers.f +scipy/optimize/minpack2/_minpack2module.c +scipy/optimize/__nnls/__nnlsmodule.c +scipy/optimize/slsqp/_slsqpmodule.c +scipy/optimize/_lsq/givens_elimination.c +scipy/optimize/_trlib/_trlib.c +scipy/optimize/tnc/moduleTNC.c +scipy/optimize/tnc/_moduleTNC.c +scipy/signal/_peak_finding_utils.c +scipy/signal/_spectral.c +scipy/signal/_spectral.cpp +scipy/signal/_max_len_seq_inner.c +scipy/signal/_max_len_seq_inner.cpp +scipy/signal/_sosfilt.c +scipy/signal/_upfirdn_apply.c +scipy/signal/_correlate_nd.c +scipy/signal/_lfilter.c +scipy/signal/_bspline_util.c +scipy/sparse/_csparsetools.c +scipy/sparse/_csparsetools.pyx +scipy/sparse/csgraph/_min_spanning_tree.c +scipy/sparse/csgraph/_shortest_path.c +scipy/sparse/csgraph/_tools.c +scipy/sparse/csgraph/_traversal.c +scipy/sparse/csgraph/_flow.c +scipy/sparse/csgraph/_matching.c +scipy/sparse/csgraph/_reordering.c +scipy/sparse/linalg/dsolve/umfpack/_umfpack.py +scipy/sparse/linalg/dsolve/umfpack/_umfpack_wrap.c +scipy/sparse/linalg/_eigen/arpack/_arpack-f2pywrappers.f +scipy/sparse/linalg/_eigen/arpack/_arpackmodule.c +scipy/sparse/linalg/_eigen/arpack/arpack.pyf +scipy/sparse/linalg/_isolve/iterative/BiCGREVCOM.f +scipy/sparse/linalg/_isolve/iterative/BiCGSTABREVCOM.f +scipy/sparse/linalg/_isolve/iterative/CGREVCOM.f +scipy/sparse/linalg/_isolve/iterative/CGSREVCOM.f +scipy/sparse/linalg/_isolve/iterative/GMRESREVCOM.f +scipy/sparse/linalg/_isolve/iterative/QMRREVCOM.f +scipy/sparse/linalg/_isolve/iterative/STOPTEST2.f +scipy/sparse/linalg/_isolve/iterative/_iterative.pyf +scipy/sparse/linalg/_isolve/iterative/_iterativemodule.c +scipy/sparse/linalg/_isolve/iterative/getbreak.f +scipy/sparse/sparsetools/bsr_impl.h +scipy/sparse/sparsetools/csc_impl.h +scipy/sparse/sparsetools/csr_impl.h +scipy/sparse/sparsetools/other_impl.h +scipy/sparse/sparsetools/sparsetools_impl.h +scipy/spatial/_ckdtree.cxx +scipy/spatial/ckdtree.h +scipy/spatial/_hausdorff.c +scipy/spatial/_qhull.c +scipy/spatial/_voronoi.c +scipy/spatial/transform/_rotation.c +scipy/special/_comb.c +scipy/special/_ellip_harm_2.c +scipy/special/_ellip_harm_2.h +scipy/special/_logit.c +scipy/special/_test_internal.c +scipy/special/_ufuncs.c +scipy/special/_ufuncs.h +scipy/special/_ufuncs.pyx +scipy/special/_ufuncs_cxx.cxx +scipy/special/_ufuncs_cxx.h +scipy/special/_ufuncs_cxx.pxd +scipy/special/_ufuncs_cxx.pyx +scipy/special/_ufuncs_cxx_defs.h +scipy/special/_ufuncs_defs.h +scipy/special/_ufuncs.pyi +scipy/special/cython_special.c +scipy/special/cython_special.h +scipy/special/cython_special.pxd +scipy/special/cython_special.pyx +scipy/special/_specfunmodule.c +scipy/special/tests/data/*.npz +scipy/special/ellint_carlson_cpp_lite/Makefile +scipy/special/ellint_carlson_cpp_lite/cellint.* +scipy/special/ellint_carlson_cpp_lite/tests +scipy/stats/_rank.c +scipy/stats/_mvn-f2pywrappers.f +scipy/stats/_mvnmodule.c +scipy/stats/_statlibmodule.c +scipy/stats/vonmises_cython.c +scipy/stats/_stats.c +scipy/stats/_levy_stable/levyst.c +scipy/stats/_biasedurn.cxx +scipy/stats/_biasedurn.pyx +scipy/stats/biasedurn.cxx +scipy/stats/_sobol.c +scipy/stats/_qmc_cy.cxx +scipy/stats/_hypotests_pythran.cpp +scipy/stats/_unuran/unuran_wrapper.c +scipy/stats/_rcont/rcont.c +scipy/stats/_stats_pythran.cpp +scipy/version.py +scipy/special/_exprel.c +scipy/optimize/_group_columns.c +scipy/optimize/cython_optimize/_zeros.c +scipy/optimize/cython_optimize/_zeros.pyx +scipy/optimize/lbfgsb/_lbfgsbmodule.c +scipy/optimize/_highs/cython/src/_highs_wrapper.cxx +scipy/optimize/_highs/cython/src/_highs_constants.cxx + +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix diff --git a/Backend_correct/README.md b/Backend_correct/README.md new file mode 100644 index 0000000..6da873e --- /dev/null +++ b/Backend_correct/README.md @@ -0,0 +1 @@ +# ARAI diff --git a/Backend_correct/app.py b/Backend_correct/app.py new file mode 100644 index 0000000..a9b587c --- /dev/null +++ b/Backend_correct/app.py @@ -0,0 +1,52 @@ +from flask import Flask, jsonify, request + +app = Flask(__name__) + +@app.route("/", methods=['POST']) +def statistics_output(): + data = request.get_json() + cost_of_trial = data.get('response_data', {}).get('cost_of_trial') + time_of_trial = data.get('response_data', {}).get('time_of_trial') + + response = { + "response_type": "statics_output", + "response_data": { + "cost_of_trial": cost_of_trial, # cena w PLN (integer) + "time_of_trial": time_of_trial # czas w formacie UTC (unix time stamp) + } + } + + return jsonify(response) + +def recommended_mediators(): + data = request.get_json() + request_type = data.get('request_type', {}).get('request_type') + request_data = data.get('request_data', {}).get('experts_called') + generic_input = data.get('generic_input', {}).get('generic_input') + trial_cost = data.get('trial_cost', {}).get('trial_cost') + localization = data.get('localization', {}).get('localization') + experts_called = data.get('experts_called', {}).get('experts_called') + witnesses_called = data.get('witnesses_called', {}).get('witnesses_called') + + top_5 = {} + list_of_mediators = [] + + for i in range(5): + mediator = {} + top_5.add(mediator) + + response = { + "response_type": "recommended_mediators", + "response_data": { + "name": name, + "specialization": specialization, + "localization": localization, + "score": score, + "number_of_opinions": number_of_opinions + } + } + + return jsonify(top_5) + +if __name__ == '__main__': + app.run(debug=True) \ No newline at end of file