From christian.mascher at gmx.de Tue Mar 1 17:47:17 2016 From: christian.mascher at gmx.de (Christian Mascher) Date: Tue, 1 Mar 2016 23:47:17 +0100 Subject: [Edu-sig] Test In-Reply-To: References: Message-ID: <56D61BF5.1020500@gmx.de> > I joined > the list and tried to write to it several times but seems that my letters > are just vanishing. I also wrote to edu-sig-owner at python.org and > wilson at visi.com (couple of weeks ago) but got no response. I am a long-time lurker, but lately some of my mails seemed to vanish as well, so this is just a test ;-) Hope it gets sorted out for everyone, Christian From kirby.urner at gmail.com Tue Mar 1 20:50:08 2016 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 1 Mar 2016 17:50:08 -0800 Subject: [Edu-sig] raging debates and the relevance of a real education Message-ID: Students lucky enough to get exposure to RSA (the algorithm) along their math track are likely having more informed debates in their classrooms, regarding the Apple vs. FBI standoff. They're certainly better equipped, concept-wise, than less privileged kids who might not even get any SQL in all four years of high school (!). The first stories I saw were about how the run-of-the-mill techie saw no reason to weigh in i.e. why pick a side? Then came the heavy hitters like John McAffee and Gen. Hayden. An aspect of the story I see differently reported is: (A) when the passcode is miss-entered more than 10 times, the phone wipes away its data (99% of the stories put it this way) (B) the phone doesn't have to wipe anything except the decrypt bits, leaving the phone encrypted forever (1% put it this other way). [1] One might argue the difference between "erased" and "indecipherable" is negligible, but as we were discussing "mental models" earlier this month, I think it's an important distinction to make. The "erased" mental model leaves people understanding why the FBI couldn't get to the data in that case: it's gone. The "forever encrypted" mental model reminds people of something else: the data is still there, just the code in uncrackable. A lot of father-knows-best types (e.g. Cyrus Vance) would like the public to forget all about uncrackable codes. Were the algorithm in question RSA, we could say the phones owner needs the passcode to get access to d, the secret complement of N, the public key. [2] Even if I know my public key, forget about decryption of d is lost, and that's a lot longer than 6 digits. Getting the passcode right is merely giving d permission to do its work. I wonder how many evil sibs have deliberately miss-entered codes to forever lock the other's phone. That'd be akin to tossing it under a bus right? Tsk. [3] Kirby PS: I wonder who believes this paragraph (I don't): "It?s possible, of course, for authorities to physically open the phone, pull out the computer chips and bombard them with lasers or radio frequencies to get at the information they need. But experts aren?t sure how much ? if any ? data would be lost in the process." [4] Sounds like BS to me. [1] https://stratechery.com/2016/apple-versus-the-fbi-understanding-iphone-encryption-the-risks-for-apple-and-encryption/ [2] http://controlroom.blogspot.com/2006/05/rsa-using-pythonic-notation.html [3] http://forums.macrumors.com/threads/a-hack-to-find-my-sisters-password-for-the-login-screen.237721/ [4] http://blogs.reuters.com/great-debate/2016/02/17/the-fbi-wants-to-set-a-legal-precedent-not-break-into-an-iphone/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Tue Mar 1 22:00:19 2016 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 1 Mar 2016 19:00:19 -0800 Subject: [Edu-sig] raging debates and the relevance of a real education In-Reply-To: References: Message-ID: >>> "Compete in the free market, but through coercive court orders.".replace("but", "not") 'Compete in the free market, not through coercive court orders.' :-D Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Tue Mar 1 23:30:51 2016 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 1 Mar 2016 20:30:51 -0800 Subject: [Edu-sig] another test.... Message-ID: Here's another example of a post that failed to reach the archive, yet the one after it, senseless without this one, did. I've been polling a number of folks about their experience and the developing consensus is we're without a listowner at this time. My plan is to step forward with one or two others and offer to serve in that role. I haven't done that yet though. Still collecting data on the current (broken) situation. Kirby ---------- Forwarded message ---------- From: kirby urner Date: Tue, Mar 1, 2016 at 6:57 PM Subject: Re: [Edu-sig] raging debates and the relevance of a real education To: Juliano Cc: "edu-sig at python.org" > What is your opinion? > Is FBI attacking the privacy of iphone users? > > I think a state government should not be banned from running businesses, applying its own decals and ideals, and that Uncle Sam Smartphones or whatever could be handed out, free of charge, to underprivileged, say through schools. They'll be FBI hackable but come with many other benefits only the US is in a position to deliver (a wide range of special apps). That doesn't really solve the current problems, but I do think patriots who want to make a statement of support, should be able to go to Walmart and buy whatever ideologically correct phone suits their persona. Sure, criminals will prefer privacy but then ordinary citizens have access to the same cryptographic techniques. That cat is well out of the bag. I'd like to see Uncle Sam with its own chain of roadside hotels, a rental car company, an airline. They'll have to be open source / open book so people see they're not cheating i.e. they have to turn a profit. They're role models, showing other capitalists how it's done. Those who always criticize the government for not understanding about business, will have less of an argument. I'm not talking about nationalizing all the existing companies or anything close. Just let Uncle Sam get into the phone business, if it takes issue with how Apple is doing it. Compete in the free market, but through coercive court orders. Kirby http://controlroom.blogspot.com/2011/05/cowardly-capitalism.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Tue Mar 1 23:34:19 2016 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 1 Mar 2016 20:34:19 -0800 Subject: [Edu-sig] rounding out the debate Message-ID: I don't think Juliano will mind my getting this posted given it was addressed to edu-sig in the first place.... consider this yet another test. Kirby From: Juliano Date: Tue, Mar 1, 2016 at 6:36 PM Subject: Re: [Edu-sig] raging debates and the relevance of a real education To: kirby urner Cc: "edu-sig at python.org" 2016-03-01 21:50 GMT-04:00 kirby urner : > > Students lucky enough to get exposure to RSA (the algorithm) along their > math track are likely having more informed debates in their classrooms, > regarding the Apple vs. FBI standoff. > > They're certainly better equipped, concept-wise, than less privileged kids > who might not even get any SQL in all four years of high school (!). > > The first stories I saw were about how the run-of-the-mill techie saw no > reason to weigh in i.e. why pick a side? > What is your opinion? Is FBI attacking the privacy of iphone users? Today the brazilian police arrested Diego Jorge Dzodan, Facebook Latin America VP. Police claim he disrespect a court order: provide whatsapp history of drug trafficking suspects. IMO brazilian police was totally overstated and overbearing. BUT, couldn't the Facebook collaborate with criminal investigations? The difference: Facebook indeed has access to the data in question. Apple did not. > > > Then came the heavy hitters like John McAffee and Gen. Hayden. > > An aspect of the story I see differently reported is: > > (A) when the passcode is miss-entered more than 10 times, the phone wipes > away its data (99% of the stories put it this way) > > (B) the phone doesn't have to wipe anything except the decrypt bits, > leaving the phone encrypted forever (1% put it this other way). [1] > > One might argue the difference between "erased" and "indecipherable" is > negligible, but as we were discussing "mental models" earlier this month, I > think it's an important distinction to make. > > The "erased" mental model leaves people understanding why the FBI couldn't > get to the data in that case: it's gone. The "forever encrypted" mental > model reminds people of something else: the data is still there, just the > code in uncrackable. > > A lot of father-knows-best types (e.g. Cyrus Vance) would like the public > to forget all about uncrackable codes. > > Were the algorithm in question RSA, we could say the phones owner needs > the passcode to get access to d, the secret complement of N, the public > key. [2] > > Even if I know my public key, forget about decryption of d is lost, and > that's a lot longer than 6 digits. Getting the passcode right is merely > giving d permission to do its work. > > I wonder how many evil sibs have deliberately miss-entered codes to > forever lock the other's phone. That'd be akin to tossing it under a bus > right? Tsk. [3] > > Kirby > > PS: I wonder who believes this paragraph (I don't): > > "It?s possible, of course, for authorities to physically open the phone, > pull out the computer chips and bombard them with lasers or radio > frequencies to get at the information they need. But experts aren?t sure > how much ? if any ? data would be lost in the process." [4] > > Sounds like BS to me. > For me as well. My question: Is the FBI able to clone the data (like a unix dd command)? Once the data is cloned, they can test as many as required passwords. When the system blocks the information, they can load the cloned data again. I apologize if I am talking nonsense. I really would like to know why the FBI is not able to do it (like CSI lol). > > [1] > https://stratechery.com/2016/apple-versus-the-fbi-understanding-iphone-encryption-the-risks-for-apple-and-encryption/ > > [2] > http://controlroom.blogspot.com/2006/05/rsa-using-pythonic-notation.html > > [3] > http://forums.macrumors.com/threads/a-hack-to-find-my-sisters-password-for-the-login-screen.237721/ > > [4] > http://blogs.reuters.com/great-debate/2016/02/17/the-fbi-wants-to-set-a-legal-precedent-not-break-into-an-iphone/ > > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig A secure communication system is like a weapon: for one is a right, for others is a danger, a well-meaning citizen can use and a terrorist (or child molester) too. +1 FBI team Juliano Fischer Naves -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Tue Mar 1 21:57:15 2016 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 1 Mar 2016 18:57:15 -0800 Subject: [Edu-sig] raging debates and the relevance of a real education In-Reply-To: References: Message-ID: > > What is your opinion? > Is FBI attacking the privacy of iphone users? > > I think a state government should not be banned from running businesses, applying its own decals and ideals, and that Uncle Sam Smartphones or whatever could be handed out, free of charge, to underprivileged, say through schools. They'll be FBI hackable but come with many other benefits only the US is in a position to deliver (a wide range of special apps). That doesn't really solve the current problems, but I do think patriots who want to make a statement of support, should be able to go to Walmart and buy whatever ideologically correct phone suits their persona. Sure, criminals will prefer privacy but then ordinary citizens have access to the same cryptographic techniques. That cat is well out of the bag. I'd like to see Uncle Sam with its own chain of roadside hotels, a rental car company, an airline. They'll have to be open source / open book so people see they're not cheating i.e. they have to turn a profit. They're role models, showing other capitalists how it's done. Those who always criticize the government for not understanding about business, will have less of an argument. I'm not talking about nationalizing all the existing companies or anything close. Just let Uncle Sam get into the phone business, if it takes issue with how Apple is doing it. Compete in the free market, but through coercive court orders. Kirby http://controlroom.blogspot.com/2011/05/cowardly-capitalism.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From aivar.annamaa at ut.ee Tue Mar 1 10:02:52 2016 From: aivar.annamaa at ut.ee (Aivar Annamaa) Date: Tue, 1 Mar 2016 17:02:52 +0200 Subject: [Edu-sig] Thonny, a new IDE for teaching programming Message-ID: <56D5AF1C.5040908@ut.ee> Hi! I've created a new free Python IDE which focusses on program animation. Eg. it can step through expression evaluation, it can visualize call stack etc. More info here: http://thonny.cs.ut.ee/ You may find it useful if you're teaching Python to beginners. I'm teaching 1st year CS students in University of Tartu and I can say Thonny has made my job easier. I'd love to hear your feedback and comments! best regards, Aivar Annamaa University of Tartu From kirby.urner at gmail.com Thu Mar 3 01:52:46 2016 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 2 Mar 2016 22:52:46 -0800 Subject: [Edu-sig] edu-sig ownership changed Message-ID: Greetings educators -- Naomi Ceder and I have taken over the listowner role as of today. I just went through the backlog of deferred posts and approved a bunch. Some will show up in last month's archive, such as Peter Farrell's re Project Euler. If you're not seeing a post you wanted to make, feel free to send it again. I'm just getting the hang of how mailman does it (quite sophisticated compared to Google and Yahoo solutions I would say). Thanks in advance for your patience. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From al at inventwithpython.com Sun Mar 6 17:23:53 2016 From: al at inventwithpython.com (Al Sweigart) Date: Sun, 6 Mar 2016 14:23:53 -0800 Subject: [Edu-sig] Thonny, a new IDE for teaching programming In-Reply-To: <56D5AF1C.5040908@ut.ee> References: <56D5AF1C.5040908@ut.ee> Message-ID: How does it compare to Philip Guo's Python Tutor? http://www.pythontutor.com/ I really like how this tool can trace forwards and backwards through the program. Also, less popular is a tool I wrote for visualizing how expressions get evaluated. It's called ShowEval: http://inventwithpython.com/showeval/ (Repo at https://github.com/asweigart/showeval ) -Al On Tue, Mar 1, 2016 at 7:02 AM, Aivar Annamaa wrote: > Hi! > > I've created a new free Python IDE which focusses on program animation. > Eg. it can step through expression evaluation, it can visualize call stack > etc. More info here: http://thonny.cs.ut.ee/ > > You may find it useful if you're teaching Python to beginners. I'm > teaching 1st year CS students in University of Tartu and I can say Thonny > has made my job easier. > > I'd love to hear your feedback and comments! > > best regards, > Aivar Annamaa > University of Tartu > _______________________________________________ > 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 andre.roberge at gmail.com Sun Mar 6 17:59:32 2016 From: andre.roberge at gmail.com (Andre Roberge) Date: Sun, 6 Mar 2016 18:59:32 -0400 Subject: [Edu-sig] Thonny, a new IDE for teaching programming In-Reply-To: References: <56D5AF1C.5040908@ut.ee> Message-ID: On Sun, Mar 6, 2016 at 6:23 PM, Al Sweigart wrote: > How does it compare to Philip Guo's Python Tutor? > http://www.pythontutor.com/ I really like how this tool can trace > forwards and backwards through the program. > PythonTutor is indeed a fantastic tool! > > Also, less popular is a tool I wrote for visualizing how expressions get > evaluated. It's called ShowEval: http://inventwithpython.com/showeval/ > >From what I can see, showeval requires explicit pre-encoding of the result of each steps (whereas Python Tutor produces those automatically). One can essentially obtain similar results automatically (i.e. without pre-encoding) using Reeborg's World. (link to the new, development version http://reeborg.ca/reeborg.html?lang=en&mode=python) 1. Enter the following code in the editor (adapted from showeval) eggs = ['dogs', 'cats', 'moose'] a = ''.join(eggs) a = a.upper() a = a.join(eggs) 2. Click on the magnifier icon at the top right corner of the editor; this will open a "watch" variable window 3. Execute the program by clicking on the "play" icon under the header bar, at the top right 4. Watch the values of the variables change --- * You can click on the "step" button (immediately to the right of the "play" icon) to execute each statement one at a time. At the moment, one sometimes needs to click it multiple times to go to the next statement. * Alternatively, one can change the speed of the animation by inserting the following call think(time_in_ms) at the top of the program. * If one steps through the program one line at a time, it is possible to step backwards; click on "Additional options" at the top. This will bring a window with multiple additional buttons, including one which does a "reverse" step. * Instead of automatically adding new variables as they are created, one can add expressions to watch using add_watch() e.g. add_watch("a+a") for the example above. A "complete" example could be: think(1000) add_watch("a+a") eggs = ['dogs', 'cats', 'moose'] a = ''.join(eggs) a = a.upper() a = a.join(eggs) Andr? Note: I gave the link to the development version, even though it is currentlynot quite as complete as the "old" one, http://reeborg.ca/world.html, since the latter will soon be obsolete). Note 2: for additional help on available functions, insert help(reeborg_en) as a statement in a Python program and execute it. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aivar.annamaa at ut.ee Mon Mar 7 01:24:46 2016 From: aivar.annamaa at ut.ee (Aivar Annamaa) Date: Mon, 7 Mar 2016 08:24:46 +0200 Subject: [Edu-sig] Thonny, a new IDE for teaching programming In-Reply-To: References: <56D5AF1C.5040908@ut.ee> Message-ID: <56DD1EAE.7020703@ut.ee> On 7.03.2016 0:23, Al Sweigart wrote: > How does it compare to Philip Guo's Python Tutor? > http://www.pythontutor.com/ I really like how this tool can trace > forwards and backwards through the program. Backwards tracing is really nice feature, that Thonny doesn't support yet. I think that pragmatically the most important difference is that Pythontutor is mostly a runtime visualizer with possibility to submit your own (small) programs, whereas Thonny tries to be both a beginner-friendly IDE and then a runtime visualizer. I believe the usage of Pythontutor is usally complemented with separate IDE (eg. IDLE), but *Thonny wants to be IDLE and Pythontutor combined*. Actually Thonny includes even a Python distribution, so that total beginners need to install only one thing to their computers. The differences in visualization: *I believe Thonny's way of visualizing function call is superior*, because its stack frames contain the source code, allowing indication where the "execution point" lies on each frame. Pythontutor (like most professional IDES) visualizes function calls as jumps in the source code and I've seen that this messes up students' model about function calls. For many students this broken model becomes the roadblock for understanding recursion. If I understand correctly, then *Pythontutor can't show how an expression gets evaluated stepwise* (pleas correct me if i'm wrong). Thonny can. Pythontutor uses arrows for explaining *references*, Thonny uses variables table with names => addresses and heap table with addresses => values. I think Pythontutor's solution is more intuitive, but Thonny's solution is more scalable. best regards, Aivar -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim.brady at pearson.com Tue Mar 8 07:39:08 2016 From: tim.brady at pearson.com (Brady, Tim) Date: Tue, 8 Mar 2016 12:39:08 +0000 Subject: [Edu-sig] Python in Schools in the UK Message-ID: Hi People I hope you can help. I am interested in the many schools in the UK who are looking at or have already adopted a cloud hosted environment for delivering applications to their students. Python is being used in many schools/colleges in the country - but I do not know how it can be delivered other than a local install on a students machine so that students can run it and debug it locally. Is there an equivalent of a web-App that allows for python code development and debug on a chrome book for example? Or any cloud derivative. I hope my question is understandable - sorry for my poor description. Thank you for your help. Regards Tim Brady *Subject Advisor **Computing & ICT * -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Tue Mar 8 11:56:07 2016 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 8 Mar 2016 08:56:07 -0800 Subject: [Edu-sig] Python in Schools in the UK In-Reply-To: References: Message-ID: On Tue, Mar 8, 2016 at 4:39 AM, Brady, Tim wrote: > Hi People > > I hope you can help. I am interested in the many schools in the UK who are > looking at or have already adopted a cloud hosted environment for > delivering applications to their students. > > Python is being used in many schools/colleges in the country - but I do > not know how it can be delivered other than a local install on a students > machine so that students can run it and debug it locally. > > Hi Tim -- Kirby here. I recommend PythonAnywhere.com and use it with my students. It gives them the ability to create a free account in the cloud and to send files to it from a local machine. There's even the ability to deploy a single public-facing web app. My demo app is at thekirbster.pythonanywhere.com with source code available here: https://github.com/4dsolutions/Python5/blob/master/mfg.py In addition, PythonAnywhere allows students to choose a mentor, who will be able to look over their shoulder in the sense of sharing files. There's even real time console sharing. I'm quite excited by the technology and use it for code school work. > Is there an equivalent of a web-App that allows for python code > development and debug on a chrome book for example? > Or any cloud derivative. > As long the the local machine has Internet access, there should be no problem using PythonAnywhere, as it shows up in your browser. > > I hope my question is understandable - sorry for my poor description. > > I think the goal at least for code school students is to the laptop be a local development environment, with a cloud stack for remote deployment of the world-readable version. That's if it's to be a running web app that they're working on (our code schoolers wanna be web devs). If the goal is to share source code, not necessarily a running web app, then a github account may be sufficient. PythonAnywhere makes it easy to tie your cloud account to your public git repository. Kirby > Thank you for your help. > > Regards > > Tim Brady > *Subject Advisor **Computing & ICT * > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From funcalculus at gmail.com Wed Mar 9 09:47:14 2016 From: funcalculus at gmail.com (Peter Farrell) Date: Wed, 9 Mar 2016 06:47:14 -0800 Subject: [Edu-sig] Edu-sig Digest, Vol 152, Issue 5 In-Reply-To: References: Message-ID: Hi, Tim, Python's online IDEs are a mixed bunch all right. Cloud 9 hosts a pretty professional-looking environment. For people learning Python I highly recommend Trinket , not least of all because it's the only one I've found so far on which you can use Python's "turtle" module, my teaching tool of choice. Being able to use turtles and Visual Python make creating 2D and 3D graphics pretty easy. You can also embed the "trinkets" into a webpage, as I've done on mine: http://www.farrellpolymath.com/code Hope this helps! Peter Farrell On Tue, Mar 8, 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. Python in Schools in the UK (Brady, Tim) > 2. Re: Python in Schools in the UK (kirby urner) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 8 Mar 2016 12:39:08 +0000 > From: "Brady, Tim" > To: edu-sig at python.org > Subject: [Edu-sig] Python in Schools in the UK > Message-ID: > < > CAEU9HMT4oN0Q-kSVgkZq73LftpektYT1iX1sT8VYVpMPx59s_A at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi People > > I hope you can help. I am interested in the many schools in the UK who are > looking at or have already adopted a cloud hosted environment for > delivering applications to their students. > > Python is being used in many schools/colleges in the country - but I do not > know how it can be delivered other than a local install on a students > machine so that students can run it and debug it locally. > > Is there an equivalent of a web-App that allows for python code development > and debug on a chrome book for example? > Or any cloud derivative. > > I hope my question is understandable - sorry for my poor description. > > Thank you for your help. > > Regards > > Tim Brady > *Subject Advisor **Computing & ICT * > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/edu-sig/attachments/20160308/be40c2c5/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Tue, 8 Mar 2016 08:56:07 -0800 > From: kirby urner > To: "Brady, Tim" > Cc: "edu-sig at python.org" > Subject: Re: [Edu-sig] Python in Schools in the UK > Message-ID: > tm8n9GH2p6Dk9eefSXjTS32FeawkuDK5nFAA at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > On Tue, Mar 8, 2016 at 4:39 AM, Brady, Tim wrote: > > > Hi People > > > > I hope you can help. I am interested in the many schools in the UK who > are > > looking at or have already adopted a cloud hosted environment for > > delivering applications to their students. > > > > Python is being used in many schools/colleges in the country - but I do > > not know how it can be delivered other than a local install on a students > > machine so that students can run it and debug it locally. > > > > > Hi Tim -- > > Kirby here. > > I recommend PythonAnywhere.com and use it with my students. It gives them > the ability to create a free account in the cloud and to send files to it > from a local machine. There's even the ability to deploy a single > public-facing web app. > > My demo app is at thekirbster.pythonanywhere.com with source code > available > here: > > https://github.com/4dsolutions/Python5/blob/master/mfg.py > > In addition, PythonAnywhere allows students to choose a mentor, who will be > able to look over their shoulder in the sense of sharing files. > > There's even real time console sharing. I'm quite excited by the > technology and use it for code school work. > > > > Is there an equivalent of a web-App that allows for python code > > development and debug on a chrome book for example? > > Or any cloud derivative. > > > > As long the the local machine has Internet access, there should be no > problem using PythonAnywhere, as it shows up in your browser. > > > > > > I hope my question is understandable - sorry for my poor description. > > > > > I think the goal at least for code school students is to the laptop be a > local development environment, with a cloud stack for remote deployment of > the world-readable version. > > That's if it's to be a running web app that they're working on (our code > schoolers wanna be web devs). > > If the goal is to share source code, not necessarily a running web app, > then a github account may be sufficient. > > PythonAnywhere makes it easy to tie your cloud account to your public git > repository. > > Kirby > > > > > Thank you for your help. > > > > Regards > > > > Tim Brady > > *Subject Advisor **Computing & ICT * > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/edu-sig/attachments/20160308/840a5a1c/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 152, Issue 5 > *************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Wed Mar 9 10:01:46 2016 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 9 Mar 2016 07:01:46 -0800 Subject: [Edu-sig] Trinket! Message-ID: Wow, thanks Peter, for turning me on to Trinket! http://blog.trinket.io/why-python/ I'm looking forward to using it a lot, maybe even as soon as tonight when I teach my next class. I also just signed up for a Cloud9 account. I look forward to comparing it with PythonAnywhere.com Kirby On Wed, Mar 9, 2016 at 6:47 AM, Peter Farrell wrote: > Hi, Tim, > > Python's online IDEs are a mixed bunch all right. Cloud 9 > hosts a pretty professional-looking environment. > > For people learning Python I highly recommend Trinket , > not least of all because it's the only one I've found so far on which you > can use Python's "turtle" module, my teaching tool of choice. Being able to > use turtles and Visual Python make creating 2D and 3D graphics pretty easy. > > You can also embed the "trinkets" into a webpage, as I've done on mine: > http://www.farrellpolymath.com/code > > Hope this helps! > > Peter Farrell > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Wed Mar 9 11:16:58 2016 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 9 Mar 2016 08:16:58 -0800 Subject: [Edu-sig] Trinket! In-Reply-To: References: Message-ID: On Wed, Mar 9, 2016 at 7:01 AM, kirby urner wrote: << SNIP >> > I also just signed up for a Cloud9 account. I look forward to comparing > it with PythonAnywhere.com > > Kirby > > Getting my test Flask application running on Cloud9 was easy, though I think it's using the built-in Flask server. PythonAnywhere imports a Flask app into a generic WSGI server that's maybe more robust? Still investigating the differences. https://python5-thekirbster.c9users.io/ Displays a chess board, uses AJAX to say what piece is clicked on i.e. the local JavaScript has to ask the server in the background "What piece is here?" using GET. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Wed Mar 9 11:24:43 2016 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 9 Mar 2016 08:24:43 -0800 Subject: [Edu-sig] Cloud9 vs. PythonAnywhere Message-ID: On Wed, Mar 9, 2016 at 8:16 AM, kirby urner wrote: > > > On Wed, Mar 9, 2016 at 7:01 AM, kirby urner wrote: > > << SNIP >> > > >> I also just signed up for a Cloud9 account. I look forward to comparing >> it with PythonAnywhere.com >> >> Kirby >> >> > Another difference: the free account @ PythonAnywhere lets my run my app continuously: http://thekirbster.pythonanywhere.com/ The Cloud9 version will stop after two hours for free accounts: https://docs.c9.io/v1.0/docs/inactive-workspaces But one can start it again e.g. for a class, by running it again. Here's the source code for what's running @ Cloud9: https://github.com/4dsolutions/Python5/blob/master/mfg.py with this change to the final boot section: if __name__ == '__main__': app.run( debug = True, host = os.getenv("IP"), port = int(os.getenv("PORT"))) Kirby > -------------- next part -------------- An HTML attachment was scrubbed... URL: From funcalculus at gmail.com Wed Mar 9 14:06:26 2016 From: funcalculus at gmail.com (Peter Farrell) Date: Wed, 9 Mar 2016 11:06:26 -0800 Subject: [Edu-sig] Edu-sig Digest, Vol 152, Issue 7 In-Reply-To: References: Message-ID: Hi, Kirby, Thanks for the info about Cloud 9. My Python projects don't run, and all I get is the message on the new page: > "It worked! > Congratulations on your first Django-powered page. > Of course, you haven't actually done any work yet. Next, start your first > app by running python manage.py startapp [app_label]." So I downloaded the mfg.py file and put in the ip and port that Cloud9 says my project is running on. I even started a terminal to put in the above code but what is the name of the app? The python file I want to run? Looking forward to hearing from you, Peter > > Here's the source code for what's running @ Cloud9: > > https://github.com/4dsolutions/Python5/blob/master/mfg.py > > with this change to the final boot section: > > if __name__ == '__main__': > app.run( > debug = True, > host = os.getenv("IP"), > port = int(os.getenv("PORT"))) > > > Kirby > > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/edu-sig/attachments/20160309/48fa8a27/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 152, Issue 7 > *************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Wed Mar 9 14:47:47 2016 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 9 Mar 2016 11:47:47 -0800 Subject: [Edu-sig] Edu-sig Digest, Vol 152, Issue 7 In-Reply-To: References: Message-ID: On Wed, Mar 9, 2016 at 11:06 AM, Peter Farrell wrote: > Hi, Kirby, > > Thanks for the info about Cloud 9. My Python projects don't run, and all I > get is the message on the new page: > >> "It worked! >> Congratulations on your first Django-powered page. >> Of course, you haven't actually done any work yet. Next, start your first >> app by running python manage.py startapp [app_label]." > > > So I downloaded the mfg.py file and put in the ip and port that Cloud9 > says my project is running on. I even started a terminal to put in the > above code but what is the name of the app? The python file I want to run? > > Good morning Peter -- # <--- still before noon in my timezone If you just pull up mfg.py (mini-flask game) in your Cloud9 editor and hit run, it'll run. It's not a Django application. But before you do that: $ sudo pip install flask # <--- this just worked for me Just to cut 'n paste from my still-open-from-some-hours-ago Cloud9 terminal: thekirbster:~/workspace (master) $ sudo pip install flask Downloading/unpacking flask Downloading Flask-0.10.1.tar.gz (544kB): 544kB downloaded Running setup.py (path:/tmp/pip_build_root/flask/setup.py) egg_info for package flask warning: no files found matching '*' under... and so on (lots of noise). Also there's another dependency: chessgame.py # <--- you see it imported up top https://github.com/4dsolutions/Python5/blob/master/chessgame.py Lest you expect too much, all this module is used for is to render the chess board and then respond to questions about what's where. When used standalone at the console, there's actually a player1-player2-player1... input mode where each player gets to move pieces using primitive tuple addressing with no validation the move is legal. But in server mode, i.e. when this module is used by mfg.py, it doesn't even do that. That's the only other file you should need. So yeah, bottom line: it's not Django. Kirby > Looking forward to hearing from you, > > Peter > > >> >> Here's the source code for what's running @ Cloud9: >> >> https://github.com/4dsolutions/Python5/blob/master/mfg.py >> >> with this change to the final boot section: >> >> if __name__ == '__main__': >> app.run( >> debug = True, >> host = os.getenv("IP"), >> port = int(os.getenv("PORT"))) >> >> >> Kirby >> >> >> >> > >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> http://mail.python.org/pipermail/edu-sig/attachments/20160309/48fa8a27/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 152, Issue 7 >> *************************************** >> > > > _______________________________________________ > 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 bobirv at gmail.com Wed Mar 9 08:59:36 2016 From: bobirv at gmail.com (Bob Irving) Date: Wed, 9 Mar 2016 08:59:36 -0500 Subject: [Edu-sig] pythonanywhere Message-ID: Looks interesting. Does anyone know if it can import and run pygame? Bob Irving Porter-Gaud School Charleston, SC -- Twitter: @birv2 www.bob-irving.com http://www.scoop.it/t/on-the-digital-frontier -------------- next part -------------- An HTML attachment was scrubbed... URL: From pcampbell.dawson at gmail.com Thu Mar 10 14:27:55 2016 From: pcampbell.dawson at gmail.com (Patricia Campbell) Date: Thu, 10 Mar 2016 14:27:55 -0500 Subject: [Edu-sig] pythonanywhere In-Reply-To: References: Message-ID: I know that cloud9 is a docker instance of Ubuntu, you can probably import and run pygame there. On Wed, Mar 9, 2016 at 8:59 AM, Bob Irving wrote: > Looks interesting. Does anyone know if it can import and run pygame? > > Bob Irving > Porter-Gaud School > Charleston, SC > > -- > Twitter: @birv2 > www.bob-irving.com > http://www.scoop.it/t/on-the-digital-frontier > > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > https://mail.python.org/mailman/listinfo/edu-sig > > -- P. Campbell Faculty www.dawsoncollege.qc.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: From urner at alumni.princeton.edu Fri Mar 11 20:30:49 2016 From: urner at alumni.princeton.edu (Kirby Urner) Date: Fri, 11 Mar 2016 17:30:49 -0800 Subject: [Edu-sig] outlining a Python course... Message-ID: Last month I offered some admittedly simplistic heuristics regarding how a boot camp / code school might use the colored belt system of martial arts to signal progress to a goal. https://mail.python.org/pipermail/edu-sig/2016-February/011368.html Applied to Python, the formula was simply one of "knowing all the keywords" at the end of the day. That translates to a good reading knowledge of Python, with many adventures yet ahead. "Black belt" just means you know enough to keep learning, not that you're now some uber-guru. The language itself doesn't stop you i.e. you can read other peoples fluent code and keep growing as a coder. I've been experimenting with this motif with my ten session class in California. We might twice a week for four hours each time. We do something like (this is a rough approximation): === Week One: basic types / big picture (rolling your own): REPL IDE IDLE distro python.org anaconda.org jupyter core std library 3rd party = dir id is == < > import math tuple list dict set datetime namedtuple True False int float str input print __builtins__ __doc__ help pydoc __name__ __file__ === Week Two: flow of control / structure of a module docstring comment class def lambda map filter return if while for break continue self __getattr__ __getitem__ __call__ __add__ __mul__ __eq__ python -c -m .py .pyc bash === Week Three: file i/o; more flow: open try except finally with assert str.format printf (%) read readlines write seek tell 'b' 'wb' 'w' unicode ascii __str__ __repr__ __enter__ __exit__ sys os os.path === Week Four: globals locals global nonlocal *args **kwargs decorator syntax: @property @classmethod @staticmethod list set dict comprehensions, generator expressions === Week Five: generator functions yield send itertools coroutine yield from async event loops event driven programming GUI tools sockets threading multiprocessing concurrency === Such a Python course is *not* equivalent to a "full stack developer" or web dev course. I'll have more to say on the latter in a future posting. This hypothetical week Six might be a segue: === Week Six: "full stack" sqlite3 http / https; SQL / noSQL JavaScript HTML / CSS, web frameworks requests Flask Django web2py template language === Notes: I like bringing in collections.namedtuple and datetime.datetime pretty early. The former serves as a bridge from index access e.g. Point[0] to attribute dot notation access e.g. Point.x whereas the latter gives students more appreciation for how builtin types may already contain lots of worldly knowledge. Time has concrete meaning and is somewhat messy. That's a good thing. The shift to daylight savings time this weekend is highly topical. :-D For a lot of my special names I use a Permutation class and talk about elementary group theory. There's a simple cryptography angle that keeps the narrative going and enough logic to make the code interesting: https://github.com/4dsolutions/Python5/blob/master/px_class.py This curriculum is still evolving. I'm always on the lookout for good ideas (and on this listserv I get them aplenty). Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Mon Mar 14 14:25:46 2016 From: kirby.urner at gmail.com (kirby urner) Date: Mon, 14 Mar 2016 11:25:46 -0700 Subject: [Edu-sig] another code school tool ( + other topics) Message-ID: *COOL TOOL*: Another tool I've been meaning to mention, apropos of recent threads: http://www.freecodecamp.com/ I signed up for it wearing my PDX Code Guild hat [1], interested in "the competition" but then I'd say FreeCodeCamp is operating in a different ballpark, too distant from ours to be considered a direct competitor in our market (we do in-person boot camps). FreeCodeCamp gives you thousands of DIY exercises across the several "full stack" topics, but also promotes Chat and Meetup modes, so yes, you'll actually start interacting with and maybe meeting some of your fellow trainees if you show initiative (self-filtering). Granted, some folks are too remote to easily join in-person meetups; urban lifestyles are more conducive to that mode. As one climbs the ladder (I got off it for now, can't climb into every treehouse) the projects get more complex and this morning my Chatter Box is filled with talk of Cloud9 (apropos), where apparently they do deployment exercises. *CODE SCHOOL CONSULTING*: On another front, I'm very "not pushy" about Python, meaning in this context that if Vietnam code schools I'm advising prefer a MEAN stack (know what that is? I do), then more power to 'em. [2] Far be it from me to say a pure JavaScript stack should be written off as 2nd class. These are spanking new technologies and we want willing guinea pigs to dive and and use them -- to their own advantage. The theory is: if you learn how to learn then the tool chain you pick will stay variable, given new tools are coming in, yielding opportunities worth availing of. So by all means, start with a MEAN stack and migrate to something else over time as you learn new tricks (there're always new ones to learn); just pick an entry point that works, includes a winning hand possibility, then maybe shuffle the deck and play a different hand (e.g. switch to something more Pythonic). *LISTOWNER BUSINESS*: if you dig into admin details you'll see I've made urner at alumni.princeton.edu a listowner however this may not prove optimum in the long run so don't be surprised if I switch back to my kirby.urner address at Gmail. I've also posted from my work address with O'Reilly during the chapter when O'Reilly experimented with running a code school (oreillyschool.com), since closed. Just helping document my activity, a geek thing to do. I can't recall if I've posted from any other email addresses over the years. I go way back on edu-sig, but have only recently assumed any listowner duties. Fortunately Naomi Ceder is co-piloting as listowner and has considerable experience (compared to me), listowning within Python.org, using Mailman in particular. *YAY MAILMAN*: I really like Mailman and am recommending it to at least one of my geek subcultures (one fairly new to the listserv concept in general -- yes, behind the times, stuck in 1790s mostly :-D). Finding a service that lets us set up like what Python.org has, a set of Mailman listservs used for self-governance, is on my list of Things to Do in a role-playing -- or we say "hat wearing" -- capacity (@npym_it). Happy Pi Day! Kirby [1] http://mean.io/#!/ M: MongoDB E: Express.js A: Angular.js N: Node.js Funny: http://xkcd.com/1655/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Mon Mar 14 19:19:19 2016 From: kirby.urner at gmail.com (kirby urner) Date: Mon, 14 Mar 2016 16:19:19 -0700 Subject: [Edu-sig] Pi Day Fun (3.14, 2016) Message-ID: http://nbviewer.jupyter.org/github/4dsolutions/Python5/blob/master/Pi%20Day%20Fun.ipynb The above URL renders a Github-saved public I-Python Notebook using nbviewer, a utility for rendering any Jupyter notebook with a public URL. My example Python code is generator-centric as successive approximations of something, approaching a limit, lends itself to such yield-based treatment. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthewharrison at gmail.com Mon Mar 14 20:21:14 2016 From: matthewharrison at gmail.com (Matt Harrison) Date: Mon, 14 Mar 2016 17:21:14 -0700 Subject: [Edu-sig] Pi Day Fun (3.14, 2016) In-Reply-To: References: Message-ID: Here's my "modern" python one-liner for today: print sum(4./num if i % 2 == 0 else -4./num for i, num in enumerate(range(1, 100000, 2))) Cheers, Matt On Mon, Mar 14, 2016 at 4:19 PM, kirby urner wrote: > > http://nbviewer.jupyter.org/github/4dsolutions/Python5/blob/master/Pi%20Day%20Fun.ipynb > > The above URL renders a Github-saved public I-Python Notebook using > nbviewer, a utility for rendering any Jupyter notebook with a public URL. > > My example Python code is generator-centric as successive approximations > of something, approaching a limit, lends itself to such yield-based > treatment. > > Kirby > > > > _______________________________________________ > 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 funcalculus at gmail.com Wed Mar 16 10:06:14 2016 From: funcalculus at gmail.com (Peter Farrell) Date: Wed, 16 Mar 2016 07:06:14 -0700 Subject: [Edu-sig] Edu-sig Digest, Vol 152, Issue 11 In-Reply-To: References: Message-ID: Hi, KIrby, Love the IPython notebook. Great idea to create a notebook with all the Pi stuff, including the funny video. Peter On Tue, Mar 15, 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. another code school tool ( + other topics) (kirby urner) > 2. Pi Day Fun (3.14, 2016) (kirby urner) > 3. Re: Pi Day Fun (3.14, 2016) (Matt Harrison) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 14 Mar 2016 11:25:46 -0700 > From: kirby urner > To: "edu-sig at python.org" > Subject: [Edu-sig] another code school tool ( + other topics) > Message-ID: > < > CAPJgG3Q4aAkSkcsCFYfpsa1bAf5fou-xKcyEQmO0oXsspHXybQ at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > *COOL TOOL*: > > Another tool I've been meaning to mention, apropos of recent threads: > > http://www.freecodecamp.com/ > > I signed up for it wearing my PDX Code Guild hat [1], interested in "the > competition" but then I'd say FreeCodeCamp is operating in a different > ballpark, too distant from ours to be considered a direct competitor in our > market (we do in-person boot camps). > > FreeCodeCamp gives you thousands of DIY exercises across the several "full > stack" topics, but also promotes Chat and Meetup modes, so yes, you'll > actually start interacting with and maybe meeting some of your fellow > trainees if you show initiative (self-filtering). Granted, some folks are > too remote to easily join in-person meetups; urban lifestyles are more > conducive to that mode. > > As one climbs the ladder (I got off it for now, can't climb into every > treehouse) the projects get more complex and this morning my Chatter Box is > filled with talk of Cloud9 (apropos), where apparently they do deployment > exercises. > > *CODE SCHOOL CONSULTING*: > > On another front, I'm very "not pushy" about Python, meaning in this > context that if Vietnam code schools I'm advising prefer a MEAN stack (know > what that is? I do), then more power to 'em. [2] > > Far be it from me to say a pure JavaScript stack should be written off as > 2nd class. These are spanking new technologies and we want willing guinea > pigs to dive and and use them -- to their own advantage. > > The theory is: if you learn how to learn then the tool chain you pick will > stay variable, given new tools are coming in, yielding opportunities worth > availing of. > > So by all means, start with a MEAN stack and migrate to something else over > time as you learn new tricks (there're always new ones to learn); just pick > an entry point that works, includes a winning hand possibility, then maybe > shuffle the deck and play a different hand (e.g. switch to something more > Pythonic). > > *LISTOWNER BUSINESS*: > > if you dig into admin details you'll see I've made > urner at alumni.princeton.edu a listowner however this may not prove optimum > in the long run so don't be surprised if I switch back to my kirby.urner > address at Gmail. > > I've also posted from my work address with O'Reilly during the chapter when > O'Reilly experimented with running a code school (oreillyschool.com), > since > closed. > > Just helping document my activity, a geek thing to do. > > I can't recall if I've posted from any other email addresses over the > years. I go way back on edu-sig, but have only recently assumed any > listowner duties. > > Fortunately Naomi Ceder is co-piloting as listowner and has considerable > experience (compared to me), listowning within Python.org, using Mailman in > particular. > > *YAY MAILMAN*: > > I really like Mailman and am recommending it to at least one of my geek > subcultures (one fairly new to the listserv concept in general -- yes, > behind the times, stuck in 1790s mostly :-D). > > Finding a service that lets us set up like what Python.org has, a set of > Mailman listservs used for self-governance, is on my list of Things to Do > in a role-playing -- or we say "hat wearing" -- capacity (@npym_it). > > Happy Pi Day! > > Kirby > > [1] http://mean.io/#!/ > M: MongoDB > E: Express.js > A: Angular.js > N: Node.js > > Funny: > http://xkcd.com/1655/ > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/edu-sig/attachments/20160314/e947a2dd/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Mon, 14 Mar 2016 16:19:19 -0700 > From: kirby urner > To: "edu-sig at python.org" > Subject: [Edu-sig] Pi Day Fun (3.14, 2016) > Message-ID: > 3MsG0oJX-9Z0XaQPfpyMnEHA at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > > http://nbviewer.jupyter.org/github/4dsolutions/Python5/blob/master/Pi%20Day%20Fun.ipynb > > The above URL renders a Github-saved public I-Python Notebook using > nbviewer, a utility for rendering any Jupyter notebook with a public URL. > > My example Python code is generator-centric as successive approximations of > something, approaching a limit, lends itself to such yield-based treatment. > > Kirby > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/edu-sig/attachments/20160314/963e1524/attachment-0001.html > > > > ------------------------------ > > Message: 3 > Date: Mon, 14 Mar 2016 17:21:14 -0700 > From: Matt Harrison > To: kirby urner > Cc: "edu-sig at python.org" > Subject: Re: [Edu-sig] Pi Day Fun (3.14, 2016) > Message-ID: > < > CAGp0cS+nK1Uv4Qc3biTFkTiPFw_93mHre60P9ndpwgFxtFuCkA at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Here's my "modern" python one-liner for today: > > print sum(4./num if i % 2 == 0 else -4./num for i, num in > enumerate(range(1, 100000, 2))) > > Cheers, > > Matt > > On Mon, Mar 14, 2016 at 4:19 PM, kirby urner > wrote: > > > > > > http://nbviewer.jupyter.org/github/4dsolutions/Python5/blob/master/Pi%20Day%20Fun.ipynb > > > > The above URL renders a Github-saved public I-Python Notebook using > > nbviewer, a utility for rendering any Jupyter notebook with a public URL. > > > > My example Python code is generator-centric as successive approximations > > of something, approaching a limit, lends itself to such yield-based > > treatment. > > > > Kirby > > > > > > > > _______________________________________________ > > 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: < > http://mail.python.org/pipermail/edu-sig/attachments/20160314/593f44d2/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 152, Issue 11 > **************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Thu Mar 17 10:03:02 2016 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 17 Mar 2016 07:03:02 -0700 Subject: [Edu-sig] welcome to algebra city! Message-ID: One of my mainstays, when it comes to teaching Python, is the Composable class. I worked on this Python type with Steve Holden back in the day, when he was writing his four part Python curriculum for O'Reilly School of Technology. His version of Composable shows up in Chapter One of the fourth course: http://archive.oreilly.com/oreillyschool/courses/Python4/Python4-01.html#s_03 My current version of the Composer class, used as recently as last night in my Session 8-of-10 for Saisoft.net, is embedded in this Jupyter Notebook, which should render in any browser: http://nbviewer.jupyter.org/github/4dsolutions/Python5/blob/master/ComposingFunctions.ipynb The usefulness of the Composer class is multifaceted: * It demonstrates operator overloading, providing meaning / behavior for both __mul__ and __pow__. * Algebraically, composition is a basic operation and relates to "piping" in the bash shell. Composing functions is core to lambda calculus. [1] When the output of a first function becomes the input to a next, that's composition. Example: $ ls *.py | wc -l which outputs the number of Python source code modules in a given directory. Notice how the pipe operator is used to get output from the command on the left to the command on the right. * Finally, Composable is usable as a class decorator, turning the decorated function into a composable one. So introducing composition of functions is an excuse to learn / reinforce many Python concepts. Kirby [1] per previous posts, whereas lambda calc is a highly specialized subject, if repurposed to contrast with delta calc i.e. conventional calculus, it becomes a marketing / publishing term for the kind of discrete math / compsci that states are starting to mandate. As a high schooler taking algebra, you might want to continue with more lambda than delta calc, depending on career plans. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Fri Mar 18 21:18:05 2016 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 18 Mar 2016 18:18:05 -0700 Subject: [Edu-sig] some real teaching code I use with my code school students Message-ID: Here's some code I used with students last Monday, in Session 8 of 10. They've covered all the Python keywords as of Session 7 but we still need to keep going over all we've learned, seeing how the concepts mesh together. Actually at this point we haven't looked at the newest keywords async and await, nor yield from as a construct. An epiphany or at least a glue-it-together moment is when we show how a decorator of a function generator may be used to give a context manager. The two versions of the game below work the same way, but the second applies said decorator logic. The script suggests seeing the "context" as a Spooky Castle one enters, there to guess one of the keywords. That's the challenge. Guessing right still results in an exception being raised, but one that's handled by __exit__, whereas failure to "get it right" results in a different exception still in need of handling even after the scope of the with block. Kirby ==== # -*- coding: utf-8 -*- """ Created on Thu Feb 11 04:58:14 2016 @author: Kirby Urner Copyleft MIT License >From the docs: sys.exc_info() This function returns a tuple of three values that give information about the exception that is currently being handled. The information returned is specific both to the current thread and to the current stack frame.... see docs for more """ 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 instance 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])) === # -*- coding: utf-8 -*- """ Created on Thu Feb 11 06:00:49 2016 @author: Kirby Urner Copyleft MIT License """ from contextlib import contextmanager from keyword import kwlist from random import choice import sys class EscapeVictorious(Exception): pass class KickFromCastle(Exception): pass @contextmanager def Castle(secret): try: obj = Game(secret) print("Welcome to Spooky Castle. To Escape, guess the secret keyword") yield obj # <-- make instance available within scope via 'as' except EscapeVictorious as ex: print("Congratulations!") print("Here is your", ex) return None # default, could leave out or pass except KickFromCastle: print("Better Luck Next Time") print("The keyword was", obj._Game__xyjk) raise class Game: def __init__(self, the_secret): self.__xyjk = the_secret self.guesses = 0 self.hints = 0 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.") if __name__ == "__main__": the_secret = choice(kwlist) try: with Castle(the_secret) as spooky: while True: spooky.query() except KickFromCastle: 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 kirby.urner at gmail.com Sun Mar 20 03:13:48 2016 From: kirby.urner at gmail.com (kirby urner) Date: Sun, 20 Mar 2016 00:13:48 -0700 Subject: [Edu-sig] some real teaching code I use with my code school students In-Reply-To: References: Message-ID: On Fri, Mar 18, 2016 at 6:18 PM, kirby urner wrote: > Here's some code I used with students last Monday, in Session 8 of 10. > > They've covered all the Python keywords as of Session 7 but we still need > to keep going over all we've learned, seeing how the concepts mesh > together. > > In light of some subsequent off-list chit chat I should hasten to add that my quoted code was not really "Pythonic" as we like to say. I was exercising some grammatical constructs we'd been over, trying to dense-pack them into a "game" with a plot (guess a secret word). Context manager, decorator, subclassed exceptions, function generator... all working together but not in a very realistic way. Code designed to show off constructs working together has a somewhat artificial flavor. There'd be way more straightforward ways to create that user experience, most definitely! I need to make sure my students realize this when we do Session 9 on Monday. And now for something completely different: http://insights.cermacademy.com/2016/03/131/ Comments welcome. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Tue Mar 22 17:41:54 2016 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 22 Mar 2016 14:41:54 -0700 Subject: [Edu-sig] Pi Day / Jupyter NBs: new Youtube Message-ID: My newest Youtube on Jupyter Notebooks, Pi Day theme: https://youtu.be/x61uUu_amDk I just got Camtasia for Mac and this was my first project using it. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Sat Mar 26 22:57:34 2016 From: kirby.urner at gmail.com (kirby urner) Date: Sat, 26 Mar 2016 19:57:34 -0700 Subject: [Edu-sig] remembering Python... Message-ID: Here's the somewhat nostalgically named "Remembering Python": https://youtu.be/6xQxhD29Rdc (a short Youtube for Python teachers) Twas from a last session (ten of ten) looking back on what we'd covered. I'm not excerpting this recording verbatim from the class. Rather, I'm going over some of what I've learned as a mentor, about ways to share Python. There's a Jupyter Notebook to go along: http://nbviewer.jupyter.org/github/4dsolutions/Python5/blob/master/Remembering1.ipynb Not that much to it, content-wise (it's short). In the Notebook and in the class notes (see "whiteboard") I hint at another "deep well": the special names. __invert__ in this case. I use it for encrypt / decrypt (permutations). I call these __ribs__ or "scaffolding" for use "backstage" in my banter. Learning Python involves learning this given special names. I notice in my two test browsers, the output of dir(__builtins__) gets truncated, chopped off, in the cited Notebook. Rendering directly on Github does not have this problem: https://github.com/4dsolutions/Python5/blob/master/Remembering1.ipynb On another topic, I attended the most recent Python User Group and followed up with this listserv posting: https://mail.python.org/pipermail/portland/2016-March/001744.html (talks about the user group towards the end and leads to more links). Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From funcalculus at gmail.com Wed Mar 30 13:24:56 2016 From: funcalculus at gmail.com (Peter Farrell) Date: Wed, 30 Mar 2016 10:24:56 -0700 Subject: [Edu-sig] Interactive Coding Web Pages? Message-ID: Hello to the Group! I'm redesigning my math-using-Python-programming course and need your input. I'd like to have the participants enter their code on a site like they do at CodingBat or CodeWars: the site tests the code and immediately gives the user feedback. Has anybody done this? Is there a template available for doing this, or is it a custom job? Is there an easier way, using an online IDE where teachers can set up classes? Would you recommend going with IPython/Jupyter notebooks instead? Any input you have would be appreciated. Thank you! Peter Farrell farrellpolymath.com hackingmathclass.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From andre.roberge at gmail.com Wed Mar 30 14:06:36 2016 From: andre.roberge at gmail.com (Andre Roberge) Date: Wed, 30 Mar 2016 15:06:36 -0300 Subject: [Edu-sig] Interactive Coding Web Pages? In-Reply-To: References: Message-ID: Hello Peter, On Wed, Mar 30, 2016 at 2:24 PM, Peter Farrell wrote: > Hello to the Group! > > I'm redesigning my math-using-Python-programming course and need your > input. > > I'd like to have the participants enter their code on a site like they do > at CodingBat or CodeWars: the site tests the code and immediately gives the > user feedback. > > Has anybody done this? Is there a template available for doing this, or is > it a custom job? > > Is there an easier way, using an online IDE where teachers can set up > classes? Would you recommend going with IPython/Jupyter notebooks instead? > Although it was not designed specifically for this type of application in mind, if no better suggestion is made, you could use Reeborg's World to do this. I just made a quick "demo world" using the current development version. To view it, go to: http://reeborg.ca/reeborg.html?lang=en&mode=python Enter the following line in the editor and press the "run" button (near the top left) World("/worlds/double.json") When offered, click to replace the code in the editor. Modify the code as you wish, and run the program. ==== When you are done, click on "World info" at the top: this can contain any information you wish to include as instruction. To view how this was done, click on "Additional options" and then "Edit World". You can then move around/minimize the floating windows to reveal 6 editors (on per tab). The relevant code was inserted in the "post" editor. ==== In principle (although I have not fully tested this with this new development version) you could easily create an entire customized menu of such "worlds" (available via the html selector at the top). How to do this is described at http://reeborg.ca/docs/en/reference/worlds.html#creating-custom-menus One thing that I know to be broken with this new version is the "permalink" option (which the example given makes use of). The "old" version ( http://reeborg.ca/world.html) should still work for those examples. > > Any input you have would be appreciated. > Others might very well have some more suitable suggestions for what you have in mind. If not, and you think that Reeborg's World *might* be suitable, do not hesitate to contact me for any further assistance. Note that this approach is limited to using only "pure" Python libraries - you could not use matplotlib examples for instance. Andr? > > Thank you! > > Peter Farrell > farrellpolymath.com > hackingmathclass.blogspot.com > > _______________________________________________ > 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 Mar 30 14:10:19 2016 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 30 Mar 2016 11:10:19 -0700 Subject: [Edu-sig] Interactive Coding Web Pages? In-Reply-To: References: Message-ID: On Wed, Mar 30, 2016 at 10:24 AM, Peter Farrell wrote: > Hello to the Group! > > I'm redesigning my math-using-Python-programming course and need your > input. > > I'd like to have the participants enter their code on a site like they do > at CodingBat or CodeWars: the site tests the code and immediately gives the > user feedback. > > You ask excellent questions. However the word "course" is underspecified in it's left to the imagination to guess if this course is (A) delivered purely virtually, (C) with a teacher in a classroom where students join in a learning process, or (B) a hybrid. Do they use CodingBat with a teacher in the room looking over their shoulders, or are they on their own in a personal workspace (like a cubicle or study carrel). You may be familiar with Michigan's Nexus Academy environment. The students enter a proctored environment with adult supervision, a cafeteria and gym may be provided, various breakout rooms and meeting rooms. However the teachers in this picture tend to patch in from remote locations, either for real time content delivery and interaction, or more asynchronously. > Has anybody done this? Is there a template available for doing this, or is > it a custom job? > At O'Reilly our approach was to spin up a workstation in the could, behind a login credential, already provided with IDE + required tools. Were I doing it today, the workstation would come with the Anaconda distribution and Visual Python, a few other bells and whistles (maybe povray). > > Is there an easier way, using an online IDE where teachers can set up > classes? Would you recommend going with IPython/Jupyter notebooks instead? > A lot depends on whether students need to do the equivalent of "passing in homework". Given we were issuing certificates, we wanted to look at aspects of style as well as substance, so even if a program delivered the correct user experience, we might send it back for a next iteration, based on lack of documentation or other such standard. Sometimes the submission would pass, but the mentor would nevertheless point out areas that could use improvement, so "pat on the back with advice". Writing programs to replace human mentors never seemed like a feasible way to go, but then there's no harm in turning students loose in entirely automated environments for workout purposes. After all, Python itself provides such an environment. At PDX Code Guild we think a student:teacher ratio of about 12:1 is ideal. But that's an intensive in-person meetup. If we factor in the distance education aspects, then the ratios may be a lot different. Not all students are active at once is the main thing, so the effective teacher caseload is not a linear function with number enrolled. A core question is whether you plan to provide a "world" behind a login, and if so what's in that world. Most educational materials come without a login. I just bought Python Programming for Biology for $60 and do not expect to need to login anywhere. But then neither will I be getting a credential for reading it. The goal is to continue improving the STEM content of my course materials. Kirby > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Wed Mar 30 14:17:47 2016 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 30 Mar 2016 11:17:47 -0700 Subject: [Edu-sig] Interactive Coding Web Pages? In-Reply-To: References: Message-ID: On Wed, Mar 30, 2016 at 11:10 AM, kirby urner wrote: > Has anybody done this? Is there a template available for doing this, or is >> it a custom job? >> > > At O'Reilly our approach was to spin up a workstation in the could, > ... in the cloud, not the could (duh). :-D Our servers were in Illinois near Champaign-Urbana though I believe we were in the process of moving them (as a mentor, my insight into the details of the IT side were rather limited). One of our core issues, as you might imagine with a cloud-based solution, was lag-time. A bum router somewhere can slow things down almost regardless of geographic distance, and many a student complained of sluggish behavior. They might need a refund within the trial period, or if truly dedicated despite lags, we could bypass the GUI to some extent, with an ssh backdoor, and that could be just the ticket. Just in traveling, I'd experience huge differences in performance, as I was using the same servers as the students were. This place I stayed in Philadelphia had agonizingly slow Internet, so I'd go somewhere else and get my work done. So you're lucky if you don't have to fight "the weather" (bandwidth issues), though I'm sure there are other trade-offs. My challenge was to make sure they didn't go away blaming Eclipse (the IDE) for there frustrations. It wasn't the IDE that was bogging down, but the whole Remote Desktop Connection (RDC). Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From macquigg at ece.arizona.edu Wed Mar 30 17:02:37 2016 From: macquigg at ece.arizona.edu (David MacQuigg) Date: Wed, 30 Mar 2016 14:02:37 -0700 Subject: [Edu-sig] Interactive Coding Web Pages? In-Reply-To: References: Message-ID: Hi Peter, A few years back, inspired by JavaBat, I set up a Python code-practice site, PyKata.org. It worked very nicely, doing everything JavaBat would do for Java, but with Python instead. We even had plans to set up a customizable interface, so every teacher could have their own homepage, pick their own exercises, and make it look like entirely their own creation. Unfortunately, I got too busy with my day job, and couldn't put in the time necessary to finish the development. So I put it aside for a project I could do when I retire. A few months ago, I got a notice from Google, that they were changing their App Engine, and I would have to modify my code to continue keeping the site working. I didn't have time even for that, so the website went away. I did post a notice on edu-sig, but got no response. The domain name pykata.org is expiring this week. Let me know if you want it. David MacQuigg, PhD On Wed, Mar 30, 2016 at 10:24 AM, Peter Farrell wrote: > Hello to the Group! > > I'm redesigning my math-using-Python-programming course and need your > input. > > I'd like to have the participants enter their code on a site like they do > at CodingBat or CodeWars: the site tests the code and immediately gives the > user feedback. > > Has anybody done this? Is there a template available for doing this, or is > it a custom job? > > Is there an easier way, using an online IDE where teachers can set up > classes? Would you recommend going with IPython/Jupyter notebooks instead? > > Any input you have would be appreciated. > > Thank you! > > Peter Farrell > farrellpolymath.com > hackingmathclass.blogspot.com > > _______________________________________________ > 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 Mar 30 19:38:26 2016 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 30 Mar 2016 16:38:26 -0700 Subject: [Edu-sig] Interactive Coding Web Pages? In-Reply-To: References: Message-ID: Alas I lost my osgarden.appspot.com to the new Google App Engine too. Just a simple I-Ching machine based on Unicode in the source... far less sophisticated than Pykata. I'm one who thinks fierce concentration on projects feeds the Zeitgeist in ways we cannot measure accurately. Pygeo made a big difference too, in opening a sense of what's possible. Arthur's projective geometry package. A limited attention span means many projects go unsung, but not necessarily because they lack merit. Projects like Struck and Packinon shaped a lot of my thinking in their day, in the small pond I was a big fish in. Some projects I saw get off the ground are still key: vZome by Scott Vorthmann and Antiprism by Adrian Rossiter come to mind (neither a Python project). VPython remains on my radar as one of those most critical to get working in the cloud as part of the student experience. I want spatial geometry not just the flat stuff. In a virtual desktop, as on a local laptop, one can use Vpython. But I'm not so sure there's an in-browser solution. Also when it comes to learning to code, I favor an IDE over Notebooks. The latter might be more for prettification and/or sharing with coworkers. It's not either / or. Use IDE to develop then frame it and summarize for public use in a Notebook. Another way to export an API. Anaconda comes with both Spyder (IDE) and Jupyter Notebooks for a reason. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Thu Mar 31 21:43:59 2016 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 31 Mar 2016 18:43:59 -0700 Subject: [Edu-sig] erratum? Bioinformatics book... Message-ID: I wonder if anyone else out there in subscriber-world has Python Programming for Biology, by Stevens and Boucher. I'm enjoying it and learning a lot. PDB files... On page 75 this is given as the wrong way to pass a function for which you wish to set up some default parameters: def jobFunc(arg1, errorFunc('Warning', color='Red')) # Wrong I agree that's wrong because we don't want to be calling the function it this time merely passing it in as an object still uncalled, arguments pre-set. This errorFunc collapses to an object, gets evaluated prematurely. But then the "right way" (same page) is given as: def jobFunc(arg1, lambda: errorFunc('Warning', color="red')): I'd say that's wrong too as we've not bound this function to a name, so how in the function body is errorFunc to be triggered? No object is queued. I'd go with: def jobFunc(arg1, to_do = lambda x='Warning', color='red': errorFunc(x, color)): which gives the caller a way to override the defaults and not use errorFunc at all maybe. Otherwise, if the defaults are acceptable, just call to_do() in the body, with no args, and all will be well. Another pattern: def jobFunc(arg1, message = 'Warning', color='red'): # ... try: # etc. -- whatever it is that might not work pass except: errorFunc(message, color) That's assuming errorFunc is always appropriate and we're only concerned to maybe override its default arguments. That could work too. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: