From calcpage at aol.com Fri Jul 1 13:54:29 2016 From: calcpage at aol.com (A. Jorge Garcia) Date: Fri, 1 Jul 2016 13:54:29 -0400 Subject: [Edu-sig] O'Reilly Webcast: Doing Math with Python (Amit Saha) In-Reply-To: Message-ID: <155a798fe0d-ecb-8d95@webprd-m01.mail.aol.com> On a related note, here's a couple of blog posts I made recently that may interest this group, http://shadowfaxrant.blogspot.com/2016/06/how-to-part-ii-pythonic-calculus.html http://shadowfaxrant.blogspot.com/2016/06/how-to-part-ii-2016-sage-computer.html Sincerely,? A. Jorge Garcia? Applied Math, Physics & CS? http://shadowfaxrant.blogspot.com? http://www.youtube.com/calcpage2009? 2015 NYS Secondary Math http://PAEMST.org Nominee -------------- next part -------------- An HTML attachment was scrubbed... URL: From calcpage at aol.com Fri Jul 1 14:01:57 2016 From: calcpage at aol.com (A. Jorge Garcia) Date: Fri, 1 Jul 2016 14:01:57 -0400 Subject: [Edu-sig] Let's dump the Graphing Calculators! In-Reply-To: Message-ID: <155a79fd461-ecb-8dff@webprd-m01.mail.aol.com> >>> Teachers want more pay and respect, and Jorge is a great role model for why they'd deserve both if allowed to innovate in the way Jorge has.? But most are on a very short leash and have to do Pearson's dirty work as mind-killer slaves.? >>> Unfortunately, there's too many teachers who do not want to bother to innovate or think outside the box. >>> In the meantime, those very few schools who dare to break the mold are in a position to hugely advantage their students.? There's nothing like shackling everyone else to TI calculators to help a lucky few stand out thanks to their school's bravery. >>> This is my hope! >>> What I don't get is why organizations like the IEEE or even the NCTM itself don't raise a fuss or in any way to insist on educational freedom.? Don't teachers want any freedom?? (Answer:? many don't). >>> Many teachers are afraid that they must adhere to the CC standard or their evaluations will suffer. To give them the benefit of the doubt, many teachers don't have the time to put into creating their own curricula. >>> NCTM and IEEE do not seem to understand how they're digging their own graves with their silence and that, looking back, they're going to seem awfully stick-in-the-mud as in "gee, look at these interesting fossils".? You'd think at some point a sense of self- preservation, of wanting to survive, would kick in. >>> I've said this for years. Ironically, I have spoken several times over the years at local T^3 conferences. What's funny is that these are conferences about using TI hardware, however, I always talk about alternatives instead! Sincerely, A. Jorge Garcia Applied Math, Physics & CS http://shadowfaxrant.blogspot.com http://www.youtube.com/calcpage2009 2013 NYS Secondary Math http://PAEMST.org Nominee -------------- next part -------------- An HTML attachment was scrubbed... URL: From calcpage at aol.com Fri Jul 1 14:03:53 2016 From: calcpage at aol.com (A. Jorge Garcia) Date: Fri, 1 Jul 2016 14:03:53 -0400 Subject: [Edu-sig] O'Reilly Webcast: Doing Math with Python (Amit Saha) In-Reply-To: <155a798fe0d-ecb-8d95@webprd-m01.mail.aol.com> Message-ID: <155a7a19774-ecb-8e13@webprd-m01.mail.aol.com> OOPS, please disregard my last post in this thread. I thought I was on another forum... Sincerely,? A. Jorge Garcia? Applied Math, Physics & CS? http://shadowfaxrant.blogspot.com? http://www.youtube.com/calcpage2009? 2015 NYS Secondary Math http://PAEMST.org Nominee -------------- next part -------------- An HTML attachment was scrubbed... URL: From funcalculus at gmail.com Fri Jul 1 19:52:03 2016 From: funcalculus at gmail.com (Peter Farrell) Date: Fri, 1 Jul 2016 16:52:03 -0700 Subject: [Edu-sig] Edu-sig Digest, Vol 156, Issue 1 In-Reply-To: References: Message-ID: Very good points, Kirby! I heartily agree with your assessment of, well, assessments. I'll go on record as saying the cult of standardization and curriculum reeks of fear. Peter On Fri, Jul 1, 2016 at 9:00 AM, wrote: > Send Edu-sig mailing list submissions to > edu-sig at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/edu-sig > or, via email, send a message with subject or body 'help' to > edu-sig-request at python.org > > You can reach the person managing the list at > edu-sig-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Edu-sig digest..." > > > Today's Topics: > > 1. Re: Let's dump the Graphing Calculators! (kirby urner) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 30 Jun 2016 10:06:49 -0700 > From: kirby urner > To: edu-sig > Subject: Re: [Edu-sig] Let's dump the Graphing Calculators! > Message-ID: > < > CAPJgG3QHYsiUnMFrpz95v7Tb86TXva02TTuypswBeWw0juO6dw at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > On Thu, Jun 30, 2016 at 3:01 AM, Jason Blum wrote: > > > Interesting article about the whole Texas Instruments Graphing Calculator > > scam: > > > > > https://mic.com/articles/125829/your-old-texas-instruments-graphing-calculator-still-costs-a-fortune-heres-why > > > > > Excellent article, thanks. > > Whereas I have love and respect for the BBC, I've been a past > advocate of the Boycott Pearson campaign, precisely for the > reasons mentioned above. > > I think Pearson has some better practices in the pipeline by now, > and dropped my campaign awhile back, but I'm still rhetorically > resisting the oppressiveness of big publishing in general (I used > to work at McGraw-Hill and understand how what's profitable is > to recycle the past with window-dressing changes). > > The Common Core is mostly for big publishing's convenience, as > marketing to individualized curricula developed by faculty would > be a real pain. Exactly right, it would be. The big publishing > textbook business model is itself what's out of date -- we neither > need nor want uniformity of that kind. > > Teachers want more pay and respect, and Jorge is a great role > model for why they'd deserve both if allowed to innovate in the > way Jorge has. But most are on a very short leash and have to > do Pearson's dirty work as mind-killer slaves. > > Hah hah, there's more of my rhetoric showing. > > > > Meanwhile you get ten times the functionality for free on > > https://desmos.com/: > > > > > https://edsurge.com/news/2015-04-30-texas-district-pilots-desmos-as-alternative-to-graphing-calculators > > > > But +1 on approaching math programmatically with Python. > > > > > > > Or with J and/or JavaScript and/or.... so many ways to go once the > creativity is unleashed. > > But that's the fear: non-standardized and diverse approaches to the > future, meaning college admissions offices would have to really think > about their jobs again instead of just using algorithms and cookie > cutters. > > We've swallowed the bogus argument that wholesale uniformity and > "every one on the same page" has something to do with "fairness". > If junior moves from military base A in Texas to military base B in > Alabama, we don't want to upset her with some different content, > something place-based or homegrown. The transition should be as > smooth as just turning the page, as everyone is in lockstep, always > the factory-minded ideal. One size fits all etc. > > Congratulations to those behind this "fairness = uniformity" deception, > as it has worked very well for them. The gullible public has bought > in to this premise. > > In the meantime, those very few schools who dare to break the > mold are in a position to hugely advantage their students. There's > nothing like shackling everyone else to TI calculators to help a > lucky few stand out thanks to their school's bravery. > > What I don't get is why organizations like the IEEE or even the > NCTM itself don't raise a fuss or in any way to insist on educational > freedom. Don't teachers want any freedom? (Answer: many > don't). > > NCTM and IEEE do not seem to understand how they're digging > their own graves with their silence and that, looking back, they're > going to seem awfully stick-in-the-mud as in "gee, look at these > interesting fossils". You'd think at some point a sense of self- > preservation, of wanting to survive, would kick in. > > Kirby > > Related polemics (hey, I'm a spin doctor too): > > http://mathforum.org/kb/thread.jspa?messageID=9796755#9796755 > https://goo.gl/dajqz0 (based on today's correspondence) > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/edu-sig/attachments/20160630/3b6b8a1d/attachment-0001.html > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > > > ------------------------------ > > End of Edu-sig Digest, Vol 156, Issue 1 > *************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amitsaha.in at gmail.com Sat Jul 2 09:43:46 2016 From: amitsaha.in at gmail.com (Amit Saha) Date: Sat, 2 Jul 2016 23:43:46 +1000 Subject: [Edu-sig] O'Reilly Webcast: Doing Math with Python (Amit Saha) In-Reply-To: References: Message-ID: Hi Sergio, On Tue, Jun 28, 2016 at 5:08 AM, Sergio Rojas wrote: > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 26 Jun 2016 19:38:27 +1000 > From: Amit Saha > To: "edu-sig at python.org" > Subject: [Edu-sig] O'Reilly Webcast: Doing Math with Python > Message-ID: > > Content-Type: text/plain; charset=UTF-8 > > Hi all, > > I am very excited to share that I am doing a webcast this coming week > with O'Reilly titled "Doing Math with Python" > (http://www.oreilly.com/pub/e/3712[http://www.oreilly.com/pub/e/3712]). > > You can register for it on the event page. Here are the date and time > of the webcast: > > Wed, June 29th at 7 PM, San Francisco > Wed, June 29th at 10pm, New York > Thu, Jun 30th at 3am - London > Thu, Jun 30th at 7:30am - Mumbai > Thu, Jun 30th at 10am - Beijing > Thu, Jun 30th at 11am - Tokyo > Thu, Jun 30th at 12pm - Sydney > > I have created a GitHub repository > (https://github.com/doingmathwithpython/oreilly-webcast-2016[https://github.com/doingmathwithpython/oreilly-webcast-2016]) which > will have the rough transcript, final slides and the code examples as > Jupyter Notebooks. > > Hope you can join me there. > > Best Wishes, > Amit. > > > ------------------------------ > > Hi Amit, > > What is needed to successfully run your jupyter notebook > "Interactive Mandelbrot Set.ipynb"? > > When opening, it shows the Mandelbrot picture at the bottom. > When executing the cell, nothing shows up. > > I am using: > Python 3.5.1 |Anaconda 4.0.0 (64-bit)| (default, Dec 7 2015, 11:16:01) > [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux > > which includes: > IPython : 4.1.2 > Numpy : 1.10.4 > Matplotlib : 1.5.1 > Scipy : 0.17.0 You will also need ipywidgets installed (I have 4.1.1). Please also note that you will need to click on the button. Let me know if that works, else I will investigate further. Best Wishes, Amit. -- http://echorand.me From kirby.urner at gmail.com Tue Jul 5 12:14:58 2016 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 5 Jul 2016 09:14:58 -0700 Subject: [Edu-sig] Introducing Python... callables = {types, functions} Message-ID: I'm on Safari On-Line sampling: Introduction to Python by Jessica McKellar O'Reilly Media, Inc., 2014 a multi-hour video series. I enjoy and value getting ideas from other Python instructors. I'm scheduled to start a new round myself this very evening. What's standing out for me is how often Jessica uses the phrase "just like in math class" or "as you'd expect from math class". Exactly, reminding viewers of "math class" is as bridge to previous relevant experience for most, though not all. "Using Python as a calculator" is a standard on-ramp since Guido's original tutorial. I do that too. I bet most of us do. We start in a REPL. I appreciate that Jessica starts using type( ) immediately, in the first few minutes, at first to distinguish type(1) from type(1.0) to tease apart ints and floats. Instilling a sense of objects being of various types is going to help students think like computer scientists and understand the deep grammar of Python better. I also tend to introduce dir( ) and help( ) almost immediately, to give a sense of the built-in environment and how to inspect it. Jessica wants to covers int, float, str and bool then start diving in to control structures right away, with if, elif, else and comparison operators (==, >=, < etc.). We're doing if statements in the REPL within the first 30 minutes. I'm also prone to introduce the words "callable" and "name" early on, and discussing how we distinguish between callable and not-callable names. callable() itself is a built-in function: >>> type(callable) Partly why I make this distinction is when using type( ) and str( ), I'm a bit leery of calling str "a function" to often. That's bleeping over an important distinction is it not? It's a callable for sure: >>> str(1) '1' >>> callable(str) # does it "eat"? True and yet... >>> type(str) >>> type(print) # another callable to share early In other words, str( ) is a callable but not really a builtin function. Like dict, list, int, float... it's the name of a type. When one calls a type directly by name (not one of its methods), we're actually giving birth to a new instance of that type. Functions aren't necessarily like that. They may return anything, of any type, including None. When it comes to laying a foundation, I find it aids understanding to introduce "callables" as a super-set of "names that may be called," inside of which we have "functions" and "types" as example members. On the other hand, this is a fine point, not to be dwelt on but spiraled back to, especially when keyword "class" is introduced. I think Jessica's approach, of glossing over this distinction in a first pass, is totally viable and realize the many delicate trade-offs as "too much too soon" may result in a sense of overwhelm. Finally, I like to emphasize the word "name" over "variable" as I find it important to shake off any mental imagery of a variable as "like a box", which imagery teachers of other languages tend to find useful. Using the word "name" helps to break the hold of "container" which is helpful for understanding how assignment works. Like Steve Holden, another Python teacher I've seen in action a few times, I like to setup a "namespace and object space" distinction, with names pointing to objects. Object space is also "the heap": https://flic.kr/p/DQb8t6 I think it's time to do some new drawings. :-D Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Tue Jul 5 14:29:01 2016 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 5 Jul 2016 11:29:01 -0700 Subject: [Edu-sig] Python as a Second Language (PSL) Message-ID: On Tue, Jul 5, 2016 at 9:14 AM, kirby urner wrote: > > > What's standing out for me is how often Jessica > uses the phrase "just like in math class" or "as > you'd expect from math class". > > Exactly, reminding viewers of "math class" is > as bridge to previous relevant experience for > most, though not all. > > On the other hand, given it's 2016 and scientific calculators still reign supreme in the math classrooms of many schools, I wonder if I'm really barking up the wrong tree. If you look at J-language documentation and teaching materials (jsoftware.com), you'll see a lot of emphasis on "parts of speech". J semantics is learned more like a human language in terms of having nouns and verbs, phrases and sentences. I consider J a "hard language". It's a direct descendant of APL (also by Iverson). When implementing object oriented programming, so many languages use "dot notation". I'm thinking a best way to introduce that is using "parts of speech" the way J does: >>> noun = Thing() # give birth to a new Thing >>> noun.color # adjective 'red' >>> noun.sayhello() # verb 'hello, world' We want students to think of dot notation in a really generic way. Rather than say "object" which comes heavy with technical connotations, why not say "thing" (as in "Internet of Things"). Right away, we think of a "generic thing" as having: (A) in outside (a control surface, the API) (B) an inside (a place for "internal state") (C) attributes - (C.i) adjectives (properties) - (C.ii) verbs (behaviors, abilities, callables methods) - (C.iii) nouns (a thing may contain other things) Should we be integrating "dot notation" within human language classes? I'm thinking PSL or "Python as a second language" might make a good title, alluding to ESL ("English as a Second Language") already in common use. In PSL we're leveraging any knowledge of a human language grammar, with its nouns, verbs and adjectives, to phase in "dot notation" as a syntax. (One could even use PSL to leverage ESL by using Python as something to converse about when teaching English). If math teachers realized that English teachers down the hall were sharing Python as a way of reinforcing the whole idea of "languages" and "grammar", they might start to take notice. There's lots an English teacher might do with Python to weave in a lot of culture and history as well, one we're planted in the humanities. Lets start with Delphi and Mount Parnassus! Human language teachers also care about typography, fonts, glyphs, symbols. That's were ASCII and Unicode come in, but also "translating" e.g. "what does capital Sigma mean?" in typography (as a glyph). In showing a Python loop to explain Sigma, we might claim we're learning PSL, not math, and not even STEM necessarily. The poet Gene Fowler ('Waking the Poet') encouraged English teachers [1] to incorporate HTML into their course material as "more punctuation" (of a kind). HTML / CSS is clearly in the realm of the "printed word" (along with the printing press and book binding). Should ESL teachers take a look at PSL as a tool for teaching English? Is it time to give up on mathematics as the logical place to phase in computer languages? Isn't "math language" a human language and therefore usable in "language class"? In looking at the challenge in this way, I'm clearly influenced by the LEX Institute and their flagship book 'Who Is Fourier?' For those unfamiliar with this excellent tome, it takes the point of view that techniques for learning human languages work well for learning math. Here are some primitive whiteboard style graphics to go with my "PSL" proposal: https://flic.kr/p/JGZkrB https://flic.kr/p/JGZmGn https://flic.kr/p/Jp5Axq This approach pertains to other languages besides Python. It's more a generic approach to OO. What I want to show students is they already know OO if they know English or another human language grammar. It's a matter of mapping the known to the unknown. Starting with "object" as something "on the heap in computer memory" or some such verbiage is making objects seem alien and esoteric, a part of a remote knowledge domain or space governed by computer science. But the whole point of OO was to leverage everyday commonsense notions about "things in general" to make computer programs more expressive. OO was an attempt to mirror how we already think, so that the language would get out of the way and let us focus on the problem at hand. However if we don't hold up the mirror to everyday thinking and point out these connections, will students make those links on their own? Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From sergio_r at mail.com Thu Jul 7 10:37:40 2016 From: sergio_r at mail.com (Sergio Rojas) Date: Thu, 7 Jul 2016 16:37:40 +0200 Subject: [Edu-sig] Edu-sig Digest, Vol 155, Issue 9 In-Reply-To: References: Message-ID: 3. Re: O'Reilly Webcast: Doing Math with Python (Amit Saha) (Sergio Rojas) ---------------------------------------------------------------------- Message: 1 Date: Sun, 26 Jun 2016 19:38:27 +1000 From: Amit Saha To: "edu-sig at python.org" Subject: [Edu-sig] O'Reilly Webcast: Doing Math with Python Message-ID: Content-Type: text/plain; charset=UTF-8 Hi all, ... I have created a GitHub repository (https://github.com/doingmathwithpython/oreilly-webcast-2016[https://github.com/doingmathwithpython/oreilly-webcast-2016][https://github.com/doingmathwithpython/oreilly-webcast-2016[https://github.com/doingmathwithpython/oreilly-webcast-2016]]) which will have the rough transcript, final slides and the code examples as Jupyter Notebooks. Hope you can join me there. Best Wishes, Amit. ------------------------------ Hi Amit, What is needed to successfully run your jupyter notebook "Interactive Mandelbrot Set.ipynb"? When opening, it shows the Mandelbrot picture at the bottom. When executing the cell, nothing shows up. I am using: Python 3.5.1 |Anaconda 4.0.0 (64-bit)| (default, Dec 7 2015, 11:16:01) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux which includes: IPython : 4.1.2 Numpy : 1.10.4 Matplotlib : 1.5.1 Scipy : 0.17.0 Regards, Sergio PD. the other notebooks execute fine ------------------------------ Hi All, I just would like to report that Amit's programs works as advertised on the beta Python distribution from Intel [ https://software.intel.com/en-us/python-distribution ]. Not sure what, but something might be wrong with the Anaconda distribution. Sergio From kirby.urner at gmail.com Sat Jul 9 13:00:26 2016 From: kirby.urner at gmail.com (kirby urner) Date: Sat, 9 Jul 2016 10:00:26 -0700 Subject: [Edu-sig] more follow-up re Pycon / EduSummit In-Reply-To: References: <576AD87D.5050909@ntoll.org> Message-ID: > > > > Did anyone else see The Martian with Tom Hanks? That was hex code that > saved his life. A coded message from NASA perhaps? :-D > > Sorry, not Tom Hanks in that one. Matt Damon. My bad. Mentioned in last paragraph in this blog post too: http://controlroom.blogspot.com/2016/07/base-10-ghetto.html Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From jurgis.pralgauskis at gmail.com Tue Jul 12 23:58:10 2016 From: jurgis.pralgauskis at gmail.com (Jurgis Pralgauskis) Date: Wed, 13 Jul 2016 06:58:10 +0300 Subject: [Edu-sig] Fwd: [Py-wg] How can you help Python in education today? In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: "Carrie Anne Philbin" Date: Jul 12, 2016 8:52 PM Subject: [Pythonedu-wg] How can you help Python in education today? To: I've been distracted lately by all of the work that the micro-python group have been doing to support the BBC micro:bit. Work that continues and needs your support. 1. Work is continuing on Mu the learner focused Python IDE. The team would really appreciate your thoughts and feedback, especially if you work with young people or those new to Python. You can do so here, on another thread or on the Microbit-Python mailing list. 2. Support for teachers/learners. If you need support learning python or teaching with python then why not start a thread here? A wonderful Python community person will help you out. This is a really quick and simply way that members can get involved. They want to help you! 3. Lesson plans, tutorials/resources. Have you written any that you want to share with others? Then share them here with a new thread. Spread the love! 4. Documentation. Recently CodeBoom wrote a really good blog post about the lack of good documentation for python modules that are used in education. Could educators on this list, collate their most used modules that need documenting for those wanting to get started with them. Could others help with this? 5. Education bundle. Dan Pope started a thread sharing his progress on this. Can you provide feedback, ideas, suggestions, a pat on the back, testing opportunities in the future? The moral here is do not let this WG die! Everyone always asks me "how can I get involved?" Educators share your success, failures and frustrations. Community members share your ideas, solutions and good-will. Thanks, Carrie Anne. -- Director of Education Raspberry Pi Foundation UK Charity No. 1129409 www.raspberrypi.org | www.codeclub.org.uk @ | in | *?* _______________________________________________ Pythonedu-wg mailing list Pythonedu-wg at python.org https://mail.python.org/mailman/listinfo/pythonedu-wg -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Wed Jul 13 13:40:35 2016 From: carl.input at gmail.com (Carl Smith) Date: Wed, 13 Jul 2016 18:40:35 +0100 Subject: [Edu-sig] Edu-sig Digest, Vol 156, Issue 7 In-Reply-To: References: Message-ID: Hi Carrie Anne, Adding some screenshots of Mu to its website would be helpful. It's just nice to be able to see what it looks like before you install it. Thanks, -- Carl Smith carl.input at gmail.com On 13 July 2016 at 17:00, wrote: > Send Edu-sig mailing list submissions to > edu-sig at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/edu-sig > or, via email, send a message with subject or body 'help' to > edu-sig-request at python.org > > You can reach the person managing the list at > edu-sig-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Edu-sig digest..." > > Today's Topics: > > 1. Fwd: [Py-wg] How can you help Python in education today? > (Jurgis Pralgauskis) > > > ---------- Forwarded message ---------- > From: Jurgis Pralgauskis > To: "edu-sig at python.org" > Cc: > Date: Wed, 13 Jul 2016 06:58:10 +0300 > Subject: [Edu-sig] Fwd: [Py-wg] How can you help Python in education today? > ---------- Forwarded message ---------- > From: "Carrie Anne Philbin" > Date: Jul 12, 2016 8:52 PM > Subject: [Pythonedu-wg] How can you help Python in education today? > To: > > I've been distracted lately by all of the work that the micro-python group > have been doing to support the BBC micro:bit. Work that continues and needs > your support. > > 1. Work is continuing on Mu the learner focused Python IDE. The team would > really appreciate your thoughts and feedback, especially if you work with > young people or those new to Python. You can do so here, on another thread > or on the Microbit-Python mailing list. > > 2. Support for teachers/learners. If you need support learning python or > teaching with python then why not start a thread here? A wonderful Python > community person will help you out. This is a really quick and simply way > that members can get involved. They want to help you! > > 3. Lesson plans, tutorials/resources. Have you written any that you want > to share with others? Then share them here with a new thread. Spread the > love! > > 4. Documentation. Recently CodeBoom wrote a really good blog post about > the lack of good documentation for python modules that are used in > education. Could educators on this list, collate their most used modules > that need documenting for those wanting to get started with them. Could > others help with this? > > 5. Education bundle. Dan Pope started a thread sharing his progress on > this. Can you provide feedback, ideas, suggestions, a pat on the back, > testing opportunities in the future? > > The moral here is do not let this WG die! Everyone always asks me "how can > I get involved?" Educators share your success, failures and frustrations. > Community members share your ideas, solutions and good-will. > > Thanks, > > Carrie Anne. > > -- > Director of Education > Raspberry Pi Foundation > UK Charity No. 1129409 > > www.raspberrypi.org | www.codeclub.org.uk > @ | in > | *?* > > > > > _______________________________________________ > Pythonedu-wg mailing list > Pythonedu-wg at python.org > https://mail.python.org/mailman/listinfo/pythonedu-wg > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Wed Jul 13 13:53:47 2016 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 13 Jul 2016 10:53:47 -0700 Subject: [Edu-sig] a next edition of a Python for adults course Message-ID: I'm back to teaching another 5 week, 2-meetups/week course for Saisoft.net based in Irvine, CA. My students are eligible for free professional development (PD) in that state. I don't think Oregon has anything similar, not even for teachers. This time, after going over tuple, list, dict, int and bool in some detail, getting the ball rolling on data structures, I turned to "the API economy" and JSON as now readable, given our new knowledge of dicts and lists, and how these embed inside each other to arbitrary depth. I like using collections.namedtuple quite a bit, as a way to set the stage for class semantics. The namedtuple is like an ordinary tuple but you get to name the elements and refer to them with dot notation. # -*- coding: utf-8 -*- """ Created on Thu Jul 12, 2016 @author: kurner LAB: Create the body of add_element, delete_element using the input() function to drive a dialog with the user """ from collections import namedtuple import json Element = namedtuple("Atom", "protons abbrev long_name mass") def load_elements(): global all_elements # <--- will be visible to entire module f = open("elements.json", "r") the_dict = json.load(f) f.close() all_elements = {} for symbol, data in the_dict.items(): all_elements[symbol] = Element(*data) # "explode" data into 4 inputs Here's my outline from last night: # -*- coding: utf-8 -*- """ Created on Tue Jul 12, 2016 Course: PYT-PR (Saisoft.net) Session 03 Instructor: Kirby Urner kirby.urner at gmail.com Audio Check (6:15 PM PDT) Introduction What's an API The "API Economy" Types we've seen: int float string tuple dict list datetime date time timedelta range slice namedtuple Intro to Functions (one type of callable) Intro to File I/O Builtin Data types and JSON Using input() Using "in" to test for membership Lab 1: enhance elements.py with an input() driven API RESTful APIs and HTTP (URLs) Sorting a List (sorted versus sort; reversed vs reverse) Lab 2: install requests 3rd party module 'requests' with conda, explore a movie database API List Comprehension syntax More on functions (how to call them) Lab 3: create a function to nicely format movie info returned by JSON Summary of Session 03 """ I'm also engaged in a parallel effort to educate adults in my region who self organize a volunteer driving religious non-profit (we don't say "church" or "temple" but yeah, like a network of those things): http://worldgame.blogspot.com/2016/07/npym-rest.html Kirby Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From ntoll at ntoll.org Wed Jul 13 14:13:47 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Wed, 13 Jul 2016 19:13:47 +0100 Subject: [Edu-sig] Edu-sig Digest, Vol 156, Issue 7 In-Reply-To: References: Message-ID: <578684DB.6040603@ntoll.org> Hi Carl, I developed Mu. There are lots of things that could be on the website and screenshots are close to the top of my to-do list. Pull requests and contributions are always welcome. The project isn't even a year old so please be patient. N. On 13/07/16 18:40, Carl Smith wrote: > Hi Carrie Anne, > > Adding some screenshots of Mu to its website would be helpful. It's just > nice to be able to see what it looks like before you install it. > > Thanks, > > -- Carl Smith > carl.input at gmail.com > > On 13 July 2016 at 17:00, > wrote: > > Send Edu-sig mailing list submissions to > edu-sig at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/edu-sig > or, via email, send a message with subject or body 'help' to > edu-sig-request at python.org > > You can reach the person managing the list at > edu-sig-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Edu-sig digest..." > > Today's Topics: > > 1. Fwd: [Py-wg] How can you help Python in education today? > (Jurgis Pralgauskis) > > > ---------- Forwarded message ---------- > From: Jurgis Pralgauskis > > To: "edu-sig at python.org " > > > Cc: > Date: Wed, 13 Jul 2016 06:58:10 +0300 > Subject: [Edu-sig] Fwd: [Py-wg] How can you help Python in education > today? > ---------- Forwarded message ---------- > From: "Carrie Anne Philbin" > > Date: Jul 12, 2016 8:52 PM > Subject: [Pythonedu-wg] How can you help Python in education today? > To: > > > I've been distracted lately by all of the work that the micro-python > group have been doing to support the BBC micro:bit. Work that > continues and needs your support. > > 1. Work is continuing on Mu the learner focused Python IDE. The team > would really appreciate your thoughts and feedback, especially if > you work with young people or those new to Python. You can do so > here, on another thread or on the Microbit-Python mailing list. > > 2. Support for teachers/learners. If you need support learning > python or teaching with python then why not start a thread here? A > wonderful Python community person will help you out. This is a > really quick and simply way that members can get involved. They want > to help you! > > 3. Lesson plans, tutorials/resources. Have you written any that you > want to share with others? Then share them here with a new thread. > Spread the love! > > 4. Documentation. Recently CodeBoom wrote a really good blog post > about the lack of good documentation for python modules that are > used in education. Could educators on this list, collate their most > used modules that need documenting for those wanting to get started > with them. Could others help with this? > > 5. Education bundle. Dan Pope started a thread sharing his progress > on this. Can you provide feedback, ideas, suggestions, a pat on the > back, testing opportunities in the future? > > The moral here is do not let this WG die! Everyone always asks me > "how can I get involved?" Educators share your success, failures and > frustrations. Community members share your ideas, solutions and > good-will. > > Thanks, > > Carrie Anne. > > -- > Director of Education > Raspberry Pi Foundation > UK Charity No. 1129409 > > www.raspberrypi.org | > www.codeclub.org.uk > @ | in > | *?* > > > > > _______________________________________________ > Pythonedu-wg mailing list > Pythonedu-wg at python.org > https://mail.python.org/mailman/listinfo/pythonedu-wg > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > > > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From carl.input at gmail.com Wed Jul 13 18:23:11 2016 From: carl.input at gmail.com (Carl Smith) Date: Wed, 13 Jul 2016 23:23:11 +0100 Subject: [Edu-sig] Edu-sig Digest, Vol 156, Issue 7 In-Reply-To: References: Message-ID: Just tried contributing to Mu, and was ridiculed by Nicholas Tollervey, so wont be bothering with it now. It would have been an interesting project. I've taught Python professionally, and developed very similar tools before, so it's exactly the type of thing I normally enjoy working on. The frosty welcome from Tollervey was a bit too much though. Best, -- Carl Smith carl.input at gmail.com On 13 July 2016 at 18:40, Carl Smith wrote: > Hi Carrie Anne, > > Adding some screenshots of Mu to its website would be helpful. It's just > nice to be able to see what it looks like before you install it. > > Thanks, > > -- Carl Smith > carl.input at gmail.com > > On 13 July 2016 at 17:00, wrote: > >> Send Edu-sig mailing list submissions to >> edu-sig at python.org >> >> To subscribe or unsubscribe via the World Wide Web, visit >> https://mail.python.org/mailman/listinfo/edu-sig >> or, via email, send a message with subject or body 'help' to >> edu-sig-request at python.org >> >> You can reach the person managing the list at >> edu-sig-owner at python.org >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of Edu-sig digest..." >> >> Today's Topics: >> >> 1. Fwd: [Py-wg] How can you help Python in education today? >> (Jurgis Pralgauskis) >> >> >> ---------- Forwarded message ---------- >> From: Jurgis Pralgauskis >> To: "edu-sig at python.org" >> Cc: >> Date: Wed, 13 Jul 2016 06:58:10 +0300 >> Subject: [Edu-sig] Fwd: [Py-wg] How can you help Python in education >> today? >> ---------- Forwarded message ---------- >> From: "Carrie Anne Philbin" >> Date: Jul 12, 2016 8:52 PM >> Subject: [Pythonedu-wg] How can you help Python in education today? >> To: >> >> I've been distracted lately by all of the work that the micro-python >> group have been doing to support the BBC micro:bit. Work that continues and >> needs your support. >> >> 1. Work is continuing on Mu the learner focused Python IDE. The team >> would really appreciate your thoughts and feedback, especially if you work >> with young people or those new to Python. You can do so here, on another >> thread or on the Microbit-Python mailing list. >> >> 2. Support for teachers/learners. If you need support learning python or >> teaching with python then why not start a thread here? A wonderful Python >> community person will help you out. This is a really quick and simply way >> that members can get involved. They want to help you! >> >> 3. Lesson plans, tutorials/resources. Have you written any that you want >> to share with others? Then share them here with a new thread. Spread the >> love! >> >> 4. Documentation. Recently CodeBoom wrote a really good blog post about >> the lack of good documentation for python modules that are used in >> education. Could educators on this list, collate their most used modules >> that need documenting for those wanting to get started with them. Could >> others help with this? >> >> 5. Education bundle. Dan Pope started a thread sharing his progress on >> this. Can you provide feedback, ideas, suggestions, a pat on the back, >> testing opportunities in the future? >> >> The moral here is do not let this WG die! Everyone always asks me "how >> can I get involved?" Educators share your success, failures and >> frustrations. Community members share your ideas, solutions and good-will. >> >> Thanks, >> >> Carrie Anne. >> >> -- >> Director of Education >> Raspberry Pi Foundation >> UK Charity No. 1129409 >> >> www.raspberrypi.org | www.codeclub.org.uk >> @ | in >> | *?* >> >> >> >> >> _______________________________________________ >> Pythonedu-wg mailing list >> Pythonedu-wg at python.org >> https://mail.python.org/mailman/listinfo/pythonedu-wg >> >> >> _______________________________________________ >> Edu-sig mailing list >> Edu-sig at python.org >> https://mail.python.org/mailman/listinfo/edu-sig >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Wed Jul 13 20:22:37 2016 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 13 Jul 2016 17:22:37 -0700 Subject: [Edu-sig] Edu-sig Digest, Vol 156, Issue 7 In-Reply-To: References: Message-ID: I've you mean what's posted here, I'm not reading much into it. The Microbit hardware is not accessible in the US right now so I'm staying out of it. Anyway my own forte isn't low-level hardware "make the lights blink" coding in the first place, beyond some dinking around in assembler. You have different experience no doubt. Python is what we used to call a VHLL (very high level language) and using it to talk to devices seemed crazy at first. But when it comes to building tiny bytecode scripts that run on a chip, there's no reason a VHLL can't play. It just needn't expect to run on the target. That being said, my friend Patrick has an entire image analysis program on a Pi in a bazooka-shaped snake trap that recognizes pythons. His target application is the Florida Everglades into which pet owners released no-longer-wanted pythons. The ecosystem was unprepared and is now seriously out of whack. It's a judgment call whether humans should insert themselves, but then this was their doing in the first place. http://controlroom.blogspot.com/2016/02/python-versus-python.html Patrick and I are both python owners and were both Python teachers for O'Reilly. It's not that we don't respect wildlife. Just making traps does not imply an overall policy of "genocide" or anything like that. Anyway, interesting project. The Pi is too power-hungry even in sleep mode to listen for a snake, so an Arduino gets that job. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Wed Jul 13 20:23:41 2016 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 13 Jul 2016 17:23:41 -0700 Subject: [Edu-sig] Edu-sig Digest, Vol 156, Issue 7 In-Reply-To: References: Message-ID: On Wed, Jul 13, 2016 at 5:22 PM, kirby urner wrote: > > I've you mean what's posted here, I'm not reading much into it. > Sorry, "If you mean..." ... my English decays as the day wears on, plus I'm pre-occupied... excuses excuses. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From ntoll at ntoll.org Thu Jul 14 03:41:42 2016 From: ntoll at ntoll.org (Nicholas H.Tollervey) Date: Thu, 14 Jul 2016 08:41:42 +0100 Subject: [Edu-sig] Edu-sig Digest, Vol 156, Issue 7 In-Reply-To: References: Message-ID: <57874236.5030905@ntoll.org> Hi Carl, On 13/07/16 23:23, Carl Smith wrote: > Just tried contributing to Mu, and was ridiculed by Nicholas Tollervey, > so wont be bothering with it now. > If that's how I made you feel, them I'm sorry. Nevertheless, I'm trying to work out how asking for evidence could be construed as ridicule. I was trying to set out the scope of Mu, why we made the UX design decisions we did when building Mu, what I would need in order to accept changes and tried (but obviously failed) to strike a pleasant and welcoming tone. > It would have been an interesting project. I've taught Python > professionally, and developed very similar tools before, so it's exactly > the type of thing I normally enjoy working on. The frosty welcome from > Tollervey was a bit too much though. > For the benefit of everyone else, the full exchange and my "frosty" response can be found here: https://github.com/ntoll/mu/issues/116 I'd encourage people to read it and make up their own mind. I'm trying to work out how asking for evidence can be construed as "frosty". You stated that you thought the editor was childish, you mention minimalism without explaining what you meant and you criticised our UX design decisions. Of course I'm going to ask for evidence. What else did you expect? Finally, making this personal by singling me out and casting aspersions in a public mailing list makes me *very* uncomfortable and is not a nice thing to do. As I mentioned at the start, if I made you feel like you were being ridiculed, then I apologise - but it is unacceptable to make ad hominem attacks on people simply because they've asked you for evidence to back up your brief and undeveloped assertions in a ticket. Finally, and for the record, we welcome feedback, both good and bad, from anyone no matter who they are. As we mention in our "contributing" statement (https://github.com/ntoll/mu/blob/master/CONTRIBUTING.rst), we expect people to follow the PSF's code of conduct, engage with respect, humour and intelligence and to expect robust yet respectful feedback. I trust that, in future, you will bear this in mind. Best wishes, Nicholas. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: From naomi.ceder at gmail.com Thu Jul 14 15:21:02 2016 From: naomi.ceder at gmail.com (Naomi Ceder) Date: Thu, 14 Jul 2016 14:21:02 -0500 Subject: [Edu-sig] Edu-sig Digest, Vol 156, Issue 7 In-Reply-To: <57874236.5030905@ntoll.org> References: <57874236.5030905@ntoll.org> Message-ID: This would probably be a good time (as a list moderator) to remind everyone to keep things respectful and kind. Personal attacks are never allowed. From anyone. Full stop. Regards, Naomi On 14 July 2016 at 02:41, Nicholas H.Tollervey wrote: > Hi Carl, > > On 13/07/16 23:23, Carl Smith wrote: > > Just tried contributing to Mu, and was ridiculed by Nicholas Tollervey, > > so wont be bothering with it now. > > > > If that's how I made you feel, them I'm sorry. > > Nevertheless, I'm trying to work out how asking for evidence could be > construed as ridicule. I was trying to set out the scope of Mu, why we > made the UX design decisions we did when building Mu, what I would need > in order to accept changes and tried (but obviously failed) to strike a > pleasant and welcoming tone. > > > It would have been an interesting project. I've taught Python > > professionally, and developed very similar tools before, so it's exactly > > the type of thing I normally enjoy working on. The frosty welcome from > > Tollervey was a bit too much though. > > > > For the benefit of everyone else, the full exchange and my "frosty" > response can be found here: > > https://github.com/ntoll/mu/issues/116 > > I'd encourage people to read it and make up their own mind. > > I'm trying to work out how asking for evidence can be construed as > "frosty". You stated that you thought the editor was childish, you > mention minimalism without explaining what you meant and you criticised > our UX design decisions. > > Of course I'm going to ask for evidence. What else did you expect? > > Finally, making this personal by singling me out and casting aspersions > in a public mailing list makes me *very* uncomfortable and is not a nice > thing to do. > > As I mentioned at the start, if I made you feel like you were being > ridiculed, then I apologise - but it is unacceptable to make ad hominem > attacks on people simply because they've asked you for evidence to back > up your brief and undeveloped assertions in a ticket. > > Finally, and for the record, we welcome feedback, both good and bad, > from anyone no matter who they are. As we mention in our "contributing" > statement (https://github.com/ntoll/mu/blob/master/CONTRIBUTING.rst), we > expect people to follow the PSF's code of conduct, engage with respect, > humour and intelligence and to expect robust yet respectful feedback. > > I trust that, in future, you will bear this in mind. > > Best wishes, > > Nicholas. > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > > -- Naomi Ceder https://plus.google.com/u/0/111396744045017339164/about -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Mon Jul 18 17:30:30 2016 From: kirby.urner at gmail.com (kirby urner) Date: Mon, 18 Jul 2016 14:30:30 -0700 Subject: [Edu-sig] teaching Python 3.5 in 2016: snapshot Message-ID: I'm prepping for class tomorrow, as a Python instructor for employed adults eligible for California State funded professional development electives, not for college credit but career-relevant nonetheless. My approach is to use collections.namedtuple to show the tuple (a sequence type, like a list) having its "slots" accessed via dot notation, not just through indexing, then swapping in an equivalent class that does the same thing (down to having __getitem__ in some examples). Seeing how a class duplicates features we've already introduced, makes a nice bridge to "defining your own types" (vs using the __builtins__ or standard library types). Once with have dicts and lists introduced, near the start, we're ready to talk about JSON already, which brings in early previews of web services, APIs, inter-operability with JavaScript (ES) and of course MongoDB. I just use json module to store .json files, as soon as we get to the function open( ), i.e. here's a first example of Talking about Python in the context of getting between a browser and a database or persistent storage, gets the juices flowing about "an ecosystem". These two source code files show off the web API angle, using an open API to get IMDB information (movie database): https://github.com/4dsolutions/Python5/blob/master/get_movie.py https://github.com/4dsolutions/Python5/blob/master/get_movie_v2.py Here's another example, going from namedtuple Element (for Periodic Table atoms), to class-based Element: namedtuple: https://github.com/4dsolutions/Python5/blob/master/elements_02.py class based: https://github.com/4dsolutions/Python5/blob/master/elements_04.py Actually running these would require the *.json files, both included in the repo: elements_v1.json elements_v2.json Next stop: SQLite and try / except syntax. Kirby PS: I'm pushing Pyret pretty seriously even though it's very much the moving target. Follow the action on Twitter @4DsolutionsPDX python-cuba working group also going well. Py2017 shaping up. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Thu Jul 21 17:02:51 2016 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 21 Jul 2016 14:02:51 -0700 Subject: [Edu-sig] teaching Python 3.5 in 2016: snapshot In-Reply-To: References: Message-ID: My "arc" (trajectory) for teaching Python is something like: >>> dir() >>> dir(__builtins__) >>> type(3) >>> type('A') >>> import math ... using Python as a calculator and wordprocessor, including file i/o (open, close, 'r' 'w' 'a') >>> list, tuple, dict >>> immutability vs. mutability, explaining how ([], []) is an immutable "containing" mutables. >>> import collections.namedtuple ... dot notation access to Atom(protons=, symbol=, long_name=, mass=) talk about APIs as: car dashboard (driverless car controversies); web APIs (point to API companies like Apigee, Google, programmable web). Linking Object.verb() and Object.noun to API concept also (docstrings = owner's manual / user's manaul -- but not a repair manual, which is for #comments in source code and tests). tell stories about Browser Wars, emergence of browser as universal client, HTTP as API, RESTful vs SOAP web services, play with existing APIs that return JSON >>> string formatting with new mini-language feature set >>> def function() notation, arguments vs parameters *args, **kwargs as either >>> save function objects to a list, show functions as top-level, lambda syntax >>> class Element: that mimics namedtuple Atom. Compare side-by-side >>> composer.py (introduce operator overloading) now show how "namedtuple" API may be duplicated using __getitem__ >From here on, we're prepared to use special names (or "__ribs__" as I sometimes call them) as a way to talk about APIs. E.g. * the iterator protocol around __next__ and __iter__ may now be presented using classes. * Context managers (__enter__, __exit__) * Descriptors (__set__ and __get__) We'll get to some of these below, after decorator syntax... >>> inheritance, MRO (method resolution order) >>> old fashioned menu-driven API based in input() to do CRUD against all_elements # <--- this is where I'm at in the current 5-week course I'm teaching >>> annotations What I call "grand unification" is up ahead where we show how a context manager mayb be built with generator as a decorator. Haven't gotten there yet with this class. That's almost black belt, like maybe brown. ==== Looking ahead to tonight's class, reviewing the bridge we've just crossed... # -*- coding: utf-8 -*- """ Created on Thu Jul 21 12:47:03 2016 @author: Kirby Urner side-by-side namedtuple and class Atom (namedtuple) and Element (a non-builtin class) work as clones of one another, meaning the loader function and reporting function are agnostic as to which type to use when building all_elements, a global dictionary of Periodic Table information. """ from collections import namedtuple import json Atom = namedtuple("Atom", "protons symbol long_name mass series") # imagine # http://inventory.earth/elements?symbol="He" # pulling from a DB # using a 'rich data structure' # http://grokbase.com/t/python/edu-sig/0676rrx2n0/rich-data-structure # https://mail.python.org/pipermail/edu-sig/2006-June/006609.html json_data = """{ "He": [2, "He", "Helium", 4.002602, "Nobel gas"], "C": [6, "C", "Carbon", 12.0107, "Noble gas"], "Na": [11, "Na", "Sodium", 22.98976928, "Alkali metal"], "H": [1, "H", "Hydrogen", 1.00794, "Other nonmetal"], "Ne": [10, "Ne", "Neon", 20.1797, "Noble gas"], "Si": [14, "Si", "Silicon", 28.0855, "Metalloid"], "Li": [3, "Li", "Lithium", 6.941, "Alkali metnal"], "F": [9, "F", "Fluorine", 18.9984032, "Metalloid"], "Be": [4, "Be", "Beryllium", 9.012182, "Alkaline earth metal"], "O": [8, "O", "Oxygen", 15.9994, "Other nonmetal"], "Mg": [12, "Mg", "Magnesium", 24.3050, "Alkaline earth metal"], "Al": [13, "Al", "Aluminum", 26.9815386, "Post-transition metal"], "N": [7, "N", "Nitrogen", 14.0067, "Other nonmetal"], "B": [5, "B", "Boron", 10.811, "Metalloid"] }""" class Element: fields = "protons symbol long_name mass series" repstr = ("Atom(protons={protons}, symbol='{symbol}', " "long_name='{long_name}', " "mass={mass}, series='{series}')") def __init__(self, protons: int, symbol: str, long_name: str, mass: float, series: str): # build self.__dict__ self.protons = protons self.symbol = symbol self.long_name = long_name self.__dict__['mass'] = mass # same idea self.series = series def __getitem__(self, idx): return self.__dict__[self.fields[idx]] def __repr__(self): return self.repstr.format(**self.__dict__) def loader(target): """ create a dict all_elements of either: target = "tuples" : namedtuples of type Atom or... target = "instances" : instances of Element class """ global all_elements all_elements = {} the_dict = json.loads(json_data) # json_data is a global for key, value in the_dict.items(): if target == "tuples": all_elements[key] = Atom(*value) # explode list object if target == "instances": all_elements[key] = Element(*value) # explode list object def print_periodic_table(): """ sort all_elements by number of protons, ordered_elements local only What about series? """ ordered_elements = sorted(all_elements.values(), key = lambda k: k.protons) print("PERIODIC TABLE OF THE ELEMENTS") print("-" * 70) print("Symbol |Long Name |Protons |Mass |Series " ) print("-" * 70) for the_atom in ordered_elements: print("{:6} | {:20} | {:6} | {:5.2f} | {:15}".format(the_atom.symbol, the_atom.long_name, the_atom.protons, the_atom.mass, the_atom.series)) if __name__ == "__main__": # loader("tuples") loader("instances") print_periodic_table() OUTPUT in REPL: >>> boron = all_elements["B"] >>> type(boron) __main__.Element >>> boron Atom(protons=5, symbol='B', long_name='Boron', mass=10.811, series='Metalloid') >>> print_periodic_table() PERIODIC TABLE OF THE ELEMENTS ---------------------------------------------------------------------- Symbol |Long Name |Protons |Mass |Series ---------------------------------------------------------------------- H | Hydrogen | 1 | 1.01 | Other nonmetal He | Helium | 2 | 4.00 | Nobel gas Li | Lithium | 3 | 6.94 | Alkali metnal Be | Beryllium | 4 | 9.01 | Alkaline earth metal B | Boron | 5 | 10.81 | Metalloid C | Carbon | 6 | 12.01 | Noble gas N | Nitrogen | 7 | 14.01 | Other nonmetal O | Oxygen | 8 | 16.00 | Other nonmetal F | Fluorine | 9 | 19.00 | Metalloid Ne | Neon | 10 | 20.18 | Noble gas Na | Sodium | 11 | 22.99 | Alkali metal Mg | Magnesium | 12 | 24.30 | Alkaline earth metal Al | Aluminum | 13 | 26.98 | Post-transition metal Si | Silicon | 14 | 28.09 | Metalloid -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Thu Jul 21 22:00:38 2016 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 21 Jul 2016 19:00:38 -0700 Subject: [Edu-sig] teaching Python 3.5 in 2016: snapshot Message-ID: apologies for formatting, striving for better readability this time... not repeating the source code, just the other part. Reformatted: ----------- From: kirby urner Date: Thu, Jul 21, 2016 at 2:02 PM Subject: Re: teaching Python 3.5 in 2016: snapshot To: "edu-sig at python.org" My "arc" (trajectory) for teaching Python is something like: >>> dir() >>> dir(__builtins__) >>> type(3) >>> type('A') >>> import math ... using Python as a calculator and wordprocessor, including file i/o (open, close, 'r' 'w' 'a') >>> list, tuple, dict >>> immutability vs. mutability, explaining how ([], []) is an immutable "containing" mutables. >>> import collections.namedtuple ... dot notation access to Atom(protons=, symbol=, long_name=, mass=) talk about APIs as: car dashboard (driverless car controversies); web APIs (point to API companies like Apigee, Google, programmable web). Linking Object.verb() and Object.noun to API concept also (docstrings = owner's manual / user's manaul -- but not a repair manual, which is for #comments in source code and tests). tell stories about Browser Wars, emergence of browser as universal client, HTTP as API, RESTful vs SOAP web services, play with existing APIs that return JSON >>> string formatting with new mini-language feature set >>> def function() notation, arguments vs parameters ... *args, **kwargs as either >>> save function objects to a list, show functions as ... top-level, lambda syntax >>> class Element: that mimics namedtuple Atom. .... Compare side-by-side >>> composer.py (introduce operator overloading) now show how "namedtuple" API may be duplicated using __getitem__ >From here on, we're prepared to use special names (or "__ribs__" as I sometimes call them) as a way to talk about APIs. E.g. * the iterator protocol around __next__ and __iter__ may now be presented using classes. * Context managers (__enter__, __exit__) * Descriptors (__set__ and __get__) We'll get to some of these below, after decorator syntax... >>> inheritance, MRO (method resolution order) >>> old fashioned menu-driven API based in input() to do ....CRUD against all_elements # <--- this is where I'm at in the current 5-week course I'm teaching >>> annotations What I call "grand unification" is up ahead where we show how a context manager maybe be built with generator as a decorator. Haven't gotten there yet with this class. That's almost black belt, like maybe brown. ==== -------------- next part -------------- An HTML attachment was scrubbed... URL: From ccosse at gmail.com Fri Jul 22 16:26:37 2016 From: ccosse at gmail.com (=?UTF-8?Q?Charles_Coss=C3=A9?=) Date: Fri, 22 Jul 2016 13:26:37 -0700 Subject: [Edu-sig] teaching Python 3.5 in 2016: snapshot In-Reply-To: References: Message-ID: Hi Kirby & Edu-sig, I?ve just returned from a year-long assignment abroad where I wrangled Django/Python and JavaScript systems for the Government of Guyana. As a side project I also taught an 8 week course on WebApp development to the GIS division of their Geology and Mines Commission. I?d like to briefly tell about that course and an approach that worked really well. The ?approach? that worked so well was to have a colleague performing live development on a laptop, projected on a screen, while I did the talking. Backing up just a bit, the original invitation was wide-open and amounted to ?teach the group something useful? in 8 weeks -- 2x per week from 5-8pm. The group was 17 GIS professionals with no programming experience. I?d never taught an actual class on software development, either, so it was an experiment. I had just a few days to propose and prepare. What I decided to do was ?drag? the group through the process of developing a GIS web application. We used GitHub and started with a blank page. We used pure, static JavaScript, in the end, thus avoiding the Django (Python) server aspect altogether. We incorporated GIS by using OpenLayers and features stored in GeoJSON files. But the team teaching aspect is the point of this post. Not every teacher can have the luxury of a like-minded programmer anticipating their next thought and coding-it-up live while you narrate, but wow! did that ever work well. I am convinced that it enabled us to cover much more material in the short time that we had available, as well as exposing students to every aspect of the development process along the way. We thought out-loud, discussed design and implementation as a group, on and on, with the advantage of my colleague on the projected laptop, able to demonstrate the effects of certain alternatives etc.. That?s about it. This technique would, of course, work for teaching any programming language, namely Python. You can see what we developed here , and you can play the actual game here (it?s a geography scavenger hunt game, btw).? Given the importance of the web and the similarities between Python and JavaScript, especially transferring data via JSON, I cannot imagine teaching one without the other. Although our 8 weeks was not enough to get much into Python, we did port several small exercises between JavaScript and Python to emphasize their similarities. Happy programming, Charles Coss??? http://ccosse.github.io/ On Mon, Jul 18, 2016 at 2:30 PM, kirby urner wrote: > > I'm prepping for class tomorrow, as a Python instructor for employed > adults eligible for California State funded professional development > electives, not for college credit but career-relevant nonetheless. > > My approach is to use collections.namedtuple to show the tuple (a > sequence type, like a list) having its "slots" accessed via dot notation, > not just through indexing, then swapping in an equivalent class that > does the same thing (down to having __getitem__ in some > examples). > > Seeing how a class duplicates features we've already introduced, > makes a nice bridge to "defining your own types" (vs using the > __builtins__ or standard library types). > > Once with have dicts and lists introduced, near the start, we're > ready to talk about JSON already, which brings in early previews > of web services, APIs, inter-operability with JavaScript (ES) and > of course MongoDB. > > I just use json module to store .json files, as soon as we get to the > function open( ), i.e. here's a first example of > > Talking about Python in the context of getting between a browser > and a database or persistent storage, gets the juices flowing about > "an ecosystem". > > These two source code files show off the web API angle, using > an open API to get IMDB information (movie database): > > https://github.com/4dsolutions/Python5/blob/master/get_movie.py > > https://github.com/4dsolutions/Python5/blob/master/get_movie_v2.py > > Here's another example, going from namedtuple Element > (for Periodic Table atoms), to class-based Element: > > namedtuple: > > https://github.com/4dsolutions/Python5/blob/master/elements_02.py > > class based: > > https://github.com/4dsolutions/Python5/blob/master/elements_04.py > > Actually running these would require the *.json files, both included in > the repo: > > elements_v1.json > elements_v2.json > > Next stop: SQLite and try / except syntax. > > Kirby > > PS: I'm pushing Pyret pretty seriously even though it's very much > the moving target. > > Follow the action on Twitter @4DsolutionsPDX > > python-cuba working group also going well. Py2017 shaping up. > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From farrellbb at gmail.com Mon Jul 25 06:36:34 2016 From: farrellbb at gmail.com (Bernie Farrell) Date: Mon, 25 Jul 2016 11:36:34 +0100 Subject: [Edu-sig] Teaching Python through ipads Message-ID: Hi there, I am planning to teach Python to second level students in Ireland using Apple iPads. Any suggestions on the best platform, environment to use? I've looked at Trinket but not sure about it, it has to be free! Appreciate any help, Thanks, Bernie -------------- next part -------------- An HTML attachment was scrubbed... URL: From funcalculus at gmail.com Tue Jul 26 00:43:31 2016 From: funcalculus at gmail.com (Peter Farrell) Date: Mon, 25 Jul 2016 21:43:31 -0700 Subject: [Edu-sig] Presentation on Learning Math with Python Message-ID: Hello! The Bay Area Python Interest Group invited me to speak at LinkedIn last Thursday about using Python in math education. They asked that I work in something about the Raspberry Pi, which (as the organizer of the SF Peninsula Raspberry Pi Meetup group) I took as an invitation to overdo it. So I loaded all my programs on my Pi 3 and did the whole presentation on it: the slides, my Python programs, a web search and my Minecraft maze and big honkin' pyramid. People liked the visual, interactive, 3D stuff I showed them but they seemed particularly blown away that I did the whole presentation on a Pi. They made me hold it up afterwards to prove it. [image: Inline image 1] Yes, that's the 2D cellular automaton from page 172 of Wolfram's New Kind of Science, in Minecraft. LinkedIn was recording it but they said it'll be a while before they post it. My colleague Ken Hawthorne was filming, too, and has posted his video here . Long story short, showing off is fun but I'd love to work with math teachers and help them incorporate Python programming into all their math lessons. And when they get some experience under their belt they'll be able to do more challenging explorations like fractals, cellular automata and 3D graphics. I never said it's going to be easy, but it can be more rewarding and meaningful than the way I learned math back in the day. Let me know what you think! Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 580309 bytes Desc: not available URL: From kirby.urner at gmail.com Wed Jul 27 13:57:06 2016 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 27 Jul 2016 10:57:06 -0700 Subject: [Edu-sig] (no subject) Message-ID: Here was my Lesson 07 of 10 for Saisoft.net (July 2016). I've been doing a series of Python courses for them, as shown in earlier postings to this archive. In a followup post, I'll list some of the Jupyter Notebooks we toured, plus the one I've developed for MathFuture (a Google Goup). I'm finding this a fruitful approach: * start with Anaconda distro * use Spyder for IDE but also demonstrate "bare command line + vim" type dev styles * take Python fluency developed in Spyder and copy-paste-adapt to Jupyter Notebooks * go back to IDE, but keep using JN. I show the Raspberry Pi as a physical device on camera and suggest getting one, case might be 3D printed. We don't actually try making the Pi join us on zoom.us (our multimedia teaching platform), but that's an experiment I might try. I refer to the REPL as my "chalk board", "scratch sheet", "doodle pad","chat window" (chatting with Python) as well as my "repl" The editor window is more self explanatory. Spyder gives us the green Run Arrow to merge "__main__" with the doodle pad's namespace. Useful to write scripts, run, then doodle with the created functions and classes. For semantics I go: * basic primitives, including datatypes, dir() help() type() * functions along with ** and * * collections.namedtuple --> explicit class-based version * classes, inheritance * instance, class, static methods (sans decorator) * generators, decorators, context managers, descriptors But always with spiraling i.e. we keep going back to the beginning and iterating through a bunch of stuff. Kirby # -*- coding: utf-8 -*- """ Created on Tue Jul 26, 2016 Course: PYT-PR (Saisoft.net) Session 07 Kirby Urner Instructor: kirby.urner at gmail.com @thekirbster Audio Check (6:15 PM PDT) Introduction: Python's Pillar Communities (three of many) web developers API (Django, Web2py, Flask, Pyramid...) STEM professionals (Anaconda / scipy / Enthought...) Animation / Graphics (pillow, Blender, vpython, pi3d) Continuing from last week: Example API: File Type Objects (returned by open()) Types: filetype, enumerate, sys, sys.argv Writing a command line utility LAB 1: write utility to print python source to console w/ line numbers Shifting gears... Jupyter Notebooks (come for free with Anaconda distro) ($ pip install will get you there too) Periodic Table in Jupyter Notebook http://nbviewer.jupyter.org/... github/4dsolutions/Python5/blob/master/Atoms%20in%20Python.ipynb LAB 2: get 'Atoms R Us' NB running on your localhost unittest and the importance of unit testing (PyUnit from JUnit) pytest, nose.... 3rd party offerings are great too! LAB 3: add more unittesting methods to Atoms R Us and/or adapt the Movie Database API code to Jupyter context Tour of more Jupyter Notebooks with hints of upcoming topics (decorator @) (generator yield) (with) Summary of Session 07 """ -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Wed Jul 27 14:06:02 2016 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 27 Jul 2016 11:06:02 -0700 Subject: [Edu-sig] interesting Jupyter Notebooks useful for teaching Python (on Github) Message-ID: http://nbviewer.jupyter.org/github/4dsolutions/Python5/blob/master/Atoms%20in%20Python.ipynb (Atom class ideas) http://nbviewer.jupyter.org/github/4dsolutions/Python5/blob/master/Pi%20Day%20Fun.ipynb (tau stuff) http://nbviewer.jupyter.org/github/4dsolutions/Python5/blob/master/Polyhedrons%20101.ipynb (linear algebra) http://nbviewer.jupyter.org/github/4dsolutions/tetravolumes/blob/master/Computing%20Volumes.ipynb (philosophy for physics majors) http://nbviewer.jupyter.org/github/4dsolutions/Python5/blob/master/STEM%20Mathematics.ipynb (sphere packing stuff) Take off the nbview viewer prefix and use just use the github part to access the raw materials. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Wed Jul 27 14:55:25 2016 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 27 Jul 2016 11:55:25 -0700 Subject: [Edu-sig] Curriculum Outline (was: no subject) Message-ID: Sorry about the missing subject line. Also I forgot try / except -- this outline was incomplete: For semantics I go: > * basic primitives, including datatypes, dir() help() type() > * functions along with ** and * > * control structures (for/else, while/else, if/elif/else, try/except/finally/else) > * collections.namedtuple --> explicit class-based version > * classes, inheritance > * instance, class, static methods (sans decorator) > * generators, decorators, context managers, descriptors > * some other stuff I'm sure I'm forgetting :-D Here's my class outline for Session 06 to give a better idea of the pacing (we meet twice a week, small class size). We didn't get to Lab 3 which is why 07 started with it. Usually I have three 20 minute labs and up to three 5 minute breaks per 4 hour session. We have live scrolling chat window. I generally keep cameras off except the one on me, so they have a small postage stamp talking head and then the coding surface as center stage. I can highlight and circle with graphics widgets but mostly just use the mouse to make chunks or lines turn color. See also: https://mail.python.org/pipermail/edu-sig/2016-July/011503.html # -*- coding: utf-8 -*- """ Created on Thur Jul 21, 2016 Course: PYT-PR (Saisoft.net) Session 06 Instructor: Kirby Urner kirby.urner at gmail.com @thekirbster Audio Check (6:15 PM PDT) Introduction: API: control surface, interface Web API: web services (REST vs SOAP) Python types: API may use special names __ribs__ __ribs__: __getitem__, __init__, __repr__, __call__, __dict__ Side-by-side: namedtuple versus class (same API) A menu-driven application (Periodic Table): modules importing modules input validation techniques LAB 1: user selects which column to order by when printing (Requires a submenu of column choices) classes (same as types): inheritance instance methods versus class methods versus static methods LAB 2: keep track of heros and monsters using class-level dict Example API: datetime.timedelta Example API: File Type Objects (returned by open()) Types: filetype, enumerate, sys sys.argv Writing a command line utility LAB 3: print any Python .py (source code) file with line numbers Summary of Session 06 """ -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Wed Jul 27 14:59:23 2016 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 27 Jul 2016 11:59:23 -0700 Subject: [Edu-sig] teaching Python 3.5 in 2016: snapshot In-Reply-To: References: Message-ID: On Fri, Jul 22, 2016 at 1:26 PM, Charles Coss? wrote: << SNIP >> Thank you for this most interesting post Charles! > But the team teaching aspect is the point of this post. Not every teacher > can have the luxury of a like-minded programmer anticipating their next > thought and coding-it-up live while you narrate, but wow! did that ever > work well. > This is an exciting suggestion. What I want to experiment a lot more with is "two instructors conversing" as the primary audio stream, more like a sportscast with two anchors, very typical on TV. The dialog / banter / conversational aspects come through so much better than listening to a single lecturer basically talk to him or her self. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From ccosse at gmail.com Thu Jul 28 18:21:28 2016 From: ccosse at gmail.com (=?UTF-8?Q?Charles_Coss=C3=A9?=) Date: Thu, 28 Jul 2016 15:21:28 -0700 Subject: [Edu-sig] teaching Python 3.5 in 2016: snapshot In-Reply-To: References: Message-ID: On Wed, Jul 27, 2016 at 11:59 AM, kirby urner wrote: > > Thank you for this most interesting post Charles! > Glad to catch your interest! > > >> But the team teaching aspect is the point of this post. Not every >> teacher can have the luxury of a like-minded programmer anticipating their >> next thought and coding-it-up live while you narrate, but wow! did that >> ever work well. >> > > This is an exciting suggestion. > > What I want to experiment a lot more with is "two instructors conversing" > as the primary audio stream, more like a sportscast with two anchors, very > typical on TV. The dialog / banter / conversational aspects come through > so much better than listening to a single lecturer basically talk to him or > her self. > Yes, the back-and-forth can be priceless. Off-the-cuff programmer humor, true emotions, like you say, "sportscast style". It's so much more laid-back, you know, because there's already two people carrying-on a casual conversation about the material, so it's easier for students to speak-up and participate in that context. Mucho potencial! Kirby > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Fri Jul 29 01:39:38 2016 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 28 Jul 2016 22:39:38 -0700 Subject: [Edu-sig] more pythonic andragogy... Message-ID: What I like about the appended module is it exercises constructs in a somewhat meaningless fashion that nevertheless has a story, a strong metaphor. We're in a spooky castle and want to leave having guessed a Python keyword, hidden in self.__xyjk during initialization. If we guess it right in five tries, an exception is raised, but one signalling we're victorious, and so the __exit__ method handles it in a congratulatory manner and returns True, and we're released from the castle without fuss or bother. If we can't guess it in five tries, even after two hints, then the exception is a kick in the pants; we're booted out with an unhandled exception (return False). The outer handler takes care of KickFromCastle in that case. The print() statements tell the story. All pretty pointless... except to those learning Python. Tonight I interleaved the code below with a more serious-looking use of context managers in a Jupyter Notebook. http://bit.ly/2aiFaIA <--- looks through nbviewer (Jupyter Notebook viewer) at one of my Github JNs (just another web page) Kirby == from keyword import kwlist from random import choice import sys class EscapeVictorious(Exception): pass class KickFromCastle(Exception): pass class Castle: def __init__(self, secret): self.__xyjk = secret self.guesses = 0 self.hints = 0 def __enter__(self): """get the ball rolling""" print("Welcome to Spooky Castle. To Escape, " "guess the secret keyword") return self # <-- make me available within scope via 'as' def hint(self): if self.hints == 0: print("The keyword begins with", self.__xyjk[0]) elif self.hints == 1: print("The keyword is", len(self.__xyjk), "letters long.") else: print("You've had your two hints, sorry") self.hints += 1 def query(self): """gradations""" print("So what is the secret keyword then? " " Guess so far:", self.guesses) ans = input("You may answer (or type 'hint'): ") if ans == self.__xyjk: print("Excellent, we're done here") print("You have won the Copper Key") # <-- RealPlayer One (novel) raise EscapeVictorious("Copper Key") elif self.guesses == 5: print("Uh oh, you're out of guesses, sigh") raise KickFromCastle("We're done!") elif ans == "hint": self.hint() return else: self.guesses += 1 print("No, that's not it.") def __exit__(self, *exception_data): """raise a ruckus""" if exception_data[0] == EscapeVictorious: print("Congratulations!") print("Here is your", exception_data[1]) return True if exception_data[0] == KickFromCastle: print("Better Luck Next Time") print("The keyword was", self.__xyjk) return False if __name__ == "__main__": the_secret = choice(kwlist) try: with Castle(the_secret) as spooky: while True: spooky.query() except: print("Handling: ", sys.exc_info()[0].__name__) print(sys.exc_info()[1]) # <--- triggers __str__ print(type(sys.exc_info()[1])) -------------- next part -------------- An HTML attachment was scrubbed... URL: From georginawilcox at gmail.com Sat Jul 30 14:21:02 2016 From: georginawilcox at gmail.com (Georgina Wilcox) Date: Sat, 30 Jul 2016 19:21:02 +0100 Subject: [Edu-sig] Online course & programming competitions for high school students Message-ID: This year is the 11th year of the NCSS Challenge -- an online programming competition for high school students, run by the University of Sydney, Australia. The competition runs for five weeks, and each week a set of problems and a set of notes are released. Students can use the online marking system to get immediate feedback on their work. There are four difficulty levels, ranging from absolute beginners (suitable for younger students), through to advanced. If you're a teacher and considering using this with your students they have free teacher trials: http://groklearning.com/teachers The competition itself starts on Monday 1st August. I've worked on this challenge as a volunteer for several years, I'd be happy to answer any questions you might have. Otherwise, check out the website: https://groklearning.com/challenge Georgina -------------- next part -------------- An HTML attachment was scrubbed... URL: