Giter VIP home page Giter VIP logo

stephanrhode / py-algorithms-4-automotive-engineering Goto Github PK

View Code? Open in Web Editor NEW
62.0 15.0 95.0 3.97 MB

This repository contains jupyter notebooks and python code for KIT course: Python Algorithms for Automotive Engineering

Home Page: http://www.fast.kit.edu/lff/1017_13056.php

License: MIT License

Jupyter Notebook 98.03% Python 1.10% TeX 0.76% Makefile 0.04% Batchfile 0.05% Limbo 0.01%
python

py-algorithms-4-automotive-engineering's Introduction

Python Algorithms for Automotive Engineering

This repository contains jupyter notebooks and python code for KIT course: Python Algorithms for Automotive Engineering. Please find the course syllabus here.

Build Status Build Status

Table of contents

1. Introduction

1.1 Introduction; 1.2. Python installation

2. Basic python

2.1. Syntax; 2.2. Semantics; 2.3. Data types; 2.4. Conditions and loops; 2.5. Functions; 2.6. Classes; 2.7. Modules

3. Tools and packages

3.1. Tools for Python; 3.2. Plot packages; 3.3. NumPy; 3.4. SciPy; 3.5. SymPy; 3.6. Scikit-Learn; 3.7. Additional packages

4. Software development

4.1. Git, Github; 4.2. PyTest; 4.3. Sphinx; 4.4. Continuous Integration; 4.5. Clean Code; 4.6. Workflows

5. Mini projects

5.1. Ordinary Differential Equations; 5.2. Vehicle model calibration; 5.3. e-Vehicle powertrain modeling; 5.4. Deep learning

Video lectures

In addition to the course material above please find here links to video lectures in German language. The text in parenthesis denotes time of video and additional time for exercises.

Lecture 01: Warm welcome (17min); 1.1 Introduction (24min); 1.2. Python installation (34min + 45min practice)

Lecture 02: 2.1. Syntax (22min + 10min practice); 2.2. Semantics (23min)

Lecture 03: 2.3. Data types (28min + 15min practice); 2.4. Conditions and loops (22min + 15min practice)

Lecture 04: 2.5. Functions (26min + 10min practice); 2.6. Classes (19min); 2.7. Modules (11min + 5min practice)

Lecture 05: 3.1. Tools for Python (31min + 25min practice); 3.2. Plot packages (20min + 10min practice)

Lecture 06: 3.3. NumPy (46min + 20min practice); 3.4. SciPy (42min)

Lecture 07: 3.5. SymPy (20min); 3.6. Scikit-Learn (67min + 20min practice)

Lecture 08: 3.7. Additional packages (13min); 4.1. Git, Github (79min)

Lecture 09: 4.2. PyTest (41min + 10min practice); 4.3. Sphinx (27min + 10min practice)

Lecture 10: 4.4. Continuous Integration (34min + 30min practice) 4.5. Clean Code (55min)

Lecture 11: 4.6. Workflows (41min); 5.1. Ordinary Differential Equations (28min + 30min practice)

Lecture 12: 5.2. Vehicle model calibration (36min + 45min practice);

Lecture 13: 5.3. e-Vehicle powertrain modeling (40min + 45min practice)

Lecture 14: 5.4. Deep learning (73min)

Getting Started

Please follow these steps to get a local copy of this project on your machine and to build, test, and deploy the lecture slides.

Prerequisites

Please bring your laptop to class. All notebooks can be viewed directly in github or through nbviewer nbviewer or, the notebooks ca be used interactively via Binder Binder.

Hence, you can follow the lecture with your laptop and a web browser. However, if you want to save your work and learn how to use tools like Pycharm, git and libraries like Pytest, you should install the following software on your computer.

Add to this, you might want to store your results in your own github repository. Therefore, please create a github account.

Installing

First, fork this repository to your github account. Than, clone this repository in a terminal with

git clone https://github.com/<YOUR USER>/py-algorithms-4-automotive-engineering.git

or go to Pycharm and click on VCS/Get from Version Control....

Second, open the project in Pycharm and create a new environment (right bottom corner of Pycharm). Than open requirements.txt in Project panel and click on install missing packages.

Alternatively, you can install the virtual environment manually from command line with this pip manual.

Third, test your installation with activated environment and a pytest call. You can check if you activated the environment by having a look at the command prompt. If it starts with (venv) user@computer:~/some/path, you are in active environment (venv), if not you need to activate the environment with

.\venv\Scripts\activate

on Windows and with

source venv/bin/activate

on Linux and macOS. Now test your installation with

pytest

Running the tests

This is very simple, just call

pytest

Create presentation slides

You can convert the jupyter notebooks into slides with this command

python make_slides.py

Create html or pdf script

You can join all jupyter notebooks into one file with nbmerge package and the command

nbmerge --recursive -o merged.ipynb

When this is done, you can use

jupyter nbconvert merged.ipynb --to html

or

jupyter nbconvert merged.ipynb --to pdf

to create all in one files of this course. Note that you need a pandoc installation on your computer. Curently, html option works, pdf causes errors and the figures in pdf are missing.

Maintainer

Contributors

License

This project is licensed under the MIT License - see the LICENSE file for details

Errata

The course material was mainly written in mid 2019 till spring 2020 for Python 3.6 and as the language develops, some parts would need changes for Python 3.11 version (current version in 2023).

Bugs

  • 01_basic-python\02_data-types dictionaries are now ordered per default.
  • I missed a section about type hints, which were introduced in Python 3.5 already. They are a convenient way to call static type checkers like mypy before program execution.

Enhancements

Many new features are now available in Python. Here some additional suggestions of language features of interest.

  • Dataclasses are way more powerful replacement for data modeling than named tuples or dictionaries.
  • Protocols came in Python 3.8 and allow to define interfaces through static duck typing.

py-algorithms-4-automotive-engineering's People

Contributors

awiawi avatar felixbleimund avatar karltlf avatar mauricio-fernandez-l avatar stephanrhode avatar tim21121997 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

py-algorithms-4-automotive-engineering's Issues

Compatibility Issue: make_slides.py and Notebook Package Version 7.0.2

Hi there,

It appears there's an incompatibility with the latest version of the notebook package (7.0.2) when running the make_slides script. When using this version of the package, I encountered an error, i.e. ModuleNotFoundError: No module named 'notebook.base'.

At the time the lecture notebooks were written, the notebook package was not yet at version > 7.

I resolved the issue by downgrading to version 6.5.5, after which the script worked perfectly. This information might be helpful for other students who encounter the same issue.

Links to references.bib not working in notebook

I found that the links referencing the references.bib file (for example here https://github.com/StephanRhode/py-algorithms-4-automotive-engineering/blame/master/01_basic-python/00_syntax.ipynb#L18) can not be resolved in notebook (on github and local).

The links reference the file ./references.bib but the file is one folder up, so the link should point to ../references.bib. Is there a maybe a problem with other tools if the links are pointing to ../references.bib?

DeepL notebook

Hi @mauricio-fernandez-l ,

great that you are on board. I created the template notebook 04_mini-projects/09_deepl.ipynb on branch deepl. This notebook has some default figures and is tested every time you push in Travis CI. The link to respective Travis is in readme and here for convenience Travis for this repo

You can test all notebooks with pytest and you can create presentation slides with make_slides.py in root folder. All is described in readme. If you need additional python packages, please add them in requirements.txt .

With respect to topic, it would be nice if we could do something with traffic sign recognition, but feel free. Add to this, it would be great if the students could solve some small problems by themselves.

Please let me know if you struggle with the setup of this repo or need any support.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.