Here's a collection of some of my and other parts from my Python Journey
- aiventures: My Repository
- Python 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 |
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 |
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++ |
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 |
# 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() |
# 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: |
#2022-07-25 Argparse Parse from Command Line | |
"C:\<Entwicklung>\WORK_JUPYTER\root\tools\argparse_template.py" | |
""" template code for argparse """ |
Here's a collection of some of my and other parts from my Python Journey