25th October 2021
Life Management⚑
Book Management⚑
- Improvement: Add link to the calibre-web kobo integration project.
Coding⚑
Python⚑
Python Snippets⚑
-
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) else: return False
Prompt Toolkit⚑
-
New: Basic concepts of building full screen applications with python prompt toolkit.
prompt_toolkit
can be used to create complex full screen terminal applications. Typically, an application consists of a layout (to describe the graphical part) and a set of key bindings.In the section we cover:
- The layout
- The controls
- How to use key bindings
- How to apply styles
- A difficult ordered list of examples to get a grasp of these concepts with simple working code.
Arts⚑
Drawing⚑
-
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:
- Introduce the basic concepts surrounding the ellipses
- How to draw them.
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.