From kent.tong.mo at gmail.com Sat Sep 1 01:10:48 2018 From: kent.tong.mo at gmail.com (Kent Tong) Date: Sat, 1 Sep 2018 13:10:48 +0800 Subject: [Edu-sig] training materials and learning environment for teaching kids python available In-Reply-To: References: Message-ID: Hi all, This is a set of training materials I used to successfully teach Python to kids as little as 10 years old. It was a success because the kids didn't just finish the course, they independently completed most of the coding challenges by applying the knowledge they had learned. The first four lessons and a lite version of the learning environment are freely available at: https://www.istudycenter.org/yes-kids-can-learn-python Let me know your ideas. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Wed Sep 5 13:14:58 2018 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 5 Sep 2018 10:14:58 -0700 Subject: [Edu-sig] training materials and learning environment for teaching kids python available In-Reply-To: References: Message-ID: Many thank yous for sharing this. I'm on board with having the language control things, ala Logo, actual physical devices, as in Arduino or Lego, or virtual, as in Codesters and your GUI / API. Andr? Roberge , an edu-sig subscriber, has a strong track record on the "control robots" front. https://github.com/aroberge The maintainer of Python's native turtle module is also an archive contributor. https://docs.python.org/3.3/library/turtle.html We've been recently debating its coordinates feature, Andr? having identified an inconsistency. https://mail.python.org/pipermail/edu-sig/2018-June/011908.html etc. Welcome aboard. Kirby On Sat, Sep 1, 2018 at 7:36 AM Kent Tong wrote: > Hi all, > > This is a set of training materials I used to successfully teach Python to > kids as little as 10 years old. It was a success because the kids didn't > just finish the course, they independently completed most of the coding > challenges by applying the knowledge they had learned. > > The first four lessons and a lite version of the learning environment are > freely available at: > https://www.istudycenter.org/yes-kids-can-learn-python > > Let me know your ideas. > > _______________________________________________ > 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 Fri Sep 7 16:11:51 2018 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 7 Sep 2018 13:11:51 -0700 Subject: [Edu-sig] multiple inheritance and method resolution order Message-ID: I have a standard exercise in sharing Python's data structures, wherein I bury the string "Waldo" in some deeply nested object, say as an element in a tuple in a dict in a list... to some demented level.[1] When we're learning Python grammar, that's when "demented" makes sense i.e. this isn't about writing production code so much as getting the basic principles. Along similar lines, when introducing super() and the method resolution order, I'm often looking for a class hierarchy that (A) involves multiple inheritance, (B) is several levels deep and (C) has "diamond patterns". Finally it hit me: I could turn to the Book of Genesis for a family tree with all these features, plus the advantage of being easy to lookup. Adam and Eve had several kids (they lived enormously long lives by today's standards), and the siblings had to have kids by each other given they were the only humans on the planet. Adam and Eve's son Seth and daughter Azura (two cases of multiple inheritance), had a son (another case). Also, Noah's mom goes back to a great grandparent shared with his dad. Diamond pattern. Eureka. There's already some precedent in mixing CS with bible studies (thinking of Knuth), and besides, Python is heavily used in the humanities for natural language processing. Bridging from Python to Genesis doesn't seem too far-fetched. :-D http://nbviewer.jupyter.org/github/4dsolutions/SAISOFT/blob/master/OO_Paradigm.ipynb (see "Multiple Inheritance") There "where's Waldo" exercise and this investigation into the MRO may be combined: bury a waldo() instance or class method somewhere in the Genesis family try, in a couple places and go: >>> subject = Noah() >>> subject.waldo() to find out where the name resolves. Have the waldo method report on its class. Kirby Cross reference to connected edu-sig topic: Rich Data Structures [1] Example code: # -*- coding: utf-8 -*- """ Created on Mon Apr 17 17:23:45 2017 @author: Kirby Urner Example of the "Where's Waldo" genre: https://i.ytimg.com/vi/SiYrSYd7mlc/maxresdefault.jpg Extract "Waldo" from each data structure """ data = {"id:":["Joe", "Smith"], "mother": ["Judy", "Smith"], "father": ["Waldo", "Smith"]} waldo = "???" # output "Waldo" print(waldo) #============================ data = {"Waldo": {"scores":[34,56,23,98,89]}} waldo = "???" # output "Waldo" hint: dict.keys() print(waldo) #============================ data = {(1,2):{"Name":["Waldeen", "Smith"]}, (4,5):{"Name":["Waldorf", "Smith"]}, (9,0):{"Name":["Waldo", "Smith"]}} waldo = "???" # output "Waldo" hint: tuples may be keys print(waldo) #============================ data = ["Joe", 3, 7, ["dog", ("cat", "Waldo")], 27, {}] waldo = "???" print(waldo) # output "Waldo' #============================ data = ([], [], ()) data[1].append("Wendy") data[1].append("Waldo") data[1].append("Willow") # where's Waldo? waldo = "???" # print(waldo) # NOW MAKE UP SOME OF YOUR OWN! -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Fri Sep 7 16:23:57 2018 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 7 Sep 2018 13:23:57 -0700 Subject: [Edu-sig] multiple inheritance and method resolution order In-Reply-To: References: Message-ID: Addendum (copyleft, re-use and modify at will) + related links [The] > "where's Waldo" exercise and this investigation into the MRO may be > combined: bury a waldo() instance or class method somewhere in the Genesis > family > [tree], > === class Gen0 (object): """the Old One""" def __init__(self): print("__init__ of {}".format("Gen0")) class Adam(Gen0): """one of two in Gen1""" def __init__(self): super().__init__() print("__init__ of {}".format("Adam")) class Eve(Gen0): """one of two in Gen1""" def __init__(self): super().__init__() print("__init__ of {}".format("Eve")) def waldo(self): print("Waldo in {}".format("Eve")) class Cain(Adam, Eve): """Gen2""" def __init__(self): super().__init__() print("__init__ of {}".format("Cain")) class Abel(Adam, Eve): """Gen2""" def __init__(self): super().__init__() print("__init__ of {}".format("Abel")) class Seth(Adam, Eve): """Gen2""" def __init__(self): super().__init__() print("__init__ of {}".format("Seth")) class Azura(Adam, Eve): """Gen2""" def __init__(self): super().__init__() print("__init__ of {}".format("Azura")) class Enosh(Seth, Azura): """Gen3""" def __init__(self): super().__init__() print("__init__ of {}".format("Enosh")) class Kenan(Enosh): """Gen4""" def __init__(self): super().__init__() print("__init__ of {}".format("Kenan")) class Mahalaleel(Kenan): """Gen5""" def __init__(self): super().__init__() print("__init__ of {}".format("Mahalaleel")) class Jared(Mahalaleel): """Gen6""" def __init__(self): super().__init__() print("__init__ of {}".format("Jared")) class Enoch(Jared): """Gen7""" def __init__(self): super().__init__() print("__init__ of {}".format("Enoch")) class Methusela(Enoch): """Gen8""" def __init__(self): super().__init__() print("__init__ of {}".format("Methusela")) def waldo(self): print("Waldo in {}".format("Methusela")) class Elisha(Enoch): """Gen8""" def __init__(self): super().__init__() print("__init__ of {}".format("Elisha")) class Lamech(Methusela): """Gen9""" def __init__(self): super().__init__() print("__init__ of {}".format("Lamech")) class Ashmua(Elisha): """Gen9""" def __init__(self): super().__init__() print("__init__ of {}".format("Ashmua")) def waldo(self): print("Waldo in {}".format("Ashuma")) class Noah(Lamech, Ashmua): """Gen10""" def __init__(self): super().__init__() print("__init__ of {}".format("Noah")) if __name__ == "__main__": import inspect subject = Noah() subject.waldo() print(inspect.getmro(subject.__class__)) === Related posts: https://grokbase.com/t/python/edu-sig/066kd86zh1/rich-data-structures-plus-knowledge-domain-object-sets https://mail.python.org/pipermail/edu-sig/2012-December/010709.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.murphy91 at gmail.com Fri Sep 7 17:05:07 2018 From: stephen.murphy91 at gmail.com (Stephen Murphy) Date: Fri, 7 Sep 2018 22:05:07 +0100 Subject: [Edu-sig] Python Code snippets for Irish second level students Message-ID: Hello all, My name is Stephen Murphy from the Republic of Ireland. In November last year I founded the Computer Science Teachers? Association of Ireland. I have recently published the first edition of the CSTAI magazine: R? na R?omheolas (link below) https://tinyurl.com/ReNaRiomh1 In addition to the articles, I also include a section on code snippets that might be useful for second level teachers and students. If anyone has any ideas about little bits of interesting code, I would be delighted if you could send them to me with a little explanation of what the code does and what it is used for. Best wishes, Stephen -------------- next part -------------- An HTML attachment was scrubbed... URL: From kent.tong.mo at gmail.com Sun Sep 9 06:43:15 2018 From: kent.tong.mo at gmail.com (Kent Tong) Date: Sun, 9 Sep 2018 18:43:15 +0800 Subject: [Edu-sig] Edu-sig Digest, Vol 181, Issue 4 In-Reply-To: References: Message-ID: Hi Stephen Much to my surprise, my 10-year-old student figured out how to do recursion even before I told them to and wrote the code below, which puts the mole at (1, 1) when button 1 is clicked, waits 1 second, executes the code in box 2. In box 2, the code puts the mole at (2, 2), waits 1 second and then execute the code in box 1. [image: image.png] --- Kent Tong Yes! Kids can learn Python. Free chapters and learning environment at https://www.istudycenter.org/yes-kids-can-learn-python -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 45525 bytes Desc: not available URL: From jurgis.pralgauskis at gmail.com Fri Sep 14 05:38:23 2018 From: jurgis.pralgauskis at gmail.com (Jurgis Pralgauskis) Date: Fri, 14 Sep 2018 09:38:23 +0000 Subject: [Edu-sig] Editors/IDEs for teaching In-Reply-To: References: Message-ID: maybe http://www.pyzo.org/mission.html (seems like simple, though oriented towards scientists, but lacks docs) From kirby.urner at gmail.com Mon Sep 24 21:44:12 2018 From: kirby.urner at gmail.com (kirby urner) Date: Mon, 24 Sep 2018 18:44:12 -0700 Subject: [Edu-sig] REQ: HOWTO mailing lists resources In-Reply-To: References: Message-ID: I wanted to followup on this thread as since Aug 30 I've linked to it from several places. I've long had a habit of taking advantage what a publicly archived listserv permits: http linking from elsewhere. There's a link to a Python repo in the end notes. Otherwise I'm mostly just fleshing out a use case vis-a-vis mailman, confirming insights by Wes. On Thu, Aug 30, 2018 at 3:16 PM Wes Turner wrote: ... > TBH, securing and upgrading mailing lists is beyond the competencies of > most volunteer-run organizations; > which is one reason that I'd recommend Google Groups or similar for most > organisations. > > Indeed, my experiences matches. The science fiction fantasy I was pursuing at the time, in my role, was that my religious sect in particular (for which I was wearing an IT hat) would eventually embrace IT expertise as one of its trademarks, a kind of branding maneuver. So sects are known for their chocolates and cheese. We'd stand out for our IT expertise. I was challenging my peers to "geek out" as we say. Some rose to the occasion. I wasn't the only IT type on the listserv (one of Google's). BTW I haven't given up on any of that investment in a higher tech look and feel, even though my personal tour of duty in that specific role ended quite a long time ago. That gig, as a Clerk of IT for my region, was a growth experience. I also continue fantasize about future meeting facilities in a high rise (as in "skyscraper"), for example some 47th floor facility in Singapore would be no contradiction in terms, not a culture clash. I picture a serene scene, perhaps with LCDs in the social area, sometimes cycling through pictures of those more iconic meetinghouses of the hallmark sort, many of them wood-heated and by this time fairly dilapidated.[1] > In my experience, ISPs offer GUI installers for various app on shared > hosting platforms, but upgrades aren't managed in the same GUI; which > requires a volunteer to keep the apps upgraded with at least security > updates. > > Exactly right. I'm on Godaddy myself and find Wordpress nags me and upgrades in place through its own GUI, but that's the exception, and is ironically the most infested with stuff. I had to SSH in and manually vim stuff out and vacuum tons of garbage directories -- I've not been a great janitor over the years (this was grunch.net). The website had essays and links I'd never put there, mostly tucked away unobtrusively so as not to attract my attention. Other upgrades, outside of Wordpress would require that I SSH in. At NPYM, we had no shell access that I recall, but my memory dims. To this day we make intensive use of Drupal -- but the security patch process was hardly intuitive (I wasn't handling it myself). Our PHP was falling behind, version-wise. In other words, we already had an inhouse-written and maintained PHP + MySQL database. Geeks R Us. I was able to test run SQL from a command line, thanks to help from Marty, and was suggesting we migrate these skills through the Secretary's office. Those proposals remain on file. I wrote a new prototype of our database in Python.[2] Kirby [1] https://youtu.be/PhsvqbCIaAs (opening 5 seconds show iconic meetinghouse, the rest being a music video recording of religious doctrines) [2] https://github.com/4dsolutions/NPYM -------------- next part -------------- An HTML attachment was scrubbed... URL: From wes.turner at gmail.com Tue Sep 25 00:09:35 2018 From: wes.turner at gmail.com (Wes Turner) Date: Tue, 25 Sep 2018 00:09:35 -0400 Subject: [Edu-sig] REQ: HOWTO mailing lists resources In-Reply-To: References: Message-ID: If you have SSH, it's generally possible to install git if it's not already, and then add everything to a git repository; keeping in mind that - like etckeeper - there are likely e.g. database passwords in said repository. A little extra CPU utilization during an off-peak time shouldn't be an issue even with shared hosting accounts. While I started out with e.g. postnuke, Mambo/Joomla, Drupal, etc. way back in the day; in recent times I've found myself leaning toward no database to maintain (no risk of SQLi). Static HTML and pull requests have most of the workflow needs solved without any ongoing maintenance burden. There are a number of comment services that handle spam and support moderation. A third party search service can do search with snippets that's way more performant. In my experience, PHP apps really do need to be regularly upgraded. https://www.staticgen.com lists quite a few static HTML solutions. Notably, Jekyll is the most popular and is supported by GitHub. It's also possible to build a dynamic app - where e.g. /admin/ is only available or known to a few users - that's then pressed into static HTML. Cactus (Django), Django-distill, and Frozen-Flask have a bunch of stars according to staticgen Such a static site is not quite the same as adding caching in front of e.g. WordPress because there's still SQL and unreviewed plugins. A managed WordPress service should be able to get caching correctly configured with e.g. Varnish, Nginx, HAproxy; and do regular backups. ... mm3 supports adding a footer with a link to the relayed message. distutils-sig@ has such a - IMHO far to extensive - footer The list admin should be able to upgrade edu-sig@ to mm3 in a jiffy? On Monday, September 24, 2018, kirby urner wrote: > > I wanted to followup on this thread as since Aug 30 I've linked to it from > several places. > > I've long had a habit of taking advantage what a publicly archived > listserv permits: http linking from elsewhere. > There's a link to a Python repo in the end notes. > > Otherwise I'm mostly just fleshing out a use case vis-a-vis mailman, > confirming insights by Wes. > > On Thu, Aug 30, 2018 at 3:16 PM Wes Turner wrote: > > ... > >> TBH, securing and upgrading mailing lists is beyond the competencies of >> most volunteer-run organizations; >> which is one reason that I'd recommend Google Groups or similar for most >> organisations. >> >> > Indeed, my experiences matches. > > The science fiction fantasy I was pursuing at the time, in my role, was > that my religious sect in particular (for which I was wearing an IT hat) > would eventually embrace IT expertise as one of its trademarks, a kind of > branding maneuver. So sects are known for their chocolates and cheese. > We'd stand out for our IT expertise. > > I was challenging my peers to "geek out" as we say. Some rose to the > occasion. I wasn't the only IT type on the listserv (one of Google's). > > BTW I haven't given up on any of that investment in a higher tech look and > feel, even though my personal tour of duty in that specific role ended > quite a long time ago. That gig, as a Clerk of IT for my region, was a > growth experience. > > I also continue fantasize about future meeting facilities in a high rise > (as in "skyscraper"), for example some 47th floor facility in Singapore > would be no contradiction in terms, not a culture clash. I picture a > serene scene, perhaps with LCDs in the social area, sometimes cycling > through pictures of those more iconic meetinghouses of the hallmark sort, > many of them wood-heated and by this time fairly dilapidated.[1] > >> In my experience, ISPs offer GUI installers for various app on shared >> hosting platforms, but upgrades aren't managed in the same GUI; which >> requires a volunteer to keep the apps upgraded with at least security >> updates. >> >> > Exactly right. > > I'm on Godaddy myself and find Wordpress nags me and upgrades in place > through its own GUI, but that's the exception, and is ironically the most > infested with stuff. > > I had to SSH in and manually vim stuff out and vacuum tons of garbage > directories -- I've not been a great janitor over the years (this was > grunch.net). The website had essays and links I'd never put there, mostly > tucked away unobtrusively so as not to attract my attention. > > Other upgrades, outside of Wordpress would require that I SSH in. At > NPYM, we had no shell access that I recall, but my memory dims. > > To this day we make intensive use of Drupal -- but the security patch > process was hardly intuitive (I wasn't handling it myself). > > Our PHP was falling behind, version-wise. > > In other words, we already had an inhouse-written and maintained PHP + > MySQL database. Geeks R Us. > > I was able to test run SQL from a command line, thanks to help from Marty, > and was suggesting we migrate these skills through the Secretary's office. > Those proposals remain on file. I wrote a new prototype of our database in > Python.[2] > > Kirby > [1] https://youtu.be/PhsvqbCIaAs (opening 5 seconds show iconic > meetinghouse, the rest being a music video recording of religious doctrines) > > [2] https://github.com/4dsolutions/NPYM > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Thu Sep 27 18:15:53 2018 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 27 Sep 2018 15:15:53 -0700 Subject: [Edu-sig] Two Jupyter Notebook exhibits Message-ID: I'm on a listserv where colleges and universities compare notes for using nbgrader, while serving Jupyter Notebooks locally, as part of the curriculum delivery architecture. My way of sharing is less cloud-based in that I invite students to run the course notebooks locally, each booting to localhost:8888 using the JN server that comes with Anaconda. Or install with pip. They're getting me live, closed circuit, and we're able to discuss the materials in real time with no central server, other than shared Github repos and a course Google Drive. The difference is I'm not grading. There's no requirement to turn stuff in, just optional workouts during the tutorials. More like at a Pycon or OSCON. Steve Holden was showing me JNs long before now, and I'm still far from expert. I appreciate them for many reasons, not the least of which is supporting LaTeX. The technology is also a meeting ground for folks from many walks of life, given how the back end kernel need no longer be only Python. I'm able to compare Python directly with JavaScript, in the same notebook (such comparisons are worth making [1]). === Two exhibits: This first one is from just this morning. A Facebook friend has found a numeric pattern, and what I see is an excuse to: 1) practice some LaTeX 2) show off Python generators 3) show off unittest 4) share about "evil" eval The Decimal class does not support trig, so I'm not in a position to use it as I did in the case of verifying the cited Ramanujan expression for 1/pi. https://github.com/4dsolutions/Python5/blob/master/VerifyArctan.ipynb The second: Graphene & Quadrays is about using an obscure Vector class to create a hex grid or hex mesh, written out by Python in Scene Description Language, and changing to XYZ only at this last opportunity. POV-Ray (free open source, povray.org) doesn't understand about Quadrays. However my algorithm for generating the mesh depends on the Python set type and its ability to prevent duplicates, especially when the set members are all 4-tuples of integers. Floating point numbers get fuzzy and create false negatives i.e. they're treated as different when they're not. All integer coordinates do not suffer from this deficiency. Lots more about Quadrays in my repo, or see Wikipedia. [ I'm not saying XY coordinates cannot be overlaid on a grid of hexagons in clever ways. Many people have contributed nifty hex grid algorithms. I'm just showing another application for a coordinate system almost no one has ever heard of. I enjoy sharing esoterica.[2] ] Quadrays assign integer coordinates not only to hexagonal mesh points, but to the volume-filling equivalent FCC (=CCP) = rhombic dodecahedrons space-filling matrix. I take that up in a connected Notebook. [3] https://github.com/4dsolutions/Python5/blob/master/GrapheneWithQrays.ipynb ==== ENDNOTES [1] https://medium.com/@kirbyurner/as-a-python-instructor-i-tend-to-recommend-a-polyglot-approach-learn-a-minimum-of-two-languages-243a0ed05eeb [2] https://www.redblobgames.com/grids/hexagons/ is an authoritative website on the topic. [3] https://github.com/4dsolutions/Python5/blob/master/Generating%20the%20FCC.ipynb -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff at elkner.net Sun Sep 30 14:02:18 2018 From: jeff at elkner.net (Jeff Elkner) Date: Sun, 30 Sep 2018 18:02:18 +0000 Subject: [Edu-sig] The making of a great Education Summit Message-ID: <7RxJHkGLyEIrMMU5vqCXvC-7sXOt1KUmDbTH3gLTXedSp3Z0HTaz5Leyh4KDacalJF24AszBW-09OeaDAElQJTCMruO-sHAR4Xxebghk-Vk=@elkner.net> Dear fellow EDU Pythonistas, The Education Summit this year is shaping up to be wonderful: https://us.pycon.org/2019/speaking/education-summit/ I just wanted to let folks know. Jeff Elkner Arlington Career Center Let's work together to create a just and sustainable world! -------------- next part -------------- An HTML attachment was scrubbed... URL: