Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Howtos: Refactoring #864

Merged
merged 11 commits into from
Sep 26, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
Howto BF-UI-001: SciUI - Reuse of interactive 2D/3D Input Space
===============================================================

Prerequisites
^^^^^^^^^^^^^
**Prerequisites**

Please install the following packages to run this example properly:

Expand All @@ -12,24 +11,21 @@ Please install the following packages to run this example properly:



Executable code
^^^^^^^^^^^^^^^
**Executable code**

.. literalinclude:: ../../../../../../../../../src/mlpro/bf/examples/howto_bf_ui_001_reuse_of_interactive_2d_3d_input_space.py
.. literalinclude:: ../../../../../../../../../test/howtos/bf/howto_bf_ui_001_reuse_of_interactive_2d_3d_input_space.py
:language: python



Results
^^^^^^^
**Results**

The SciUI application should start and show an interactive demo of a 2D/3D input space as follows:

.. image:: images/howto.bf.ui.001/sciui_iis.png



Cross Reference
^^^^^^^^^^^^^^^
**Cross Reference**

- :ref:`API Reference: SciUi <target_api_bf_ui_sciui>`
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,20 @@
Howto BF-001: Logging
=====================

Executable code
^^^^^^^^^^^^^^^
**Executable code**

.. literalinclude:: ../../../../../../../../../src/mlpro/bf/examples/howto_bf_001_logging.py
.. literalinclude:: ../../../../../../../../../test/howtos/bf/howto_bf_001_logging.py
:language: python



Results
^^^^^^^
**Results**

.. image:: images/log_example.png
:scale: 60 %



Cross Reference
^^^^^^^^^^^^^^^
**Cross Reference**

- :ref:`API Reference: Various <target_api_bf_various>`
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,20 @@
Howto BF-002: Timer
===================

Executable code
^^^^^^^^^^^^^^^
**Executable code**

.. literalinclude:: ../../../../../../../../../src/mlpro/bf/examples/howto_bf_002_timer.py
.. literalinclude:: ../../../../../../../../../test/howtos/bf/howto_bf_002_timer.py
:language: python



Results
^^^^^^^
**Results**

.. image:: images/timer_example.png
:scale: 70 %



Cross Reference
^^^^^^^^^^^^^^^
**Cross Reference**

- :ref:`API Reference: Various <target_api_bf_various>`
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,22 @@
Howto BF-003: Store and plot data
=================================

Prerequisites
^^^^^^^^^^^^^
**Prerequisites**

PLease install following packages to run this howto

- `Matplotlib <https://matplotlib.org/>`_



Executable code
^^^^^^^^^^^^^^^
**Executable code**

.. literalinclude:: ../../../../../../../../../src/mlpro/bf/examples/howto_bf_003_store_plot_and_save_variables.py
.. literalinclude:: ../../../../../../../../../test/howtos/bf/howto_bf_003_store_plot_and_save_variables.py
:language: python



Results
^^^^^^^
**Results**

.. image::
images/states_1.png
Expand All @@ -41,7 +38,6 @@ Results



Cross Reference
^^^^^^^^^^^^^^^
**Cross Reference**

- :ref:`API Reference: Various <target_api_bf_various>`
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,21 @@
Howto BF-004: Buffers
=====================

Executable code
^^^^^^^^^^^^^^^
**Executable code**

.. literalinclude:: ../../../../../../../../../src/mlpro/bf/examples/howto_bf_004_buffers.py
.. literalinclude:: ../../../../../../../../../test/howtos/bf/howto_bf_004_buffers.py
:language: python



Results
^^^^^^^
**Results**

.. image::
images/buffer_example.png
:width: 500px



Cross Reference
^^^^^^^^^^^^^^^
**Cross Reference**

- :ref:`API Reference: Various <target_api_bf_various>`
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,20 @@
Howto BF-005: Persistence
=========================

Executable code
^^^^^^^^^^^^^^^
**Executable code**

.. literalinclude:: ../../../../../../../../../src/mlpro/bf/examples/howto_bf_005_persistence.py
.. literalinclude:: ../../../../../../../../../test/howtos/bf/howto_bf_005_persistence.py
:language: python



Results
^^^^^^^
**Results**

.. image::
images/howto.bf.005.png



Cross Reference
^^^^^^^^^^^^^^^
**Cross Reference**

+ :ref:`API Reference: Various <target_api_bf_various>`
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,21 @@
Howto BF-EH-001: Event Handling
===============================

Executable code
^^^^^^^^^^^^^^^
**Executable code**

