[CentralOH] 2017-10-19 道場 Scribbles 落書/惡文? version shibboleth; braces in python; pyflakes; jedi; breaking out of nested loops; ascii art; recursion palooza ioccc; jupyter notebook; avoiding sql injection attacks; csv; recursion; fibonacci

jep200404 at columbus.rr.com jep200404 at columbus.rr.com
Sun Oct 22 06:42:16 EDT 2017


many folks tonight

Python version shibboleth: '...' versus '!'

    doj at sbc:~$ python
    Python 2.7.12 (default, Nov 19 2016, 06:48:10)
    [GCC 5.4.0 20160609] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import __hello__
    Hello world...
    >>>
    doj at sbc:~$

    doj at sbc:~$ python3
    Python 3.5.2 (default, Sep 14 2017, 22:51:06)
    [GCC 5.4.0 20160609] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import __hello__
    Hello world!
    >>>
    doj at sbc:~$

car needs fixed versus car needs to be fixed

pop versus soda versus coke
http://bigthink.com/strange-maps/308-the-pop-vs-soda-map
https://laughingsquid.com/soda-pop-or-coke-maps-of-regional-dialect-variation-in-the-united-states/
http://www.mappery.com/Pop-vs-Soda-US-Map

Perl is 30 years old around now.
It surprised me that Perl is only four years older than Python.

How to use braces instead of indentation to indicate structure.
Python indentation
https://en.wikipedia.org/wiki/Python_syntax_and_semantics#Indentation

    doj at sbc:~$ python2
    Python 2.7.12 (default, Nov 19 2016, 06:48:10)
    [GCC 5.4.0 20160609] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from __future__ import braces
      File "<stdin>", line 1
    SyntaxError: not a chance
    >>>
    doj at sbc:~$

    doj at sbc:~$ python3
    Python 3.5.2 (default, Sep 14 2017, 22:51:06)
    [GCC 5.4.0 20160609] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from __future__ import braces
      File "<stdin>", line 1
    SyntaxError: not a chance
    >>>
    doj at sbc:~$

pyflakes
jedi

Someone asked about breaking out of nested loops. Study:

    http://nbviewer.jupyter.org/github/cohpy/challenge-201605-generators/blob/master/james-prior/b-break-out-of-nested-loops.ipynb
    http://nbviewer.jupyter.org/github/james-prior/cohpy/blob/master/20160708-dojo-breaking-out-of-nested-loops-to-variable-levels.ipynb

    2016-07-08 道場 Scribbles 落書/惡文? input() from io.StringIO() csv try/except EAFP LBYL regexes xterm links scarf mitigation java ee rice libreoffice defect rate machine learning identity warranty stickers eye tracking breaking nested loops books buildozer kivy sed & awk iter(partial(input, prompt), 'quit') bash in ms windows ! in.format() loop unrolling parade
    https://mail.python.org/pipermail/centraloh/2016-July/002895.html

    2016-07-15 道場 Scribbles 落書/惡文? atlassian diff regex tiobe 5*7*17 try/except/break/goto kivy pylint pyflakes jedi Magnolia Thunderpussy Pokémon Go hackerrank smell wipy iot natron indentation LBM
    https://mail.python.org/pipermail/centraloh/2016-July/002901.html

How to use an Arduino and Raspberry Pi to turn a fiber optic neural network into wall art
https://opensource.com/article/17/10/fiber-optic-neural-network-art

Learn how to program in Python by building a simple dice game
https://opensource.com/article/17/10/python-101

ascii art way before ascii
https://upload.wikimedia.org/wikipedia/commons/7/78/Brooklyn-Daily-Eagle-1875-01-06.png

wp:IOCCC
august entry of 1985 http://ioccc.org/years.html#1985
recursion palooza
fans of recursion should figure out the following

    http://ioccc.org/1985/august/august.c

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

Meet Bill Pollock, founder of No Starch Press
https://opensource.com/article/17/10/no-starch
https://www.nostarch.com/catalog/python

The Python 3 Standard Library by Example
by Doug Hellmann

anki monkey patching wrap

wp:"Hello, World!" program

conda create --yes --name erik2 python=2 jupyter
source activate erik2
jupyter notebook --browser=firefox

conda create --yes --name erik3 python=3 jupyter
source activate erik3
jupyter notebook --browser=firefox

https://xkcd.com/327/

PEP 249 -- Python Database API Specification v2.0
https://www.python.org/dev/peps/pep-0249/

django

CSV File Reading and Writing
https://docs.python.org/3/library/csv.html

wp:recursion
wp:Fibonacci number


More information about the CentralOH mailing list