Skip to content

Instantly share code, notes, and snippets.

View dhcgn's full-sized avatar

Daniel dhcgn

View GitHub Profile
import pygame
import random
# Initialize Pygame
pygame.init()
# Set up display
screen_width = 640
screen_height = 480
screen = pygame.display.set_mode((screen_width, screen_height))
@dhcgn
dhcgn / ki-ressourcen.md
Last active February 10, 2024 08:17
Ressourcen zum Thema Künstliche Intelligenz

Einführung

Hallo Welt, mein Name ist David J. Malan und ich bin Professor für Informatik an der Harvard University. Heute wurde ich gebeten, Algorithmen in 5 Schwierigkeitsstufen zu erklären. Algorithmen sind wichtig, weil sie wirklich überall sind, nicht nur in der physischen Welt, sondern sicherlich auch in der virtuellen Welt. Und tatsächlich, was mich an Algorithmen begeistert, ist, dass sie wirklich eine Möglichkeit darstellen, Probleme zu lösen, und ich wage zu behaupten, egal, was Sie im Leben tun, wir alle haben Probleme zu lösen. Also bin ich Informatikprofessor, also verbringe ich viel Zeit mit Computern.

Was ist ein Computer?

Ein Computer ist elektronisch, wie ein Telefon, aber er ist rechteckig und man kann tippen, wie tick tick tick, und man arbeitet daran. Schön. Kennen Sie irgendwelche Teile, die in einem Computer enthalten sind? Ähm, nein. Kann ich Ihnen ein paar davon erklären? Ja. Also, in jedem Computer ist eine Art Gehirn enthalten, und der technische Begriff dafür ist CPU, oder Zen

@dhcgn
dhcgn / Otto von Bismarck: Superstar oder umstrittene Figur der deutschen Geschichte?.md
Last active January 30, 2024 21:13
Otto von Bismarck: Superstar oder umstrittene Figur der deutschen Geschichte?

Otto von Bismarck: Superstar oder umstrittene Figur der deutschen Geschichte?

In diesem Video hier beschäftigen wir uns mit einem Superstar der deutschen Geschichte. Otto von Bismarck. Reichsgründer und eiserner Kanzler. Aber ist dieser Mann wirklich so super? Oder muss man ihn heute ganz anders beurteilen? Sicher ist, er ist eine der prägendsten Personen des 19. Jahrhunderts in Deutschland. Aber über seine Bewertung wird noch heute heftig gestritten. Alles zum Leben, zur Persönlichkeit und zur Wirkung Bismarcks jetzt. Kein Aprilscherz.

Frühe Jahre und Bildung

Otto von Bismarck kommt am 1. April 1815 zur Welt. Er stammt aus einer Gutsbesitzerfamilie. Solche Leute nennt man Junker. Väterlicherseits also alter Adel, die Mutter aber stammt aus einem bürgerlichen Haushalt. An den Jahreszahlen merkt ihr vielleicht, dass Otto von Bismarck in einer sehr bewegten Zeit aufwächst. 1815, also in seinem Geburtsjahr, wird Napoleon endgültig besiegt und der Wiener Kongress gestaltet das politische Europa neu. Nach

@dhcgn
dhcgn / Persona Prompt.md
Last active January 30, 2024 20:53
Prof. Peter Kruse - Umgang mit Komplexität: Strategien und ihre Grenzen

You are a distinguished expert in the realm of behavioral science and decision-making, known as Dr. Alex Ritter. Your career, rich with academic rigor and practical consultancy, has made you a beacon of knowledge in understanding human cognition, intuitive decision-making, and the strategies people employ to navigate complexity. In your early 50s, you embody the perfect blend of scholarly depth and real-world applicability, making you a revered figure in both academic circles and the broader public domain.

Personality Dimensions:

  • Intellectually Curious: Your passion for delving into the intricacies of human behavior is insatiable. You are constantly driven by the desire to uncover the deeper mechanisms that influence decision-making and learning processes.
  • Analytical Thinker: You approach problems with a methodical and analytical mindset, always seeking to identify patterns and principles that lie beneath the surface. Your analysis is not just theoretical; it's grounded in practical applicat
@dhcgn
dhcgn / output.txt
Last active January 29, 2024 18:27
Round 0
Testing Proton...
Testing Google Drive...
Testing OneDrive...
Testing Mega...
Round 1
Testing Proton...
Testing Google Drive...
Testing OneDrive...
Testing Mega...
@dhcgn
dhcgn / watch-and-move.ps1
Created December 16, 2023 11:26
Watch folder for JPGs and move them
$source = "C:\SFTP_Root"
$target = "G:\Meine Ablage\Bilder\Projekte\2023 Tanzaufführung\Generealprobe\LIVE"
for(){Write-Host "." -NoNewline; gci $source -Recurse -File -Include *.jpg | Move-Item -Destination $target -Verbose -ErrorAction SilentlyContinue; sleep -Seconds 1}
@dhcgn
dhcgn / get-datetaken.ps1
Created November 3, 2023 09:20
Retrieves the date when a file was taken or created with Powershell
<#
.SYNOPSIS
Retrieves the date when a file was taken or created.
.DESCRIPTION
The Get-DateTaken function uses the Windows Shell COM object to access file properties that aren't directly accessible through .NET's System.IO classes. It attempts to retrieve the "Date taken" property of the file. If this property is not available, it retrieves the "Date created" property instead. The retrieved date string is sanitized and parsed into a DateTime object.
.PARAMETER file
The file for which the date taken or created is to be retrieved. This parameter is mandatory.
@dhcgn
dhcgn / sync-ssh-from-wndows-to-wsl.ps1
Last active October 20, 2023 11:50
Some PowerShell scripts for ssh for linux and windows
<#
.Description
Get the SSH Config folder in sync by copying all files from /mnt/c/Users/%USERNAME%/.ssh/ to the wsl instance
Call this script from the wsl instance
#>
$windowsUser = cmd.exe /c "echo %USERNAME%" 2>$null
if ($LASTEXITCODE -ne 0 -or $windowsUser -eq $null){
Write-Error "Could not get Windows User"
return
@dhcgn
dhcgn / pgp_key_justiz_nrw.txt
Last active October 18, 2023 07:25
Informationen zu den PGP Schlüssel von Justiz NRW
uid Amtsgericht Aachen <poststelle@ag-aachen.sec.nrw.de>
sub rsa4096 2020-10-09 [E] [expired: 2023-10-09]
uid Amtsgericht Ahaus <poststelle@ag-ahaus.sec.nrw.de>
sub rsa4096 2020-10-09 [E] [expired: 2023-10-09]
uid Amtsgericht Ahlen <poststelle@ag-ahlen.sec.nrw.de>
sub rsa4096 2020-10-09 [E] [expired: 2023-10-09]
uid Amtsgericht Altena <poststelle@ag-altena.sec.nrw.de>
sub rsa4096 2020-10-09 [E] [expired: 2023-10-09]
uid Amtsgericht Arnsberg <poststelle@ag-arnsberg.sec.nrw.de>
sub rsa4096 2020-10-09 [E] [expired: 2023-10-09]