June 10, 2025

#english #python #taskwarrior

English - Reported Speech

  • I am tired (Direct Speech) - She said she was tired (Reported Speech)
  • I have finished work (Direct Speech) - He said he had finished (Reported Speech)
  • I went to school (Direct Speech) - She said she had gone (Reported Speech)
  • I will go (Direct Speech ) - He said he would go (Reported Speech)
  • i can speak English (Direct Speech) - She said she could speak English (Reported Speech)
Tense Shift (Backshifting)

When reporting, we usually shift the tense one step int o the past if the reporting verb is in the past We don’t always backshift when the reporting verb is present tense or if the info is still true

Reporting Questions

  • Do you speak English? (Direct) - He asked if I spoke English
    • Use: asked if/whether + statement word order (no inversion)
  • Wh-questions(where, what, why, how)
    • Where do you live? (Direct) - She asked where I lived

Taskwarrior

  • The task reports show every possible report is possible with task warrior
    • burndown burndown chart completed tasks
    • next total of next task
    • history total of completions, deletions
    • list recurring and next tasks
    • active actived task
    • summary summary of the projects

Python - Function as objects

  • It is possible to assign function to variables
  • __doc__ to see function documentation
  • High order functions are functions that receive functions as arguments
    • map and sorted are functions that receives other functions
    • sorted(fruits, key=len)
  • map and filter can be replaced by list comprehension and generation
  • Anonymous functions are used with lambda and the best usage is with high order functions
    • sorted (fruits, key=lambda word: word[::-1])
  • callable are used to detect callable objects
    • __call__ can be implemented for classes
  • functools.partial are used to implement partial functions
    • Partial functions use some arguments with object and use others to execute

Sources

  • Fluent Python - Luciano Ramalho - 2023 - Second Edition - Web Edition
  • chatgpt

Eu com algumas figuras que representa análise de dados/ciência
#english #python #taskwarrior