This article demonstrates libraries and features in Python I used to build an auction program. In summary the code takes in an input file with lots of rows of data and prints out the output of the auction items, sold and unsold in a summary.
Furthermore, the code has been uploaded to the github repository below. There is a docker image which can be downloaded and run to inspect the features in more detail.
Code can be found:
Map is an efficient way of looping through items whilst applying a function to each element of the iterable. …
Money talks is a series to get the money conversation going.
As a member of the Association of Speakers Clubs I gave a speech called Money Talks. It was my A8 speech which meant it had to incorporate a bit of humour.
My challenge was how does one talk about money with a bit of humour included?
The topic of money is such a taboo in our society. On the other hand, money is one of the most important aspects of living or surviving in the world we live in today.
This particular episode focusses on three topics:
What is the eval function?
eval() will interpret any string argument parsed into it and execute it as Python code. A simple example is adding two numbers as shown below, The string ‘number + 2’ passed through eval gets executed and returns the value 3.
>> number = 1
>> eval('number + 2')
Additionally, eval only works with an expression. Trying to pass a statement will cause a syntax error as shown in the example below.
>> eval('number = 1 + 2')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 1
num = 1 + 2
We are past the half way mark of the first month of the new year. Have you changed anything yet? Are you happy with how things are? Do you think it’s the people around you that need to change?
I love this quote by Leo Tolstoy a Russian novelist, “Everyone thinks of changing the world, but no one thinks of changing himself”
Have you thought of the next big idea to rival Uber, Airbnb, KICKSTARTER or Bitcoin? …