Google lists their guidelines for this here and state
If your site has a favicon, it can be included in Google Search
results for your site
Your code looks compliant with their guidelines. The only thing I can't see is the size of your icon which must be a multiple of 48px square, for example: 48x48px, 96x96px, 144x144px and so on.
However, they also ...
When writing a title for SEO, the unique and keyword rich parts of the title should come first. Parts of the title that are the same across many pages or which don't contain keywords for which it would be good to rank should come at the end. The following would be much more SEO friendly titles:
Functions - Python Tutorials Part 1
Understanding Object ...
Check Google's cached version - you can see that "<no title>" was actually the title of your page at the point it was crawled in June:
<title><no title> — Machine Learning from Scratch</title>
Use Google Search Console to get Google to re-crawl your page, and it will see and index the new title.
The page title represents the subject of the content of each separate web page. The meta description provides a short and meaningful description of the content of each separate web page.
Check out the following Google guidelines for metadata:
Page titles should be descriptive and concise. Avoid vague descriptors
like "Home" for your home page, or &...
I'm assuming that your image consists of stylized text of your second section title. Basically, that the image is the heading, itself.
In that case the first idea is better. Google, at least, is smart to things being hidden by CSS anyways.
And in the second idea, the img is not part of the heading itself, which isn't semantically correct.
My answwer to similar question of one of my clients here in Slovenia:
What happens if the "SEO Title" is too long or longer than recommended number of characters? Does Google punish it? Or does the latter simply not show up? Are the words - “keywords” in the deleted (not shown) part taken into account in searches?
There is no Google penalty to ...