# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# + [markdown] slideshow={"slide_type": "slide"}
# <img src="../_static/objects.jpg" alt="Objects" width="350" align="right">
#
# [Table of contents](../toc.ipynb)
#
# # Tools for Python developers
#
# * Upon now, you used either python through terminal or some cloud service like [Python anywhere](https://www.pythonanywhere.com/try-ipython/), or the respective jupyter notebooks for this class on [Binder](https://mybinder.org/v2/gh/StephanRhode/py-algorithms-4-automotive-engineering/master)
# * This chapter introduces an integrated development environment (Pycharm) and local interactive notebooks (Jupyter).

# + [markdown] slideshow={"slide_type": "slide"}
# ## Pycharm
#
# <img src="https://raw.githubusercontent.com/gilbarbara/logos/master/logos/pycharm.svg?sanitize=true" alt="Octocat" width="150">
#
# * Pycharm is one possible integrated development environment (IDE) for Python. 
# * An IDE is basically a program which supports all steps of software development like
#   * Coding with code completion, static code analyses, templates,...
#   * Testing
#   * Debugging
#   * Version control
#   * Environment and package management
#   * Code refactoring
#   * Build chains,...
#   * Please find [here all features](https://www.jetbrains.com/pycharm/features/)

# + [markdown] slideshow={"slide_type": "subslide"}
# * Other popular choices next to Pycharm are Visual Studio Code, and Spyder. Just try which one is best for you.
# * There is a free community edition of Pycharm [link to installer](https://www.jetbrains.com/pycharm/download).
# * And as Pycharm is a professional software, there is much [video recorded training material](https://www.jetbrains.com/pycharm/learning-center/).

# + [markdown] slideshow={"slide_type": "subslide"}
# ### Pycharm introduction video
#
# Please find here a [video which presents Pycharm features](https://www.youtube.com/watch?v=BPC-bGdBSM8).

# + [markdown] slideshow={"slide_type": "subslide"}
# ### A small Pycharm live demo
#
# <img src="pycharm.png" alt="Pycharm" width="800">

# + [markdown] slideshow={"slide_type": "subslide"}
# ## Exercise: First steps in Pycharm (15 minutes)
#
# <img src="../_static/exercise.png" alt="Exercise" width="75" align="left">
#
# Please complete the following tasks:
# * Install Pycharm from [https://www.jetbrains.com/pycharm/download](https://www.jetbrains.com/pycharm/download)
# * Create a new project
# * Create an environment (pip, conda)
# * Add this Python code as file
#   ```
#   def my_hello():
#       print("Hello world")
#   
#   ```
# * Execute this file in Pycharm

# + [markdown] slideshow={"slide_type": "slide"}
# ## Jupyter
#
# <img src="https://raw.githubusercontent.com/gilbarbara/logos/master/logos/jupyter.svg?sanitize=true" alt="Octocat" width="150">
#
# * Jupyter is an interactive programming environment, where you can combine programming, presentation of results, and explanation with text and equations in one web page.
# * Hence Jupyter is a way to communicate scientific computing like it is done since ages. Leonardo da Vinci used Notebooks as well!
# * Jupyter works with Python kernel, as well as with Julia, R, Rubi, Matlab.
# * Relatively recent, [Jupyter Lab](https://jupyterlab.readthedocs.io/en/stable/) was released, which is the successor of Jupyter.
# * Note the entire course material is written in Jupyter. It is very convenient :)

# + [markdown] slideshow={"slide_type": "subslide"}
# ### Jupyter installation
#
# * Jupyter is a package. Hence, just type `conda install jupyter` to extend your environment.
# * You can also try Jupyter in the cloud here [https://jupyter.org/try](https://jupyter.org/try).
# * The command to start the Jupyter notebook server is `jupyter notebook`.
#
# <img src="jupyter.png" alt="Jupyter" width="800">

# + [markdown] slideshow={"slide_type": "subslide"}
# ### Some Jupyter commands
#
# * There is edit mode and navigation mode. You can switch between them with `enter` and `esc`.
# * `shift + enter` runs a cell and selects the next cell below.
# * If you use functions, you can use auto completion with `tab` or read the doc string with `shift + tab`.
# * Many more keyboard shortcuts are on top of Jupyter panel in the keyboard icon.
# * Add to this, there are some so called magic commands, which start with `%`. Quite common is for instance `%matplotlib notebook`, which embeds plots.

# + [markdown] slideshow={"slide_type": "subslide"}
# ### Jupyter tutorial
#
# * There is a great Jupyter tutorial on Binder. Hence, please consult this tutorial to learn Jupyter.
#
# * https://hub.mybinder.turing.ac.uk/user/ipython-ipython-in-depth-zgalw2wh/notebooks/binder/Index.ipynb

# + [markdown] slideshow={"slide_type": "subslide"}
# ## Exercise:  Jupyter (10 minutes)
#
# <img src="../_static/exercise.png" alt="Exercise" width="75" align="left">
#
#
# Here the task:
#
# * Activate your local Python environment and install jupyter with `conda install jupyter`.
# * Open the notebook server with `jupyter notebook` command.
# * Create a new notebook and try some Python code there.
# * Add text in markdown cells.

# + [markdown] slideshow={"slide_type": "subslide"}
# ## Jupyter extensions
#
# There are many extensions for Jupyter notebooks like 
# * table of contents bar,
# * variable inspector,
# * spell checkers,
# * auto code style checks,...
# available in [jupyter-contrib-nbextensions](https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/index.html).
#
# With these extensions, Jupyter becomes a very powerful interactive development environment.

# + [markdown] slideshow={"slide_type": "subslide"}
# Please find here a screen shot of Jupyter with table of contents and variable inspector extension.
#
# <img src="jupyter_nb_extensions.png" alt="Jupyter extended" width="800">

StarcoderdataJupyterScriptsDedupFiltered