Table of Contents
I've set up several Pelican sites on GitHub Pages and each time I seem to run into way more trouble than seems necessary. Here are a few details that I seem to need to rediscover each time.
Add themes as git submodules
For example, to use Flex:
git submodule add https://github.com/alexandrevicenzi/Flex.git Flex git commit -am "Added Flex submodule" git push origin main
Use nelsonjchen/gh-pages-pelican-action
Python on an Arduino Nano RP2040 Connect
Table of Contents
I recently purchased an Arduino Nano RP2040 Connect with the hope of running MicroPython (one of the useful side effects of having kids is an excuse to buy stuff for projects). It's worth noting a couple of the issues that …
sqlite dict factory
Probably not as efficient as using the sqlite3.Row class, but works when actual dict objects are required. Adapted from https://docs.python.org/2/library/sqlite3.html.
import sqlite3 def dict_factory(cursor, row): return {col[0]: row[idx] for idx, col in enumerate(cursor.description)} con = sqlite3.connect(":memory …