.. literalinclude:: ../../../../../../../../../src/mlpro/bf/examples/howto_bf_eh_001_event_handling.py
.. literalinclude:: ../../../../../../../../../test/howtos/bfs/howto_bf_eh_001_event_handling.py
:language: python



Results
^^^^^^^
**Results**

.. image::
images/eh_example.png
:width: 900 px



Cross Reference
^^^^^^^^^^^^^^^
**Cross Reference**

+ :ref:`API Reference: Event Handling <target_api_bf_event>`
- :ref:`API Reference: Event Handling <target_api_bf_event>`
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,22 @@
Howto BF-MT-001: Multitasking - Parallel Algorithms
===================================================

Prerequisites
^^^^^^^^^^^^^
**Prerequisites**

Please install following packages to run this howto

- `Multiprocess <https://pypi.org/project/multiprocess/>`_



Executable code
^^^^^^^^^^^^^^^
**Executable code**

.. literalinclude:: ../../../../../../../../../src/mlpro/bf/examples/howto_bf_mt_001_parallel_algorithms.py
.. literalinclude:: ../../../../../../../../../test/howtos/bf/howto_bf_mt_001_parallel_algorithms.py
:language: python



Results
^^^^^^^
**Results**

The howto example logs details of the three runs and in particular the speed factors of multithreading and
multiprocessing in comparison to the serial/synchronous execution. On a PC with an AMD Ryzen 7 CPU (8/16 cores)
Expand All @@ -30,7 +27,6 @@ running Linux, the system monitor shows an approx. 5x speedup with multithreadin



Cross Reference
^^^^^^^^^^^^^^^
**Cross Reference**

- :ref:`API Reference: Multitasking <target_api_bf_mt>`
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,22 @@
Howto BF-MT-002: Multitasking - Tasks and Workflows
===================================================

Prerequisites
^^^^^^^^^^^^^
**Prerequisites**

To run this howto please install the following packages

- `Multiprocess <https://pypi.org/project/multiprocess/>`_



Executable code
^^^^^^^^^^^^^^^
**Executable code**

.. literalinclude:: ../../../../../../../../../src/mlpro/bf/examples/howto_bf_mt_002_tasks_and_workflows.py
.. literalinclude:: ../../../../../../../../../test/howtos/bf/howto_bf_mt_002_tasks_and_workflows.py
:language: python



Results
^^^^^^^
**Results**

The howto example logs details of the two runs (workflow synchronously/multithreading). A short break
between the workflow runs allows a better observation of CPU load in the system monitor.
Expand All @@ -29,7 +26,6 @@ between the workflow runs allows a better observation of CPU load in the system



Cross Reference
^^^^^^^^^^^^^^^
**Cross Reference**

- :ref:`API Reference: Multiprocessing <target_api_bf_mt>`
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,29 @@
Howto BF-MATH-001: Dimensions, Spaces and Elements
=============================================

Prerequisites
^^^^^^^^^^^^^
**Prerequisites**

Please install following packages to run this howto

- `Numpy <https://www.numpy.org/>`_



Executable code
^^^^^^^^^^^^^^^
**Executable code**

.. literalinclude:: ../../../../../../../../src/mlpro/bf/examples/howto_bf_math_001_spaces_and_elements.py
.. literalinclude:: ../../../../../../../../test/howtos/bf/howto_bf_math_001_spaces_and_elements.py
:language: python



Results
^^^^^^^
**Results**

.. image::
images/math_001.png
:width: 1200 px



Cross Reference
^^^^^^^^^^^^^^^
**Cross Reference**

- :ref:`API Reference: Math <target_ap_bf_math>`
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,22 @@
Howto BF-MATH-010: Normalizers
==============================

Prerequisites
^^^^^^^^^^^^^
**Prerequisites**

Please install following packages to run this howto

- `Numpy <https://www.numpy.org>`_



Executable code
^^^^^^^^^^^^^^^
**Executable code**

.. literalinclude:: ../../../../../../../../src/mlpro/bf/examples/howto_bf_math_010_normalizers.py
.. literalinclude:: ../../../../../../../../test/howtos/bf/howto_bf_math_010_normalizers.py
:language: python



Results
^^^^^^^
**Results**

The results will be available as follows

Expand Down Expand Up @@ -102,7 +99,6 @@ The results will be available as follows



Cross Reference
^^^^^^^^^^^^^^^
**Cross Reference**

- :ref:`API Reference: Normalizers <target_ap_bf_math_norm>`
Loading