From jep200404 at columbus.rr.com Mon Mar 2 14:11:21 2015 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Mon, 2 Mar 2015 08:11:21 -0500 Subject: [CentralOH] =?utf-8?q?2015-02-27_=E9=81=93=E5=A0=B4_Scribbles_?= =?utf-8?b?76SY5pu4L+aDoeaWhz8ga29hbnMsIHRvbXNydGJ0LCBwbGF0ZWQsIGNlbGVy?= =?utf-8?q?y_rabbitmq_php_squirrel_squeal_edx_flask?= Message-ID: <20150302081121.0c34d781.jep200404@columbus.rr.com> 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://github.com/gregmalcolm/python_koans tomsrtbt The project Euler problems can be like koans. wp:Plated wire memory http://www.hq.nasa.gov/office/pao/History/computers/Ch4-7.html celery rabbitmq http://www.rabbitmq.com/getstarted.html ubuntu$ pip install pika==0.9.8 ubuntu$ sudo apt-get install python-pip git-core pika PHP Features: http://cube-drone.com/2014_11_16-99_Ingenuity.html SQL sequel my squirrel squeal wp:Mille Miglia wp:edX A computer with Windows is like a dog without a brick tied to its tail. Someone donated "Flask Web Development" book. http://shop.oreilly.com/product/0636920031116.do From eric at intellovations.com Tue Mar 3 14:51:47 2015 From: eric at intellovations.com (Eric Floehr) Date: Tue, 3 Mar 2015 08:51:47 -0500 Subject: [CentralOH] Awesome Upcoming Python Books Message-ID: There are a slate of really cool Python books coming out, many of them are available now as "early access" titles. There is something for everyone here, and some really fun stuff too! *From O'Reilly:* *Fluent Python:* http://shop.oreilly.com/product/0636920032519.do *Cython:* http://shop.oreilly.com/product/0636920033431.do *From No Starch Press:* *Python Playground:* http://www.nostarch.com/pythonplayground *Learn Python with Minecraft:* http://www.nostarch.com/pythonwithminecraft *Python Crash Course:* http://www.nostarch.com/pythoncrashcourse *Automate the Boring Stuff with Python:* http://www.nostarch.com/automatestuff *Doing Math With Python:* http://www.nostarch.com/doingmathwithpython *From Packt Press:* *Functional Python Programming:* https://www.packtpub.com/application-development/functional-python-programming -------------- next part -------------- An HTML attachment was scrubbed... URL: From pybokeh at gmail.com Tue Mar 3 15:02:56 2015 From: pybokeh at gmail.com (pybokeh) Date: Tue, 3 Mar 2015 09:02:56 -0500 Subject: [CentralOH] Awesome Upcoming Python Books In-Reply-To: References: Message-ID: These are awesome. Thanks! On Mar 3, 2015 8:58 AM, "Eric Floehr" wrote: > There are a slate of really cool Python books coming out, many of them are > available now as "early access" titles. There is something for everyone > here, and some really fun stuff too! > > > *From O'Reilly:* > > *Fluent Python:* http://shop.oreilly.com/product/0636920032519.do > > *Cython:* http://shop.oreilly.com/product/0636920033431.do > > > *From No Starch Press:* > > *Python Playground:* http://www.nostarch.com/pythonplayground > > *Learn Python with Minecraft:* http://www.nostarch.com/pythonwithminecraft > > *Python Crash Course:* http://www.nostarch.com/pythoncrashcourse > > *Automate the Boring Stuff with Python:* > http://www.nostarch.com/automatestuff > > *Doing Math With Python:* http://www.nostarch.com/doingmathwithpython > > > *From Packt Press:* > > *Functional Python Programming:* > https://www.packtpub.com/application-development/functional-python-programming > > > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pybokeh at gmail.com Fri Mar 6 02:20:10 2015 From: pybokeh at gmail.com (pybokeh) Date: Thu, 5 Mar 2015 20:20:10 -0500 Subject: [CentralOH] Another great list of snippets for data wranglers or analysts Message-ID: http://chrisalbon.com/ - Daniel Kim -------------- next part -------------- An HTML attachment was scrubbed... URL: From jep200404 at columbus.rr.com Sun Mar 8 01:14:34 2015 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Sat, 7 Mar 2015 19:14:34 -0500 Subject: [CentralOH] =?utf-8?q?2015-03-06_=E9=81=93=E5=A0=B4_Scribbles_?= =?utf-8?b?76SY5pu4L+aDoeaWhz8gbWFuZ2EgZGF0YWJhc2UgZm9yZWlnbiBrZXksIGxp?= =?utf-8?q?censes=2C_kanthal=2C_short_north_coffee_house=2C_south_pole_sky?= =?utf-8?q?dive_craters?= Message-ID: <20150307191434.7e07b5e1.jep200404@columbus.rr.com> Someone likes and brought to show: The Manga Guide to Databases by Mana Takahashi Trend-Pro Co., Ltd. illustrated by Shoko Azuma Westerville Public Library 197 464 439 3 ISBN 978-1-59327-190-9 no starch press http://www.nostarch.com/mg_databases.htm http://www.nostarch.com/manga wp:Mastodon (band) https://duckduckgo.com/html/?q=postgresql+foreign+key http://www.postgresql.org/docs/current/static/tutorial-fk.html wp:MIT License wp:BSD licenses http://engineershandbook.com/ wp:CRC Handbook of Chemistry and Physics wp:Kanthal MAXthal wp:MAX phases wp:Trustor affair wp:PID controller short north coffee house http://shortnorthcoffeehouse.com/ 1195 North High Street (south of 5th Ave near Garden Theatre) open 24 hours per day, seven days a week wp:Little Shop of Horrors http://parachutistonline.com/feature/tragedy-in-antarctica?-lessons-from-the-south-pole Meaning of {0[0]} and {0[1]} in string format method on page 224 of Learning Python 5th edition was explained. colug.net/python/dojo/20150306/ From eric at intellovations.com Wed Mar 11 00:42:07 2015 From: eric at intellovations.com (Eric Floehr) Date: Tue, 10 Mar 2015 19:42:07 -0400 Subject: [CentralOH] Python Puzzler -- The little max bug In-Reply-To: References: Message-ID: One clarification, in the parse_* functions, "f" should be "lines" but it doesn't really matter for this puzzle. On Tue, Mar 10, 2015 at 7:38 PM, Eric Floehr wrote: > The following code has a bug. > > The code takes input and generates a dictionary of dictionaries of > dictionaries of the following form: > > { > 'hour1': > { 'formula_type1': { ... }, > 'formula_type2': { ... }, > ... > }, > 'hour2': > { 'formula_type1': { ... }, > 'formula_type2': { ... }, > ... > }, > ... > } > > The symptoms were that formula types MINT, CLOUD, and PRECIP were showing > up in the final dictionary (hoursdict), but MAXT was not. For any set of > lines and hour all the formula types showed up exactly once. > > What was the bug, and why was MAXT the only formula type affected? > > > ########################################## > > hoursdict = {} > > for line in lines: > formula_type = ### Code to determine formula_type ### > hour = ### Code to determine hour ### > > try: > hourdict = hoursdict[hour] > except: > hourdict = {} > hoursdict[hour] = {} > > hourdict[formula_type] = {} > > if formula_type in ('MAXT','MINT'): > parse_h1h4_formulas(f, hourdict[formula_type]) > elif formula_type == 'CLOUD': > parse_cloud_formulas(f, hourdict[formula_type]) > elif formula_type == 'PRECIP': > parse_precip_formulas(f, hourdict[formula_type]) > > return hoursdict > > ########################################## > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at intellovations.com Wed Mar 11 00:38:48 2015 From: eric at intellovations.com (Eric Floehr) Date: Tue, 10 Mar 2015 19:38:48 -0400 Subject: [CentralOH] Python Puzzler -- The little max bug Message-ID: The following code has a bug. The code takes input and generates a dictionary of dictionaries of dictionaries of the following form: { 'hour1': { 'formula_type1': { ... }, 'formula_type2': { ... }, ... }, 'hour2': { 'formula_type1': { ... }, 'formula_type2': { ... }, ... }, ... } The symptoms were that formula types MINT, CLOUD, and PRECIP were showing up in the final dictionary (hoursdict), but MAXT was not. For any set of lines and hour all the formula types showed up exactly once. What was the bug, and why was MAXT the only formula type affected? ########################################## hoursdict = {} for line in lines: formula_type = ### Code to determine formula_type ### hour = ### Code to determine hour ### try: hourdict = hoursdict[hour] except: hourdict = {} hoursdict[hour] = {} hourdict[formula_type] = {} if formula_type in ('MAXT','MINT'): parse_h1h4_formulas(f, hourdict[formula_type]) elif formula_type == 'CLOUD': parse_cloud_formulas(f, hourdict[formula_type]) elif formula_type == 'PRECIP': parse_precip_formulas(f, hourdict[formula_type]) return hoursdict ########################################## -------------- next part -------------- An HTML attachment was scrubbed... URL: From jep200404 at columbus.rr.com Wed Mar 11 02:04:16 2015 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Tue, 10 Mar 2015 21:04:16 -0400 Subject: [CentralOH] Python Puzzler -- The little max bug In-Reply-To: References: Message-ID: <20150310210416.18b37300.jep200404@columbus.rr.com> On Tue, 10 Mar 2015 19:38:48 -0400, Eric Floehr wrote: > What was the bug, and why was MAXT the only formula type affected? 'MAXT' was the first type for each hour, so when formula_type was 'MAXT', try: hourdict = hoursdict[hour] failed with an KeyError, so the except section runs. hourdict and hoursdict[hour] are initialized to (different) empty dictionaries and hoursdict[hour] does not refer to hourdict, so changes to hourdict are not saved in hoursdict. For subsequent lines of an hour, the hourdict = hoursdict[hour] succeeds in the try: section, because of the hoursdict[hour] = {} from the previous failure, so changes to hourdict are also changes to hoursdict[hour]. 'MAXT' was the only formula type affected because it was the first type for each hour. Change the except section to: except KeyError: hourdict = {} hoursdict[hour] = hourdict or: except KeyError: hoursdict[hour] = {} hourdict = hoursdict[hour] Better yet, change the try/except stuff to: if hour not in hoursdict: hoursdict[hour] = {} hourdict = hoursdict[hour] Need some better variable names. From jep200404 at columbus.rr.com Wed Mar 11 02:21:27 2015 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Tue, 10 Mar 2015 21:21:27 -0400 Subject: [CentralOH] Python Puzzler -- The little max bug: Use dict.setdefault() In-Reply-To: <20150310210416.18b37300.jep200404@columbus.rr.com> References: <20150310210416.18b37300.jep200404@columbus.rr.com> Message-ID: <20150310212127.5c3b424a.jep200404@columbus.rr.com> On Tue, 10 Mar 2015 21:04:16 -0400, jep200404 at columbus.rr.com wrote: > Better yet, change the try/except stuff to: > > if hour not in hoursdict: > hoursdict[hour] = {} > hourdict = hoursdict[hour] Better yet: hourdict = hoursdict.setdefault(hour, {}) From jep200404 at columbus.rr.com Wed Mar 11 02:39:48 2015 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Tue, 10 Mar 2015 21:39:48 -0400 Subject: [CentralOH] Python Puzzler -- The little max bug: lines versus line In-Reply-To: References: Message-ID: <20150310213948.5b011d2e.jep200404@columbus.rr.com> On Tue, 10 Mar 2015 19:42:07 -0400, Eric Floehr wrote: > One clarification, in the parse_* functions, > "f" should be "lines" but it > doesn't really matter for this puzzle. Did you mean "line"? From jep200404 at columbus.rr.com Wed Mar 11 02:47:38 2015 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Tue, 10 Mar 2015 21:47:38 -0400 Subject: [CentralOH] Python Puzzler -- The little max bug: Refactor if/elif/elif, then whole mess In-Reply-To: References: Message-ID: <20150310214738.2e6bebb5.jep200404@columbus.rr.com> On Tue, 10 Mar 2015 19:38:48 -0400, Eric Floehr wrote: > if formula_type in ('MAXT','MINT'): > parse_h1h4_formulas(f, hourdict[formula_type]) > elif formula_type == 'CLOUD': > parse_cloud_formulas(f, hourdict[formula_type]) > elif formula_type == 'PRECIP': > parse_precip_formulas(f, hourdict[formula_type]) That can be rearranged as: parser = { 'MAXT': parse_h1h4_formulas, 'MINT': parse_h1h4_formulas, 'CLOUD': parse_cloud_formulas, 'PRECIP': parse_precip_formulas, } for line in lines: ... (parser[formula_type])(line, hourdict[formula_type]) I don't know if the parentheses around parser[formula_type] are necessary. ----------------------------------------------------------------- Refactoring the whole mess, yields: def foo(lines): parser = { 'MAXT': parse_h1h4_formulas, 'MINT': parse_h1h4_formulas, 'CLOUD': parse_cloud_formulas, 'PRECIP': parse_precip_formulas, } hoursdict = {} for line in lines: formula_type = get_formula_type(line) hour = get_hour(line) hourdict = hoursdict.setdefault(hour, {}) hourdict[formula_type] = {} (parser[formula_type])(line, hourdict[formula_type]) return hoursdict From jep200404 at columbus.rr.com Wed Mar 11 19:16:25 2015 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Wed, 11 Mar 2015 14:16:25 -0400 Subject: [CentralOH] dict.setdefault() returns a reference In-Reply-To: <20150310214738.2e6bebb5.jep200404@columbus.rr.com> References: <20150310214738.2e6bebb5.jep200404@columbus.rr.com> Message-ID: <20150311141625.0ceca02b.jep200404@columbus.rr.com> On Tue, 10 Mar 2015 21:47:38 -0400, jep200404 at columbus.rr.com wrote: > hourdict = hoursdict.setdefault(hour, {}) > hourdict[formula_type] = {} > (parser[formula_type])(line, hourdict[formula_type]) That dict.setdefault() returns a reference is significant. See http://colug.net/python/cohpy/20150310/, especially cells 11 and 12, but earlier cells also. From jep200404 at columbus.rr.com Thu Mar 12 01:39:18 2015 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Wed, 11 Mar 2015 20:39:18 -0400 Subject: [CentralOH] Refactorio ad absurdum In-Reply-To: <20150310214738.2e6bebb5.jep200404@columbus.rr.com> References: <20150310214738.2e6bebb5.jep200404@columbus.rr.com> Message-ID: <20150311203918.1c16cad3.jep200404@columbus.rr.com> dict.setdefault() seems non-Pythonic. I like it. :-) On Tue, 10 Mar 2015 21:47:38 -0400, jep200404 at columbus.rr.com wrote: > Refactoring the whole mess, yields: > > def foo(lines): > parser = { > 'MAXT': parse_h1h4_formulas, > 'MINT': parse_h1h4_formulas, > 'CLOUD': parse_cloud_formulas, > 'PRECIP': parse_precip_formulas, > } > > hoursdict = {} > for line in lines: > formula_type = get_formula_type(line) > hour = get_hour(line) > hourdict = hoursdict.setdefault(hour, {}) > hourdict[formula_type] = {} > (parser[formula_type])(line, hourdict[formula_type]) > > return hoursdict Refactorio ad absurdum[1]: def foo(lines): parser = { 'MAXT': parse_h1h4_formulas, 'MINT': parse_h1h4_formulas, 'CLOUD': parse_cloud_formulas, 'PRECIP': parse_precip_formulas, } hoursdict = {} for line in lines: (parser[get_formula_type(line)])(line, (hoursdict.setdefault(get_hour(line), {})).setdefault(get_formula_type(line), {})) return hoursdict It was fun to get the body of the loop down to one (very long non-PEP8) line. That is probably the hardest to understand Python code I have ever written. I wonder if it even runs. Can the original poster try it? Refactoring it to a dictionary comprehension probably would be interesting. Using a map/reduce approach could also be fun and unreadable. def foo(lines): # Each parser function takes a single argument line, # and returns a value for # (hoursdict[get_hour(line)])[get_formula_type(line)]. parser = { 'MAXT': parse_h1h4_formulas, 'MINT': parse_h1h4_formulas, 'CLOUD': parse_cloud_formulas, 'PRECIP': parse_precip_formulas, } hoursdict = {} for line in lines: hoursdict.setdefault(get_hour(line), {})).setdefault(get_formula_type(line), (parser[get_formula_type(line)])(line)) return hoursdict Hmmm, use dict.update() for reduce? Oh well, that's enough for today. Back on my head. [1] wp:Reductio ad absurdum What is the valid latin for refactorio? From jep200404 at columbus.rr.com Thu Mar 12 16:42:18 2015 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Thu, 12 Mar 2015 11:42:18 -0400 Subject: [CentralOH] Refactorio Ad Absurdum: Mismatched Parentheses In-Reply-To: <20150311203918.1c16cad3.jep200404@columbus.rr.com> References: <20150310214738.2e6bebb5.jep200404@columbus.rr.com> <20150311203918.1c16cad3.jep200404@columbus.rr.com> Message-ID: <20150312114218.70068498.jep200404@columbus.rr.com> On Wed, 11 Mar 2015 20:39:18 -0400, jep200404 at columbus.rr.com wrote: > hoursdict.setdefault(get_hour(line), {})).setdefault(get_formula_type(line), (parser[get_formula_type(line)])(line)) Oops. Mismatched parentheses should have been: hoursdict.setdefault(get_hour(line), {}).setdefault(get_formula_type(line), (parser[get_formula_type(line)])(line)) Even if it works, it is bad code. From jep200404 at columbus.rr.com Thu Mar 12 23:06:41 2015 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Thu, 12 Mar 2015 18:06:41 -0400 Subject: [CentralOH] Incrementally Downloading ISH Data Message-ID: <20150312180641.794d1ce7.jep200404@columbus.rr.com> Hi Eric, Rehashing what we discussed, plus one new thought. FTP probably can not send a file beginning from an arbitrary point. wget can. Recent versions of gzip are deterministic, so if only the tail of an uncompressed file changes, then only the tail of a compressed file changes. However, if there is a change other than at the end, whole compressed file changes. This happens, albeit rarely. Would need to reload a bit more than just the tail end to detect such rare changes. I think rsync tends to resend whole file if any part of it changes. I'm not sure about rsync. Bittorrent protocol can pick up where it left off, and could retransmit only the 64 KByte chunks that have changed. So everyday we could easliy download just the changes. That would require a change on NWS server. The hard part would probably be getting them to change their server. Sales pitch could be that it would reduce the load on their servers, both my allowing incremental downloads, and by other peers sharing the load. We would need to test the ability for bittorrent to only download changes before pitching it. Jim From joe at joeshaw.org Fri Mar 13 15:07:23 2015 From: joe at joeshaw.org (Joe Shaw) Date: Fri, 13 Mar 2015 10:07:23 -0400 Subject: [CentralOH] Incrementally Downloading ISH Data In-Reply-To: <20150312180641.794d1ce7.jep200404@columbus.rr.com> References: <20150312180641.794d1ce7.jep200404@columbus.rr.com> Message-ID: Hi, On Thu, Mar 12, 2015 at 6:06 PM, wrote: > FTP probably can not send a file beginning from an arbitrary point. > wget can. > FTP can resume a download from an arbitrary point, and most servers probably implement it by now. It's not quite as flexible as an HTTP range request, though. (And FTP is a horrible protocol by modern standards.) See the REST command in http://www.faqs.org/rfcs/rfc959.html. > I think rsync tends to resend whole file if any part of > it changes. I'm not sure about rsync. > No, rsync uses a block checksum algorithm and only transfers blocks that are different. See https://rsync.samba.org/tech_report/ They mention that it's primarily optimized for smaller files, so I'm not sure how efficient it is with large chunks of data. Bittorrent protocol can pick up where it left off, > and could retransmit only the 64 KByte chunks that > have changed. So everyday we could easliy download > just the changes. That would require a change on NWS server. > The hard part would probably be getting them to change their > server. Sales pitch could be that it would reduce the load > on their servers, both my allowing incremental downloads, > and by other peers sharing the load. We would need to test > the ability for bittorrent to only download changes before > pitching it. > If bittorrent is too much to swallow, here are other binary delta/diff options available that don't require a specific transfer protocol: - xdelta - https://code.google.com/p/xdelta/ - libxdiff (used by git) - http://www.xmailserver.org/xdiff-lib.html - bsdiff - http://www.daemonology.net/bsdiff/ - courgette (developed by Google to push Chrome updates) - http://dev.chromium.org/developers/design-documents/software-updates-courgette Joe -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian.costlow at gmail.com Fri Mar 13 22:37:05 2015 From: brian.costlow at gmail.com (Brian Costlow) Date: Fri, 13 Mar 2015 17:37:05 -0400 Subject: [CentralOH] Could this be the end of Django and Flask? Message-ID: Or even Python as a web platform? http://azac.pl/cobol-on-wheelchair/ Sorry, for the off topic post. Saw this on HN, couldn't resist. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at intellovations.com Fri Mar 13 23:18:02 2015 From: eric at intellovations.com (Eric Floehr) Date: Fri, 13 Mar 2015 18:18:02 -0400 Subject: [CentralOH] Could this be the end of Django and Flask? In-Reply-To: References: Message-ID: Well, it will have to compete with the reigning incumbent: COBOL on Cogs http://www.coboloncogs.org/HOME.HTM Yes, COBOL joins Python in having more than one web framework! (You really made my heart sink with that subject line, though :-) On Fri, Mar 13, 2015 at 5:37 PM, Brian Costlow wrote: > Or even Python as a web platform? > > http://azac.pl/cobol-on-wheelchair/ > > Sorry, for the off topic post. Saw this on HN, couldn't resist. > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at aufdencamp.com Sat Mar 14 16:29:16 2015 From: mark at aufdencamp.com (Mark Aufdencamp) Date: Sat, 14 Mar 2015 08:29:16 -0700 Subject: [CentralOH] =?utf-8?q?Could_this_be_the_end_of_Django_and_Flask?= =?utf-8?q?=3F?= Message-ID: <20150314082916.181451e9c2a7ebbcd6ae28cea81146c8.295f041ced.wbe@email17.secureserver.net> Funny Brian! I can't seem to find an 88 level http response code. For the record, I still have a pair of COBOL text books on my shelf from 1986 :) > -------- Original Message -------- > Subject: [CentralOH] Could this be the end of Django and Flask? > From: Brian Costlow > Date: Fri, March 13, 2015 5:37 pm > To: COhPy > > > Or even Python as a web platform? > > http://azac.pl/cobol-on-wheelchair/ > > Sorry, for the off topic post. Saw this on HN, couldn't resist.
_______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh From jep200404 at columbus.rr.com Sat Mar 14 20:21:11 2015 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Sat, 14 Mar 2015 15:21:11 -0400 Subject: [CentralOH] =?utf-8?q?2015-03-13_=E9=81=93=E5=A0=B4_Scribbles_?= =?utf-8?b?76SY5pu4L+aDoeaWhz8gRWZmZWN0aXZlIFB5dGhvbiBib29rOyBkb3BwbGVy?= =?utf-8?q?_gestures=3B_c_structs=3B_ball_of_mud=3B_ioccc=3B_panda3d=3B_na?= =?utf-8?q?nd2tetris=3B_arduino=3B_VM_mac=3B_ASCII=3B_test_code_coverage?= =?utf-8?q?=3B_emacs_v_emacs=3B_skydive?= Message-ID: <20150314152111.47018d4f.jep200404@columbus.rr.com> 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 http://www.southpolestation.com/trivia/90s/skydive.html test code coverage program https://pypi.python.org/pypi/coverage/3.7.1 http://git.kernel.org/cgit/editors/uemacs/uemacs.git https://www.kernel.org/doc/Documentation/CodingStyle http://marc.info/?l=git&m=122955159617722&w=2 https://plus.google.com/u/0/+LinusTorvalds/posts/iySKQGtkmtb http://ioccc.org/1984/anonymous.c knick at dojo:~/20150313$ cat dash.c #include #include int main(int argc,char *argv[]) { printf("%d\n", '-'); printf("%d %d\n", '-', '-'); printf("%d\n", '-'-'-'); printf("\n"); printf("%d\n", '/'); printf("%d %d\n", '/', '/'); printf("%d\n", '/'/'/'); } knick at dojo:~/20150313$ make dash cc dash.c -o dash knick at dojo:~/20150313$ ./dash 45 45 45 0 47 47 47 1 knick at dojo:~/20150313$ cat dash.py print "%d" % ord('-') print "%d %d" % (ord('-'), ord('-')) print "%d" % (ord('-') - ord('-')) print print "%d" % ord('/') print "%d %d" % (ord('/'), ord('/')) print "%d" % (ord('/') / ord('/')) knick at dojo:~/20150313$ python dash.py 45 45 45 0 47 47 47 1 knick at dojo:~/20150313$ knick at dojo:~/20150313/c$ cat foo.c #include #include char foo[]="hello world\n"; int c='A'; int main(int argc, char *argv[]) { printf("%d\n", 'A'); printf("%c\n", 'A'); } knick at dojo:~/20150313/c$ make foo cc foo.c -o foo knick at dojo:~/20150313/c$ ./foo 65 A knick at dojo:~/20150313/c$ cat foo.py print ord('A') print chr(65) knick at dojo:~/20150313/c$ python foo.py 65 A knick at dojo:~/20150313/c$ Effective Python: 59 Specific Ways to Write Better Python (Effective Software Development Series) ?This is an immensely useful resource for advanced Python usage and building cleaner, more maintainable software. Anyone looking to take their Python skills to the next level would benefit from putting the book?s advice into practice.? ?Wes McKinney, creator of pandas; author of Python for Data Analysis wp:Panda3D learn hardware from very low-level (NAND) to high level (tetris) http://nand2tetris.org/ learn low-level software What is the equivalent of nand2tetris for software? wp:Arduino wp:Parallels Desktop for Mac http://www.chromeindustries.com/us/en/customs Big Ball of Mud www.laputan.org/mud/mud.html http://danielrapp.github.io/doppler/ C structs struct employeeStruct { char first_name[80]; char last_name[80]; int age; }; struct employeeStruct joe; struct employeeStruct bob; strcpy(joe.first_name, "John"); strcpy(joe.last_name, "Doe"); joe.age = 123; class Namespace(): pass From pybokeh at gmail.com Sun Mar 15 17:50:18 2015 From: pybokeh at gmail.com (pybokeh) Date: Sun, 15 Mar 2015 12:50:18 -0400 Subject: [CentralOH] Help with doing git pull requests on a Python project Message-ID: Hello List, I took a basic git/github class a while back, but I'm still struggling. I only know how to create my own repositories locally and at github and push changes to them and raise issues. But that's about it since I don't really create code that would be used by others and my level of Python is not that great to be able to contribute to the actual source code of Python projects. However, I can contribute at least by improving documentation. I want to improve documentation of a Python project and was wondering if someone could meet me at this week's upcoming dojo meeting this Friday or I can meet at other times of the week. Coffee, tea, or snacks on me. I was provided this link on how to contribute to this particular project ("pandas"): https://github.com/pydata/pandas/wiki/Contributing and that's where things got confusing for me and need help with. If you can spare some time with me, I'd really appreciate it. Thanks! - Daniel -------------- next part -------------- An HTML attachment was scrubbed... URL: From jep200404 at columbus.rr.com Sun Mar 15 20:01:06 2015 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Sun, 15 Mar 2015 15:01:06 -0400 Subject: [CentralOH] Help with doing git pull requests on a Python project In-Reply-To: References: Message-ID: <20150315150106.725aa936.jep200404@columbus.rr.com> On Sun, 15 Mar 2015 12:50:18 -0400, pybokeh wrote: > I took a basic git/github class a while back, but I'm still struggling. I > only know how to create my own repositories locally and at github and push > changes to them and raise issues. But that's about it since I don't really > create code that would be used by others and my level of Python is not that > great to be able to contribute to the actual source code of Python > projects. However, I can contribute at least by improving documentation. Contributing to documentation is the classic beginning for open-source software. > I want to improve documentation of a Python project and was wondering if > someone could meet me at this week's upcoming dojo meeting this Friday or I > can meet at other times of the week. Coffee, tea, or snacks on me. I can help then with the github part. (Others are welcome. I'll learn from them.) > I was provided this link on how to contribute to this particular project > ("pandas"): > https://github.com/pydata/pandas/wiki/Contributing > > and that's where things got confusing for me and need help with. It seems that the pandas folks are picky about what you issue a pull request of, in wanting the rebased stuff. I have used the rebase command. It is intimidating at first. I found the dox at git-scm.com/book/en/v2/Git-Branching-Rebasing to be good. Practice on a sacrificial copy of a repo. Perhaps the dox to improve first are those about how to contribute. Separately, for contributing to Python itself (not just a project that uses Python), there are mentors for that, and I am not one of them. By the way, the 2014-08-15 scribbles have notes for setting up a git server. Ever listen to Car Talk? diner at dojo:~$ mkdir dk-diner diner at dojo:~$ cd dk-diner diner at dojo:~/dk-diner$ git clone git://github.com/pydata/pandas Cloning into 'pandas'... remote: Counting objects: 81769, done. remote: Compressing objects: 100% (21/21), done. remote: Total 81769 (delta 7), reused 0 (delta 0), pack-reused 81748 Receiving objects: 100% (81769/81769), 46.56 MiB | 910.00 KiB/s, done. Resolving deltas: 100% (66997/66997), done. Checking connectivity... done. diner at dojo:~/dk-diner$ git remote -v fatal: Not a git repository (or any of the parent directories): .git diner at dojo:~/dk-diner$ cd pandas/ diner at dojo:~/dk-diner/pandas$ git remote -v origin git://github.com/pydata/pandas (fetch) origin git://github.com/pydata/pandas (push) diner at dojo:~/dk-diner/pandas$ git remote add upstream git://github.com/pydata/pandas diner at dojo:~/dk-diner/pandas$ git remote -v origin git://github.com/pydata/pandas (fetch) origin git://github.com/pydata/pandas (push) upstream git://github.com/pydata/pandas (fetch) upstream git://github.com/pydata/pandas (push) diner at dojo:~/dk-diner/pandas$ From pybokeh at gmail.com Sun Mar 15 23:08:05 2015 From: pybokeh at gmail.com (pybokeh) Date: Sun, 15 Mar 2015 18:08:05 -0400 Subject: [CentralOH] Help with doing git pull requests on a Python project In-Reply-To: <20150315150106.725aa936.jep200404@columbus.rr.com> References: <20150315150106.725aa936.jep200404@columbus.rr.com> Message-ID: Thanks for the support! I feel like there is maybe too much of a learning curve or too many hurdles to do something as simple as updating documentation. I guess it doesn't help that I use git seldomly or only to push changes to my own repositories. Need like a git lite for people like me ;-) - Daniel On Mar 15, 2015 3:03 PM, wrote: > On Sun, 15 Mar 2015 12:50:18 -0400, pybokeh wrote: > > > I took a basic git/github class a while back, but I'm still struggling. > I > > only know how to create my own repositories locally and at github and > push > > changes to them and raise issues. But that's about it since I don't > really > > create code that would be used by others and my level of Python is not > that > > great to be able to contribute to the actual source code of Python > > projects. However, I can contribute at least by improving documentation. > > Contributing to documentation is the classic beginning for > open-source software. > > > I want to improve documentation of a Python project and was wondering if > > someone could meet me at this week's upcoming dojo meeting this Friday > or I > > can meet at other times of the week. Coffee, tea, or snacks on me. > > I can help then with the github part. > (Others are welcome. I'll learn from them.) > > > I was provided this link on how to contribute to this particular project > > ("pandas"): > > https://github.com/pydata/pandas/wiki/Contributing > > > > and that's where things got confusing for me and need help with. > > It seems that the pandas folks are picky about what you > issue a pull request of, in wanting the rebased stuff. > I have used the rebase command. It is intimidating at first. > I found the dox at git-scm.com/book/en/v2/Git-Branching-Rebasing > to be good. Practice on a sacrificial copy of a repo. > > Perhaps the dox to improve first are those about how to contribute. > > Separately, for contributing to Python itself (not just a project > that uses Python), there are mentors for that, and I am not > one of them. > > By the way, the 2014-08-15 scribbles have notes for setting > up a git server. Ever listen to Car Talk? > > diner at dojo:~$ mkdir dk-diner > diner at dojo:~$ cd dk-diner > diner at dojo:~/dk-diner$ git clone git://github.com/pydata/pandas > Cloning into 'pandas'... > remote: Counting objects: 81769, done. > remote: Compressing objects: 100% (21/21), done. > remote: Total 81769 (delta 7), reused 0 (delta 0), pack-reused 81748 > Receiving objects: 100% (81769/81769), 46.56 MiB | 910.00 KiB/s, done. > Resolving deltas: 100% (66997/66997), done. > Checking connectivity... done. > diner at dojo:~/dk-diner$ git remote -v > fatal: Not a git repository (or any of the parent directories): .git > diner at dojo:~/dk-diner$ cd pandas/ > diner at dojo:~/dk-diner/pandas$ git remote -v > origin git://github.com/pydata/pandas (fetch) > origin git://github.com/pydata/pandas (push) > diner at dojo:~/dk-diner/pandas$ git remote add upstream git:// > github.com/pydata/pandas > diner at dojo:~/dk-diner/pandas$ git remote -v > origin git://github.com/pydata/pandas (fetch) > origin git://github.com/pydata/pandas (push) > upstream git://github.com/pydata/pandas (fetch) > upstream git://github.com/pydata/pandas (push) > diner at dojo:~/dk-diner/pandas$ > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at joeshaw.org Mon Mar 16 14:46:21 2015 From: joe at joeshaw.org (Joe Shaw) Date: Mon, 16 Mar 2015 09:46:21 -0400 Subject: [CentralOH] Help with doing git pull requests on a Python project In-Reply-To: References: Message-ID: Hi, The problem with those pandas instructions is that they don't tell the whole story of what you need to do. The basic workflow for contributing to a project on GitHub is: 1. Clone the project you want to work on 2. Fork the project you want to work on 3. Create a *feature branch* to do your own work in 4. Commit your changes to your feature branch 5. Push your feature branch to your fork on GitHub 6. Send a pull request for your branch on your fork into the upstream mainline A very helpful tool for interacting with GitHub is the hub tool, which can either be used as a stand-in replacement for git or as a separate tool. https://github.com/github/hub It abstracts away a lot of the annoying parts of interacting with Git and forks and such. I'll try to do step by step through the process, using the hub and git command-line tools. *Clone the project you want to work on* $ hub clone pydata/pandas (Equivalent to git clone https://github.com/pydata/pandas.git) This clones the project from the server onto your local machine. When working in git you make changes to your local copy of the repository. Git has a copy of *remotes* which are, well, remote copies of the repository. When you clone a new project, a remote called origin is automatically created that points to the repository you provide in the command line above. In this case, pydata/pandas on GitHub. When you are ready to upload your changes back to the main repository, you *push to the remote*. Between when you cloned and now changes may have been made to upstream remote repository. To get those changes, you *pull from the remote*. *Fork the project you want to work on* The easiest way to do this is with hub. Make sure to run this command from the pandas directory that was created when you cloned the repo. $ hub fork This does a couple of things. It creates a fork of pandas in your GitHub account. It establishes a new remote in your local repository with the name of your github username. So in my case I now have two remotes: origin, which points to the main upstream repository; and joeshaw, which points to my forked repository. We'll be pushing to my fork. *Create a feature branch to do your own work in* This creates a place to do your work in that is separate from the main code. $ git checkout -b doc-work doc-work is what I'm choosing to name this branch. You can name it whatever you like. Hyphens are idiomatic. Now do whatever changes you are going to do for this project. *Commit your changes to your feature branch* If you are creating new files, you will need to explicitly add them to the to-be-commited list (also called the index, or staging area): $ git add file1.md file2.md etc If you are just editing existing files, you can add them all in one batch: $ git add -u Next you need to commit the changes. $ git commit This will bring up an editor where you type in your commit message. The convention is usually to type a short summary in the first line (50-60 characters max), then a blank line, then additional details if necessary. *Push your feature branch to your fork in GitHub* Ok, remember that your fork is a remote named after your github username. In my case, joeshaw. $ git push joeshaw doc-work This pushes to the joeshaw remote only the doc-work branch. Now your work is publicly visible to anyone on your fork. *Send a pull request for your branch on your fork into the upstream mainline* You can do this either on the web site or using the hub tool again. $ hub pull-request This will open your editor again. If you only had one commit on your branch, the message for the pull request will be the same as the commit. This might be good enough, but you might want to elaborate on the purpose of the pull request. Like commits, the first line is a summary of the pull request and the other lines are the body of the PR. In general you will be requesting to pull from your current branch (in this case doc-work) into the master branch of the origin remote. If your pull request is accepted as-is, the maintainer will merge it into the official upstream sources. Good luck! This isn't an exhaustive tutorial, but hopefully it's enough to get you started and contributing. I hope you find it useful. Joe On Sun, Mar 15, 2015 at 12:50 PM, pybokeh wrote: > Hello List, > I took a basic git/github class a while back, but I'm still struggling. I > only know how to create my own repositories locally and at github and push > changes to them and raise issues. But that's about it since I don't really > create code that would be used by others and my level of Python is not that > great to be able to contribute to the actual source code of Python > projects. However, I can contribute at least by improving documentation. > I want to improve documentation of a Python project and was wondering if > someone could meet me at this week's upcoming dojo meeting this Friday or I > can meet at other times of the week. Coffee, tea, or snacks on me. > > I was provided this link on how to contribute to this particular project > ("pandas"): > https://github.com/pydata/pandas/wiki/Contributing > > and that's where things got confusing for me and need help with. > > If you can spare some time with me, I'd really appreciate it. Thanks! > > - Daniel > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pybokeh at gmail.com Mon Mar 16 15:51:40 2015 From: pybokeh at gmail.com (pybokeh) Date: Mon, 16 Mar 2015 10:51:40 -0400 Subject: [CentralOH] Help with doing git pull requests on a Python project In-Reply-To: References: Message-ID: Thanks Joe! Pandas contributer emailed me back and said he should've sent me this link instead: http://pandas.pydata.org/developers.html But will definitely look at your suggestions this week. -Daniel On Mar 16, 2015 9:46 AM, "Joe Shaw" wrote: > Hi, > > The problem with those pandas instructions is that they don't tell the > whole story of what you need to do. > > The basic workflow for contributing to a project on GitHub is: > > 1. Clone the project you want to work on > 2. Fork the project you want to work on > 3. Create a *feature branch* to do your own work in > 4. Commit your changes to your feature branch > 5. Push your feature branch to your fork on GitHub > 6. Send a pull request for your branch on your fork into the upstream > mainline > > A very helpful tool for interacting with GitHub is the hub tool, which > can either be used as a stand-in replacement for git or as a separate > tool. > > https://github.com/github/hub > > It abstracts away a lot of the annoying parts of interacting with Git and > forks and such. I'll try to do step by step through the process, using the > hub and git command-line tools. > > *Clone the project you want to work on* > > $ hub clone pydata/pandas > > (Equivalent to git clone https://github.com/pydata/pandas.git) > > This clones the project from the server onto your local machine. When > working in git you make changes to your local copy of the repository. Git > has a copy of *remotes* which are, well, remote copies of the > repository. When you clone a new project, a remote called origin is > automatically created that points to the repository you provide in the > command line above. In this case, pydata/pandas on GitHub. > > When you are ready to upload your changes back to the main repository, you *push > to the remote*. Between when you cloned and now changes may have been > made to upstream remote repository. To get those changes, you *pull from > the remote*. > > *Fork the project you want to work on* > > The easiest way to do this is with hub. Make sure to run this command > from the pandas directory that was created when you cloned the repo. > > $ hub fork > > This does a couple of things. It creates a fork of pandas in your GitHub > account. It establishes a new remote in your local repository with the > name of your github username. So in my case I now have two remotes: > origin, which points to the main upstream repository; and joeshaw, which > points to my forked repository. We'll be pushing to my fork. > > *Create a feature branch to do your own work in* > > This creates a place to do your work in that is separate from the main > code. > > $ git checkout -b doc-work > > doc-work is what I'm choosing to name this branch. You can name it > whatever you like. Hyphens are idiomatic. > > Now do whatever changes you are going to do for this project. > > *Commit your changes to your feature branch* > > If you are creating new files, you will need to explicitly add them to the > to-be-commited list (also called the index, or staging area): > > $ git add file1.md file2.md etc > > If you are just editing existing files, you can add them all in one batch: > > $ git add -u > > Next you need to commit the changes. > > $ git commit > > This will bring up an editor where you type in your commit message. The > convention is usually to type a short summary in the first line (50-60 > characters max), then a blank line, then additional details if necessary. > > *Push your feature branch to your fork in GitHub* > > Ok, remember that your fork is a remote named after your github username. > In my case, joeshaw. > > $ git push joeshaw doc-work > > This pushes to the joeshaw remote only the doc-work branch. Now your > work is publicly visible to anyone on your fork. > > *Send a pull request for your branch on your fork into the upstream > mainline* > > You can do this either on the web site or using the hub tool again. > > $ hub pull-request > > This will open your editor again. If you only had one commit on your > branch, the message for the pull request will be the same as the commit. > This might be good enough, but you might want to elaborate on the purpose > of the pull request. Like commits, the first line is a summary of the pull > request and the other lines are the body of the PR. > > In general you will be requesting to pull from your current branch (in > this case doc-work) into the master branch of the origin remote. > > If your pull request is accepted as-is, the maintainer will merge it into > the official upstream sources. Good luck! > > This isn't an exhaustive tutorial, but hopefully it's enough to get you > started and contributing. I hope you find it useful. > > Joe > > > > > > On Sun, Mar 15, 2015 at 12:50 PM, pybokeh wrote: > >> Hello List, >> I took a basic git/github class a while back, but I'm still struggling. >> I only know how to create my own repositories locally and at github and >> push changes to them and raise issues. But that's about it since I don't >> really create code that would be used by others and my level of Python is >> not that great to be able to contribute to the actual source code of Python >> projects. However, I can contribute at least by improving documentation. >> I want to improve documentation of a Python project and was wondering if >> someone could meet me at this week's upcoming dojo meeting this Friday or I >> can meet at other times of the week. Coffee, tea, or snacks on me. >> >> I was provided this link on how to contribute to this particular project >> ("pandas"): >> https://github.com/pydata/pandas/wiki/Contributing >> >> and that's where things got confusing for me and need help with. >> >> If you can spare some time with me, I'd really appreciate it. Thanks! >> >> - Daniel >> >> _______________________________________________ >> CentralOH mailing list >> CentralOH at python.org >> https://mail.python.org/mailman/listinfo/centraloh >> >> > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at intellovations.com Mon Mar 16 20:00:55 2015 From: eric at intellovations.com (Eric Floehr) Date: Mon, 16 Mar 2015 15:00:55 -0400 Subject: [CentralOH] Help with doing git pull requests on a Python project In-Reply-To: References: Message-ID: Joe, Thanks so much for this detailed writeup! I didn't know about hub, but it definitely will make working with github projects easier! -Eric On Mon, Mar 16, 2015 at 9:46 AM, Joe Shaw wrote: > Hi, > > The problem with those pandas instructions is that they don't tell the > whole story of what you need to do. > > The basic workflow for contributing to a project on GitHub is: > > 1. Clone the project you want to work on > 2. Fork the project you want to work on > 3. Create a *feature branch* to do your own work in > 4. Commit your changes to your feature branch > 5. Push your feature branch to your fork on GitHub > 6. Send a pull request for your branch on your fork into the upstream > mainline > > A very helpful tool for interacting with GitHub is the hub tool, which > can either be used as a stand-in replacement for git or as a separate > tool. > > https://github.com/github/hub > > It abstracts away a lot of the annoying parts of interacting with Git and > forks and such. I'll try to do step by step through the process, using the > hub and git command-line tools. > > *Clone the project you want to work on* > > $ hub clone pydata/pandas > > (Equivalent to git clone https://github.com/pydata/pandas.git) > > This clones the project from the server onto your local machine. When > working in git you make changes to your local copy of the repository. Git > has a copy of *remotes* which are, well, remote copies of the > repository. When you clone a new project, a remote called origin is > automatically created that points to the repository you provide in the > command line above. In this case, pydata/pandas on GitHub. > > When you are ready to upload your changes back to the main repository, you *push > to the remote*. Between when you cloned and now changes may have been > made to upstream remote repository. To get those changes, you *pull from > the remote*. > > *Fork the project you want to work on* > > The easiest way to do this is with hub. Make sure to run this command > from the pandas directory that was created when you cloned the repo. > > $ hub fork > > This does a couple of things. It creates a fork of pandas in your GitHub > account. It establishes a new remote in your local repository with the > name of your github username. So in my case I now have two remotes: > origin, which points to the main upstream repository; and joeshaw, which > points to my forked repository. We'll be pushing to my fork. > > *Create a feature branch to do your own work in* > > This creates a place to do your work in that is separate from the main > code. > > $ git checkout -b doc-work > > doc-work is what I'm choosing to name this branch. You can name it > whatever you like. Hyphens are idiomatic. > > Now do whatever changes you are going to do for this project. > > *Commit your changes to your feature branch* > > If you are creating new files, you will need to explicitly add them to the > to-be-commited list (also called the index, or staging area): > > $ git add file1.md file2.md etc > > If you are just editing existing files, you can add them all in one batch: > > $ git add -u > > Next you need to commit the changes. > > $ git commit > > This will bring up an editor where you type in your commit message. The > convention is usually to type a short summary in the first line (50-60 > characters max), then a blank line, then additional details if necessary. > > *Push your feature branch to your fork in GitHub* > > Ok, remember that your fork is a remote named after your github username. > In my case, joeshaw. > > $ git push joeshaw doc-work > > This pushes to the joeshaw remote only the doc-work branch. Now your > work is publicly visible to anyone on your fork. > > *Send a pull request for your branch on your fork into the upstream > mainline* > > You can do this either on the web site or using the hub tool again. > > $ hub pull-request > > This will open your editor again. If you only had one commit on your > branch, the message for the pull request will be the same as the commit. > This might be good enough, but you might want to elaborate on the purpose > of the pull request. Like commits, the first line is a summary of the pull > request and the other lines are the body of the PR. > > In general you will be requesting to pull from your current branch (in > this case doc-work) into the master branch of the origin remote. > > If your pull request is accepted as-is, the maintainer will merge it into > the official upstream sources. Good luck! > > This isn't an exhaustive tutorial, but hopefully it's enough to get you > started and contributing. I hope you find it useful. > > Joe > > > > > > On Sun, Mar 15, 2015 at 12:50 PM, pybokeh wrote: > >> Hello List, >> I took a basic git/github class a while back, but I'm still struggling. >> I only know how to create my own repositories locally and at github and >> push changes to them and raise issues. But that's about it since I don't >> really create code that would be used by others and my level of Python is >> not that great to be able to contribute to the actual source code of Python >> projects. However, I can contribute at least by improving documentation. >> I want to improve documentation of a Python project and was wondering if >> someone could meet me at this week's upcoming dojo meeting this Friday or I >> can meet at other times of the week. Coffee, tea, or snacks on me. >> >> I was provided this link on how to contribute to this particular project >> ("pandas"): >> https://github.com/pydata/pandas/wiki/Contributing >> >> and that's where things got confusing for me and need help with. >> >> If you can spare some time with me, I'd really appreciate it. Thanks! >> >> - Daniel >> >> _______________________________________________ >> CentralOH mailing list >> CentralOH at python.org >> https://mail.python.org/mailman/listinfo/centraloh >> >> > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From smashing_good_show at hotmail.com Fri Mar 20 17:32:36 2015 From: smashing_good_show at hotmail.com (timothy spencer) Date: Fri, 20 Mar 2015 09:32:36 -0700 Subject: [CentralOH] Else Statements and Loops Message-ID: So you can use an "else" statement with a for loop or a while loop. I didn't know that. I came across that in Lutz's book. There was no mention of that in Zed's book. I just thought that was pretty neat. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at joeshaw.org Fri Mar 20 18:09:36 2015 From: joe at joeshaw.org (Joe Shaw) Date: Fri, 20 Mar 2015 17:09:36 +0000 Subject: [CentralOH] Else Statements and Loops In-Reply-To: References: Message-ID: Hi, For reference, from the Python docs: https://docs.python.org/2/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops Joe On Fri, Mar 20, 2015 at 12:33 PM timothy spencer < smashing_good_show at hotmail.com> wrote: > So you can use an "else" statement with a for loop or a while loop. I > didn't know that. I came across that in Lutz's book. There was no mention > of that in Zed's book. I just thought that was pretty neat. > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jshaffstall at gmail.com Fri Mar 20 18:15:39 2015 From: jshaffstall at gmail.com (Jay Shaffstall) Date: Fri, 20 Mar 2015 13:15:39 -0400 Subject: [CentralOH] Else Statements and Loops In-Reply-To: References: Message-ID: I first discovered this language feature when teaching Python to non-programming in my CS0 course. They'd use else on while loops, and it would work. I've had to work to break them of the habit (since none of the programs they're writing need that sort of 'finally' functionality on loops). Jay On Fri, Mar 20, 2015 at 1:09 PM, Joe Shaw wrote: > Hi, > > For reference, from the Python docs: > https://docs.python.org/2/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops > > Joe > > On Fri, Mar 20, 2015 at 12:33 PM timothy spencer < > smashing_good_show at hotmail.com> wrote: > >> So you can use an "else" statement with a for loop or a while loop. I >> didn't know that. I came across that in Lutz's book. There was no mention >> of that in Zed's book. I just thought that was pretty neat. >> _______________________________________________ >> CentralOH mailing list >> CentralOH at python.org >> https://mail.python.org/mailman/listinfo/centraloh >> > > _______________________________________________ > 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 Fri Mar 20 19:04:14 2015 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Fri, 20 Mar 2015 14:04:14 -0400 Subject: [CentralOH] Quick Start Versus Comprehensive Tutorials In-Reply-To: References: Message-ID: <20150320140414.792310a0.jep200404@columbus.rr.com> On Fri, 20 Mar 2015 09:32:36 -0700, timothy spencer wrote: > So you can use an "else" statement with a for loop or a while loop. > I came across that in Lutz's book[1]. > There was no mention of that in Zed's book[2]. There are many differences like that between Lutz's Learning Python and quick start tutorials such as Zed's. The quick start tutorials, such as but not limited to Zed's, are great for getting a quick start and being able to be productive in a short period. However, for that quick start, they necessarily leave out many things. Learning Python is also a tutorial, also suitable for beginners. Unlike the quick start tutorials, Learning Python is comprehensive. It also is slow, so it does not get ahead of you. It does not leave you in the dust. When you get through Learning Python, you know Python. I recommend a hybrid approach. Start with a quick tutorial like Zed's, then read Lutz's Learning Python. [1] Learning Python, Fifth Edition by Mark Lutz http://www.amazon.com/Learning-Python-Edition-Mark-Lutz/dp/1449355730 [2] Lean Python the Hard Way by Zed Shaw http://learnpythonthehardway.org/book/ From jep200404 at columbus.rr.com Sat Mar 21 17:19:53 2015 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Sat, 21 Mar 2015 12:19:53 -0400 Subject: [CentralOH] =?utf-8?q?2015-03-20_=E9=81=93=E5=A0=B4_Scribbles_?= =?utf-8?b?76SY5pu4L+aDoeaWhz8gZ2l0aHViOyBwYW5kYXM7IG1lZWNlczsgZm9yazsg?= =?utf-8?q?rabbitmq=3B_ascii=3B_patent=3B_javascript=3B_test=27em=3B_phant?= =?utf-8?q?omjs=3B_jasmine=3B_vending_machine=3B_kata=3B_nvm=3B_npm=3B_tap?= =?utf-8?q?=3B_atom=3B_truthiness=3B_nerdtree_emberjs=3B_euler=3B_dvorak?= =?utf-8?q?=3B_steno=3B_mcilroy=3B_pipes=3B_hartmann=3B_steampunk=3B_coffe?= =?utf-8?q?e=3BK=26R=3Bgas_prices?= Message-ID: <20150321121953.19102b00.jep200404@columbus.rr.com> 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://mail.python.org/pipermail/centraloh/2015-March/002388.html On a weekend morning that someone is made aware of: Buy half a dozen or more assorted donuts from DK Diner. Bring them early to Stauf's on a weekend morning to share. DK Diner 1715 West Third Avenue http://thedkdiner.com/index.html Stauf's Coffee Roasters 1277 Grandview Avenue http://www.staufs.com:80/default.aspx http://pandas.pydata.org/developers.html#contributing-to-the-documentation https://www.python.org/dev/peps/pep-0008/ https://pypi.python.org/pypi/flake8 emacs spaces for indentation, no hard tab http://stackoverflow.com/questions/69934/set-4-space-indent-in-emacs-in-text-mode Mice make one slow. I hate meeces to pieces. wp:ratpoison wp:Pixie and Dixie and Mr. Jinks http://www.catb.org/jargon/html/F/fork.html https://en.wikipedia.org/wiki/Fork_(software_development) Has Github forked the definition of "fork" (conflating forking with mere cloning/copying)? Forrest Gump: English is as English does. set up git credentials for github for helping someone bring my git, github, and gitserver notes rabbitmq might be relevant for a particular scholar http://www.rabbitmq.com/tutorials/tutorial-two-python.html man ascii http://man7.org/linux/man-pages/man7/ascii.7.html http://www.kernel.org/doc/man-pages/ wp:ASCII http://arstechnica.com/tech-policy/2015/03/how-life360-won-its-patent-war/ 2015-03-18 Guy Royse presented jasmine and/or testem rough schedule is: 18:30 - 19:00 hangout 19:00 - 20:00 presentation 20:00 - at least 21:00 hangout test'em jasmine phantomjs testme will run your jasmine specifications on phantomjs phantomjs headless browser on top of webkit great for testing but not much else https://en.wikipedia.org/wiki/PhantomJS jasmine wp:Jasmine (JavaScript framework) jasmine.github.io test'em runs tests under many different browsers https://github.com/airportyh/testem testem is for javascript what py.test is for python? ? ? vending machine kata https://github.com/guyroyse/vending-machine-kata nvm node version manager https://github.com/creationix/nvm https://www.npmjs.com/package/nvm npm node package manager https://www.npmjs.com ** globs match directories any depth tap: test anything protocol wp:Test Anything Protocol wp:Atom (text editor) wp:Ariel Atom .toBe === .toequals == .toBeTruthy not so useful .toBeFalsy not so useful wp:truthiness nerdtree plugin for vim https://github.com/scrooloose/nerdtree after end of meeting a guy stood up who was wanting to start an Ember JS meetup. He wrote on a white board the following. Ember CBus Jmar910 at gmail http://emberjs.com github.com/jmar910 -------------------------------------------------------------------------------- project euler can be used for practice (kata) wp:Dvorak Simplified Keyboard wp:Stenotype http://openstenoproject.org/ Mirabai Knight http://pyvideo.org/search?models=videos.video&q=mirabai+knight wp:steampunk https://www.flickr.com/photos/jmknapp/3956758483/ browse to Hagrid; closeup of steampunk http://www.linuxtoday.com/infrastructure/2009091400635NWEV wp:Douglas McIlroy wp:Pipeline (Unix) wp:Hartmann pipeline When Hartmann pipes recombine, they preserve order unix pipes just ain't the same re='Hello';cat (grep "$re" | cat >found.txt) >(grep -v "$re" | cat >notfound.txt) >/dev/null re='Hello';tee (grep "$re" >found.txt) | grep -v "$re" >notfound.txt columbusideafoundry.com code & coffee 7am thursdays at Stauf's (1277 Grandview Ave) looks for geeks with laptops wp:The C Programming Language wp:K&R https://github.com/james-prior/gas-prices http://www.gaspricepro.com/gaspricedownload/index.php?promo=gasbuddy%20api http://www.gaspricepro.com/gaspricedownload/go.php?t=1t1 http://www.mygasfeed.com/ http://stackoverflow.com/questions/4299895/api-for-best-gas-prices-like-gasbuddyhttp://www.mygasfeed.com/keys/api https://www.crunchbase.com/organization/gasbuddy xterm skinny fonts unreadable font terminal speed tester time find; find | wc xterm gnome-terminal xfce-terminal konsole lxde-terminal wp:Software craftsmanship Science as a Craft Industry by Freeman J. Dyson http://www.sciencemag.org/content/280/5366/1014.full?view=full From eric at intellovations.com Tue Mar 24 18:14:49 2015 From: eric at intellovations.com (Eric Floehr) Date: Tue, 24 Mar 2015 13:14:49 -0400 Subject: [CentralOH] Python Talk on Classes Message-ID: There are few talks where both new programmers and seasoned professionals will learn something. There are fewer still where you not only learn about the details of the language, but also how to do software development better in general. And there are precious few talks that are able to combine the two, and do it in an engaging and fun manner that keeps you from nodding off whether you have been coding for 2 months or 2 decades. This talk by Raymond Hettinger, titled "Python's Class Development Toolkit", given at PyCon 2013, is one of them. Don't let the boring name turn you off. This is a great talk for new and old alike. In any anthology of the best Python talks, this talk will be included. https://www.youtube.com/watch?v=HTLu2DFOdTg -------------- next part -------------- An HTML attachment was scrubbed... URL: From jep200404 at columbus.rr.com Wed Mar 25 17:47:29 2015 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Wed, 25 Mar 2015 12:47:29 -0400 Subject: [CentralOH] Hurlama: Python Embedded in Shell Script Message-ID: <20150325124729.5050105b.jep200404@columbus.rr.com> Check out the redacted shell script below for how it has Python code embedded in it. A sample invocation could be: foo 'http://wx.com/data/{year:04d}/xyz-{year:04d}{month:02d}/.zip' #!/usr/bin/env bash ... ymd=`date '+%Y %m %d'` # ymd='2013 06 03' echo "$ymd:" | tr -d '\n' for arg in "$@"; do echo -n " '$arg'" done echo url_format="$1" ... year=`echo $ymd | awk '{print $1}'` # echo $year month=`echo $ymd | awk '{print $2}'` # echo $month day=`echo $ymd | awk '{print $3}' | sed -e 's/^0//'` ... url=`python - "$url_format" "$year" "$month" "$day" <wget.stderr | md5sum >"$day" ... Are you hurling yet? From eric at intellovations.com Thu Mar 26 01:55:25 2015 From: eric at intellovations.com (Eric Floehr) Date: Wed, 25 Mar 2015 20:55:25 -0400 Subject: [CentralOH] Counting array sizes Message-ID: I had a dictionary indexed by strings, with the value being an array of one or more items. I wanted to know how many had 1 item, how many had 2, etc. My solution was to use Counter from collections: >>> from collections import Counter >>> d = { 'A': [1], 'B': [2,3], 'C': [4], 'D': [1,2,3]} >>> lens = [ len(value) for value in d.values() ] >>> print(lens) [1, 1, 2, 3] >>> counts = Counter(lens) >>> print(counts) Counter({1: 2, 2: 1, 3: 1}) >>> counts[1] 2 In my case it was a dictionary of 850 entries, with arrays of varying size. It made understanding the composition of the the dictionary easier. What Python module/class/function has made your life easier? -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at intellovations.com Thu Mar 26 13:10:16 2015 From: eric at intellovations.com (Eric Floehr) Date: Thu, 26 Mar 2015 08:10:16 -0400 Subject: [CentralOH] Monthly Meeting this Monday Message-ID: http://www.meetup.com/Central-Ohio-Python-Users-Group/events/220893506/ This month, James Bonanno will be talking about Cython, an optimizing static compiler for both Python and the Cython variant. There will also be lightning talks! Details: We will be meeting at Pillar, at the Launchpad, which is down the hall to the left and where we met last month (there will be signs). Pillar will provide food and drink (thanks Pillar!). Informal meeting starts at 6pm, with the talk starting at 6:30pm. We will finish no later than 8:30pm to adjourn to the informal meeting. James Bonanno will present on Cython. Cython is an optimising static compiler for both the Python programming language and the extended Cython programming language (based on Pyrex). It makes writing C extensions for Python as easy as Python itself. Compared to Shedsking, Pythran, Numba, and PyPy, Cython offers the most versatility and power for increasing performance of Python applications. His talk will cover the basics of using Cython and how to compile a basic program and run it. As always, if there is time, we welcome your short talks on any Python-related topics, big or small. It's a great, low commitment way to help you over your public speaking fears! -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian.costlow at gmail.com Mon Mar 30 15:54:02 2015 From: brian.costlow at gmail.com (Brian Costlow) Date: Mon, 30 Mar 2015 09:54:02 -0400 Subject: [CentralOH] Volunteers needed for Young Coder mentoring Message-ID: Hello All, As an offshoot of the Young Coders program started at PyCon, and held at PyOhio the past two years, I have been working with the Columbus Museum of Art to add programming to the activities in their Thursday after school program. The program runs 4-8 PM on Thursdays, and provides maker space for kids to work on traditional art, computer art, music and a number of other disciplines. We want to add programming, then eventually some hardware hacking and robotics, to the mix. The format is for the kids to be largely self-directed and exploratory, there's not a lot of formal instruction. Instead, adult mentors are available to assist as needed. I am looking for Python devs that would be interested in becoming mentors. If interested, please email me directly at brian.costlow+yccma at gmail.com Thanks! Brian Costlow -------------- next part -------------- An HTML attachment was scrubbed... URL: From kurtis.mullins at gmail.com Mon Mar 30 16:24:22 2015 From: kurtis.mullins at gmail.com (Kurtis Mullins) Date: Mon, 30 Mar 2015 10:24:22 -0400 Subject: [CentralOH] Volunteers needed for Young Coder mentoring In-Reply-To: References: Message-ID: I don't live in the Columbus area -- but if this type of thing ever pops up in the Dayton area, I'd love to help out and get my son involved. I'm glad to see the Museum pursuing this! I hope you find cool devs willing and able to come help out and mentor the young'ins On Mon, Mar 30, 2015 at 9:54 AM, Brian Costlow wrote: > Hello All, > > As an offshoot of the Young Coders program started at PyCon, and held at > PyOhio the past two years, I have been working with the Columbus Museum of > Art to add programming to the activities in their Thursday after school > program. > > The program runs 4-8 PM on Thursdays, and provides maker space for kids to > work on traditional art, computer art, music and a number of other > disciplines. We want to add programming, then eventually some hardware > hacking and robotics, to the mix. > > The format is for the kids to be largely self-directed and exploratory, > there's not a lot of formal instruction. Instead, adult mentors are > available to assist as needed. > > I am looking for Python devs that would be interested in becoming mentors. > > If interested, please email me directly at brian.costlow+yccma at gmail.com > > Thanks! > > Brian Costlow > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pcarswell.1 at gmail.com Mon Mar 30 18:34:57 2015 From: pcarswell.1 at gmail.com (Peter Carswell) Date: Mon, 30 Mar 2015 12:34:57 -0400 Subject: [CentralOH] Counting array sizes In-Reply-To: References: Message-ID: I have use exercises with dictionaries which required the get() method ...especially the feature which when the particular key was not found, a dictionary element was created with a specified value. """ Returning home next meet-up. """ pete On Wed, Mar 25, 2015 at 8:55 PM, Eric Floehr wrote: > I had a dictionary indexed by strings, with the value being an array of > one or more items. I wanted to know how many had 1 item, how many had 2, > etc. > > My solution was to use Counter from collections: > > >>> from collections import Counter > >>> d = { 'A': [1], 'B': [2,3], 'C': [4], 'D': [1,2,3]} > >>> lens = [ len(value) for value in d.values() ] > >>> print(lens) > [1, 1, 2, 3] > >>> counts = Counter(lens) > >>> print(counts) > Counter({1: 2, 2: 1, 3: 1}) > >>> counts[1] > 2 > > In my case it was a dictionary of 850 entries, with arrays of varying > size. It made understanding the composition of the the dictionary easier. > > What Python module/class/function has made your life easier? > > > _______________________________________________ > 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 Mon Mar 30 22:37:13 2015 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Mon, 30 Mar 2015 16:37:13 -0400 Subject: [CentralOH] Reminder: CohPy Meeting Tonight Message-ID: <20150330163713.069af594.jep200404@columbus.rr.com> See cohpy.org for details. From nick.albright at gmail.com Tue Mar 31 05:24:44 2015 From: nick.albright at gmail.com (Nick Albright) Date: Mon, 30 Mar 2015 23:24:44 -0400 Subject: [CentralOH] Help with doing git pull requests on a Python project In-Reply-To: References: Message-ID: Joe! Thanks for the wonderful write up! I just used it to create a pull request for an open source project! = ) -Nick On Mon, Mar 16, 2015 at 9:46 AM, Joe Shaw wrote: > Hi, > > The problem with those pandas instructions is that they don't tell the > whole story of what you need to do. > > The basic workflow for contributing to a project on GitHub is: > > 1. Clone the project you want to work on > 2. Fork the project you want to work on > 3. Create a *feature branch* to do your own work in > 4. Commit your changes to your feature branch > 5. Push your feature branch to your fork on GitHub > 6. Send a pull request for your branch on your fork into the upstream > mainline > > A very helpful tool for interacting with GitHub is the hub tool, which > can either be used as a stand-in replacement for git or as a separate > tool. > > https://github.com/github/hub > > It abstracts away a lot of the annoying parts of interacting with Git and > forks and such. I'll try to do step by step through the process, using the > hub and git command-line tools. > > *Clone the project you want to work on* > > $ hub clone pydata/pandas > > (Equivalent to git clone https://github.com/pydata/pandas.git) > > This clones the project from the server onto your local machine. When > working in git you make changes to your local copy of the repository. Git > has a copy of *remotes* which are, well, remote copies of the > repository. When you clone a new project, a remote called origin is > automatically created that points to the repository you provide in the > command line above. In this case, pydata/pandas on GitHub. > > When you are ready to upload your changes back to the main repository, you *push > to the remote*. Between when you cloned and now changes may have been > made to upstream remote repository. To get those changes, you *pull from > the remote*. > > *Fork the project you want to work on* > > The easiest way to do this is with hub. Make sure to run this command > from the pandas directory that was created when you cloned the repo. > > $ hub fork > > This does a couple of things. It creates a fork of pandas in your GitHub > account. It establishes a new remote in your local repository with the > name of your github username. So in my case I now have two remotes: > origin, which points to the main upstream repository; and joeshaw, which > points to my forked repository. We'll be pushing to my fork. > > *Create a feature branch to do your own work in* > > This creates a place to do your work in that is separate from the main > code. > > $ git checkout -b doc-work > > doc-work is what I'm choosing to name this branch. You can name it > whatever you like. Hyphens are idiomatic. > > Now do whatever changes you are going to do for this project. > > *Commit your changes to your feature branch* > > If you are creating new files, you will need to explicitly add them to the > to-be-commited list (also called the index, or staging area): > > $ git add file1.md file2.md etc > > If you are just editing existing files, you can add them all in one batch: > > $ git add -u > > Next you need to commit the changes. > > $ git commit > > This will bring up an editor where you type in your commit message. The > convention is usually to type a short summary in the first line (50-60 > characters max), then a blank line, then additional details if necessary. > > *Push your feature branch to your fork in GitHub* > > Ok, remember that your fork is a remote named after your github username. > In my case, joeshaw. > > $ git push joeshaw doc-work > > This pushes to the joeshaw remote only the doc-work branch. Now your > work is publicly visible to anyone on your fork. > > *Send a pull request for your branch on your fork into the upstream > mainline* > > You can do this either on the web site or using the hub tool again. > > $ hub pull-request > > This will open your editor again. If you only had one commit on your > branch, the message for the pull request will be the same as the commit. > This might be good enough, but you might want to elaborate on the purpose > of the pull request. Like commits, the first line is a summary of the pull > request and the other lines are the body of the PR. > > In general you will be requesting to pull from your current branch (in > this case doc-work) into the master branch of the origin remote. > > If your pull request is accepted as-is, the maintainer will merge it into > the official upstream sources. Good luck! > > This isn't an exhaustive tutorial, but hopefully it's enough to get you > started and contributing. I hope you find it useful. > > Joe > > > > > > On Sun, Mar 15, 2015 at 12:50 PM, pybokeh wrote: > >> Hello List, >> I took a basic git/github class a while back, but I'm still struggling. >> I only know how to create my own repositories locally and at github and >> push changes to them and raise issues. But that's about it since I don't >> really create code that would be used by others and my level of Python is >> not that great to be able to contribute to the actual source code of Python >> projects. However, I can contribute at least by improving documentation. >> I want to improve documentation of a Python project and was wondering if >> someone could meet me at this week's upcoming dojo meeting this Friday or I >> can meet at other times of the week. Coffee, tea, or snacks on me. >> >> I was provided this link on how to contribute to this particular project >> ("pandas"): >> https://github.com/pydata/pandas/wiki/Contributing >> >> and that's where things got confusing for me and need help with. >> >> If you can spare some time with me, I'd really appreciate it. Thanks! >> >> - Daniel >> >> _______________________________________________ >> CentralOH mailing list >> CentralOH at python.org >> https://mail.python.org/mailman/listinfo/centraloh >> >> > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From james at atlantixeng.com Tue Mar 31 07:06:30 2015 From: james at atlantixeng.com (James Bonanno) Date: Tue, 31 Mar 2015 01:06:30 -0400 Subject: [CentralOH] Cython Presentation Message-ID: <551A2B56.3010508@atlantixeng.com> Hello All; The repo that contains the Cython presentation is here: https://github.com/saturn77/CythonBootstrap To clone: git clone git at github.com/saturn77/CythonBootstrap.git The main file is the CythonBootstrap.ipynb, which will generate all the files in the ./src diretory when you run the notebook. I did fix the matplotlib issue too... Please pull or fork or even start this repo if appropriate! Thanks. James From joe at joeshaw.org Tue Mar 31 15:43:16 2015 From: joe at joeshaw.org (Joe Shaw) Date: Tue, 31 Mar 2015 13:43:16 +0000 Subject: [CentralOH] Help with doing git pull requests on a Python project In-Reply-To: References: Message-ID: All right! Congratulations Nick! On Mon, Mar 30, 2015 at 11:25 PM Nick Albright wrote: > Joe! > > Thanks for the wonderful write up! I just used it to create a pull > request for an open source project! = ) > -Nick > On Mon, Mar 16, 2015 at 9:46 AM, Joe Shaw wrote: > >> Hi, >> >> The problem with those pandas instructions is that they don't tell the >> whole story of what you need to do. >> >> The basic workflow for contributing to a project on GitHub is: >> >> 1. Clone the project you want to work on >> 2. Fork the project you want to work on >> 3. Create a *feature branch* to do your own work in >> 4. Commit your changes to your feature branch >> 5. Push your feature branch to your fork on GitHub >> 6. Send a pull request for your branch on your fork into the upstream >> mainline >> >> A very helpful tool for interacting with GitHub is the hub tool, which >> can either be used as a stand-in replacement for git or as a separate >> tool. >> >> https://github.com/github/hub >> >> It abstracts away a lot of the annoying parts of interacting with Git and >> forks and such. I'll try to do step by step through the process, using the >> hub and git command-line tools. >> >> *Clone the project you want to work on* >> >> $ hub clone pydata/pandas >> >> (Equivalent to git clone https://github.com/pydata/pandas.git) >> >> This clones the project from the server onto your local machine. When >> working in git you make changes to your local copy of the repository. Git >> has a copy of *remotes* which are, well, remote copies of the >> repository. When you clone a new project, a remote called origin is >> automatically created that points to the repository you provide in the >> command line above. In this case, pydata/pandas on GitHub. >> >> When you are ready to upload your changes back to the main repository, >> you *push to the remote*. Between when you cloned and now changes may >> have been made to upstream remote repository. To get those changes, you *pull >> from the remote*. >> >> *Fork the project you want to work on* >> >> The easiest way to do this is with hub. Make sure to run this command >> from the pandas directory that was created when you cloned the repo. >> >> $ hub fork >> >> This does a couple of things. It creates a fork of pandas in your GitHub >> account. It establishes a new remote in your local repository with the >> name of your github username. So in my case I now have two remotes: >> origin, which points to the main upstream repository; and joeshaw, which >> points to my forked repository. We'll be pushing to my fork. >> >> *Create a feature branch to do your own work in* >> >> This creates a place to do your work in that is separate from the main >> code. >> >> $ git checkout -b doc-work >> >> doc-work is what I'm choosing to name this branch. You can name it >> whatever you like. Hyphens are idiomatic. >> >> Now do whatever changes you are going to do for this project. >> >> *Commit your changes to your feature branch* >> >> If you are creating new files, you will need to explicitly add them to >> the to-be-commited list (also called the index, or staging area): >> >> $ git add file1.md file2.md etc >> >> If you are just editing existing files, you can add them all in one batch: >> >> $ git add -u >> >> Next you need to commit the changes. >> >> $ git commit >> >> This will bring up an editor where you type in your commit message. The >> convention is usually to type a short summary in the first line (50-60 >> characters max), then a blank line, then additional details if necessary. >> >> *Push your feature branch to your fork in GitHub* >> >> Ok, remember that your fork is a remote named after your github >> username. In my case, joeshaw. >> >> $ git push joeshaw doc-work >> >> This pushes to the joeshaw remote only the doc-work branch. Now your >> work is publicly visible to anyone on your fork. >> >> *Send a pull request for your branch on your fork into the upstream >> mainline* >> >> You can do this either on the web site or using the hub tool again. >> >> $ hub pull-request >> >> This will open your editor again. If you only had one commit on your >> branch, the message for the pull request will be the same as the commit. >> This might be good enough, but you might want to elaborate on the purpose >> of the pull request. Like commits, the first line is a summary of the pull >> request and the other lines are the body of the PR. >> >> In general you will be requesting to pull from your current branch (in >> this case doc-work) into the master branch of the origin remote. >> >> If your pull request is accepted as-is, the maintainer will merge it into >> the official upstream sources. Good luck! >> >> This isn't an exhaustive tutorial, but hopefully it's enough to get you >> started and contributing. I hope you find it useful. >> >> Joe >> >> >> >> >> >> On Sun, Mar 15, 2015 at 12:50 PM, pybokeh wrote: >> >>> Hello List, >>> I took a basic git/github class a while back, but I'm still struggling. >>> I only know how to create my own repositories locally and at github and >>> push changes to them and raise issues. But that's about it since I don't >>> really create code that would be used by others and my level of Python is >>> not that great to be able to contribute to the actual source code of Python >>> projects. However, I can contribute at least by improving documentation. >>> I want to improve documentation of a Python project and was wondering if >>> someone could meet me at this week's upcoming dojo meeting this Friday or I >>> can meet at other times of the week. Coffee, tea, or snacks on me. >>> >>> I was provided this link on how to contribute to this particular project >>> ("pandas"): >>> https://github.com/pydata/pandas/wiki/Contributing >>> >>> and that's where things got confusing for me and need help with. >>> >>> If you can spare some time with me, I'd really appreciate it. Thanks! >>> >>> - Daniel >>> >>> _______________________________________________ >>> CentralOH mailing list >>> CentralOH at python.org >>> https://mail.python.org/mailman/listinfo/centraloh >>> >>> >> >> _______________________________________________ >> CentralOH mailing list >> CentralOH at python.org >> https://mail.python.org/mailman/listinfo/centraloh >> >> _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdsantiagojr at gmail.com Tue Mar 31 17:20:00 2015 From: jdsantiagojr at gmail.com (John Santiago) Date: Tue, 31 Mar 2015 11:20:00 -0400 Subject: [CentralOH] Cython Presentation In-Reply-To: <551A2B56.3010508@atlantixeng.com> References: <551A2B56.3010508@atlantixeng.com> Message-ID: I was really looking forward to getting to the metope; but unable to attend. Thank you for posting this! > On Mar 31, 2015, at 1:06 AM, James Bonanno wrote: > > Hello All; > > The repo that contains the Cython presentation is here: > > https://github.com/saturn77/CythonBootstrap > > To clone: > > git clone git at github.com/saturn77/CythonBootstrap.git > > The main file is the CythonBootstrap.ipynb, which will generate all the files in the ./src diretory when you run the notebook. I did fix the matplotlib issue too... > > Please pull or fork or even start this repo if appropriate! > > Thanks. James > > > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh From james at atlantixeng.com Tue Mar 31 20:06:04 2015 From: james at atlantixeng.com (James Bonanno) Date: Tue, 31 Mar 2015 14:06:04 -0400 Subject: [CentralOH] Cython + IPython Notebook Message-ID: <551AE20C.8060106@atlantixeng.com> I add that the new IPython/Jupyter notebook is extremely flexible and powerful, ..It made making the Cython presentation extremely compact in the sense that all the .pyx files are generated from within notebook. I will look to add additional examples and reference designs to that repo. -James