- Llama-3.2-3B-Instruct-4bit is used for generating the story based on the instructions in PROMPT.md
- Llama 3.2 seems to work best with smaller stories: keeping the stories around 1000 words results ~4 min audio, with a slightly slower speed cadence.
- Kokoro-82M-bf16 is used as the text to speech model (using even the "premium" built-in macOS voices produced weaker results with the
saycommand) - Add your own sound file (eg. BACKGROUND_SOUND = "rain.m4a") for background soundscape.
- There were some weird type innotation bugs in some of the underlying packages, hence the
# type: ignorecomments for the linter.
| from abc import ABC, abstractmethod | |
| from dataclasses import asdict, dataclass | |
| class Character(ABC): | |
| @dataclass(slots=True, kw_only=True) | |
| class Stats: | |
| STR: int | |
| DEX: int | |
| CON: int |
by [Your Name]
The dome of the Grand Assembly cracked with strobes and pulses of pure algorithmic light. Hexsound tunneled through the crowd like a virusโcompressed, modulated, fractal-burst into flesh. In the center pit, on a circular dais of jury-rigged silicon and scrapmetal chrome, the Sceners were at war.
"Sectorjamโs up," said Ryn, thumb twitching on her neural-ink interface. She sat in the mezzanine shadows above the compo pit, visor lenses flickering with debug streams. โRunning custom synthmods on a gutted Triarc Z80. Heโs bending opcode like origami.โ
Below, Sectorjamโneon mohawk, skin like a failed BIOS bootโdrove his fingers across a ghostboard, each tap spitting machinecode into a corrupted 8-bit memory space. His demo was alive: vector forests blooming in real-time, synced to audio generated from nothing but electromagnetic ripple and clever abuse of voltage.
โWatch the sync chain,โ muttered Kaz, Rynโs partner, hunched beside her, his spinal jack trailing
| ; | |
| ; assembly example to write a message on the Commodore 64 screen | |
| ; | |
| ; address of the basic loader. the RUN command is looking for the first instruction here. | |
| ; the assembly code should be compiled to start here as well, so it can be run with a sys command | |
| *=$0801 | |
| ; this is the basic loader, this is mimicing of jumping in to the assembly code with a sys command | |
| !byte $0c,$08,$b5,$07,$9e,$20,$32,$30,$36,$32,$00,$00,$00 |
| """\ | |
| Boids is an artificial life program, which simulates the flocking behaviour of birds, and related group motion. | |
| Some resources I'd recommend if you wanted to learn more about boids: | |
| * https://en.wikipedia.org/wiki/Boids | |
| * https://people.ece.cornell.edu/land/courses/ece4760/labs/s2021/Boids/Boids.html | |
| * http://www.red3d.com/cwr/boids/ | |
| This is my quick excercise to make a simplified, 2d, retro inspiried implementation. | |
| """ |
| import os | |
| import time | |
| import random | |
| animals = "๐ ๐๐ฆ๐ฆฃ๐๐ฆ๐ฆ๐ช๐ฆ๐ฆ๐ฆฌ๐๐๐๐๐๐๐ฆ๐๐ฆ๐๐๐๐๐ฆ" | |
| #animals = "๐ถ๐ฑ๐ญ๐ฐ๐ฆ๐ป๐ผ๐ฆ๐ฏ๐จ๐ป๐ฎ" | |
| width = os.get_terminal_size().columns - 2 | |
| pos = [width] * len(animals) |
| #!/usr/bin/env bash | |
| # | |
| # Bootstrap script for setting up a macOS machine | |
| # | |
| # Requires xcode and tools! | |
| xcode-select -p || exit "XCode must be installed! (use the app store)" | |
| echo "Starting bootstrapping" |
| import os | |
| import datetime | |
| with os.popen("nvram -p") as out: | |
| ts_line = next((line for line in out.readlines() if line.startswith("panicmedic-timestamps")), None) | |
| if ts_line: | |
| ts_hex = ts_line.split("\t")[-1] | |
| ts_int = int(ts_hex, 16) | |
| ts = datetime.datetime.fromtimestamp(ts_int // 1000000) | |
| print(f"Last kernel panic: {ts}") |
| import collections | |
| with open("words.txt") as f: | |
| # let's read the words from the file, but ignore anything that ends with s | |
| # just to remove plurals | |
| words = [line.strip() for line in f.read().splitlines() if line[4] != "s"] | |
| # how often the different letter occur? | |
| occurances = collections.Counter() | |
| for word in words: |
| import locale | |
| import requests | |
| import tabulate | |
| locale.setlocale(locale.LC_ALL, "en_US") | |
| # available snapshots: 30, 90, 365 days | |
| data_ranges = {"new": 30, "old": 90} |