The experimental Jupyter notebooks of Audrey M. Roy Greenfeld. This website and all its notebooks are open-source at github.com/audreyfeldroy/arg-blog-fasthtml
Sat, Jan 25, 2025
Here I clean up the code, back-integrate the manual fixes I've since made, and reduce the steps it takes to export.
Fri, Jan 24, 2025
Here I use the Python Imaging Library to create and display an image in-notebook, so that it's rendered as part of the blog post on audrey.feldroy.com.
Thu, Jan 23, 2025
My first MonsterUI notebook wasn't rendering correctly. I started to debug it in this notebook, but ended up just using this as a test notebook for the next one.
Thu, Jan 23, 2025
Here in this Jupyter notebook I rewrite audrey.feldroy.com and use nb_export to export it as my new main.py for arg-blog-fasthtml.
Wed, Jan 22, 2025
Iterating through the ButtonT enum to show all MonsterUI button types visually.
Wed, Jan 22, 2025
Can we customize a FastHTML app to set different headers when rendering notebooks with nb2fasthtml, based on what the notebook actually needs for its headers?
Tue, Jan 21, 2025
Exploring how to make basic SVG animations work with FastHTML.
Mon, Jan 20, 2025
How to make a website check the user's preferred mode and set the background appropriately.
Sun, Jan 19, 2025
Working with Anki flashcard decks in Python, with genanki to work with the decks and fastcore for ease of use.
Sat, Jan 18, 2025
Demo of adding sounds to a FastHTML app with Tone.js. Sounds make web apps come alive and feel interactive.
Fri, Jan 17, 2025
FastHTML MonsterUI example app that uses Tone.js to make different alarm clock sounds.
Thu, Jan 16, 2025
A mathematical breakdown of cosine similarity, with copy-pastable LaTeX.
Tue, Jan 14, 2025
SQLite full text search setup via APSW for all the notebooks on this website, inspired by the [APSW FTS5 Tour]((https://rogerbinns.github.io/apsw/example-fts.html)).
Mon, Jan 13, 2025
The SQLite FTS5 (full-text search) extension includes the built-in tokenizers unicode61, ascii, porter, and trigram, implemented in [fts5_tokenize.c](https://github.com/sqlite/sqlite/blob/master/ext/fts5/fts5_tokenize.c). [APSW](https://github.com/rogerbinns/apsw) provides a Python API to use those. Here we explore the default tokenizer `unicode61` and built-in tokenizer `ascii` in detail.
Sun, Jan 12, 2025
I've made good progress on creating a notebook every day. Now I have so many notebooks that my index page needs an overhaul, including: * Dates with datetime * Cards with execnb to grab notebook titles * The cache decorator to make that fast * Subtle CSS tweaks to increase information density
Sat, Jan 11, 2025
I'm taking inventory of all the Command Mode and dual-mode nbclassic keyboard shortcuts on macOS, with my random musings about each. This is part of my deliberate practice to master all of the useful ones, and will serve as a reference for myself later.
Fri, Jan 10, 2025
In this tutorial we'll look at the simplest routes and route handlers you can create with FastHTML. We'll define the handlers as little functions, and then call them as we would any other Python function. After that, we'll make simple GET requests to a simple index route/handler, a parameterized one, and a parameterized one with a redirect.
Thu, Jan 9, 2025
from execnb.nbio import new_nb, mk_cell, read_nb, write_nb from execnb.shell import exec_nb from pathlib import Path
Wed, Jan 8, 2025
I get so lazy about title tags. The point of today's notebook is to make me less lazy, so I actually fix the title of this site. Oh, and to explore `Title` and `Titled` in FastHTML.
Tue, Jan 7, 2025
I just changed my Bluesky to [@audrey.feldroy.com](https://bsky.app/profile/audrey.feldroy.com). To verify my domain ownership, I added this route handler to my FastHTML website:
Mon, Jan 6, 2025
FastHTML provides default headers for every page, which are also fully customizable. This notebook explores how this works.
Sun, Jan 5, 2025
In my terminal (Ghostty) when I run shell scripts that update multiple repos, I get asked my SSH key passphrase over and over. It gets annoying with 20+ repos. To get around this, I use OpenSSH's authentication agent, `ssh-agent`.
Sat, Jan 4, 2025
from fastcore.all import * from fasthtml.common import * from fasthtml.jupyter import * from IPython.display import IFrame from pathlib import *
Fri, Jan 3, 2025
The [zip docs](https://docs.python.org/3/library/functions.html#zip) say that `zip(*iterables, strict=False)`: > Iterate over several iterables in parallel, producing tuples with an item from each one.
Thu, Jan 2, 2025
from fastcore.all import * from fasthtml.common import *
Thu, Jan 2, 2025
from fastcore.all import * from fasthtml.common import * from fasthtml.jupyter import * from IPython.display import display, Javascript
Wed, Jan 1, 2025
My adaptation of https://developer.mozilla.org/en-US/play to FastHTML, with improvements.
Wed, Jan 1, 2025
## Simple Command Substitution
Tue, Dec 31, 2024
I needed a quick note box for the index page of this site, without affecting the CSS of my notebooks that explore weird CSS stuff deeply.
Mon, Dec 30, 2024
This notebook uses images in every possible way.
Sun, Dec 29, 2024
## Variables
Sat, Dec 28, 2024
When using `pico=False` and no CSS framework, a FastHTML page doesn't look great. Can we use minimal typography to make it look decent, without dependencies?
Fri, Dec 27, 2024
I have Jupyter notebooks in `nbs/`. I want to turn them into cards from the filenames, without having to read the file contents.
Fri, Dec 27, 2024
This notebook shows how to: * Get and use Pygments styles programmatically * Extract and display the source code from Python functions * Apply different Pygments syntax highlighting to different cells of the same notebook with proper CSS scoping * Use Pygments-highlighted code in a FastHTML FastTag
Thu, Dec 26, 2024
## Understand the Problem
Wed, Dec 25, 2024
## Understand the Problem Can a Jupyter notebook be converted to syntax-highlighted HTML easily with Pygments? Side note: Highlight.js is what Danny and Isaac use for syntax highlighting in FastHTML apps. I'll try that in another notebook later. I started this on a plane where I only had Pygments installed.
Tue, Dec 24, 2024
This notebook is a [SolveIt](https://solveit.fast.ai/)-style exploration of [https://github.com/AnswerDotAI/execnb/](https://github.com/AnswerDotAI/execnb/). Here I am following the SolveIt process in a Jupyter notebook to learn new things.
Tue, Dec 24, 2024
from fastcore.all import *
Mon, Dec 23, 2024
import glob from pathlib import Path from fastcore.all import * from nb2fasthtml.core import * from execnb.nbio import *
Mon, Dec 23, 2024
Here we are checking the numbers from our daughter's snowman card to Daddy. She gave him math problems to solve and a snowman joke.
Mon, Aug 5, 2024
import os from claudette import * import fasthtml import fasthtml.common from fasthtml.common import * import inspect
Sun, Aug 4, 2024
Studying https://claudette.answer.ai/
Mon, Jul 29, 2024
Studying https://docs.fastht.ml/tutorials/by_example.html more
Mon, Jul 29, 2024
My study of the `@delegates` decorator and `GetAttr` from `fastcore`.
Mon, Jul 29, 2024
My early attempts to figure out auth in FastHTML. Things have likely changed a lot since.
Tue, Jul 16, 2024
My early exploration of the xtend notebook in FastHTML.
Mon, Jul 15, 2024
from fasthtml.common import *
Sun, Jul 14, 2024
Caution: I’ve learned better patterns since I wrote this. Leaving this here for posterity.
Sat, Jul 29, 2023
I feel like Jupyter notebooks would be really nice for blogging or publishing "Today I Learned" posts. I had heard about Fastpages before via Jeremy Howard's blog or YouTube videos, but seeing that it was deprecated in favor of nbdev, I decided to try nbdev.