Skip to content

Instantly share code, notes, and snippets.

View aiventures's full-sized avatar

Henrik Fessler aiventures

View GitHub Profile
@aiventures
aiventures / windows.txt
Created April 16, 2023 08:28
Windows Snippets
https://learn.microsoft.com/de-de/windows-server/administration/windows-commands/shutdown
/s Fährt den Computer herunter.
/hybrid Fährt das Gerät herunter und bereitet es für den schnellen Start vor. Diese Option muss mit der Option /s verwendet werden.
/t <xxx> Legt den Timeoutzeitraum vor dem Herunterfahren auf xxx Sekunden fest. Der gültige Bereich ist 0 bis 315360000 (10 Jahre), und der Standardwert ist 30.
/a Bricht das Herunterfahren des Systems ab. Dies kann nur während des Timeoutzeitraums verwendet werden. Bewirkt in Kombination mit /fw, dass alle ausstehenden Starts in der Firmware gelöscht werden.
C:\Windows\System32\shutdown.exe /s /hybrid /t 0
C:\Windows\System32\shutdown.exe /a
@aiventures
aiventures / vscode.txt
Created April 11, 2023 17:47
collection_vscode
20220814 Fold / Unfold all methods / Shortcut List
Command Fold / Unfold Code Shortcuts didnt work: CTRL SHIFT P FOLD ALL / UNFOLD ALL
15.4.2022 Code Open in New Tab
https://stackoverflow.com/questions/38713405/open-files-always-in-a-new-tab
CTRL+SHIFT+P Preferences: Open User Settings >
"workbench.editor.enablePreview" property, and set its value to false.
Editor > Rename > Enable Preview >
Workbench > Editor > Show Tabs
14.04.2022 settings.json in C:\Users\<User>\AppData\Roaming\Code\User
14.04.2022 Adding Bash As Console
@aiventures
aiventures / markdown.txt
Created April 11, 2023 17:46
collection_markdown
20.11.2019 15:03
https://www.markdownguide.org/basic-syntax/
https://www.markdownguide.org/extended-syntax/#fenced-code-blocks
https://rdmd.readme.io/docs/code-blocks
----------------------------
Notepad++ Add In MarkDownViewer++
@aiventures
aiventures / bash_snippets.txt
Last active May 1, 2023 19:21
Bash Snippets
alias oi="open_extended ${f_info}"
alias ow="open_extended ${p_docs}/worklog.txt"
# frequently used git aliases
alias git_log="git log -p -3"
alias git_log_graph="git log -3 --stat --graph --pretty=format:\"%H - %an, %ar : %s\""
# frequently used find commands
# get number of files of a given type and find filenames
@aiventures
aiventures / upsert_dataframe_from_dict.py
Created January 29, 2022 17:24
Upserting Data of a Dataframe Using a Dictionary
# upserting dataframe from a an array of dictionaries
import pandas as pd
d = {"X":{"A":"XA","B":"XB","D":"XD","M":"XM"},
"Y":{"B":"YB","D":"YD","M":"YM"},
"R1":{"A":"UA","B":"UB","N":"UN"}
}
df_new = pd.DataFrame(d).transpose()
@aiventures
aiventures / analyze_text.py
Created November 24, 2021 15:45
analyze_text.py creating word count csv
# this will create a CSV with a wordcount from text document
import numpy as np
import pandas as pd
from sklearn.feature_extraction.text import CountVectorizer
f = r"<path to your txt file>.txt"
f_csv = r"<path to your csv output file>.csv"
lines = []
with open(f,encoding="utf-8") as fp:
@aiventures
aiventures / python_snippets.py
Last active April 16, 2023 16:23
Python Snippets
#2022-07-25 Argparse Parse from Command Line
"C:\<Entwicklung>\WORK_JUPYTER\root\tools\argparse_template.py"
""" template code for argparse """
@aiventures
aiventures / Python_Cheatsheet.md
Last active December 23, 2020 11:56
Python Cheatsheet

Python Stuff

Here's a collection of some of my and other parts from my Python Journey

Python @ Work

File Operations