Uploaded January 2023 | Updated September 2026, 6 hours ago
Recently my old colleagues had a locker block with keypad lockers in which the now needed to store their belongings and papers with important data, instead of the old communal archive cabinet with a key.
Now I was sure these keypads were trivial to circumvent. And my conclusion is yes -- when you don't have a good lock out system that prevents several tries.
We will write a #Python #program that shows all possible 4! (4 factorial) combinatons. And explore how 3 different digits in a 4 digit code is saver!
github.com/rdoetjes/combinations/blob/main/comb.py
Recently my old colleagues had a locker block with keypad lockers in which the now needed to store their belongings and papers with important data, instead of the old communal archive cabinet with a key.
Now I was sure these keypads were trivial to circumvent. And my conclusion is yes -- when you don't have a good lock out system that prevents several tries.
We will write a #Python #program that shows all possible 4! (4 factorial) combinatons. And explore how 3 different digits in a 4 digit code is saver!
github.com/rdoetjes/combinations/blob/main/comb.py







![MAKING A CHATBOT IN ZIG (OpenAI API consumption)
Today we will learn how to consume APIs in #Zig we learn how to consume an #APIs using #TLS #HTTPS and Bearer token, specifically OpenAI, which we will use to make a simple REPL based chat bot.
The code:
https://github.com/rdoetjes/tuts/tree/main/zig-https-openai
NOTES: This is a basic single answer and forget bot. If you want to keep the actual chat state like you see in ChatGPT, you would feed the answers back into the message with the role assistant, you answers with the role user. System role is used to set up the basic state like: Answer in a way like the character Leisure Suite Larry, you keep things light and full of innuendo.
This is an idea I am working on an interactive adventure
{
model: gpt-4,
messages: [
{role: system, content: You are an assistant guiding the user through an interactive adventure.},
{role: user, content: I enter the room and see a sword on a pedestal.},
{role: assistant, content: The sword gleams under the light. Its beautifully crafted, with a silver hilt.},
{role: user, content: I take the sword.},
{role: assistant, content: You now have the sword in your possession.},
{role: user, content: I walk towards the door with the sword in hand.},
{role: assistant, content: You feel empowered as you walk towards the door, the sword glimmering in your hand.}
]
}
Chapters:
00:00 Introduction
02:13 Coding one page API request
19:48 Running the debugged code
20:31 Going through the OpenAI API abstraction code
25:05 Demo chatbot MAKING A CHATBOT IN ZIG (OpenAI API consumption)](https://i.ytimg.com/vi/WzGgepdA1lU/mqdefault.jpg)


