From 5c8df046b03892d8eea2a24421a69a19bc435cca Mon Sep 17 00:00:00 2001 From: Nikola Date: Mon, 13 Jul 2026 15:27:21 +0200 Subject: [PATCH] vault backup: 2026-07-13 15:27:21 --- .obsidian/workspace.json | 14 +++--- Semester 2/EIST/EIST CHEATSHEET.md | 73 +++++++++++++++++++++++++++--- Semester 2/EIST/Progress.md | 12 ++--- 3 files changed, 80 insertions(+), 19 deletions(-) diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 1e15cb9..b18cfc4 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -11,14 +11,14 @@ "id": "3ba46ad009838dd8", "type": "leaf", "state": { - "type": "split-diff-view", + "type": "markdown", "state": { - "aFile": "Semester 2/EIST/EIST CHEATSHEET.md", - "bFile": "Semester 2/EIST/EIST CHEATSHEET.md", - "aRef": "" + "file": "Semester 2/EIST/EIST CHEATSHEET.md", + "mode": "source", + "source": false }, - "icon": "diff", - "title": "Diff: EIST CHEATSHEET (Working Tree)" + "icon": "lucide-file", + "title": "EIST CHEATSHEET" } } ] @@ -208,8 +208,8 @@ }, "active": "3ba46ad009838dd8", "lastOpenFiles": [ - "Semester 2/EIST/EIST CHEATSHEET.md", "Semester 2/EIST/Progress.md", + "Semester 2/EIST/EIST CHEATSHEET.md", "Semester 2/EIST/EIST CHEATSHEET.pdf", "2026-07-10.md", "Semester 2/EIST/lu280859klubr.tmp", diff --git a/Semester 2/EIST/EIST CHEATSHEET.md b/Semester 2/EIST/EIST CHEATSHEET.md index fdd1b41..b4092dd 100644 --- a/Semester 2/EIST/EIST CHEATSHEET.md +++ b/Semester 2/EIST/EIST CHEATSHEET.md @@ -137,7 +137,7 @@ public List getTimeLine(@PathVariable("id") int userID) { getActivityURL + userID, // Set the uri HttpMethod.GET, null, // requestEntity = null as there is no body, new ParameterizedTypeReference>(){} // response body type ); - return response.getBody(); + return response.getBody(); } ``` ## REST API Endpoints @@ -202,8 +202,14 @@ public class ActivityController { } } ``` -
+## Excersises: +- L02PE01 TUM Social App +- L02PE02 REST Architectural Style Part 2 +- L09PE02 Wizardry Character Creation +- + +
# Flask API in Python ## *Server side* endpoints @@ -390,11 +396,64 @@ def list(self): return self.json_request("GET","/",request_body) pass ``` +## Excersises: +- L03PE01 Online FileFolder + +# Python - general syntax and tips: +## Dictonaries: +```python +thisdict = { +  "brand": "Ford", +  "model": "Mustang", +  "year": 1964 +} +print(thisdict["brand"]) +``` + +```python +thisdict = dict(name = "John", age = 36, country = "Norway") +print(thisdict) +``` +You can check if a key exists with the keyword *in*: +```python +if "model" in thisdict: +  print("Yes, 'model' is one of the keys in the thisdict dictionary") +``` + +You can loop over keys and values in dictionary: +```python +for x in thisdict: # Loop over keys +  print(x) +for x in thisdict.keys(): #Another way to loop over keys +  print(x) +  +for x in thisdict: # Loop over values +  print(thisdict[x]) +for x in thisdict.values(): # Another way to loop over values +  print(x) +  +for x, y in thisdict.items(): # Looping over key-value pairs as tuples +  print(x, y) +``` + +### Dictionary methods +| Method | Description | +| ------------ | ----------------------------------------------------------------------------------------------------------- | +| clear() | Removes all the elements from the dictionary | +| copy() | Returns a copy of the dictionary | +| fromkeys() | Returns a dictionary with the specified keys and value | +| get() | Returns the value of the specified key | +| items() | Returns a list containing a tuple for each key value pair | +| keys() | Returns a list containing the dictionary's keys | +| pop() | Removes the element with the specified key | +| popitem() | Removes the last inserted key-value pair | +| setdefault() | Returns the value of the specified key. If the key does not exist: insert the key, with the specified value | +| update() | Updates the dictionary with the specified key-value pairs | +| values() | Returns a list of all the values in the dictionary | # DOCKER **Docker reference: https://docs.docker.com/** - ### Dockerfiles https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/ https://docs.docker.com/reference/dockerfile/ @@ -528,8 +587,6 @@ public void getCityWeatherSingleDay(LocationDate request, StreamObserver #### Setup -The **blocking stub** is a placeholder on which the functions are called. It needs to be received from the gRPC object in some way. +The **blocking stub** is a placeholder on which functions are called. It needs to be received from the gRPC object in some way. ```java public WeatherClient(Channel channel) { @@ -706,6 +763,10 @@ public String displayPlaylist(int[] playlist) throws SpotifyClientException { } ``` +## Excersises: +- L02PB01 Weather Reporter +- L02P01 Spotify gRPC +- L03PE03 Gobblemaps
diff --git a/Semester 2/EIST/Progress.md b/Semester 2/EIST/Progress.md index 162ea60..12e3e19 100644 --- a/Semester 2/EIST/Progress.md +++ b/Semester 2/EIST/Progress.md @@ -8,15 +8,15 @@ - [x] L02PE01 - [x] L02PE02 - [x] L02PE03 - - [ ] **Lecture 3:** + - [x] **Lecture 3:** - [x] L03PB01 - [x] L03PB02 - [x] L03P01 - - [ ] L03P02 - - [ ] L03PE01 - - [ ] L03PE02 - - [ ] L03PE03 - - [ ] L03PE04 + - [x] L03P02 + - [x] L03PE01 + - [x] L03PE02 + - [x] L03PE03 + - [x] L03PE04 - [ ] **Lecture 4:** - [ ] L04PB01 - [ ] L04PB02