Examples#
While the majority of the kdFlex software is written in
C++, Python bindings for the C++ classes are available as Python
extensions.
Example Python scripts, named notebook.py, are available within each of the
subfolders within /usr/share/Karana/Tutorials in your local
installation (/opt/homebrew/share/Karana/Tutorials if using macOS). These scripts illustrate the use of the kdFlex Python extension and can be run from within each of these folders by
running python3 notebook.py.
There are also Jupyter notebook versions of each of the tutorials, named notebook.ipynb within the same folder. The introduction video shows how to run these notebooks from a remote machine, from a local machine, and as a normal Python script.
Python Tutorial Notebooks#
This section contains tutorial examples on using kdFlex. The Python examples are included here, since the associated Jupyter notebooks can be converted to HTML.
Installation folder#
The
notebooks tutorials are located under /usr/share/Karana/Tutorials (/opt/homebrew/share/Karana/Tutorials if using macOS).
The C++ examples cannot be easily converted to a web format, but are included with the kdflex package
as well under /usr/share/Karana/Tutorials/example_cc (or /opt/homebrew/share/Karana/Tutorials/example_cc) if
using macOS. One or more tags can be selected to filter down the list of notebooks.
Each notebook has a corresponding notebook.py, which is a regular Python script.