Python

Beside editing text files, we have to embed these textfile into a python underlying structure of the jupyter notebook. Furthermore, we want to use python for ploting based on the matplotlib. Thus, to know basics of python programming is essential. In the following we will privite a showrt introduction what python is and provide link to certain online tutorials.

What is Python?

Python is a high-level, interpreted, general-purpose programming language known for its simplicity and readability. Created by Guido van Rossum in 1991, Python emphasizes code readability with its use of significant whitespace and an easy-to-learn syntax. It is widely used in web development, data science, automation, artificial intelligence, machine learning, and more.

Advantages of Python

  1. Ease of Learning and Use: Python’s syntax is clean and straightforward, making it accessible to beginners and reducing development time for experienced programmers.

  2. Wide Range of Libraries and Frameworks: Python has a vast ecosystem of libraries (like NumPy, Pandas, TensorFlow) and frameworks (like Django, Flask), which allow rapid development across different domains.

  3. Cross-Platform Compatibility: Python is cross-platform, meaning code written in Python can run on different operating systems (Windows, macOS, Linux) without modification.

  4. Dynamic Typing: Python is dynamically typed, so developers don’t need to declare the types of variables, which makes it easier to write and modify code quickly.

  5. Strong Community and Support: Python has an active and large developer community, providing extensive support, tutorials, and tools, along with frequent updates.

  6. Versatility: Python is used in diverse fields, such as web development, scientific computing, artificial intelligence, automation, and scripting, making it a versatile language.

  7. Integration Capabilities: Python can easily integrate with other languages (like C, C++, Java), databases, and web services, allowing it to fit into existing systems.

Disadvantages of Python

  1. Performance (Speed): Python is slower compared to compiled languages like C++ or Java, due to its interpreted nature. For tasks where performance is critical (e.g., game engines, high-frequency trading), Python may not be the best choice.

  2. High Memory Consumption: Python tends to use more memory than languages like C or C++, which can be an issue for memory-constrained environments.

  3. Not Ideal for Mobile or Client-Side Development: Python is not commonly used for mobile app development or client-side programming. While there are frameworks (like Kivy for mobile apps), they are not as mature or widely used as alternatives like Swift (iOS) or Kotlin (Android).

  4. Runtime Errors: Because Python is dynamically typed, certain errors (such as type errors) may not be detected until runtime, which can lead to issues in large projects.

  5. Global Interpreter Lock (GIL): Python’s GIL limits its ability to run multiple threads in parallel on multi-core processors, which can hinder performance for CPU-bound multi-threaded applications.

In summary, Python excels in ease of use, flexibility, and broad applicability, but it may not be the best choice when performance, memory efficiency, or specific application domains (e.g., mobile development) are critical.

Python tutorials

We recommend to what the following video tutorials

Text tutorials are

Already existing courses “Python for Scientific Computing”

You can directly apply code presented in the video or text tutorial in a provided notebook, located in python_tutorial/PythonTutorialNotebook.ipynb when you start jupyter notebook by the docker container.

Post-installation of packages into the container

In case, you need python packages beyond the provided, it is straight forward to install them into the container using pip. Note that in this case the software need to be reloaded all the time when you start jupyter new.

Just run

pip install <package>;

Where your specify the package name.

Matplotlib

For visualization, we want to use matplotlib. A tutorial for it is available here.