From herrold at owlriver.com Tue Apr 4 13:42:01 2017 From: herrold at owlriver.com (R P Herrold) Date: Tue, 4 Apr 2017 13:42:01 -0400 (EDT) Subject: [CentralOH] Some finance books mentioned at lunch Message-ID: Interestingly the AMZN web site no longer offers the ISBN, but rather their proprietary replacement The Mis-Behaviour of Markets By Mandebrot ASIN: B002A7FW22 Fortune's Formula: The Untold Story of the Scientific Betting System That Beat the Casinos and Wall Street by William Poundstone ASIN: B000SBTWNC The Only Three Questions That Still Count: Investing By Knowing What Others Don't Kindle Edition by Ken Fisher ASIN: B006ORXIB6 Not mentioned but one should be conversant with: Behavioural Economics, extending Rational Economic actors, and Efficient Markets Hypothesis The Heretics of Finance: Conversations with Leading Practitioners of Technical Analysis (Bloomberg) 1st Edition, Kindle Edition by Andrew W. Lo ASIN: B003NX72ZC Freakonomics Rev Ed: A Rogue Economist Explores the Hidden Side of Everything Revised & Expand, Roughcut Edition, Kindle Edition by Steven D. Levitt ASIN: B000MAH66Y -- Russ herrold From anthonyclever at gmail.com Wed Apr 5 15:36:01 2017 From: anthonyclever at gmail.com (Anthony Clever) Date: Wed, 5 Apr 2017 15:36:01 -0400 Subject: [CentralOH] Python Books Humble Bundle Message-ID: Hello Friends, Some of you might be interested in the Python Book Bundle @ Humble Bundle running right now, benefiting the PSF. https://www.humblebundle.com/books/python-book-bundle - Anthony -------------- next part -------------- An HTML attachment was scrubbed... URL: From jep200404 at columbus.rr.com Thu Apr 6 18:55:08 2017 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Thu, 6 Apr 2017 18:55:08 -0400 Subject: [CentralOH] =?utf-8?q?2017-03-27_=E6=9C=83=E8=AD=B0_Scribbles_?= =?utf-8?b?76SY5pu4L+aDoeaWhz86IG1heCBtb3Jsb2NrZSBtZW1vcnkgbGVha3M7IGpp?= =?utf-8?q?m_prior_named_groups_in_regular_expressions_and_f-strings=3B_te?= =?utf-8?q?ssel_2?= Message-ID: <20170406185508.5aa537c7.jep200404@columbus.rr.com> Thanks to Pillar Technology and Paul Schwendenman for their generous hospitality. They gave us pizza, cookies, salad, and beer. Be sure to respond to meetup so Pillar they how much pizza to order. (don't forget to add cohpy and techlife columbus counts) out of town came from Dayton came from Tiffin (he should bring Brandon!) announcements give back hack givebackhack.com Brian designers, business people, and developers build some kind social enterprise that would benefit society starting friday night at CCAD's campus 2017-03-31 through 2017-04-02 meals and t-shirts provided $10k seed money for any new ventures started IGS is sponsor 10% discount for "python" code in past, buy one, give one for bags for foster kids to haul their stuff in between foster homes max morlocke will present again next month wp:steelpan 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 Young Coders program needs a community partner started by Katie Cunningham PyOhio contact Brian Costlow brian.costlow at gmail.com community partner provides students hauls them to and from pyohio students need to be at pyohio at about 8am (the saturday) students leave around 4 or 5pm Eric: pyohio is looking for sponsors costs about $25k to put on pyohio for 400 to 500 attendees >>> list(map(lambda f: f(1027), (int, hex, oct, bin, ))) [1027, '0x403', '02003', '0b10000000011'] >>> Brazenhead 1027 W Fifth 0x403 W Fifth 0o2003 W Fifth 0b10000000011 W 101th ############################################################################### Memory Leaks Max Morlocke Head of Engineering at Mineralsoft https://github.com/kedlav Mineralsoft Austin, TX kedlav at gmail.com https://github.com/kedlav/presentations/blob/master/memory_leaks.pdf some tricky ways that memory can leak - mutable default parameters are usually a bug than can also gobble memory - unhandled traceback keeping stack frame alive - cyclic references does not like gdb (because he does not have neck beard ala Pat Rothluss?) wp:Patrick Rothfuss https://www.goodreads.com/author/show/108424.Patrick_Rothfuss someone else has no problem using gdb nonetheless, maybe gdb is wrong tool for interpreted language such as Python (thinking and prints work just fine for many folks) objgraph https://mg.pov.lt/objgraph/ statsd graphite grafana beware of overriding __del__ method. use __enter__ and __exit__ methods with context manager instead of open and close pdflib http://www.pdflib.com/ likes it, uses it much commercial product lxml.element.Etree Tracking Down a Freaky Python Memory Leak https://benbernardblog.com/tracking-down-a-freaky-python-memory-leak/ DebuggingWithGdb https://wiki.python.org/moin/DebuggingWithGdb weak references will not keep an object from being garbage collected https://docs.python.org/3/library/weakref.html http://stackoverflow.com/questions/2436302/when-to-use-weak-references-in-python study once a year: Common Gotchas http://docs.python-guide.org/en/latest/writing/gotchas/ plumber is nice paid subscription what is URL for it? focused on java developers can be expensive then switch to statsd are there any linters that will flag suspect code, such as mutable default arguments? https://pylint.readthedocs.io/en/latest/reference_guide/features.html dangerous-default-value (W0102): Dangerous default value %s as argument Used when a mutable value as list or dictionary is detected in a default value for an argument. it can not possibly be my code max will give presentation next month on security he will send a synopsis paragraph to eric ############################################################################### Jim Prior gave a presentation on using Named Groups in Regular Expressions to improve readability. http://nbviewer.jupyter.org/github/james-prior/cohpy/blob/master/20170327-cohpy-named-groups.ipynb https://github.com/james-prior/cohpy/blob/master/20170327-cohpy-named-groups.ipynb ############################################################################### Jim Prior gave a presentation on using f-strings to improve readability, since there was still some time left over. http://nbviewer.jupyter.org/github/james-prior/cohpy/blob/master/20170327-cohpy-fstrings.ipynb https://github.com/james-prior/cohpy/blob/master/20170327-cohpy-fstrings.ipynb No one complained about bug in Jupyter notebook that showed wrong syntax highlighting for f-strings. That bug has since been fixed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Earlier today, he wondered how to defer evaluation of f-strings. Imagine have a dictionary of f-strings. date_formats = { 'iso': f'{year}-{month}-{day}', 'us': f'{month}/{day}/{year}', 'other': f'{day} {month} {year}', } The f-strings would be evaluated when the dictionary is created, not when the values are fetched later. Then he realized that lambdas could be used to defer evaluation. http://nbviewer.jupyter.org/github/james-prior/cohpy/blob/master/20170327-cohpy-defer-fstring-evaluation.ipynb https://github.com/james-prior/cohpy/blob/master/20170327-cohpy-defer-fstring-evaluation.ipynb So there is a good use for Zak's (aka y2kbugger) crazy f-string lambdas. http://nbviewer.jupyter.org/github/james-prior/cohpy/blob/master/20170130-cohpy-fstrings.ipynb https://github.com/james-prior/cohpy/blob/master/20170130-cohpy-fstrings.ipynb What drawbacks are there? Scoping issues? How can one evaluate or convert a regular string as an f-string? How about eval('f%r' % s), lambda: eval('f%r' % s)? Why is %r used instead of %s or %a? What other ways are there? http://nbviewer.jupyter.org/github/james-prior/cohpy/blob/master/20170327-cohpy-regular-string-to-fstring.ipynb https://github.com/james-prior/cohpy/blob/master/20170327-cohpy-regular-string-to-fstring.ipynb - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - might give a presentation on how to evaluate a regular string as an f-string or on pycrypto. ############################################################################### big crane taking up half of parking lot open-source microcontroller tessel 2 $45 TM-12-07 tessel.io https://github.com/tessel Made with love by The Tessel Project 580 MHz Mediatek MT7620n 64 MB DDR2 RAM & 32 MB flash 48MHz Atmel SAMD21 coprocessor microUSB power and programming port ethernet port two USB ports two tessel ports (kinda Arduino compatible) analog inputs badly soldered (not hot enough long enough?) wifi 802.11bgn bluetooth? default: runs javascript (on top of linux) use npm (node package manager) to install software option: runs rust 2017-07-13 (a thursday) Pillar Plugged In: beginning Arduino blink two LEDs max 50 people, 10 kits, 5 people per kit bring a scope! ############################################################################### how to run meeting show cohpy.org on screens until presentation begins show meeting schedule on screens: 6:00 pm to 6:30 pm: eat, socialize 6:30 pm to 8:00 pm: introductions and announcements, then presentations 8:00 pm hard stop for presentations 8:00 pm adjourn to Brazenhead 18:30: thank hosts for pizza and beer free pizza and beer on tap anything is fridge is free mention that when you're done, please throw away your trash, put plates in sink (or beside sink) ask host where to put glasses, forks, and knives? Be sure to respond to meetup so Pillar knows how much pizza to order. (don't forget to add cohpy and techlifecolumbus counts) mention cohpy.org and technical mailing list who is here for first time, please raise your hand others introduce yourself to people with hands raised who is here from out of town? have three first timers and three repeat attendees introduce themselves to group ask for folks who have announcement about events announce next meeting. May meeting will be next to last monday to avoid memorial day. 2017-05-22 work who is looking for work? who is looking for workers? then presentations then adjourn by 8:00pm to brazenhead From nludban at columbus.rr.com Fri Apr 7 11:06:14 2017 From: nludban at columbus.rr.com (Neil Ludban) Date: Fri, 7 Apr 2017 11:06:14 -0400 Subject: [CentralOH] =?utf-8?q?2017-03-27_=E6=9C=83=E8=AD=B0_Scribbles_?= =?utf-8?b?76SY5pu4L+aDoeaWhz86IG1heCBtb3Jsb2NrZSBtZW1vcnkgbGVha3M7IGpp?= =?utf-8?q?m_prior_named_groups_in_regular_expressions_and_f-strings=3B_te?= =?utf-8?q?ssel_2?= In-Reply-To: <20170406185508.5aa537c7.jep200404@columbus.rr.com> References: <20170406185508.5aa537c7.jep200404@columbus.rr.com> Message-ID: <20170407110614.0b2b9e7678a4852e14df8c70@columbus.rr.com> On Thu, 6 Apr 2017 18:55:08 -0400 jep200404 at columbus.rr.com wrote: > ############################################################################### > > Memory Leaks > > Max Morlocke > Head of Engineering at Mineralsoft > https://github.com/kedlav > Mineralsoft > Austin, TX > kedlav at gmail.com > > https://github.com/kedlav/presentations/blob/master/memory_leaks.pdf > > some tricky ways that memory can leak > > - mutable default parameters are usually a bug than can also gobble memory > - unhandled traceback keeping stack frame alive > - cyclic references > > does not like gdb (because he does not have neck beard ala Pat Rothluss?) > > wp:Patrick Rothfuss > https://www.goodreads.com/author/show/108424.Patrick_Rothfuss > > someone else > has no problem using gdb > nonetheless, maybe gdb is wrong tool for interpreted language such as Python > (thinking and prints work just fine for many folks) Python has its own set of gdb scripts for pretty printing the C data structures that represent interpreted objects: https://docs.python.org/devguide/gdb.html Which are implemented in Python because gdb 7 added an (optional) embedded Python interpreter for all your debug scripting needs: https://sourceware.org/gdb/current/onlinedocs/gdb/Python.html Here's a more interesting example using gdb's Python API to read an embedded target's memory and translate addresses to source code, sort of like printing a call stack but for "goto"s: https://learn.adafruit.com/debugging-the-samd21-with-gdb/micro-trace-buffer From herrold at owlriver.com Mon Apr 17 13:35:06 2017 From: herrold at owlriver.com (R P Herrold) Date: Mon, 17 Apr 2017 13:35:06 -0400 (EDT) Subject: [CentralOH] seen humor: CERN Researchers Apologize For Destruction Of 5 Parallel Universes In Recent Experiment Message-ID: As we've had the CoPY presentation, this is perhaps relevant http://www.theonion.com/article/cern-researchers-apologize-destruction-5-parallel--55780 From jocassid at gmail.com Thu Apr 20 12:41:22 2017 From: jocassid at gmail.com (John Cassidy) Date: Thu, 20 Apr 2017 12:41:22 -0400 Subject: [CentralOH] SOAP library Message-ID: Can anyone recommend a good SOAP library with Python 2 & 3 compatibility? -------------- next part -------------- An HTML attachment was scrubbed... URL: From anthonyclever at gmail.com Thu Apr 20 16:21:43 2017 From: anthonyclever at gmail.com (Anthony Clever) Date: Thu, 20 Apr 2017 16:21:43 -0400 Subject: [CentralOH] SOAP library In-Reply-To: References: Message-ID: Zeep? http://docs.python-zeep.org/en/master/ On Thu, Apr 20, 2017 at 12:41 PM, John Cassidy wrote: > Can anyone recommend a good SOAP library with Python 2 & 3 compatibility? > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kedlav at gmail.com Mon Apr 24 14:54:16 2017 From: kedlav at gmail.com (Max) Date: Mon, 24 Apr 2017 14:54:16 -0400 Subject: [CentralOH] Practical Security Overview Presentation Message-ID: The slides for tonight's presentation are available at: https://github.com/kedlav/presentations/blob/master/practical_security_overview.pdf -Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From herrold at owlriver.com Tue Apr 25 12:52:37 2017 From: herrold at owlriver.com (R P Herrold) Date: Tue, 25 Apr 2017 12:52:37 -0400 (EDT) Subject: [CentralOH] hashes, and other nonces Message-ID: Thanks for last night's presentation. Much actionable material there I see this in my new feed this morning, as to generating nonces: http://www.evontech.com/what-we-are-saying/entry/python-36-adds-new-secrets-module-for-robust-account-and-password-security.html Python 3.6, the newest major release of the Python language, has added a new module, called secrets, to help generate cryptographically strong random numbers for managing secrets, like account authentication, tokens and related secrets. Python developers are highly likely to prefer secrets ... -- Russ herrold From kedlav at gmail.com Tue Apr 25 15:41:27 2017 From: kedlav at gmail.com (Max) Date: Tue, 25 Apr 2017 15:41:27 -0400 Subject: [CentralOH] hashes, and other nonces In-Reply-To: References: Message-ID: Secrets is a fantastic addition to the standard library. If you're curious as to why there's yet another module covering random number and string generation and why it is in the standard lib, the PEP covering this module is fantastic: https://www.python.org/dev/peps/pep-0506/ -Max On Tue, Apr 25, 2017 at 12:52 PM, R P Herrold wrote: > Thanks for last night's presentation. Much actionable > material there > > I see this in my new feed this morning, as to generating > nonces: > > http://www.evontech.com/what-we-are-saying/entry/python-36- > adds-new-secrets-module-for-robust-account-and-password-security.html > > Python 3.6, the newest major release of the Python language, > has added a new module, called secrets, to help generate > cryptographically strong random numbers for managing secrets, > like account authentication, tokens and related secrets. > Python developers are highly likely to prefer secrets ... > > -- Russ herrold > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jep200404 at columbus.rr.com Tue Apr 25 22:17:28 2017 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Tue, 25 Apr 2017 22:17:28 -0400 Subject: [CentralOH] =?utf-8?q?2017-04-24_=E6=9C=83=E8=AD=B0_Scribbles_?= =?utf-8?b?76SY5pu4L+aDoeaWhz86IE1heCBNb3Jsb2NrZTogUHJhY3RpY2FsIFNlY3Vy?= =?utf-8?q?ity_Overview=3B_Jim_Prior=3A_LBYL_v_EAFP=3B?= Message-ID: <20170425221728.542cba85.jep200404@columbus.rr.com> Thanks to Pillar and Chris Baker for their generous hospitality. There was free salad, pizza, cookies, and beer. The May meeting is on 2017-05-22. That is the NEXT to last Monday in May. presentations Max Morlocke Practical Security Overview presentation https://github.com/kedlav/presentations/raw/master/practical_security_overview.pdf Jim Prior LBYL v EAFP http://nbviewer.jupyter.org/github/james-prior/cohpy/blob/master/20170424-cohpy-lbyl-v-eafp.ipynb https://github.com/james-prior/cohpy/blob/master/20170424-cohpy-lbyl-v-eafp.ipynb https://github.com/james-prior/cohpy/blob/master/20170424-cohpy-except-0-bare.py https://github.com/james-prior/cohpy/blob/master/20170424-cohpy-except-1-valueerror.py https://github.com/james-prior/cohpy/blob/master/20170424-cohpy-except-3-valueerror-min-try.py Some one asked about speed of handling exceptions in Python. Response: First one codes for clarity, not speed. Until one measures that speed is too slow, don't worry about speed. "Premature optimization is the root of all evil." That said, handling exceptions is something that Python does well and fast. Exceptions are pervasive in Python, much more than many people realize. For example, iterators are terminated by a StopInteration exception. https://docs.python.org/3/library/exceptions.html#exceptions.StopIteration http://anandology.com/python-practice-book/iterators.html#the-iteration-protocol That person volunteered to make 1.5 million strings to test LBYL v EAFP speed in safe_float(). Watch the mailing list for updates. good crowd Is bdist_rpm seriously broken in Python3? Where does bdist_rpm come from? I wonder about bdist_rpm2 command of pypi2rpm. https://pypi.python.org/pypi/pypi2rpm Sliders with wine? https://duckduckgo.com/html/?q=short+north+white+castle+alcohol+serving[jep at main ~]$ 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 From herrold at owlriver.com Wed Apr 26 12:25:28 2017 From: herrold at owlriver.com (R P Herrold) Date: Wed, 26 Apr 2017 12:25:28 -0400 (EDT) Subject: [CentralOH] =?euc-kr?b?MjAxNy0wNC0yNCD85eyhIFNjcmliYmxlcyDR5t/2?= =?euc-kr?q?/=E4=C2=D9=FE=3F=3A_Max_Morlocke=3A_Practical_Security_Overvie?= =?euc-kr?q?w=3B_Jim_Prior=3A_LBYL_v_EAFP=3B?= In-Reply-To: <20170425221728.542cba85.jep200404@columbus.rr.com> References: <20170425221728.542cba85.jep200404@columbus.rr.com> Message-ID: On Tue, 25 Apr 2017, jep200404 at columbus.rr.com wrote: > Is bdist_rpm seriously broken in Python3? > Where does bdist_rpm come from? > I wonder about bdist_rpm2 command of pypi2rpm. > https://pypi.python.org/pypi/pypi2rpm as to the latter: [herrold at centos-7 python]$ git clone https://bitbucket.org/tarek/pypi2rpm Cloning into 'pypi2rpm'... remote: Not Found fatal: repository 'https://bitbucket.org/tarek/pypi2rpm/' not found ... there is a tarball which I snagged a copy of, and will take a look later ------------------------- I suspect bdist_rpm comes from the distutils see Pythonic doco at: https://docs.python.org/3/distutils/builtdist.html#creating-rpm-packages I'd post the code, but I am trying to figure out the CLI method to create a new remote archive path at GitHub to which I can push it. I have a script addressing, and for me, solving the bdist_rpm issues, and integrating with my RPM packaging build and maintenance systems ----------------------- Jim was interested in what a 'private archive' looks like at GitHub ... the Interactive Brokers API one is such, which I have cloned. The GUI shows this and 'inherits' the ACL http://gallery.herrold.com/stuff/github-private.png I assume it is also restricted to being inadvertently exposed in the other methods of access -- Russ herrold From sriveravi at gmail.com Thu Apr 27 11:05:02 2017 From: sriveravi at gmail.com (Samuel) Date: Thu, 27 Apr 2017 11:05:02 -0400 Subject: [CentralOH] python webcam server Message-ID: Hey folks, I'm interested in setting up some kind of server on my old maccy where I can monitor my house/dog from anywhere online. Prefer python. I don't know much about any of this (how to set up a server, log in from far away, set up the stream, make it secure). Anyone point me in the right direction? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdsantiagojr at gmail.com Thu Apr 27 11:28:53 2017 From: jdsantiagojr at gmail.com (John Santiago) Date: Thu, 27 Apr 2017 15:28:53 +0000 Subject: [CentralOH] python webcam server In-Reply-To: References: Message-ID: Hell Samuel, Not sure if this would be helpful but checkout these camera. . http://www.bestbuy.com/site/d-link-day-and-night-wi-fi-video-security-camera-white/8884295.p?skuId=8884295 dlink has a free cloud service that those cameras connect to On Thu, Apr 27, 2017 at 11:05 AM Samuel wrote: > Hey folks, I'm interested in setting up some kind of server on my old > maccy where I can monitor my house/dog from anywhere online. Prefer python. > I don't know much about any of this (how to set up a server, log in from > far away, set up the stream, make it secure). > > Anyone point me in the right direction? > > Thanks. > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: