From: 2weiEmu Date: Thu, 26 Mar 2026 15:11:55 +0000 (+0100) Subject: cheatsheet and watchlist X-Git-Url: https://git.saalbach.dev/?a=commitdiff_plain;h=5b565c942f9b16200aafb2a8cdf66252847bfbe0;p=research-obsidian.git cheatsheet and watchlist --- diff --git a/.obsidian/app.json b/.obsidian/app.json index 43721a7..e0dc070 100644 --- a/.obsidian/app.json +++ b/.obsidian/app.json @@ -6,8 +6,8 @@ "includeName": true, "pageSize": "A4", "landscape": false, - "margin": "0", - "downscalePercent": 80 + "margin": "2", + "downscalePercent": 67 }, "promptDelete": false, "openBehavior": "file:List of things to do", diff --git a/.obsidian/appearance.json b/.obsidian/appearance.json index a672e0d..62aa922 100644 --- a/.obsidian/appearance.json +++ b/.obsidian/appearance.json @@ -4,5 +4,5 @@ "interfaceFontFamily": "Courier Code", "textFontFamily": "Courier Code", "monospaceFontFamily": "Courier Code", - "cssTheme": "Obsidian gruvbox" + "cssTheme": "Sanctum" } \ No newline at end of file diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index c493b8c..b76f23d 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -8,12 +8,12 @@ "type": "tabs", "children": [ { - "id": "d2b9d46d83ae4703", + "id": "1598ee3eb0962476", "type": "leaf", "state": { "type": "markdown", "state": { - "file": "WP and Flamethrowers/Apparently White Phosphorus and Flamethrowers are not illegal under international law.md", + "file": "Watchlist & Do List.md", "mode": "source", "source": false, "backlinks": true, @@ -28,7 +28,7 @@ } }, "icon": "lucide-file", - "title": "Apparently White Phosphorus and Flamethrowers are not illegal under international law" + "title": "Watchlist & Do List" } } ] @@ -174,12 +174,13 @@ "pdf-plus:PDF++: Toggle auto-paste": false } }, - "active": "d2b9d46d83ae4703", + "active": "1598ee3eb0962476", "lastOpenFiles": [ + "List of things to do.md", + "DGG Hackathon Simple Cheatsheet.md", "WP and Flamethrowers/Apparently White Phosphorus and Flamethrowers are not illegal under international law.md", "WP and Flamethrowers", "Nebulous Command/Missile Interception/Det. vs. Intc. vs. Saturation.md", - "List of things to do.md", "Nebulous Command/Missile Interception/Data.md", "Nebulous Command/Missile Interception/Effective Defense Layouts.md", "Nebulous Command/Missile Interception/Test Layouts/SCC_SGM211_Layout.png", @@ -211,7 +212,6 @@ "European Union/Child Sexual Abuse Act/Notes on the Original Document.md", "European Union/Child Sexual Abuse Act/cellar_13e33abf-d209-11ec-a95f-01aa75ed71a1.0001.02_DOC_1.pdf", "Nebulous Command/Notes on Nebulous Command.md", - "Nebulous Command/Notes on Mechanics.md", "NoteOn/note-on-logo.png", "NoteOn/note-on-500-oops.svg", "NoteOn/note-on-404-not-found.svg", diff --git a/DGG Hackathon Simple Cheatsheet.md b/DGG Hackathon Simple Cheatsheet.md new file mode 100644 index 0000000..bb114a3 --- /dev/null +++ b/DGG Hackathon Simple Cheatsheet.md @@ -0,0 +1,74 @@ +lambda functions and map function + +```python +% # MOD operator +// # Integer division Math.floor(a / b) + +def FUNCTION_NAME(arg1[: type], arg2[: type]): + # the indent is needed + +while CONDITION: + # indent + +for variable in ARRAY: # every item in array + +for index, variable in enumerate(ARRAY): + +# length of str or array +a, b = len(STR), len(ARRAY) + +for index in range(len(ARRAY)): +# range(ARRAY), creates a range of numbers +# according to range(START, STOP, STEP) +# STOP non-inclusive + +l = list(range(0, 5)) # may be cast to list +# [0, 1, 2, 3, 4] + +if VAR in ARRAY: + +if VAR not in ARRAY: + +match var: + case PATTERN: + + case _: + +``` +### Arrays +```python +ARRAY.append(ELEMENT) +ARRAY.count(ELEMENT) +ARRAY.index(ELEMENT) # first index of element +ARRAY.reverse() +ARRAY[index] # indexing +ARRAY[start:stop] # index, stop is not included +ARRAY[start:stop:step] # slice with step +# e.g. fast reverse: ARRAY[::-1] is ARRAY but reversed + +k = [var * 2 for var in ARRAY] # fast map +k = [var * 2 if CONDITION for var in ARRAY] +k = [var * 2 if CONDITION else var for var in ARRAY] +``` +### String manipulation +```python +STRING.join(ARRAY) +# e.g. +# ",".join(["3", "5", "3"]) +# "3,5,3" + +STR = f"The value of this variable is {VAR}" +STR = f"{VAR:.2f}" # limits to two decimal points + +INT = ord(CHAR) # ASCII value +CHAR = chr(INT) # other way around +ARRAY = STRING.split(CHAR) +INT = STRING.find(SUBSTRING[, START, STOP]) # first occurence index +INT = STRING.rfind(SUBSTRING[, START, STOP]) # first occurence index, but in reverse +STRING.isdigit() +STRING.isalpha() # i.e. alphabetic char > 1 +STR = STR.lower() # lowercase +STR = STR.upper() # uppercase +STR = STR.strip(STR of CHARS) +STR = STR.replace(OLD, NEW) +``` \ No newline at end of file diff --git a/Watchlist & Do List.md b/Watchlist & Do List.md index 0ecdffd..b9bcc49 100644 --- a/Watchlist & Do List.md +++ b/Watchlist & Do List.md @@ -55,6 +55,23 @@ the wire hannibal frieren +project hail mary + +play: death stranding + +listen: god is an astronaut + +watch: dark + +watch: ministry of ungentlemanly warfare + +watch: kingdom of heaven + +watch: the dark knight + +watch: kill bill + +watch: knight of the seven kingdoms The family stone