[CentralOH] 2015-02-23 會議 Scribbles 落書/惡文?: Mr. Rooney, April Fool, Database Migration: SQLAlchemy/Alembic versus Django ORM, go, memoization, closure, dict.get(), dict.setdefault(), well tempered Lars on Mars, C++ in iPython notebook

jep200404 at columbus.rr.com jep200404 at columbus.rr.com
Tue Feb 24 18:53:59 CET 2015


Thanks again to Pillar with Raymond Chandler for hosting us.
Pillar is a very generous host again. The Thai pizza was very good.

We look forward to seeing posted:
    technique for doing C++ in Ipython notebook
    Joe Shaw's slides
    Jim Reed's slides
    video of K Lars Lohn's PyTn presentation

        https://www.pytennessee.org/schedule/presentation/66/

wp: prefix means Wikipedia
To get good answers, consider following the advice in the links below.

    http://catb.org/~esr/faqs/smart-questions.html
    http://web.archive.org/web/20090627155454/www.greenend.org.uk/rjk/2000/06/14/quoting.html

What is the name of the album released in the 1970s 
that had well tempered stuff done on a synthesizer?
Was it done by somebody other than Glenn Gould?

were in Pillar's "Launchpad" (west)
native resolution of the right projector seems to be 1920x1080
in spite of label on wall that says "MAX RES 1680X1050".
The label on the HDMI 2 button is inverted top for bottom.
Need to take key cap off, and flip the label over.
On the control panel, hit the left or right button to select which projector
one wants to select an input for, then hit input button for which input one want to connect
to the selected projector. We had much less difficulty with these projectors
than in the Forge.

    wifi worked fine automatically

whacking video modes messed up xfce

Lars' presentation at PyTN
    somebody showed a video of it on their phone

jim prior reviewed memoization
    
    argument packing and unpacking
    memoization is a technique used to make a function faster by 
    remembering and returning previously calculated results, 
    so that which remembers calculated return values of a functioninvolved a function that 

    wp:Closure (computer programming)
    Closures are a wierd thing which can make your
    head wobble the first time one encounters them.
    Watching Brandon Rhodes' video "Names, Objects, and Plummeting From The
    Cliff" will help one understand persistance with closures.
    
        http://pyvideo.org/video/542/

    Links for the Ipython notebook used in the presentation are in the 
    scribbles previously posted to the list and archived at the following URL.
    https://mail.python.org/pipermail/centraloh/2015-January/002312.html

    Should have spent less time on .items() and argument unpacking.

    After the presentation, someone suggested using the .get() method of
    dictionaries, to avoid the 'if x not in results:' test. Unfortunately, the
    .get() method does not change the dictionary, so we would have to
    explicitly save the result, so helper would be defined as:

        def helper(x):
            results[x] = results.get(x, f(x))
            return results[x]

    That 'results[x] = ' is a bit ugly. Of course, someone really meant to
    suggest the .setdefault() method, which yields elegant code:

        def helper(x):
            return results.setdefault(x, f(x))

    Unfortunately, a problem with both of them is that f(x) is _always_ called,
    defeating the purpose of memoization.

    The new notebook showing how bad the .get() and .setdefault() methods were
    will be at colug.net/python/cohpy/20150223/

    need to put on my github account
    Eric wants to put that content on a cohpy account at github.

joe shaw

    Gave presentation on Go language, comparing its virtues with those of
    The Zen of Python PEP #20 https://www.python.org/dev/peps/pep-0020/
    Using the Zen of Python was a good template for the presentation.

    Functions can return arbitrary number of values, similar to python.

    We look forward to Joe posting his slides.

jim reed

    Mars lander

    COD3: C under very strict rules 2.5M lines of code for Mars thing
    had very low defect rate, 5 total defects or was it 5 defects per million
    lines? The C code was tested with 25 k lines of Python code?

    Python has unusually low defect rate in python itself.
    http://www.coverity.com/press-releases/coverity-finds-python-sets-new-level-of-quality-for-open-source-software/

    We look forward to Jim posting his slides also.

question: migration ability: sqlalchemy versus django ORM

    Alembic is the thing for migration for SQLAlchemy,
    but don't know enough to compare with Django ORM's migration support.
    (People know one or the other but not both.)

April Fool's paraphased and misinterpreted

    Three high school students, Aaron, Bob, and Chuck who were into theatre
    decided to put on an April Fool's day prank in the lunch room near the area
    where they usually ate with their friends. Aaron and Bob made a list of
    plausible things that would provoke each other and practiced an escalating
    confrontation that would lead to a fight between them. Chuck's role was to
    keep everyone else (who did not know the confrontation was all fake) away
    from Aaron and Bob so the confrontation could go on. On April 1st, the mock
    confrontation was staged. At one point Bob slammed Aaron against a door
    which made a big sound down the hall. Then the vice-principle comes in to
    see Aaron slumped down with Bob standing nearby. Chuck volunteers "Bob hit
    Aaron". The veep chastises Bob, noting that they have talked about this
    before, telling Aaron and Bob to come with him. On the way to his office,
    he stops at the intersection of two halls. The veep and Bob have an
    escalating conversation. Several times Bob tries to tell the veep that the
    veep does not understand the situation, but the veep keeps cutting him off
    until the veep says to Bob "No, _you_ don't understand the situation. April
    Fool's.". Aaron and Chuck had talked to the veep beforehand. The veep was
    in on it but not Bob. Bob is stunned at the turn of events, curses all
    those involved and walked away very peeved. Bob stayed peeved for a long
    time.

What could Mr. Rooney have learned from that?


More information about the CentralOH mailing list