Skip to content

Instantly share code, notes, and snippets.

@ch-ntz
ch-ntz / husky_prepare-commit-msg_openai_conventional-commits.sh
Last active April 8, 2025 21:22
Husky Prepare Commit Message OpenAI Conventional Commit Script
#!/usr/bin/env bash
set -eo pipefail
COMMIT_MSG_FILE="$1"
COMMIT_SOURCE="$2"
if [ "$COMMIT_SOURCE" = "merge" ] || [ "$COMMIT_SOURCE" = "commit" ]; then
echo "Skipping AI commit message for merges or commits in progress."
exit 0
@ch-ntz
ch-ntz / elevator-challenge-using-look.md
Created March 25, 2024 18:31
Coding Challenge: Elevator Simulator Using LOOK Algorithm

Coding Challenge: Elevator Simulator Using LOOK Algorithm

Overview

Develop a simulation representing an elevator's operations within a building. This includes handling pickup requests, moving between floors according to the LOOK algorithm, and managing passenger destinations efficiently.

Non-Functional Specifications

  • Code Quality: Write clean, well-organized, and maintainable code. Apply clear naming conventions and modular design principles.
  • Error Management: Implement comprehensive error handling for scenarios like invalid floor numbers or requests outside the building's range.
@ch-ntz
ch-ntz / elevator-challenge-using-scan.md
Last active March 25, 2024 18:30
Elevator Challenge Requirements

Coding Challenge: Elevator Simulator Using SCAN Algorithm

Overview

Create a simulation representing an elevator's operations within a building, including handling pickup requests, moving between floors, and managing passengers.

Non-Functional Specifications

  • Code Quality: Write clean, well-organized, and maintainable code. Use clear naming conventions and modular design.
  • Error Management: Implement comprehensive error handling for invalid inputs (e.g., invalid floor numbers, requests outside the building, etc.).
@ch-ntz
ch-ntz / planck_time.md
Last active February 19, 2026 17:22
The Planck Time Format

The Planck Time Format

Abstract

This paper proposes the Planck Time Format (PTF), a universal system of time measurement derived from fundamental physical constants rather than astronomical cycles. By defining a practical unit — the Planck Second — as a scaled multiple of Planck time, this framework enables timekeeping independent of planetary motion while remaining computationally tractable. Standard metric prefixes provide scalable units, and optional colloquial terminology supports informal usage. The system is intended for scientific, computational, and potential interstellar applications requiring a universal temporal reference.

1. Introduction

Modern civil timekeeping is historically rooted in Earth's rotation and orbital dynamics. While effective for terrestrial society, such definitions are inherently local and unsuitable for interplanetary or interstellar contexts. As humanity expands technologically and potentially spatially, a time standard grounded in invariant physical laws beco

@ch-ntz
ch-ntz / issue_template.md
Last active December 23, 2024 19:01
Issue Template
name Issue Template
about Use this template for reporting bugs or requesting features
title
labels
assignees

Description

@ch-ntz
ch-ntz / ad_click_analysis.md
Created December 4, 2023 19:10
ad_click_analysis.md

Ad click analysis

Data

You've been provided with two CSV files. The first contains a sample of ads and their corresponding click data and some ther metrics in the following format:

date,impressions,clicks,sales,ad_spend,keyword_id,asin
2017-06-09,3692,113,71,48.4,UVOLBWHILJ,63N02JK10S
2017-06-06,4354,2101,669,50.68,Q6BWZ0FMGD,BDC04ENWFY
2017-06-06,5498,0,0,60.57,UVOLBWHILJ,63N02JK10S
2017-05-04,7915,3287,1077,52.94,F9G2ZWODSG,YIHJS8ZU50
@ch-ntz
ch-ntz / active_passive_agent_design.md
Created July 3, 2023 15:55
The Dichotomy of Active and Passive Experiences in AI Agent Design

The Dichotomy of Active and Passive Experiences in AI Agent Design

Artificial Intelligence (AI) has created new vistas of interaction, shaping the way humans communicate with technology. A critical distinction in this landscape is the difference between passive and active user experiences. Active experiences involve direct, real-time interaction between users and AI, while passive experiences feature AI operating in the background, delivering results with minimal user involvement.

To examine these experiences, it's beneficial to consider different interaction models like stimuli-response, source-destination, or publisher-subscriber. The stimuli-response model suits active experiences, with users (stimuli) eliciting responses from AI systems. In contrast, the source-destination model aligns with passive experiences, as AI (source) processes data and delivers output to users (destination) with limited interaction. The publisher-subscriber model works across both experiences, with users subscribing to AI ser

@ch-ntz
ch-ntz / index.ts
Created May 6, 2023 01:30
Words Used in Foreign Languages
import { gpt } from 'gpt-tag';
import { appendFile, writeFile } from 'node:fs/promises';
(async () => {
const words = ['egg', 'bread', 'tea', 'wine', 'coffee', 'chicken']
const languages = ['English', 'Spanish', 'Frensh', 'German', 'Russian']
const promptFactory = async (word: string, language: string) => `Write an example usage of the word, "${word}" in the language "${language}"`
let str = '| |'
@ch-ntz
ch-ntz / index.ts
Created May 6, 2023 01:11
Greatest Predators One vs. Many
import { gpt } from 'gpt-tag';
import { prompt } from 'prompt-tag';
import { appendFile, writeFile } from 'node:fs/promises';
(async () => {
const arenas = ['Sky Fortress', 'Lava Dome', 'Underground Lair']
const animals = ['Grizzly Bear', 'Great White Shark', 'Liger', 'Mastadon', 'T-Rex']
const promptFactory = async (animalA: string, animalB: string, arena: string) => prompt`Write a one paragraph description of a fictional fight between a ${animalA} and ${animalB} if fought at ${arena}}`
@ch-ntz
ch-ntz / index.ts
Last active May 6, 2023 00:56
Flora and Fauna of the United States
import { gpt } from 'gpt-tag';
import { prompt } from 'prompt-tag';
import { appendFile } from 'node:fs/promises';
(async () => {
const themes = ['native plants', 'flora and fauna']
const areas = ['Rocky Mountains', 'Great Lakes', 'Gulf Coast']
const years = [1700, 1800, 1900, 2000]