Shallow Thoughts

Akkana's Musings on Open Source Computing and Technology, Science, and Nature.

Tue, 07 May 2024

Bighorn on the Trail

On a mountain bike ride on the White Rock Canyon Rim trail yesterday, we stopped at one of the overlooks to admire the view, and turned to see three bighorn sheep crossing the trail behind us.

[Two bighorn sheep crossing a trail]

Read more ...

Tags: ,
[ 13:04 May 07, 2024    More nature | permalink to this entry | ]

Sat, 04 May 2024

Creating an Image with Wrapped Text using the Python Imaging Library

I stumbled onto the page for this year's Asimov's Magazine Readers' Award Finalists. They offer all the stories right there -- but only as PDF. I prefer reading fiction on my ebook reader (a Kobo Clara with 6" screen), away from the computer. I spend too much time sitting at the computer as it is. But trying to read a PDF on a 6" screen is just painful.

The open-source ebook program Calibre has a command-line program called ebook-convert that can convert some PDF to epub. It did an okay job in this case — except that the PDFs had the wrong author name (they all have the same author, so I'm guessing it's the name of the person who prepared the PDFs for Asimov's), and the wrong title information (or maybe just no title), and ebook-convert compounded that error by generating cover images for each work that had the wrong title and author.

I went through the files and fixed each one's title and author metadata using my epubtag.py Python script. But what about the cover images? I wasn't eager to spend the time GIMPing up a cover image by hand for each of the stories.

Read more ...

Tags: , ,
[ 13:52 May 04, 2024    More programming | permalink to this entry | ]

Mon, 22 Apr 2024

Tactical is the New Black

[a so-called 'Tactical Pen'] My new binocular came! And something curious came with them: a "tactical pen".

It seems to be quite a nice gel pen, with an aluminum body and a locking retractor. But the "tactical" part is less clear.

Me What makes it tactical?
Dave Maybe that it's black?
Me Tactical is the new black?

And of course, my mind couldn't help wandering off to explore what might make the difference between a tactical pen and a strategic pen. Maybe something about how long the ink reserve lasts? Or how long it takes to click the clicky retractor thing?

Oh, well, it was free when buying the binocular from B&H, and it really is a pretty nice pen.

On the binocular:


Read more ...

Tags:
[ 16:06 Apr 22, 2024    More humor | permalink to this entry | ]

Thu, 18 Apr 2024

Using Sox Play to Help Learn Guitar

I mentioned last month that I'm learning guitar. It's been going well and I'm having fun. But I've gotten to the point where I sometimes get chords confused: a song is listed as using E major and I play D major instead.

Also, it's important to practice transitions between chords, which is easy when you only know three chords; but with eight or so, I had stopped practicing transitions in general and was only practicing the ones that occur in songs I like to play.

I found myself wishing I had something like flash cards for guitar chords.

Someone must have already written that, right? But I couldn't find anything promising with a web search. And besides, it's more fun to write programs than to flail at unhelpful search engines, and you always end up learning something new.

Read more ...

Tags: , , , ,
[ 20:02 Apr 18, 2024    More linux | permalink to this entry | ]

Sat, 13 Apr 2024

Saw the Eclipse ... Sort Of

[Viewing the eclipse from 19 Mile Crossing, TX] I'm sorry, but I have no eclipse photos to share. I messed that up. But I did get to see totality.

For the April 8, 2024 eclipse, Dave and I committed early to Texas. Seemed like that was where the best long-range forecasts were. In the last week before the eclipse, the forecasts were no longer looking so good. But I've heard so many stories of people driving around trying to chase holes in the clouds, only to be skunked, while people who stayed put got a better view. We decided to stick with our plan, which was to stay in San Angelo (some 190 miles off the centerline) the night before, get up fairly early and drive to somewhere near the centerline.

Read more ...

Tags: , ,
[ 12:36 Apr 13, 2024    More science/astro | permalink to this entry | ]

Wed, 03 Apr 2024

Making OsmAnd Overlays with QGIS (2024 Edition)

Several years ago I wrote about Making a Land Ownership Overlay with QGIS and Making Overlay Maps for OsmAnd. I've been using that land use overlay for years. But recently I needed to make several more overlays: land ownership for Utah for a hiking trip, one for the eclipse, and I wanted to refresh my New Mexico land ownership overlay since it was several years out of date. It turns out some things have changed, so here's an update, starting from the point where your intended overlay is loaded as a layer in QGIS.

Read more ...

Tags: , , ,
[ 18:15 Apr 03, 2024    More mapping | permalink to this entry | ]

Fri, 29 Mar 2024

Gmail with an App Password

In 2022 I wrote about Sending Mail via Gmail using OAuth2.

But it turned out that Google expires OAuth2 tokens on a weekly basis. So if you use that method, once a week you'll have to bring up a browser, log in to your Google account and go through the five or so pages of re-authorizing. Which will invariably happen when you're in a hurry and just wanted to send a quick email so you can move on to other things.

However, it turns out there's an easier way, which apparently doesn't expire: App passwords. I switched to using app passwords back then (I've been using that app password since then), and I even wrote it up, and then forgot to post it. What a dingbat!

But I changed my GMail password recently, and it turns out when you change your Gmail account password, Google revokes all app passwords you've set up (and, of course, doesn't bother to tell you that, and the error message you get when you try to sign in with the old app password has nothing whatever to do with the actual problem, which is that your app password has been revoked and you need to create a new one).

So I dug out this old never-got-posted article and used it to make a new app password, and have updated the parts that were a little out of date.

Read more ...

Tags: , ,
[ 20:32 Mar 29, 2024    More tech/email | permalink to this entry | ]

Sat, 23 Mar 2024

Command-Line Metronome

I mentioned before that I'm taking beginner guitar lessons. Justin recommends using a metronome for some of the practicing, and that makes sense: I notice that sometimes when I practice I try to go too fast, which might or might not be good for learning the chord changes but it also leads to more mistakes and worse chord quality.

There are probably lots of phone metronome apps, but I'm usually practicing near my computer (where I watch the lessons and where I keep all my notes on chords and rhythms for particular songs), so I thought it would be nice to have a metronome on Linux.

Read more ...

Tags: , , ,
[ 18:37 Mar 23, 2024    More linux | permalink to this entry | ]