Skip to main content

Posts

My First GitHub Pull Request; Datasette Windows and Spatialite

 I made my first ever pull request on GitHub this morning! The gang and I still mostly develop code on Windows boxes. It has more to do with the machines we have available to us on any given day than anything else. (The just-sit-down-and-type machine in our house is also for playing video games, so... Windows.) This has led to issues when using our Datasette enabled QSO logger and mapping applications .  Datasette on Windows has an issue with finding the SpatiaLite DLL file. The gang and I worked through the issues and documented our really clunky, blunt force, fix . The fix, however, amounted to changing the source code of Datasette itself on a per installation basis. That meant that if I moved to a new Windows machine I had to find the fix and re-implement it. Even worse, that meant that if I wanted to try something that worked only in a newer version of Datasette, I also had to reimplement the fix. That... Was a Lot. So, I was totally psyched when I got a little bit of time yester
Recent posts

Things I Learned: Adding new DLL locations to Windows via the PATH Envrionment Variable

 This is a note for myself for later when I try to construct a better set of instructions for adding Spatialite to Windows for use with Datasette . You can instruct Windows to look for DLLs in a new directory simply by adding that directory to your PATH envrionment variable via  set PATH=C:\path to your dll;%PATH% via .

Things I Learned: Datasette-Enrichments: The Template Can Be The Optional Arguments

 This is a small thing, but it's going to give me a lot of utility with the enrichments I'm writing. More than once, I've run into the need for an input argument to the enrichments I'm creating. Take the elevation enrichment for example. I'd like the user to be able to specify how long their elevation profile path should be in meters. My slop and drop method for adding an argument to rows of table data would be to simply specify a constant in my SQL query ala  select tx_lat, tx_lng, rx_lat, rx_lng, 200 as optional_meters from qso_table That would result in an extra column containing the number 200 on every row. That also won't work with enrichments for the moment because the operate on filtered tables, not generic SQL queries. That was irksome. The answer though, is simple, elegant even. For each enrichment , the user specifies their input using a template. For the elevation enrichment, the template looks like this: but I could have just as easily typed and now

Things I Learned... Again: Spatialite with Datasette on Windows

 I'm mostly writing this so that the next time I run into this, I'll have a handy set of notes. Many months ago, I found out that Datasette on Windows doesn't like this :             for extension in self.sqlite_extensions:                 # "extension" is either a string path to the extension                  or a 2-item tuple that specifies which entrypoint to load.                 if isinstance(extension, tuple):                     path, entrypoint = extension                     conn.execute("SELECT load_extension(?, ?)", [path, entrypoint])                 else:                     conn.execute("SELECT load_extension(?)", [extension]) instead, it wants to see              for extension in self.sqlite_extensions:                 # "extension" is either a string path to the extension                 # or a 2-item tuple that specifies which entrypoint to load.                 #if isinstance(extension, tuple):                 #    p

Soldersmoke Becomes Cloud Chamber Smoke!

 Bill Meara over at Soldersmoke built a cloud chamber particle detector! He has all the details on the Soldersmoke  blog , including the plans for the detector and a few videos of particle traces. Cloud Chamber de Soldersmoke Between the chamber and the book the plan came from, it all put me in mind of the time Ruidoso High School had not one, not two, but three particle accelerator science fair projects occupying the high school lab. Including a Tesla Coil version, a cyclotron, and one of these highlighted in the plan book Bill links above: From  "The Amateur Scientist" by C. L. Strong  (The cyclotron was mine.)

ChatGPT, Datasette-Extract, and the US Ham Radio General Exam Question Pool

 I started a project, ahem, yesterday to 'quickly' see if ChatGPT could read the entire United States general class amateur radio exam question pool into a Datasette instance using the datasette-extract plugin. As of this morning, I haven't been able to coax ChatGPT using the gpt-4-turbo model. I capture my rather raw notes below. The short version of this is that I was never able to get the AI to capture more than 19 questions at a time. I'm hopeful that the pool could be moved into a database table using iterative processes, but for now, I've run out of time for this quick project :)  Occasionally ChatGPT seemed to hallucinate out part of its process into the table Notes Follow I'm going to track how easy it is to get the general exam question pool into a database using the Datasette Plugin. I started this endeavor at 20:37 UTC. Get my already existent OpenAI API key ready to go 20:43: Done. As usual with OpenAI, the hardest part was finding login screens

Things I'm Learning: Adding Text Encoded Images to Google Earth (Pro and Web)

 This project has been going on for a while, but remember, the point of the elevation profile project was to add the elevation profile between our ham radio—Project TouCans—and the receiving station at the other end of a QSO to the map of the QSO itself. This week, I finally got to start work on the maps themselves, and I've found a few things. First, an image added to a Placemark description without a  width="100%" tag will overflow the pane that Google Earth Web creates for the Placemark A user can scroll the chart horizontally, but theOh  information isn't all visible at once. Adding the width tag back in fixes the issue on Google Earth Web, but leaves Google Earth Pro with a very small chart I thought a good compromise between the two might be to house the image in its own div. For Google Earth Web we get but on Google Earth Pro we still get the tiny chart: It seems the only way to get this done will be to learn the new Google Earth kml 'Carousel' extensio