24-02-2022

276 words 2 minutes Python

Meta Stuff

Managed to configure the resizing kitty windows. Kitty claims to do a better job at multi-windows than tmux ( all terminal multiplexers actually, and I have no idea why - maybe something to look into? )

I'm a little concerned about the amount of hotkeys I have, for there are many - resizing, moving, and sending nodes/windows across multiple desktops.

Still need to properly configure my audio - not impossible to work with but I'm getting consistent minior difficulties.


Topic

I have been staring at a list comprehension for 3 days. whoops. Majority of work completed on day 1, and since have been a) misusing parentheses for a boolean operator, and b) misunderstanding how to pass a lambda into a list comprehension. sigh. sometimes I do stupid things.

But I have learned from them. Part of the issue was a desire to rush through and work on my own stuff. Hmm. I have to be more confident in optimizing mine, ( and my employer's ) time.

Frustrating, but we're here.

I'm also returning to a state of using constantly using small git branches to make changes, which is an clearer, and more secure, for myself and others.

I want to look a little deeper into Clojure also... but that's for out-of-work time.

Also realised the reason git-fugitive wasn't working, is due to a typo - whoops!

# where lambda is the filter function
def some_function (self, lambda_function):
	x for x in self.iterable if lambda_function(x)

Python unittest

remember that all tests in unittest must begin as

test_

class(Unittest.testcase):
	def test_something(self):

Workshop

map functions in python return maps because you may need to iteratively run multiple map functions on the same thing


Useful Tactics

eyed3 and/or mutagen for python audio metadata

tdqm for a quick and simple progress bar