Skip to main content
Data Science Wizardry Blog by Attila Vajda

4 way coordination with metronome

Music practice ideas #

Setting the rhythm I am learning to play on the metronome is effective. Playing along the metronome creates insight into the accurate pattern, and is ample cognitive exercise for learning rhythm from a different perspective, or dimension.

Learning the lyrics, and singing/ basic guitar pattern of "The Passenger" seemed very difficult, but after struggling for a few hours I almost know the lyrics. I listen to two versions of the song, and singing it naturally, imitating the original singers lightly seems to work.

Playing a beat on 8 counts using left foot, right foot, left hand and right hand has 2^32 permutations, it is very interesting to combine maths with music. Somehow learning music seems to become easier, when I know the number of possible permutations.

Maths music journal entry of permutations

Code puzzle whimsy #

t = [0, 1, 2]
t2 = t * 1
t[0] = 100
print(t2)

^1

I am asking Mixtral computer agent to vary this puzzle, because I learn from rephrasing, and looking at analogous problems.

Please write this puzzle with gibberish variables, different values, and make it slightly more challenging

q_list = [99, -1, "spam"]
w_sequence = q_list * 3
q_list[0] = 12345
print(w_sequence)

[12345, -1, "spam",12345, -1, "spam",12345, -1, "spam"]

Click me to reveal the secret!

The answer to life, the universe, and everything is...


>>> print(w_sequence)
[99, -1, 'spam', 99, -1, 'spam', 99, -1, 'spam']

Epiphany! The copied list did not change, because list is a mutable data structure, so the copy of it points to a different place in memory.

quxx = 42
garpon_ages = {'Alice': quxx, 'Bob': quxx, 'Eva': quxx}
quxx += 1
print(garpon_ages['Alice'])

-10/+10 Quantum points

43

Click me to reveal the secret!

The answer to life, the universe, and everything is...


>>> print(garpon_ages['Alice'])
42


>>> b=(2,)
>>> b
(2,)
>>> q = {'a':b}
>>> b = 2
>>> q
{'a': (2,)}

Scikit-learn whimsical issue #

Tests failing when cuda installed but no GPU is present #28280

No Cake at the Party, whimsical analogy for the issue

Analogy of sklearn issue

It would be good to connect abstract concepts with these analogies, so that I am learning the lingo of scikit-learn as well. Nevertheless, after doing this exercises for a few days, I am already starting to get a feel for what sort of problems arise in the issue tracker.

I am asking Mixtral 8x7b instruct.

I was reluctant, or blocked, in simply pasting images of conversations with the computer agent here. Keeping with the theme of building MVP, I follow up the motivation to realise ideas, and I am happy. Now I read the message after I include it in the blog, and learn from the blog itself! How cool πŸ‘. I find this analogy, metaphor, visualisation, whimsical, lighthearted expression gathering, multidimensional approach very effective in understanding seemingly dry, and inaccessible material.

Turbocharging computations with

ChatGPT conversation of lighthearted concept analogies

"Compute Unified Device Architecture" does not seem to mean anything πŸ€”.

Lighthearted analogies of ChatGPT for Compute Unified Device Architecture

Alright, let's read one more, and then I am done with this Anterior Midsingulate Cortex turbocharging, in other words tenacity building exercise.

Analogy for the main issue title

I can revisit these contemplations, much like an ardent devotee of learning revisits a journal entry.

algorithms exercise #

Algorithms exercise 1.2-1 Algorithms exercise 2.2-2 ^2

Glassboard A[1:n]

An example for A[1:n] is A[1:4], where array A has 4 elements:

[1, 2, 3, 4]
[2, 4, 6, 8]
[1, 2, 6, 24]

A[a:b], a is the index of the first element, while b is the index of the last.

In the exercise A[1:n] is unsorted, eg. [3, 8, 1, 9], where n = 4.

A = [3, 8, 1, 9]

# finding the smallest element:
s = min(A) # 1

# exchanging it with A[1]:
A[1], A[index(min(A))] = A[index(min(A))], A[1]

Machine Learning one-liners #

I am learning about Logistic Regression.

>>> f = lambda a,b: a+b
>>> m = f
>>> m(1,2)
3

This seems to be one component of the pattern of m=LogisticRegression().fit(a,b).

I color coded the elements of the one-liners, and gained insight into their workings!

Notes for Logistic Regression color coding on paper ^3

V$_{3,1}$ implies the first variation of three elements #

[^1] Mayer, C., Rieger, L., & Chan, A. (2020). "Coffee Break Python - Mastery Workout: 99 Tricky Python Puzzles to Push You to Programming Mastery.".

[^2] Cormen, T., Leiserson, C., Rivest, R., & Stein, C. (2022). Introduction to Algorithms. MIT Press.

[^3] Mayer, C. (2020). Python One-Liners. No Starch Press.