How to complete a full Marathon

How to complete a Full Marathon.
1) Training – don’t bother, you’ll just get your shoes dirty.
2) A week before the event – Panic. Remember, the race is all about managing your emotions (and taking photographs.)
3) The night before the event, go out with friends to the pub and drink. Alcohol has magical properties to let you forget that you’re about to follow the footsteps of someone who died when he reached Athens, and people barely remember his name.
4) Morning of the race – pop two aspirins and down it with the strongest Italian coffee you can legally find.
5) Run – this is easy, just place one foot in front of the other and it’s important to have a confident and athletic stride. Don’t worry about sweat or pain, those can be easily photoshoped out later.IMG_2721

What does the Vietnam war have to do with German Photography?

That’s one of the topics for my class presentation next week.  The answer is quite simple.  German and other European camera manufacturers made cameras that were complex and often with leaf shutters.  Zeiss has been making optics for over 100 years now and the quality to this day is very good.

But Japanese camera companies started making modular and simple cameras with a focal plane shutter that allowed the parts to be mass produced and the parts interchangeable.  During and after the Vietnam war, US servicemen would take their vacations in Japan and buy these cameras, flooding the market.

After that, many people grew up using Canon, Nikon and forgetting to use the complex German systems.  Exception has been Leica, but they were and still are expensive, costing many times over what a comparable Japanese camera costs.

PyStone

A nifty way to benchmark a machine using Python (and it’s built in)

MacAir:~ raf$ python3 /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/test/pystone.py
Pystone(1.2) time for 50000 passes = 0.614033
This machine benchmarks at 81428.9 pystones/second
MacAir:~ raf$

And my Mac Pro:

FLD-ML-00020763:GIT kruczkowski$ python3 /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/test/pystone.py
Pystone(1.2) time for 50000 passes = 0.39734
This machine benchmarks at 125837 pystones/second
FLD-ML-00020763:GIT kruczkowski$

And my new Thinkpad:

raf@thinkpad:~$ /usr/lib/python3.5/test/pystone.py
Pystone(1.2) time for 50000 passes = 0.216861
This machine benchmarks at 230562 pystones/second

Back to Python

Reviewing Python studies after a break on doing other things such as moves, work projects and life.  Here’s some of my notes from the past reviews and notebooks.

Data Objects

object.attribute
function(argument)
object.method(argument)
list = ['a', 'b', 'c']
dictionary = {'key':'value','key':'value'}
tuple = ('bob',40)
for target in object:
    statement
else:
    statement

Files

f = open ('foo.txt', 'rU')
for line in f:
    print(line),
f.close()

Classes

def myclass(mylocallist):
   print(mylocallist)

myclass(mylist)