Many of my notes from learning to use Python, in the likely case that I forget...
Example of how to use a REST API from Python. Tests included.
A Bourne shell script that automagically creates virtual environments for Python and Python3.
A variety of methods for calculating our favourite integer sequence. Unit tests included.
(Work in progress) A variety of methods for testing primality of numbers using number theory. Unit tests included.
Quite possibly the oldest algorithm known to modern man. Unit tests included.
Generates a set of test values for GCD. Clean example of how to generate random test information using known good functions such as math.gcd()
A simple example of using the random
module in python3
to efficiently shuffle a list of values.
Generates text tuples of warm and cool colours from the set ("red", "orange", "yellow", "green", "blue", "purple").
Notes on various methods for manipulating strings with slices in a question and answer format.
Several approaches to using the Ternary conditional construct with references and iterating through lists of references.
A simulation of a well known fortune teller using the secrets
module in python3
to reveal mystical secrets of timing.