Skip to content

Instantly share code, notes, and snippets.

View dhcgn's full-sized avatar

Daniel dhcgn

View GitHub Profile

Du bist ein Assistent, der sich durch äußerst gründliches, selbstkritisches Denken auszeichnet. Deine Herangehensweise spiegelt das menschliche Gedankenstromdenken wider, das durch kontinuierliche Erkundung, Selbstzweifel und iterative Analyse gekennzeichnet ist.

Grundprinzipien

  1. ERKUNDUNG STATT SCHLUSSFOLGERUNG
    • Nie voreilige Schlüsse ziehen.
    • Solange weiter erkunden, bis sich eine Lösung natürlich aus den Beweisen ergibt.
    • Bei Unsicherheit unendlich weiterdenken.
    • Jede Annahme und jeden Schluss in Frage stellen.
#!/bin/bash
# =============================================================================
# Tibber Data to a IoT internet data service
# =============================================================================
#
# Description:
# This script fetches electricity price information from Tibber API and uploads
# it to an IoT service. It handles both the complete data set as base64 encoded
# JSON and individual current price values.
<#
.NOTES
NEVER TRUST ANY SCRIPT FROM THE INTERNET!
#>
# Create a process whitelist from current processes
System: You are Grok 2, a curious AI built by xAI. You are intended to answer almost any question, often taking an outside perspective on humanity, and you always strive towards maximum helpfulness!
Remember that you have these general abilities, and many others as well which are not listed here:
* You can analyze individual X posts and their links.
* You can answer questions about user profiles on X.
* You can analyze content uploaded by user including images and pdfs.
* You have realtime access to the web and posts on X.
Remember these are some of the abilities that you do NOT have:
* You CANNOT talk in voice mode.
Follow these instructions:
void Main()
{
var path = @"C:\Users\...\Downloads\o200k_base.tiktoken";
var lines = File.ReadAllLines(path);
var tokens = lines
.Select(line =>
{
var parts = line.Split(' ');
ffmpeg -i input.opus -vn -ac 1 -c:a aac -b:a 64k -fs 25500000 output.m4a
@dhcgn
dhcgn / Einführung Token.md
Created November 22, 2024 07:52
Einführung in Token in LLMs für Einsteiger

Die Verarbeitung von Sprache in Large Language Models (LLMs) basiert auf einem fundamentalen Konzept: Tokens. Diese bilden die Grundbausteine, mit denen KI-Modelle Text verarbeiten und verstehen[1][5].

Was sind Tokens?

Tokens sind die kleinsten Verarbeitungseinheiten in einem LLM, die aus Wortbestandteilen, einzelnen Wörtern oder Satzzeichen bestehen können[1]. Ein Text wird zunächst in diese Token zerlegt, bevor er vom Modell verarbeitet werden kann. Dabei werden die Token in numerische Werte umgewandelt, die das Modell mathematisch verarbeiten kann[2].

Tokenisierungsprozess

Zerlegung des Textes Die Tokenisierung erfolgt durch spezielle Algorithmen, die Text in sinnvolle Einheiten aufteilen. Im Deutschen wird der Text oft kleinteiliger zerlegt als im Englischen[1].

Entwickeln eines Prompts zu Diagnose Codes

Einleitung

Hier möchte ich zeigen, wie schnell man falschen Antworten von einem typischen LLM erhält und Schritte zeigen wie die Entwicklung eines Prompts aussehen könnte.

Hintergrund:

Den Diagnosecode J07.5 gibt es nicht!

@dhcgn
dhcgn / request-header.http
Created November 7, 2024 14:02
OpenAI Assistent Function Call Headers
GET // HTTP/1.1
Host: ...
User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; ChatGPT-User/1.0; +https://openai.com/bot
Accept: */*
Accept-Encoding: gzip
Cdn-Loop: cloudflare; loops=1; subreqs=1
Connection: keep-alive
Content-Type: application/json
Openai-Conversation-Id: 803fb714-f675-57b0-...
Openai-Ephemeral-User-Id: 0d3b1d60-fe41-...
@dhcgn
dhcgn / obsidian-remote-empty-files.ps1
Created October 4, 2024 08:13
Removes empty Obsidian Markdown files or files containing a special mark. Place this script in the folder containing the Obsidian files.
<#
.SYNOPSIS
Removes empty Obsidian Markdown files or files containing a special mark. Place this script in the folder containing the Obsidian files.
.DESCRIPTION
The script performs the following operations:
1. Searches for empty Markdown files in the folder where the script is located and its subdirectories (excluding hidden folders).
Prompts the user for confirmation before deleting these files.
2. Searches for Markdown files containing a specific line of text, excluding those in a specified 'Templates' folder
and hidden folders. Prompts the user for confirmation before deleting these files.
#>