Skip to content

25th October 2021

Life Management

Book Management

  • Improvement: Add link to the calibre-web kobo integration project.



Python Snippets

  • New: Locate element in list.

    a = ['a', 'b']
    index = a.index('b')
  • New: Transpose a list of lists.

    >>> l=[[1,2,3],[4,5,6],[7,8,9]]
    >>> [list(i) for i in zip(*l)]
    ... [[1, 4, 7], [2, 5, 8], [3, 6, 9]]
  • New: Check the type of a list of strings.

    def _is_list_of_lists(data: Any) -> bool:
        """Check if data is a list of strings."""
        if data and isinstance(data, list):
            return all(isinstance(elem, list) for elem in data)
            return False

Prompt Toolkit



  • New: How to draw Ellipses.

    Ellipses are the next basic shape we're going to study (after the lines). They are extremely important and notoriously annoying to draw. Important because we're going to be using ellipses in 2D space to represent circles that exist in 3D space.

    In this section we:

Exercise Pool

  • New: Add the Tables of ellipses drawing exercise.

    This exercise is meant to get you used to drawing ellipses, in a variety of sizes, orientations and degrees. It also sets out a clear space each ellipse is meant to occupy, giving us a means to assess whether or not an ellipse was successful, or if there were visible mistakes (where it went outside of its allotted space, or ended up falling short). Practicing against set criteria, with a way to judge success/failure is an important element of learning. There's nothing wrong with failure - it's an opportunity to learn. Having a clearly defined task allows us to analyze those failures and make the most of them.