From jep200404 at columbus.rr.com Sat Jul 8 19:34:59 2017 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Sat, 8 Jul 2017 19:34:59 -0400 Subject: [CentralOH] =?utf-8?q?2017-07-06_=E9=81=93=E5=A0=B4_Scribbles_?= =?utf-8?b?76SY5pu4L+aDoeaWhz8gQyB2IFB5dGhvbjsgVHVmdGU7IFRoZSBQcmluY2lw?= =?utf-8?q?les_of_Good_Programming=3B_IoT=3B_multimethods?= Message-ID: <20170708193459.6aa8ed45.jep200404@columbus.rr.com> 6 folks tonight compare and contrast the following blank() implementations. blank() should blank the row line starting at column, and blank the entirety of following lines. void blank(char buf[LINES][COLUMNS], int row, int column) { goto MIDDLE; for ( ; row < LINES; row++) for (column = 0; column < COLUMNS; column++) MIDDLE: buf[row][column] = ' '; } void blank(char buf[LINES][COLUMNS], int row, int column) { for ( ; row < LINES; row++) { for ( ; column < COLUMNS; column++) buf[row][column] = ' '; column = 0; } } void blank_to_end_of_row(char buf[LINES][COLUMNS], int row, int column) { for ( ;column < COLUMNS; column++) buf[row][column] = ' '; } void blank_row(char buf[LINES][COLUMNS], int row) { blank_to_end_of_row(buf, row, 0); } void blank(char buf[LINES][COLUMNS], int row, int column) { blank_to_end_of_row(buf, row++, column); for ( ; row < LINES; row++) blank_row(buf, row); } void blank(char buf[LINES][COLUMNS], int row, int column) { blank_to_end_of_row(buf, row++, column); for ( ; row < LINES; row++) blank_to_end_of_row(buf, row, 0); } def blank(buf, row, column): for row in range(row, LINES): for column in range(column, COLUMNS): buf[row][column] = ' ' column = 0 def blank_to_end_of_row(buf, row, column): for column in range(column, COLUMNS): buf[row][column] = ' ' def blank_row(buf, row): blank_to_end_of_row(buf, row, 0) def blank(char buf[LINES][COLUMNS], int row, int column): blank_to_end_of_row(buf, row, column) row += 1 for row in range(row, LINES): blank_row(buf, row) def blank(char buf[LINES][COLUMNS], int row, int column): blank_to_end_of_row(buf, row, column) row += 1 for row in range(row, LINES): blank_to_end_of_row(buf, row, 0) int blank(char buf[LINES][COLUMNS], int row_arg, int column_arg) { int row = row_arg; for (column = column_arg; column < COLUMNS; column++) buf[row][column] = ' '; for (row++ ; row < LINES; row++) for (column = 0; column < COLUMNS; column++) buf[row][column] = ' '; } /* this is wrong: fails to clear beginning of following lines */ int blank(char buf[LINES][COLUMNS], int row_arg, int column_arg) { int row; for (row = row_arg; row < LINES; row++) for (column = column_arg; column < COLUMNS; column++) buf[row][column] = ' '; } someone suggested using fmt https://linux.die.net/man/1/fmt how would you use fmt (in shell)? visualization wp:Edward Tufte 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 lawyer listening to Crystal Method Vegas Fatboy Slim Weapon of Choice The Principles of Good Programming https://www.artima.com/weblogs/viewpost.jsp?thread=331531 https://opensource.guide/best-practices/ Keep communication public Require tests and other checks to improve the quality of your code https://opensource.guide/ Home Assistant is written in Python Why can't we have the Internet of Nice Things? A home automation primer https://opensource.com/article/17/7/home-automation-primer A Simple Python Script To Test Internet Bandwidth Speed In Linux Command Line http://www.2daygeek.com/speedtest-cli-check-internet-bandwidth-speed-command-line-linux/ wp:multimethods Implementing multimethods in Python https://adambard.com/blog/implementing-multimethods-in-python/ Multimethods? In MY Python? https://pyohio.org/schedule/presentation/272/ ivanoff wp:The Shining (film) wp:The Third Man Mozilla launches Project Things IoT framework on Raspberry Pi http://linuxgizmos.com/mozilla-launches-project-things-iot-framework-on-raspberry-pi/ From eric at intellovations.com Tue Jul 11 10:22:19 2017 From: eric at intellovations.com (Eric Floehr) Date: Tue, 11 Jul 2017 10:22:19 -0400 Subject: [CentralOH] Fedora Python Classroom Message-ID: Looks like a really interesting project! https://labs.fedoraproject.org/python-classroom/ Has anyone looked at this or tried it? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jep200404 at columbus.rr.com Thu Jul 13 07:29:20 2017 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Thu, 13 Jul 2017 07:29:20 -0400 Subject: [CentralOH] Writing Python Like It's C: Fixed Bugs In-Reply-To: <20170708193459.6aa8ed45.jep200404@columbus.rr.com> References: <20170708193459.6aa8ed45.jep200404@columbus.rr.com> Message-ID: <20170713072920.3e643040.jep200404@columbus.rr.com> On Sat, 8 Jul 2017 19:34:59 -0400, jep200404 at columbus.rr.com wrote: > def blank(char buf[LINES][COLUMNS], int row, int column): > def blank(char buf[LINES][COLUMNS], int row, int column): Those bugs have been fixed in: http://nbviewer.jupyter.org/github/james-prior/cohpy/blob/master/20170706-dojo-clear-to-end-of-table.ipynb From jep200404 at columbus.rr.com Sat Jul 22 19:41:54 2017 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Sat, 22 Jul 2017 19:41:54 -0400 Subject: [CentralOH] =?utf-8?q?2017-05-26_=E9=81=93=E5=A0=B4_Scribbles_?= =?utf-8?b?76SY5pu4L+aDoeaWhz8gdmlkZjsgZ29vZCBib29rczsgemVyY29uZjsgdmly?= =?utf-8?q?tues=3B_tdd=3B_practice_of_programming?= Message-ID: <20170722194154.0e222212.jep200404@columbus.rr.com> wp:FogBugz maturity assessment version control ci http://threevirtues.com/ http://www.perl101.org/terms.html a handy little tool jp at dontworry:~$ ll ~/bin/vidf -rwxr-x--- 1 jp jp 35 Sep 24 2014 /home/jp/bin/vidf jp at dontworry:~$ cat ~/bin/vidf vim -O <(diff "$1" "$2") "$1" "$2" jp at dontworry:~$ 30 best practices for software development and testing https://opensource.com/article/17/5/30-best-practices-software-development-and-testing wp:Test-Driven Development by Example wp:The Practice of Programming wp:The Elements of Programming Style wp:Strunk & White Linux kernel coding style https://www.kernel.org/doc/Documentation/process/coding-style.rst wp:Bonjour (software) wp:Avahi (software) wp:Zeroconf From jep200404 at columbus.rr.com Sat Jul 22 19:21:59 2017 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Sat, 22 Jul 2017 19:21:59 -0400 Subject: [CentralOH] =?utf-8?q?2017-07-20_=E9=81=93=E5=A0=B4_Scribbles_?= =?utf-8?b?76SY5pu4L+aDoeaWhz8gcHJpbWUgbnVtYmVyczsgcmVhZGFiaWxpdHk7IHR1?= =?utf-8?q?ple_unpacking=3B_web_frameworks=3B_ORM=3B_migration=3B_names=3B?= =?utf-8?q?_yagni=3B_minimum_viable_product=3B_MoSCoW?= Message-ID: <20170722192159.373e581e.jep200404@columbus.rr.com> 4 folks tonight Just playing around with various ways of generating prime numbers. The focus is on readability, not speed. http://nbviewer.jupyter.org/github/james-prior/cohpy/blob/master/20170720-dojo-primes-revisited.ipynb http://nbviewer.jupyter.org/github/james-prior/cohpy/blob/master/20170720-dojo-tuple-unpacking-revisited.ipynb Facing New Rivals, Amazon May Open Up Alexa Data for Developers https://www.theinformation.com/facing-new-rivals-amazon-may-open-up-alexa-data-for-developers 5 best open source multi-platform data science notebook software https://www.ossblog.org/best-open-source-multi-platform-data-science-notebook-software/ Apache says 'no' to Facebook code libraries https://www.theregister.co.uk/2017/07/17/apache_says_no_to_facebook_code_libraries/ AI Is Inventing Languages Humans Can?t Understand. Should We Stop It? https://www.fastcodesign.com/90132632/ai-is-inventing-its-own-perfect-languages-should-we-let-it python web frameworks django 800 pound gorilla you will not outgrow it flask http://flask.pocoo.org/ bottle http://bottlepy.org/docs/dev/ growler https://github.com/pyGrowler/Growler python ORM django ORM sqlalchemy migration support for django django ORM has builtin migration support for sqlalchemy alembic https://docs.djangoproject.com/en/1.10/ref/contrib/gis/db-api/#compatibility-tables https://docs.djangoproject.com/en/1.11/topics/migrations/ https://docs.djangoproject.com/en/1.11/topics/migrations/#backend-support airplane names Smart data structures and dumb code works a lot better than the other way around. http://catb.org/~esr/writings/cathedral-bazaar/cathedral-bazaar/ar01s06.html Plan to throw the first one away; you will anyway. wp:The Mythical Man-Month 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 Premature optimization is the root of all evil. wp:All your base are belong to us wp:yagni wp:Minimum viable product wp:MoSCoW method wp:LLC yagni versus "Adding A Feature" http://dilbert.com/strip/2017-07-20 Will East Texas be able to keep patent cases despite the Supreme Court? https://arstechnica.com/tech-policy/2017/07/will-east-texas-be-able-to-keep-patent-cases-despite-the-supreme-court/ wp:Alembic wp:Alembic Inc From jep200404 at columbus.rr.com Wed Jul 26 19:03:18 2017 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Wed, 26 Jul 2017 19:03:18 -0400 Subject: [CentralOH] Five Days of Python Message-ID: <20170726190318.205bf048.jep200404@columbus.rr.com> Starting tomorrow (Thursday) we have five days of local Python events. Thursday: regular dojo Friday: PyOhio bag stuffing; PyOhio Friday Night Sprints Saturday: PyOhio; PyOhio Saturday Night Sprints Sunday: PyOhio Monday: COhPy monthly meeting For details see cohpy.org. Also follow link from cohpy.org to the meetup page. https://en.wikipedia.org/wiki/Three_Days_of_the_Condor