June 11, 2025

NotebookLM

  • Can be used to create podcasts from documents you are using to learn something
  • Can be used to create quizzes to solidify knowledge about something you are learn
  • Can different kind of sources: pdfs, websites, copy/paste sources

English - Wish and If only

  • Use to express a desire for a different present reality
    • Subject + wish / if only + past simple
    • I wish I spoke English fluently. (But I don’t)
    • If only it weren’t raining. (But it is)
  • Used to talk about something you regret not doing or doing
    • Subject + wish/ if only + past perfect
    • I wish I had studied harder for exam.
    • If only we had arrived earlier
  • Used to complain or express frustration about someone’s behavior or something in the world
    • Subject + wish + someone/something + would + verb
    • I wish you would stop interrupting me
    • He wishes it wouldn’t rain so often

Python

  • Type hints in functions are used to help static analyses tools like mypy to identify types
  • Type hints are optional and do not improve performance
  • Use one space after : and one between the two sides on =
  • Optional is used with None or when the parameter accepts None value
  • Duck typing is a typing check for type of operation
  • Nominal typing is related to the implementation of the code
  • Union is like or and | can used in as replace
    • Avoid to use Union in the return of the function because we have to test the value returned
  • Use list to type returns and Sequence or Iterable to type parameters
  • TypeVar is generic types
    • Can be restrictive: NumberT = TypeVar('NumberT', float, Decimal, Fraction)
    • Can be delimited:HashableT = TypeVar('HashableT', bound=Hashable)
  • Protocols is related to the implementation

Sources


Eu com algumas figuras que representa análise de dados/ciência