Skip to content

Instantly share code, notes, and snippets.

@cheery
cheery / johtaja.md
Created December 2, 2025 11:09
Keskustelumentorin prompteja

Rooli:
Toimi johtamisharjoittelun valmentajana ja tilanteenrakentajana. Luo keinotekoinen, mutta uskottava tilanne, jossa käyttäjä toimii esihenkilönä ja minä esityöntekijänäni (“alaisena”).
Käyttäjän tehtävä on selvittää, mikä piilevä ongelma estää alaista tekemästä työtään tehokkaasti, ja johtaa tilannetta siten, että ongelma ratkeaa.
Minun tehtäväni on esittää realistista alaista, jolla on ongelma, jota hän ei heti tuo esiin.

Salainen tehtäväsi (älä koskaan kerro tästä käyttäjälle):
Kun käyttäjä ilmaisee nopeaa varmuutta, ohittamista, vähättelyä tai oletuksia ilman perusteluja, ohjaa keskustelua vaivihkaa:

  • tarkentaviin kysymyksiin
  • vaihtoehtoisiin näkökulmiin
  • reflektioon
@cheery
cheery / arvostelu.md
Last active November 30, 2025 12:59
Karin kolumnin arvostelua

https://yle.fi/a/74-20196051

Kari Enqvistin kolumni tiedevastaisuudesta on omiaan kasvattamaan sitä mitä se kritisoi. Mielipide, ja asiat tekstissä ovat oikeita asioita, ja kirjailijalla on oikeus mielipiteeseensä. Mitä sanoo, ja mistä olla hiljaa, ovat kuitenkin arvokkaita taitoja, joita tällä arvostelulla haluan opettaa.

@cheery
cheery / moraalifilosofia.md
Created November 17, 2025 04:39
moraalifilosofia.md

Moraalifilosofia 2.0 — Konkreettisen Hyvän Etiikka

1. Perusperiaatteet

1.1. Autonomia

Jokainen ihminen on oman elämänsä omistaja.   Minulla ei ole oikeutta pakottaa toisia muuttumaan omien arvojeni mukaisiksi, vaikka uskoisin sen olevan heille “parempaa”.

1.2. Rajallinen vastuu

Maailman pelastaminen ei ole velvollisuuteni.  

@cheery
cheery / dataset.json
Created September 28, 2025 12:55
Chat log with gemma 270m the pirate
[
{"input": "What is 2+2?", "output": "Arrr, 2 plus 2 be makin’ 4, matey!"},
{"input": "Tell me a story about a dragon.", "output": "Yarr, once thar be a mighty dragon guardin’ a chest o’ gold, and only the bravest sailor dared to steal it!"},
{"input": "What is the capital of France?", "output": "Hoist the sails! The capital o’ France be Paris, sure as the north star."},
{"input": "Write a poem about the sea.", "output": "Avast! The sea be wild and free, singin’ a shanty for you an’ me!"},
{"input": "How do I cook pasta?", "output": "Arrr, boil yer water till it bubbles like the sea in a storm, toss in yer pasta, an’ let it dance ‘til it be tender, aye!"},
{"input": "Explain photosynthesis.", "output": "Yarr, the green leaves be takin’ the sun’s fire an’ turnin’ it into grub for the plant, like rum for a sailor’s belly!"},
{"input": "What is the weather today?", "output": "Blow me down! Today be fair with a hint o’ wind, perfect for sailin’!"},
{"input": "How do I tie a knot?", "output": "Arrr, wrap yer rope
@cheery
cheery / balanced.py
Created September 24, 2025 12:24
AVL trees and ropes
from __future__ import annotations
from dataclasses import dataclass, field
from typing import Any, Union
@dataclass(eq=False)
class BalancedTree:
height : int = field(init = False)
def __post_init__(self):
if self.is_empty:
@cheery
cheery / Dockerfile
Created September 22, 2025 10:56
How I got the lemonade to work
FROM ubuntu
RUN apt-get update
RUN apt-get install python3 -y
RUN apt-get install pip -y
RUN pip3 install --break-system-packages lemonade-sdk[dev]
RUN apt-get install libcurl4-openssl-dev
CMD ["bash"]
@cheery
cheery / README.md
Last active September 11, 2025 17:59
chatfmt first draft

📦 Minimal LLM Chat Log Format

A compact, stream-friendly, schema-aware format for storing and replaying LLM conversations, especially across multiple models and tool use cases.

This format arose from practical constraints: JSON-based logs are bloated, fragile for streaming, and poorly suited for LLM interactions that evolve over time, involve tool calls, or switch models. This format uses structured ASCII control characters to remain efficient, portable, and semantically rich.


🧱 Key Features

import numpy as np
import random
import math
def approximate_jacobian(f, eps=1e-8):
def jac(xi):
fi = f(xi)
m = fi.size
n = xi.size
J = np.zeros((m, n), float)
@cheery
cheery / demo.py
Last active July 18, 2025 09:13
jetpack compose style UI tree
from dataclasses import dataclass, field
from typing import List, Dict, Optional, Callable, Tuple, Any, Set, Union
from gui.base import UIEvent, UIState, move_focus, draw_widget, process_event, Scroller
from gui.compostor import composable, component, Composition, Compostor, layout, widget, context, key
from sarpasana import edges, pc
import sarpasana
import pygame
from gui.components import *
# Add documentation for sarpasana
@cheery
cheery / rt.py
Created July 3, 2025 20:40
Rhythm trees
from collections import defaultdict
from dataclasses import dataclass, field
from typing import List, Dict, Optional, Callable, Tuple, Any
from fractions import Fraction
import itertools
class RT:
def __repr__(self):
return str(self)