[CentralOH] 2017-02-10 道場 Scribbles 落書/惡文? Part 1: EAFP; virtual environments; closure; put this in your pipe and smoke it; cowlishaw; Euler #104; trash calendar challenge; three step dance
jep200404 at columbus.rr.com
jep200404 at columbus.rr.com
Sun Feb 12 17:24:02 EST 2017
rr is choking on scribbles again, so binary sort to figure it out
busy night
had 9 folks, even without some of the regulars
We met in the "Community Room".
Either that room's heat was fixed,
or it was warm outside,
or we generated enough heat,
or our expectations were low enough,
or some combination thereof.
EAFP
doj at pan:~$ python3
Python 3.6.0 |Anaconda 4.3.0 (32-bit)| (default, Dec 23 2016, 12:22:10)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> float('1.234')
1.234
>>> float('1.234lkjsad')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: could not convert string to float: '1.234lkjsad'
>>> try:
... a = float('1.2398r2398')
... except ValueError:
... print('do something else!')
... else:
... print('good value is ', a)
...
do something else!
>>>
videos of good presentations, several of which were at PyOhio
Pyvideo.org
Raymond Hettinger
Beyond PEP 8 -- Best practices for beautiful intelligible code
Keynote - What Makes Python Awesome
Transforming Code into Beautiful, Idiomatic Python
Brandon Rhodes
Names, Objects, and Plummeting From The Cliff
A Python Æsthetic: Beauty and Why I Python
The Mighty Dictionary (#55)
Python Design Patterns 1
Python and the Glories of the UNIX Tradition
Squinting at Python Objects
Fernando Pérez
Science And Python: retrospective of a (mostly) successful decade
K Lars Lohn
The Well Tempered API
wp:Gödel, Escher, Bach
wp:recursion
Configman - the grand unified theorem of configuration
good use of color in presentation
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
https://try.jupyter.org/
virtual environments are pretty much mandatory
python: python -m venv env
legacy python: virtualenv
conda
miniconda
anaconda
wp:Closure (computer programming)
http://colug.net/python/cohpy/20150223/
http://nbviewer.jupyter.org/url/colug.net/python/cohpy/20150223/cohpy-20150223-memoization.ipynb
https://github.com/cohpy/challenge-201605-generators/blob/master/james-prior/8-nested-generators-20160626-1920.ipynb
repeated repeated repeated repeated addition
http://nbviewer.jupyter.org/github/cohpy/challenge-201605-generators/blob/master/james-prior/9-the-twelve-days-of-christmas.ipynb
http://nbviewer.jupyter.org/github/cohpy/challenge-201605-generators/blob/master/james-prior/5-dojo-20160429-2016-Mar-COhPy_Challenge_Rough-20160625-1612.ipynb
http://nbviewer.jupyter.org/github/cohpy/challenge-201605-generators/blob/master/james-prior/7-iter_date-revisited.ipynb
wp:Mike Cowlishaw
IBM feller
he was hot stuff there
20% speed up in some OS release
did denser decimal software
three decimal digits in 10 bits (pretty efficient)
wp:Densely packed decimal
wp:Chen–Ho encoding
Project Euler #104
https://github.com/james-prior/euler/blob/master/euler-104-pandigital-fibonacci-ends-20170210.ipynb
http://nbviewer.jupyter.org/github/james-prior/euler/blob/master/euler-104-pandigital-fibonacci-ends-20170210
someone else did euler #104
used completely different techniques than above
haskell
was smoking fast at making fibonacci numbers
(a million fibonacci numbers in under a second)
was terribly slow at picking out first and last 9 digits
javascript
was slow at making fibonacci numbers
was fast at getter first and last 9 digits
wrote own math routines for extended precision
did things in "giglets" inspired by Cowlishaw declets.
(9 digits fit in 30 bits which is within native int type)
???used hybrid approach???
??? haskell to make fibonacci numbers???
??? javascript to get first and last 9 digits???
???best time was about five minutes???
Challenge
Given a year, generate something like the following.
If no year specified, use current year.
https://311.columbus.gov/2017%20Rotating%20Holiday%20Calendar.pdf
https://311.columbus.gov/2017%20Recycling%20and%20Yard%20Waste%20Calendar.pdf
https://www.columbus.gov/Templates/Detail.aspx?id=64633
See https://311.columbus.gov/AddrLookupnew.aspx
https://www.southernohioforestrally.com/
find -type f -exec ls -lad --full-time {} \; | sort -k6,7 | column -t -s ' '
wp:Ringling Bros. and Barnum & Bailey Circus
wp:Sells Floto Circus
http://www.zillow.com/homedetails/755-Dennison-Ave-Columbus-OH-43215/33845587_zpid/
three step dance
./configure
make
sudo make install
http://tldp.org/LDP/LG/current/smith.html
http://www.freetds.org/userguide/config.htm
http://www.codecoffee.com/tipsforlinux/articles/27.html
http://bochs.sourceforge.net/doc/docbook/user/compiling.html
otro baile
Otros Aires
Tanghetto
Gotan Project
Bajofondo
More information about the CentralOH
mailing list