I strive to keep this site free of ads and trackers for your privacy. If you would like to support what I’m doing in any of my various projects, you can Buy me a Coffee, become a Patron, or you could get yourself something nice from my Spoonflower Shop.

5th

12:56: When you need to sort a list by a specific key in each list-item’s object, you use a lambda function to drill down to your key.1

example = [
	("event": "A walk in the woods", "date": datetime_object_1),
	("event": "Grocery Shopping", "date": datetime_object_2),
	("event": "Movie Night")
]

example.sort(key=lambda example: example["date"])

1st

14:09: Some choice quotes from ADHD 2.01:

On conforming to social norms & standards:

We don’t choose not to conform. We don’t even notice what the standard we’re not conforming to is! – Chapter 1

On cerebellar fitness:

Basically, it’s been shown that you can take your cerebellum to the cerebellar gym and beef it up. – Chapter 3

Refs:

25th

21:55: For when you develop a Python script on one machine, then place it for running on another, but you didn’t generate a requirements.txt file - pipreqs1 will interrogate the import statements in all python files in the directory you specify and generate a requirements.txt file based on those import statements. Then you can pip install -r requirements.txt to make sure all your script’s requirements are met. Boom.

Refs:

8th

10:30: I’m always needing and never remembering that dict(zip(keys, values)) is a thing. Dict keys in keys, dict values in values, and boom! now both are combined as a single dictionary. Note that keys and values must be equal in length.

2nd

14:47: tired: “I should do [thing].” wired: “If I do [thing], then [other positive thing]”. The first weighs the task down with a moral obligation. The second focuses on the positive benefit or outcome.1


Refs:


  1. Comment in r/ADHD post accessed 5/2/23 ↩︎

11th

19:21: NFC tag on washing machine -> Tasker -> set timer to remind myself to flip the load I’ve just started over to the dryer. And another one on the dryer, same deal.

7th

17:24: Why was the dwarf in Dwarf Fortress in a perpetual state of “Attending Meeting”? Because the meeting was with the Mayor and the Mayor’s office didn’t have a chair, so the Mayor wasn’t taking the meeting.

20th

11:26: Use ImageMagick to prepare an image via cli for use on an e-paper or e-ink display.

For drawing without using prepared images on the Adafruit grayscale EPD, your 4 values are: #FFFFFF, #B1AFAD, #70696B, #000000.

15th

10:46: I needed to insert only the day of the month in two spots and wasn’t grokking the numerical order significance of golang’s date layout constant. The tl;dr is: use ‘2’, ‘02’, or ‘_2’, as the date constant’s day of month is in the second position. NB: the third position is the hour; you’d use ‘15’ for 24h time and ‘3’ or ‘03’ for 12h time (paired with “PM” or “AM” where you want that inserted).


21:30: I need to spend some quality time playing around with CSS’s built-in grid1, in particular - with minmax and fraction sizing.