[Edu-sig] introducing python

2024-04-18 Thread kirby urner
When I start introducing Python I use this chart [1]:

Five Dimensions of Python:


   - Level 0: core syntax with keywords & punctuation, indentation (import,
   if...)
   - Level 1: a large set of built-ins (e.g. print)
   - Level 2: special names with the double underlines
   - Level 3: Standard Library (e.g. math)
   - Level 4: 3rd Party Ecosystem (e.g. numpy, pandas, matplotlib)

Here's a Level 2 topic I've been recently working on:

https://nbviewer.org/github/4dsolutions/m4w/blob/main/gadzooks.ipynb

I know, we don't all love those __ribs__ (special names), however that's a
benefit of Free Open Source: you can fork and adapt, take the best ideas,
and leave the rest.

This one is about how implementing __add__ gets you default behavior
for __iadd__ with no extra work, with the option to go on to add your
own __iadd__.

Kirby


[1] example of me doing that:

https://github.com/4dsolutions/clarusway_data_analysis/blob/main/python_warm_up/warmup_python_intro.ipynb

coming from:

https://nbviewer.org/github/4dsolutions/clarusway_data_analysis/blob/main/DAwPy_S1_%28Numpy_Arrays%29/daily_schedule.ipynb

(Exhibit: some Python teaching in the wild)
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: Lightning Talk: Quadrays with Python

2024-04-08 Thread kirby urner
On Mon, Apr 8, 2024 at 12:39 PM kirby urner  wrote:

> Fond memories. [1]

[1]

https://flic.kr/s/aHsjyyLxcQ  (pix from a Pycon in Santa Clara)

https://youtu.be/iBvd5gU2sgY  (another Lightning Talk -- at Santa Clara)

https://www.linkedin.com/pulse/pythonic-andragogy-kirby-urner/  (on
Pythonic Andragogy)
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Lightning Talk: Quadrays with Python

2024-04-08 Thread kirby urner
https://youtu.be/enO1vgOJxwM

Were I to join the Saturday Morning queue, and share a Lightning Talk at a
Pycon.  Fond memories. [1]

This 4 min 38 sec YouTube speaks to teachers in that Venn Diagram where the
set of math teachers and set of Python programmers intersect.  edu-sig has
always presumed such an intersection exists, and caters to its members.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: Grokking Python

2024-03-04 Thread kirby urner
On Mon, Mar 4, 2024 at 1:09 AM DL Neil via Edu-sig 
wrote:

> On 4/03/24 06:30, kirby urner wrote:
> > On Sat, Mar 2, 2024 at 3:37 PM Wes Turner  > <mailto:wes.tur...@gmail.com>> wrote:
> >
> > They're dunder methods; double-underscore
> >
> >
> > Certainly they are and my intro definitely includes this information.
> >
> > Check out the following Dog class, endowed with two of Python’s “magic
> > methods” also known as: “dunder methods” (with “dunder” being short for
> > “double underline”) or “special methods”.
>
>

In composing that post I dragged and dropped the JPG showing the actual
source code for said Dog class, as it appears in Medium, but perhaps
embedded pictures are not encouraged by HyperKitty's current settings, I
wouldn't know.

I was a nominal listowner here for a short time but then lost those
credentials somewhere along the way, while still being able to post.
Pleased to meet you mice dancer.  A prof in New Mexico playing with
ChatGPT4 just sent me what it says about me:

https://flic.kr/p/2pBi659  (may be magnified)

Lets I wasn't prepared for the Mailman 3 slash HyperKitty overhaul, which
isn't to say anything against it happening. So what if I was unprepared?
That happens a lot. Stuff happens.



>
> Please read "Why naming things is hard"
> (https://hilton.org.uk/blog/why-naming-things-is-hard) - and yes there
> is any number of similar articles.
>
>

OK, done.


The pertinent quotation is "There are only two hard things in Computer
> Science: cache invalidation and naming things." (Phil Karlton).
>
> When training, the difficulty of choosing names is magnified by the
> difficulty of choosing examples. Short, understandable, apparent,
> illustrative, etc...
>
> So, here's a (Socratic) question: have you ever met a computer scientist
> or programming professional who has had to write code about a dog's
> stomach, or even the other popular one: a bowl of fruit?
>
> Next Socratic question: could we, or should we, choose more realistic
> examples (and names)? Yes, high schoolers have little experience of the
> world and of commerce. So, talking of products and minimum order
> quantities might be a stretch. However, there are plenty of examples
> where we can talk about class Person, and either a wallet which we'd
> like filled, or a list of skills being learned, for example.
>



Ah so, it's the fact that I'm doing a Dog in particular that maybe irks
ya.  Not well-grounded in a professional use case.

Sometimes I go straight to a Python class (i.e. snake) and do the same
thing with the stomach (append, maybe pop from).

Typically I'll do an eat method and then show how __call__ might be
substituted for eat( ) or even made a synonym.

The idea being these creatures have __ribs__ being vertebrates, and ribs
connote a spinal cord, which is the seat of reflex reactions i.e. verb
actions, responses to stimuli (being called in various ways).

Snakes have lots of ribs. A mnemonic, but one not widespread in the
literature (better for me that way? -- I stand out).

The idea being:  thinking in terms of objects was meant to meet you
halfway. Think of the types of objects you know from being alive. Know any
dogs?  The term "object oriented" is not meant to be mysterious. It shares
a lot with English grammar i.e. noun.verb(args). The parens look like a
mouth turned sideways and they "eat" arguments (if any are provided).

Typically humans have more experience with dogs than with programming
languages by their teen years, though not always.

Lets help you think about Python in terms you already understand, given
you're a Person inheriting design attributes of Mammals (or more generally
an Animal) in the process.

So, did I learn this Pythonic Andragogy from actual practicing computer
programmers who've devoted their whole lives to being good at programming
(I was pretty good -- made a decent living)?  They're not my principal
audience. How about computer scientists? Nope, they already know this stuff.

My audience is more "English speakers" although I presume the stuff readily
translates. They may not wish to become coders, ever (but since when did
life obey mere wishes?). I was a philosophy major myself although at
Princeton we looked down on the word "major" for some reason.

After we have a Dog, Snake and Cat class, I tend to hoist the eat and even
birth methods (__init__) to an Animal superclass, leaving these now
subclasses of Animal to __repr__ themselves, and do things specific to
their species, such as bark or meow.

__repr__ could be written more generally though, making use of
type(self).__name__ for like "Dog('rover')" output, even from Animal.

See:
https://github.com/4dsolutions/DigitalMathematics/blob/master/grok_python.py

Wait, am I saying that Dog's have a self

[Edu-sig] Re: Grokking Python

2024-03-03 Thread kirby urner
On Sat, Mar 2, 2024 at 3:37 PM Wes Turner  wrote:

> They're dunder methods; double-underscore
>
>
Certainly they are and my intro definitely includes this information.

Check out the following Dog class, endowed with two of Python’s “magic
methods” also known as: “dunder methods” (with “dunder” being short for
“double underline”) or “special methods”.


Then my link to them goes here:

https://docs.python.org/3/reference/datamodel.html#specialnames

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Grokking Python

2024-02-14 Thread kirby urner
Long termers here will likely remember my fave Pythonic Pedagogy: to
introduce special names as __ribs__.

Because pythons have lots of __ribs__.

I've not abandoned this idea, just haven't been redundantly reposting about
it here for some time.

But now...

Why not share a couple "friend links" (nothing counts against a quota, no
logging in I hope)?:

https://kirbyurner.medium.com/grokking-python-9f96140c1e07?sk=d1ec6762e753d5c79106faf1669fcb04

https://kirbyurner.medium.com/pythons-rib-cage-e4ff16cf3a74?sk=3e59d2356de6a13b42c9cf61d4d6a308

A two parter on Medium. I'm getting some claps. I can take criticisms too.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] boosting sympy (again)

2024-02-11 Thread kirby urner
I've linked to this Notebook previously, however seeing as it's on Github,
it keeps getting updated (just by me in this scenario):

https://nbviewer.org/github/4dsolutions/m4w/blob/main/Polyhedrons.ipynb

Github view:

https://github.com/4dsolutions/m4w/blob/main/Polyhedrons.ipynb

This Notebook showcases what you get from the sympy module:

* numeric evaluations to arbitrary precision

* parallel keeping track of numeric values as algebraic expressions

One could argue one gets this from Mathematica and I'd agree:  Python has
freed itself from the constraints of floating point and does computer
algebra (CAS) to a decent level, by means of free open source libraries.

My strategy continues to be to market this curriculum tech locally (e.g.
here in Oregon), while advertising it more globally (e.g. via Lithuania).

Kirby

Addendum:

More of that same geometry (links to said notebook):
https://mybizmo.blogspot.com/2024/02/slinging-jargon.html

Some history (re the Greater Pythonista community).
https://worldgame.blogspot.com/2010/09/setting-up-djangocon.html

Is there a pyhist-...@python.org or like that?
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: Python in K-12: good news (they're using Jupyter)

2024-01-25 Thread kirby urner
Thanks for jumping in David.

I concur, the Excel environment is a productive "home base" for deriving
the visualizations and is in many cases is sufficient.

In the Office model, one is then expected to embed said visualizations in a
Word document, perhaps exporting to PDF, if wanting to add more verbiage
and/or make it more journal article or textbook like. [1]

In your type of advocacy work, maybe getting the visualizations is
sufficient, and indeed, the final step from Jupyter Notebook to a PDF
version is sometimes the trickiest, when it comes to page breaks especially.

Here's a Notebook in the same ballpark, dealing with the half life of
naturally occurring and/or artificially generated radioactive substances:

https://nbviewer.org/github/4dsolutions/School_of_Tomorrow/blob/master/isotope_decay.ipynb

This is the classic synergy of Jupyter + pandas + matplotlib, the kind of
thing I've been teaching through a Turkey-based company. [2]

I don't see it as either / or, and true, Jupyter might be the wrong tool in
many instances. I wonder if you've had a chance to play with pandas inside
of Excel. I know Microsoft has added that.

I've yet to try it out (currently, I don't have a computer with Office at
my fingertips).

Kirby

PS: in my previous post I had a typo buried in the most mathy part, which
I've since fixed on Github.
https://groups.io/g/synergeo/message/2481

[1]
https://www.theatlantic.com/science/archive/2018/04/the-scientific-paper-is-obsolete/556676/
(Atlantic has implemented more of a firewall then previously -- the article
is about Wolfram's Mathematica as well as Jupyter)

[2]
https://nbviewer.org/github/4dsolutions/clarusway_data_analysis/blob/main/DAwPy_S1_%28Numpy_Arrays%29/daily_schedule.ipynb



On Thu, Jan 25, 2024 at 1:18 PM David MacQuigg  wrote:

> Hello Kirby
>
> Jupyter is excellent, but I still wish there was a simple built-in
> charting tool in Python. Jupyter is like Sketchup, a tool I use once a
> year, but not enough to justify keeping up on it.
>
> My work now is focused on nuclear power
> , and educating
> journalists who might break with the mainstream and need a good summary of
> facts and arguments. That occasionally requires me to make a quick
> calculation and plot, and I find myself using Google Sheets instead of
> Python. Here is an example on Separative Work Units, the fundamental
> measure of cost in uranium enrichment. Once you get the calculation worked
> out, the plot is just a few more clicks.
>
> https://docs.google.com/spreadsheets/d/1OyKPyjo6k1ckZVwAh8sfkDEtB5W22VUriBaelK3LWY4/edit?usp=sharing
>
> David MacQuigg, PhD
> Engineering Editor, Citizendium
> 520-721-4583
>
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Python in K-12: good news (they're using Jupyter)

2024-01-25 Thread kirby urner


Here's something for the archive about how Python continues to help me in 
my work as a K-16 curriculum developer.

There's a link to a Jupyter Notebook running sympy towards the middle, with 
the surrounding text about how it looks to me like the schools are moving 
to Jupyter, judging from my own experience with regional faculties.

Kirby Urner
Oregon Curriculum Network



-- Forwarded message -
From: kirby urner 
Date: Thursday, January 25, 2024 at 7:39:09 AM UTC-8
Subject: Synergetics in K-12
To: trimtab-book-c...@googlegroups.com 




The post below goes back to our TrimTab meetup with Siobhan Roberts and her 
bio of H.S.M. Coxeter.
https://www.freelists.org/post/math4wisdom/Caring-for-our-legacies-Franz-Jere-Kirby-Andrius,4.
 
( public archive)

That USA public schools have proved themselves largely incapable of 
incorporating useful K-12 content drawing from Synergetics has left them 
non-competitive vs-a-vs private schools that are finding ways. 

This deficiency could be addressed, however the quality of public school 
education has dropped much lower on the priorities list than it used to be, 
according to a public school worker I interviewed recently (I'm still 
looking for a key data visualization on that score).

Kirby


-- Forwarded message -
From: *kirby urner* 
Date: Wed, Jan 24, 2024 at 7:43 PM
Subject: Re: [math4wisdom] Re: Caring for our legacies: Franz, Jere, Kirby, 
Andrius...
To: 
Cc: math4wisdom 



Greetings all --

I am glad to be hearing from Franz, who has a lively writing style about 
stuff I also care about.

My last contribution to this listserv was before my car trip north, 
somewhat recapitulating a trip I did with Andrius in 2023.

On my way back, I visited a small private school my friend works at and 
spoke with the math faculty. [0]

I was gratified to discover they were already using the Jupyter technology 
I favor, along with other stuff.  Enough time has passed such that students 
exposed to Jupyter in college are now career teachers and are passing the 
torch if / when free to do so.

"Jupyter" (the word) is an amalgam of Julia Python R (Ju-Pyt-R) as these 
were the original kernel languages adopting what used to be called I-Python 
Notebook technology. The idea is to create interactive web pages that not 
only present static content, but that also allow browsers to run code in 
one or more languages. 

As a high school (and above) level math and computer science teacher, I 
appreciate the level of integration this technology provides and I showcase 
it extensively.

To take a concrete example:

I've continued making hay from the piece of trivium that 2024 (our year) is 
a tetrahedral number. The next one won't be until 2300.

A tetrahedral number is formed by stacking triangular numbers, picture 
bowling balls or cannon balls. 1, 4, 10, 20... we're accumulating 
triangular layers, making the stack higher and higher.  Start with 1, put 3 
under it, but 6 under that, then a layer of 10... and so on.

https://oeis.org/A000292

After a long drive from north of Seattle back to Portland today, I wanted 
to relax and unwind by figuring out why we get  (n(n + 1)(n + 2))/6 for 
this sequence, where n is the layer number. Given 22 layers:  22(23)(24)/6 
= 2024.  Check.

What we can do is assume some formula A n^3 + B n^2 + C^n + D (n = 1, 2, 3, 
4...) does the trick and substitute known values for n paired with 
corresponding right answers. Our goal is to derive the unknowns A, B, C, D 
from the knowns.

A + B + C + D = 1 when n = 1
8A + 4B = 2C + D = 4 when n = 2
27A + 9B + 3D + D = 10 when n = 3
64A + 16B + 4C + D = 20 when n = 4

That's four linear equations in four unknowns, in principle solvable using 
algorithms from linear algebra. 

I added a middle section on the formula's derivation to:

https://nbviewer.org/github/4dsolutions/m4w/blob/main/Sequences.ipynb

letting Python in a Jupyter Notebook do the "heavy lifting" i.e. the work 
of inverting the matrix defined above.

Why am I sharing all this here?  I want to keep building on figurate and 
polyhedral numbers as a topic, and as a gateway to higher maths.

Triangular numbers are figurate (flat) whereas polyhedral numbers tend to 
be multi-layer, such as cubes, tetrahedrons, octahedrons.

One of our more important polyhedral sequences 12, 42, 92, 162... is the 
number of balls in successive layers when you start with 12-around-1 in an 
omni symmetric pattern, that of the cuboctahedron. [1] In adding layers, 
the shape does not change.

In her biography of the late H.S.M. Coxeter, a pioneer of higher 
dimensional Euclidean geometry based in the University of Toronto, Siobhan 
Roberts talks about the generating formula for said sequence 10 * n^2 + 2, 
and how Coxeter was appreciative of Buckminster Fuller for having derived 
it on his own, even though it doesn't take more than high school level 
skills to do so. [2]  Fuller had a fascination for ball packing as

[Edu-sig] reintroduction, link to latest repo

2023-12-11 Thread kirby urner
S'been some time since I reintroduced myself on edu-sig, which remains an
important stash in my "lexiverse" e.g. I have quite a few links into it
(from blogs etc.), pointing back to old discussions and debates,
collections of links (e.g. by Wes Turner) and so on.

In contrast, one of my other main stashes of similar postings was at Math
Forum, math-teach (the publicly archived listserv) in particular, and that
is no more. Math Forum started at Swarthmore College (PA) then was
acquired by Drexel (Philadelphia) and I believe is today managed by the
NCTM (the K-12 math teacher association). mathforum.org

All those discussion groups got wiped (even the archives were removed). All
of which is to say, I'm glad for the relative longevity of Python.org sig
archives in general. At the height of my influence at Math Forum, we had a
whole page on Quadrays, one of those esoteric / obscure topics I like to
use Python for.

https://flic.kr/p/KjMqQP  (screenshot)

Here's a Table of Contents for my most recent Github repo. The entire
4dsolutions.net repo specializes in curriculum development.

https://github.com/4dsolutions/m4w/blob/main/M4WTOC.ipynb

On the ground, I'm often field testing the materials, through different
teaching roles e.g. O'Reilly as a full time Python teacher; adult Python
for Californians with jobs in IT (Saisaft's demographic); Coding with Kids
(before and through start of pandemic); Sunshine Elite Education
(accelerated private school accredited to teach Oregonians); Clarusway (I
taught data analysis and visualization courses for them, adding to their
pre-existing curriculum).

I'm a veteran of many Pycons and a few EuroPythons (Gothenburg, Vilnius),
overlapping a lot with Steve Holden, a former PSF director and chairman
nowadays in the UK but at one time a denizen of Portland, my home town and
center of open source activities, including O'Reilly's OSCON and OS Bridge.
Here on edu-sig, a bunch of us were active in creating a Python in Schools
or Python in Education track with its own events during Pycons. Those were
fun (the ones I got to).

One of my early roles in the Math Wars (debates about maths curriculum) was
to push for laptops and more Python use in the schools. That happened, as
we turned out to be a large army, boosted by the affordability of free open
source software. I came from a full time math teaching background (geometry
thru calc at a Catholic academy) from Princeton, philosophy focus, before
that (Class of 1980).

I'm a big fan of using other-than-floating-point numbers ala Mathematica,
when teaching high school math topics using Python. A lot of my content is
spatially geometric (a theme going back in this archive, in discussions
with one Arthur Siegal especially, https://pygeo.sourceforge.net ).

I'm still blogging a lot, doing YouTubes and so on, looking forward to
2024.

The public archive I post the most to these days, hosted by a math PhD in
Lithuania, is connected through the Github repo.
https://github.com/4dsolutions/m4w/blob/main/m4w_hmwk_oct22_2023.ipynb

Something fun:  https://econgoat.ai/en

Kirby Urner
4dsolutions.net
usa.or.pdx (Portland)
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] my recent YouTube mentioning edu-sig

2023-09-13 Thread kirby urner
FYI:

https://youtu.be/KUBA9Z8PRpU

It's mostly about books, but edu-sig is mentioned.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] pandas outside of data science (exhibit)

2023-06-20 Thread kirby urner
I just got Reuven M. Lerner's Bamboo Weekly (I'm a subscriber) which asks
what I use Python for and talks (succinctly) about pandas.

This specimen is interesting I think...

https://nbviewer.org/github/4dsolutions/School_of_Tomorrow/blob/master/Synchronizing_on_S.ipynb

... because I'm using pandas for tabular data in the context of a
math-geometry page, nothing much to do with data science per se.

Moral:  We don't have to typecast pandas as purely for data scientists,
because every discipline, just about, has tabular data.

I also showcase using sympy in tandem with pandas.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] exhibit on Replit

2023-06-13 Thread kirby urner
Sometimes my students are also learning English and it's fun to build on
that.

However, even if you're perfectly fluent in English, the following exhibit
might prove instructive, regarding Python:

"""
This type of object gets along with nobody!

or·ner·y
ˈôrn(ə)rē/
adjective North American informal
adjective: ornery

bad-tempered and combative.
"some hogs are just mean and ornery"
synonyms: grouchy, grumpy, cranky, crotchety, cantankerous,
bad-tempered, ill-tempered, dyspeptic, irascible, waspish; More

自 = self in Chinese, disregard errors
"""

class Ornery:

  def __init__(自, name="Fred"):
自.name  = name
print("A sourpuss is born!")

  def __getitem__(自, key):
return "How dare you touch me with those brackets!"

  def __call__(自, *args, **kwargs):
return "Don't call me at home!"

  def __getattr__(自, attr):
return "I'm insulted you'd suppose I'd have {}".format(attr)

  def __repr__(自):
return "Don't bother me!  Go away."

  def __invert__(自):
return "I can't invert, are you kidding?"


---

Check it out and run it!

https://replit.com/@kurner/Ornery-Type#main.py

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Update from Silicon Forest

2023-04-05 Thread kirby urner
Originally from Math4Wisdom public listserv, hosted by Andrius Kulikauskas,
PhD.
https://www.freelists.org/list/math4wisdom


From: kirby urner 
Date: Wed, Apr 5, 2023 at 8:16 AM
Subject: Re: [math4wisdom] Re: What is algebra? How do we describe adding,
subtracting, multiplying, dividing?
To: M4W clique


Glad to see David chiming in.

I'm continuing my conversation with Jon re the Bucky stuff on another
listserv (also public archives, like M4W) [1]

[1]  https://groups.io/g/synergeo/message/2260
<https://groups.io/g/synergeo/message/2235>


On Tue, Apr 4, 2023 at 2:24 PM David Pinto  wrote:

> Thanks Andrius et al
>


> Not philosophy. Just what is going on when we count, do addition,
> subtraction, multiplication, addition.
>
>
>

What is Algebra?

I really like M4W's focus on Pascal's Triangle (binomial theorem) as a
doorway into (a) combinatorics and (b) polynomials more generally, leading
(eventually) to the classification of polynomials (their taxonomy) into
such as Bernoulli, Hermite, Sheffer, Chebyshev.

Pascal's Triangle is what I call a "grand central station" on our planet
(aka "Math World" if we wanna call it that, or, more parochially, for me,
"Python Planet").

As a curriculum developer for the Silicon Forest (Oregon Curriculum Network
is my public vehicle, backed by my proprietary 4D Solutions (4dsolutions.net)),
I've been injecting more Abstract Algebra into Algebra (the pre-college
academic subject) by means of Python.

As many of you know, I'm one of those math teachers who thinks we should
ditch graphing calculators for big screen computers, even though this
disrupts the factory-based "every kid has a locker, moves from room to
room" picture of what "school" is supposed to be.  Python can do anything a
graphing calculator does, including plots (xy-curves, histogram, pie
chart... i.e. it's great for statistics, i.e. data science, as well as for
generic geometry).

Students might have to take a van or bus to specific buildings to access
their workspaces though, as these take up too much room per the standard
model classroom.

https://i.pinimg.com/originals/7f/4d/99/7f4d99ec33a9736f3fb890b6127894eb.jpg
https://thetechnodiary.com/wp-content/uploads/2021/07/Cooler-Master-ORB-X-GamePod.jpg

Safe to say: ergonomics is tier one, in terms of priority topics.

Cramped desk or game-ready pod?  For some, it's a no brainer.

Python allows operator overloading i.e. we can define new classes of object
that control what the operators mean to them.  Not every computer language
(e.g. Java) allows this.

Lesson Plan:

A typical Silicon Forest lesson plan features the function type object,
which originally, out of the box, comes unequipped with any meaning for
multiplication.

We then create a new class (new type) based on the function, its instances
callable with the same arguments, giving the same outputs, that makes
"multiply" mean "compose", the archetypal thing we do with functions.

Instead of:

f ( g (x) ) i.e. f after g of x

we now get to write:

(f * g)(x)

or even:

h = f * g

and later:

h(x)

Example (screen shots)

https://www.flickr.com/photos/kirbyurner/52795727030/sizes/c/
https://flic.kr/s/aHsknZHG75 (album)
https://flic.kr/s/aHBqjzJdXN  (a school the let me prototype; Saturday
Academy another)

Part of abstract algebra is elementary group theory and learning that
subtraction and division are "syntactic sugar" for "adding the additive
inverse of" and "multiplying by the multiplicative inverse of"
respectively.

Then we dive into all that totative / totient stuff, i.e. groups of
totatives of N mod N, aiming towards Fermat's Little, and Euler's Theorems
used to implement the RSA algorithm (public key crypto).

This is already an established east coast college prep  pathway at Phillips
Academy / Andover [1].

The Silicon Forest is playing catch up in some respects.

I'm a big fan of the Abstract Algebra lectures on the YouTube channel
Socratica, also good on Python. [2]

[1]  https://dl.acm.org/doi/book/10./1855295 (authors were faculty at
the time)

[2]  https://youtube.com/playlist?list=PLi01XoE8jYoi3SgnnGorR_XOW3IcK-TP6

===
Philosophy of Mathematics

I mentioned to Andrius my interest in Ludwig Wittgenstein's later
philosophy, which later philo LW encouraged us to take in by using his
earlier philo (Tractatus) for contrast, and for clues as to what he was
aiming to show and/or induce.

His Philosophical Investigations (posthumous) dovetails with his Remarks on
the Foundations of Mathematics.

I consider him another philosopher of mathematics, albeit under-appreciated
(somewhat like RBF in that regard -- I merge the two, featuring Bucky-style
language games under a philosophers' microscope (LW's technique)).  EJA
said he enjoyed my RBF/LW confluence.

Two points on LW's contribution:

(1)  he had a strong interest in 'aspect shifts' i.e. the schooling of 

[Edu-sig] Python on background for data analyst track

2023-03-01 Thread kirby urner
As some of us will have experienced, quite a few budding data analysts in
training will come to Python via numpy and pandas, heading towards seaborn
and dash, perhaps from past experience in R or Matlab, perhaps not.

They've never yet had a core Python class, but are likely to have one in
the near future, if they decide to stay within the Python ecosystem and/or
stick with data science.

I've got such a cohort coming my way and thought this time I would develop
some more explicit background content on Python, the core language, which
I'm calling "warm-up notebooks" and so far doing in Jupyter.

https://github.com/4dsolutions/clarusway_data_analysis/tree/main/python_warm_up

Here are some pedagogical features I incorporate that might be of interest
to others in a similar position of needing to develop curriculum:

1.  mention numpy and pandas early

There's nothing conceptually that hard about a rectangle of numbers,
addressable by row and column.  The mechanisms of installing 3rd party
packages may be addressed.

Introduce range, then why not arange and linspace for compare and contrast
purposes.

I go straight to numpy and pandas in notebook 2.  To see the sequence, see
here (home base for the class):

https://github.com/4dsolutions/clarusway_data_analysis/blob/main/DAwPy_S1_(Numpy_Arrays)/daily_schedule.ipynb

I'm still adding notebooks.

2.  functions are just another type of object

In exploring the various built-in types, with Python allowing us to make
new types, it becomes useful to see individual functions as instances of
the function type, where list, tuple, int, str function are all
built-in types.

We don't use keyword class to define a function, but keyword def (or maybe
lambda).

What makes function instances stand out is they're callable.  But so are
instances of classes implementing __call__.

[1] def f(x):
return x * x  # return x times itself

[2] type(f)
function

[3] issubclass(type(f), object)
True

[4] isinstance(f, type(f))
True

3.  Use "composition of functions" to motivate drive a decorator syntax
intro

I've been doing this for a while now.  Most students will remember
composition of functions from high school, and if not, it's an easy concept.

def f(x):
return 2 * x

def g(x):
return x**2


print("f after g:", f(g(arg)))
print("g after f:", g(f(arg)))

Output:
f after g: 200
g after f: 400

What's not so easy, an may require active tutoring, is passing a function
into Composer type like this:

# where decorator syntax will come in handy
f = Composer(f)
g = Composer(g)

print("f after g:", (f * g)(arg))
print("g after f:", (g * f)(arg))

Output (same answers):
f after g: 200
g after f: 400

In other words, we repurpose the __mul__ operator (*) to become the compose
operator, which in LaTeX is usually \circ.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Learning Math with Python

2023-01-27 Thread kirby urner
I was glad to see FreeCodeCamp recommending a math-with-Python course just
now.  Description, with links, appended.

A lot of us on edu-sig have advocated for and/or practiced this genre for
some decades, with in-person summits and everything.  We're a hub!

I've long been working in the same area, including recently, mixing in my
own experimental content:

https://github.com/4dsolutions/elite_school/blob/master/PY4HS.ipynb

Feedback welcome on this one especially:

https://nbviewer.org/github/4dsolutions/elite_school/blob/master/ADS_highschool_math.ipynb

Kirby

PS:  FYI I've also got some Python content at:
https://kirbyurner.academia.edu/research



-- Forwarded message -
From: Quincy Larson 
Date: Fri, Jan 27, 2023 at 8:51 PM
Subject: Learn Math and Python at the same time [free 15-hour university
course]
To: 


Here are this week's five links that are worth your time:

1. freeCodeCamp just published our own university-level course to help you
learn Algebra using Python. If you have forgotten much of the Algebra you
learned – or if you never really learned it well in the first place – this
course is for you. In it, freeCodeCamp instructor Ed Pratowski will teach
you how to use Python and Jupyter Notebook to do math. You'll learn all
about Variables, Graphing, Cartesian Planes, Factoring, and more. Ed has
been teaching math to university students for more than two decades. I
think you'll find his teaching style to be clear and memorable. (15 hour
YouTube course):
https://www.freecodecamp.org/news/college-algebra-course-with-python-code/
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: How can i shift my website to python?

2022-12-27 Thread kirby urner
I'd say there's no easy wix --> Django migration path, with Django a
premier and free Python website development framework.

You'd need to start over.

Why, though?  What's wrong with wix?  What do you imagine you would get out
of a Python do-over?

Feel free to contact me off list.  edu-sig tends to be focused outside of
the commercial business sector.

Have you asked on Quora?

Kirby


On Sat, Dec 24, 2022 at 7:40 AM xigiya3038--- via Edu-sig <
edu-sig@python.org> wrote:

> Hi my website (https://www.solacefamilyfunerals.com.au/) is in Wix. Now i
> want to shift in Custom website using Python Language. Is it possible to
> shift my wix website to custom one using Python Language? I conscious about
> website ranking. Is this process effect my ranking? I need help about
> this.Wating for expert opinion
> Thanks in Advance.
>
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] lightning talk (YouTube < 3 mins) re PyScript

2022-09-05 Thread kirby urner
https://youtu.be/obZqST6mBn8  (2 mins 41 secs)

My first video on PyScript.

Alludes to other topics in my Python for High School stuff.

https://github.com/4dsolutions/elite_school/blob/master/PY4HS.ipynb

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] answer on Quora re common misconceptions re Python

2022-07-21 Thread kirby urner
I've written a ton of answers on Quora over the years.

This latest answer links to our edu-sig home page and talks about Python in
education.

https://qr.ae/pvkQkA

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] reviewing PY4HS (Python for High School) pedagogy / andragogy

2022-07-12 Thread kirby urner
The pedagogy I'm showcasing below follows my theme of "classes first"
and/or "classes early" i.e. we can capitalize on the object oriented
perspective encapsulating how we think in human terms, about objects (known
as "things" in the vernacular (joke)).  Granted some my find the object
oriented perspective an wrong place to start, but this is edu-sig@python.org
after all.

We start with animals, because of their obvious appeal and familiarity,
introduce special names, move to operator overloading in particular, and
from there to a well-known number type already encountered pre high
school:  the rational number, aka fraction.

Back in the early days of edu-sig, I'd promulgate this curriculum sans
Python yet having a Fraction type in the Standard Library.  That didn't
take long to materialize.  Nowadays there's no practical reason to code a
Rat (rational number) if the goal is just to get on with coding.

However if the goal is to learn coding itself, i.e. the grammar of Python,
while reviewing basic arithmetic, then almost nothing could be more
instructive.  A Fraction type is exactly what Python is good at letting us
construct, thanks to all those __ribs__ (as I call them).

Thanks to Wes for suggesting a povray might be conda installed from
conda-forge or one of those.  That certainly would be preferable to a
homebrew solution on Mac I would hazard, if we're using conda anyway.
However I haven't checked it out yet myself.

The class in question is within the hour.  I won't keep posting every
segment as with these last several posts I'll have established the URLs /
Repos through which followup is always possible.  Presumably these recent
posts have established the trajectory.  I'm always on the lookout for more
early adopters if you want to contact me directly.  Let's exchange some
ideas.

Kirby


-- Forwarded message -
From: Sunshine Elite Education 
Date: Tue, Jul 12, 2022 at 2:47 PM
Subject: Python III: Python Programming and Data Structure for High School
: July 12: Before Class
To: 
Cc: 



Greetings everyone, from your instructor for Py4HS (Python for High School)
-- a nickname.

https://github.com/4dsolutions/elite_school/blob/master/Py4HS_July_12_2022.ipynb

is the Notebook I've been working on as a starting place for today's
session.


I want to review what we've been doing in Python, when it comes to making
types (like types of animals), and connect that forward to a Rational Number
type written purely in Python.

A good review of fractions, a topic taken up even before high school.

Then Fibonacci Numbers.

You will find these topics in the overview page, the one where I preview a
lot of stuff.
For example, under Polynomial, you will find reference to a Greek letter
number
(math has lots of those) I introduce in today's Notebook.

In other words, our topics connect together in many ways, just like towns
on a map
may have many roads connecting them in a network (a network is what we also
call
a "graph").  We learn the territory by exploring it.  Python becomes one of
our tools
for exploring mathematics. Plus we also enjoy exploring Python, an
interesting
language by Guido van Rossum and friends.

Kirby


*Course Name*: Python III: Python Programming and Data Structure for High
School
*Datetime*: 07/05-08/26 Tuesday,Friday 4:30pm-6:00pm
*Location*: Online13

Thanks,
Sunshine Elite Education
 
Web: www.SunshineEliteEducation.com
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: Archive Copy: High School with Jupyter Notebooks (Silicon Forest)

2022-07-06 Thread kirby urner
A 10-minute Youtube talk that goes with this branch:

https://youtu.be/7Vp1HGLTYzs

(features this same Github notebook and repo).

Then stick around to check out my channel if curious.

Kirby

PS:  the original contained an embedded animated GIF, like those I do here:
https://github.com/4dsolutions/School_of_Tomorrow/blob/master/Flextegrity_Lattice.ipynb


On Tue, Jul 5, 2022 at 7:32 PM kirby urner  wrote:

>
>
> -- Forwarded message -
> From: Sunshine Elite Education 
> Date: Tue, Jul 5, 2022 at 6:47 PM
> Subject: Python III: Python Programming and Data Structure for High School
> : July 5: after class
>
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Archive Copy: High School with Jupyter Notebooks (Silicon Forest)

2022-07-05 Thread kirby urner
-- Forwarded message -
From: Sunshine Elite Education 
Date: Tue, Jul 5, 2022 at 6:47 PM
Subject: Python III: Python Programming and Data Structure for High School
: July 5: after class
To: 
Cc: 



Greetings students --

This is in followup to our first meetup, which just ended.

I'll often make some notes in followup, to remind you of what we've covered
and to provide some bookmarks for your web browser.

The tools I focused on:

Jupyter Notebook -- used with languages such as Julia, Python and R
Jupyter Lab -- for working with Notebooks
POV-Ray -- Persistence of Vision Ray Tracer
Python  -- the language itself, by Guido van Rossum, the Dutchman

Some Python types and math concepts we previewed (we'll be coming back to
all this stuff, I was just trying to give examples of high school math
topics we'll be looking at):

* sets :  no duplicates, no left to
right order (we looked at some Emoji as elements)
* number bases (other than 10) -- more next time
* Pascal's Triangl e 
* number sequences:  figurate (e.g. triangular) and polyhedral (e.g.
tetrahedral)
https://oeis.org/A000217 (tetrahedral -- found in Pascal's Triangle)
https://oeis.org/A005901 (cuboctahedral)






* "Mod" type: numbers that add and multiply "modulo" something
  (5 mod 12) x (5 mod 12) = 25 mod 12 = 1 mod 12) -- wasn't that much a
high school topic years ago but then along came cryptography as an everyday
feature of the internet
* "Rat" type:  rational numbers i.e. fractions (1/2 + 1/3 = 5/6)
* Polynomials (I didn't say much about them)
* Plotting (meaning "graphs" -- another form of visual output, much easier
to get than with POV-Ray).

The Mod and Rat types demonstrate Python's use of "special names" which
look like __this__ i.e. two underlines on either side of some word.  I call
them __ribs__ because they look a bit like snake ribs
. That's a
"mnemonic device" (a way to help you remember).


For the most part I scrolled through this Jupyter Notebook top to bottom:
https://github.com/4dsolutions/elite_school/blob/master/ADS_highschool_math.ipynb

= = =

Where to get JupyterLab etc?
https://www.anaconda.com/products/distribution

Where to get POV-Ray:
http://www.povray.org/download/ (Windows)
http://megapov.inetart.net/download.html#Mac (Mac and Linux)

You may need to get some help with installation, especially if you want
POV-Ray on Mac or Linux.

Do you know some techies?

My email address is kirby.ur...@gmail.com

I'll be talking in more detail about installation issues on Friday.

We'll also be looking at using Notebooks in the cloud (e.g. through
colab.research.google.com).

But eventually I hope you'll be comfortable using JupyterLab as a working
local environment (with POV-Ray an optional nice-to-have).  JupyterLab
includes access to both Notebooks and Python, as well as to a Terminal
(console) window.



Kirby


*Course Name*: Python III: Python Programming and Data Structure for High
School
*Datetime*: 07/05-08/26 Tuesday,Friday 4:30pm-6:00pm
*Location*: Online13

Thanks,
Sunshine Elite Education

Tel: (503)915-2956
Address: 15320 NW Central Dr. Ste D6, Portland, OR 97229
Web: www.SunshineEliteEducation.com
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] High School Mathematics (Silicon Forest, Python ecosystem)

2022-06-10 Thread kirby urner
I'm just winding up the winter-spring term.

This was actually an 8th grader cohort, pre highschool, but it's an
accelerated curriculum.

They're already doing vector cross products in physics.

https://github.com/4dsolutions/elite_school/blob/master/ADS_highschool_math.ipynb

I'm continuing to add new material.  This morning I added the section on
visualization.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Fwd: Data Structure and Algorithms in Python: May 29: After Class Review

2022-05-29 Thread kirby urner
I share these emails to my students from time to time, to document the
progress of an 8th grade online class.

The Notebook I was working on today.
https://github.com/4dsolutions/elite_school/blob/master/TheCabal.ipynb


-- Kirby


==

From: Sunshine Elite Education
Date: Sun, May 29, 2022 at 7:39 PM
Subject: Data Structure and Algorithms in Python: May 29: After Class Review

Greetings all --

Tonight's talk was about how those intricate little patches of symbols, in
math books, are pretty much algorithms, but in a pre-computer language. We
use letters for numbers because the recipes are for a whole variety of
inputs.  The gears turn, and we get our computed outputs.  That's been
going on since long before electronic computers.

My opening example involved computing the volume of a tetrahedron, regular
or irregular, on the basis of its edge lengths only, of which there are
six.  I showed the Cayley-Menger algorithm for computing that, which
involves taking the "determinant of a matrix" a topic in some high school
math curricula (e.g IB, AP) but not all.

Python's sympy was able to take that matrix and convert it to a lot of
terms under a radical sign (2nd root symbol).  Using plane nets, I was able
to compute the volume of:

* a regular tetrahedron of edges 1
* an "A module" (1/24th of the above)
* an "E module" (1/120th of a rhombic triacontahedron)

This is shoptalk from a niche geometry I specialize in studying.  I was
demonstrating how I make use of the same tools I'm teaching, when doing my
own geometry research.

Python and mathematics weave together in Jupyter Notebooks to give you
symbolic operations with sympy, plotting capability (graphing) with
matplotlib, and tabular data (pandas -- coming up).

During the 2nd half of the talk, we dove deep into Python's capabilities,
reviewing the role of __special_names__ ("__ribs__") via the Ornery class
, and then diving into @properties,
which use @decorator syntax.

That magic circle source code we looked at is here:
https://github.com/4dsolutions/elite_school/blob/master/magic_circle_v2.py


Kirby


*Course Name*: Data Structure and Algorithms in Python
*Datetime*: 01/29-06/19 Wednesday,Sunday 6:00pm-7:00pm
*Location*: Online10

Thanks,
Sunshine Elite Education
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] documenting the evolution of a 21st century high school course (Silicon Forest)

2022-05-15 Thread kirby urner
An email to students, after Zoom class this evening:


-- Forwarded message -
From: Sunshine Elite Education
Date: Sun, May 15, 2022 at 9:32 PM
Subject: Data Structure and Algorithms in Python: May 15: After class (re
Quicksort)
To: 



Thanks for joining me this evening.

The famous QuickSort, which I coded live, is here:

https://nbviewer.org/github/4dsolutions/elite_school/blob/master/ADS_sandbox_7.ipynb
(scroll down)

I was somewhat surprised I could get it working without notes.


Note:  if the goal really is super speed, then C/C++ is a better bet (I
showed C++ for Kids, a book). But Python, with its clear high level syntax,
is good for communicating the gist of the algorithm.

Python itself is written in C (often) so it's internal, native sorting
capabilities (e.g. part of L.sort and sorted(L)) are much faster than those
like the one I shared, written in Python. In a practical sense, you don't
really need to write a sort algorithm in Python as these are already
provided to you.

The source code for Python is out there, if you get curious about how it
sorts stuff internally. Check into how the list type is implemented -- that
would be where I'd poke around (I haven't yet). There should be a book out
there that's like a guide to Python's C internals.  Is there?  I don't know.

I did some overview of our evolving online textbook, which now has a TOC.
Feel free to explore any time, by way of review.  In the Graph Theory
sandbox, I've added more links to student work.

https://github.com/4dsolutions/elite_school/blob/master/ADS_TOC.ipynb

Kirby


*Course Name*: Data Structure and Algorithms in Python
*Datetime*: 01/29-06/19 Wednesday,Sunday 6:00pm-7:00pm
*Location*: Online10

Thanks,
Sunshine Elite Education
--- -

Web: www.SunshineEliteEducation.com
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] exhibit: teacher to students, pre-class email, Silicon Forest May, 2022

2022-05-08 Thread kirby urner
From: Sunshine Elite Education
Date: Sun, May 8, 2022 at 12:07 PM
Subject: Data Structure and Algorithms in Python: Sunday May 8: Pre Class
Prim's Algorithm


Greetings guys --

In the old days of purely paper textbooks, adding to them or changing them
was hard and only happened from one edition to the next, with maybe years
in between.

Today, those of us using Jupyter Notebooks within a version control system
for textbooks, likely have the ability to update them often.  We now think
in terms of an electronic textbook that has the ability to change
continuously through frequent new "versions" (instread of through
relatively infrequent "editions").

Along those lines...

At https://github.com/4dsolutions/elite_school

I have expanded ADS_sandbox_6.ipynb with new material regarding Prim's
algorithm for finding the least costly spanning tree within a graph.

Here's a Youtube I cite and include screenshots from:
https://youtu.be/Uj47dxYPow8

Prim's Algorithm: Minimum Spanning Tree (MST)
371,043 views
Jun 23, 2016
EducateYourself 
2.07K subscribers
Short example of Prim's Algorithm, graph is from "Cormen" book.


Another resource I recently added, a new link from our textbook:
https://www.geeksforgeeks.org/5-best-books-for-competitive-programming/

Might these be books from your library if you see CP in your future?  Are
any of them online?  Maybe you already have some data structure and
algorithms books you would like to recommend and/or share about.

I've included a few recommendations of my own e.g. Math Adventures with
Python for example.  I show a picture of its author, in front of my house.

See you at 6 pm.

Kirby


*Course Name*: Data Structure and Algorithms in Python
*Datetime*: 01/29-06/19 Wednesday,Sunday 6:00pm-7:00pm
*Location*: Online10

Thanks,
Sunshine Elite Education

___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] snapshot 2022: data structures and algorithms

2022-04-28 Thread kirby urner
In a few minutes I'll join Sunshine Elite Education online
and help out like a gym coach in some ways, because
Algorithms and Data Structures, at the 8th grade level,
is a doorway into a competitive sport:  competitive
programming (CP).  Although the contests are geared
towards youth, say high school level, in full adulthood
comes the "coding interview" and so the same skills apply.

Then later tonight, I'll be marching a small army of the
the future through the numpy + pandas + matplotlib
ecosystem.  I'd call that Algorithms and Data Structures
too, in the numpy's ndarray and the DataFrame are both
data structures.  With lots of algorithms to go with.  My
new Hello, World page:

https://nbviewer.org/github/4dsolutions/clarusway_data_analysis/blob/main/Kirby%20Notebooks/Intro_Bio.ipynb

My way of merging both worlds is to tackle the "longest
increasing sequence in a matrix" problem, a coding
interview classic, with numpy.  I'm sure that would not
be acceptable in the contest area, but it's a way of merging
my two worlds.  If you want to see more, click on USAOS
in the Notebook allow and scroll to where I'm developing
those algorithms (Kadane's Algorithm etc.): Eureka Moments.

https://nbviewer.org/github/4dsolutions/elite_school/blob/master/Exercises.ipynb#USA-Computing-Olympiad

I think of this as anthropology, me some guy in the field.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: Fwd: exhibit: after class note to students, Silicon Forest elite school

2022-04-21 Thread Kirby Urner
Sorry about the crummy formatting guys, of the 
forwarded missive. I would have provided a link
but TrimTab BookClub is a private archive.  Here
I'm just 1-2-3 testing that I can sign into edu-sig
directly and post through the HyperKitty interface.

Any feedback is welcome of course.

On this topic of Polyhedrons as a resource for 
learning OO i.e. maybe a Polyhedron superclass 
with specific Tetrahedron, Cube, Octahedron... as 
subclasses (a design I've used a lot): an advantage 
is the ability to bridge to actual rendering, i.e. to 
computer graphics.  When I first joined edu-sig 
some decades back, it was VPython that was 
sparking a lot of excitement (cite Pygeo).  I would 
add Blender to the list of Python ecosystem tools able 
to do spatial stills and animations.  A goal is to keep a 
computer-friendly curriculum more right brain friendly, 
i.e. graphical and not just lexical.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Fwd: exhibit: after class note to students, Silicon Forest elite school

2022-04-21 Thread kirby urner


-- Forwarded message -
From: kirby urner 
Date: Wednesday, April 20, 2022 at 7:50:48 PM UTC-7
Subject: Re: exhibit: after class note to students, Silicon Forest elite 
school
To: Trimtab Book Club 



A very similar letter to my recent one, why?  I'm teaching two groups, this 
one entirely online.

So what I test out with one group, I adjust for the next, leap frog fashion.

I think it's worth sharing them both, to promote a stereoscopic view of the 
terrain.






Thanks for tuning in to our biweekly "radio show" (like talk radio, but 
with pictures).

Today our theme was algorithm speed, which is described using O-notation. 
"Polynomial time" O(n^2) for example, is only able to process about 5000 
data elements in a second, rougly speaking.  That's an approximation I cited
from the USACO PDF I want you to have:

https://usaco.guide/CPH.pdf

That 300 page PDF has a healthy dose of what we call Discrete Math. It's 
what
you will need to do well in CP (competitive programming).  Sorting, finding 
shortest
paths through a graph, or solving a subarray problem ("Kedanes algorithm" 
is part
of the lore), have all been implemented for you.  

The USACO documentation counsels against trying to reinvent the wheel on 
the fly 
i.e. reinventing the best known algorithms.  Rather, your job is to know 
which 
algorithm is called for, and then to make use of the relevant library, e.g. 
for sorting.

My talk zoomed back, away from CP, to show more of the terrain:  algorithms 
as 
used in the movie and simulations industries, data structures as tiles from 
a globe.
I demonstrated a real time rendering of tensegrity structures, implemented 
by a 
world leader in the field, Gerald de Jong.

Thanks to WebAssembly generated from Rust, your browser is able to show his 
creations involving in real time, not as a pre-recorded movie.  Sometimes 
it's 
hard to tell the difference.

https://pretenst.com/app/#construction;Triped
https://pretenst.com/app/#construction;Halo-by-Crane

Real materials (not CGI):
https://pretenst.com/construct ion/2021/07/27/brass-bubble-120 
<https://pretenst.com/construction/2021/07/27/brass-bubble-120>

This is all still Algorithms and Data Structures.  

I ended with kennethsnelson.net. That's not the website I built for him, 
and 
for which he gave me Barrel Tower (showed on screen), but the one that 
came after, when he found the right paid professional.  I was just doing it 
as a friend.

Kenneth, an Oregonian (born and raised in Pendleton), was in inspiration 
for both Gerald and myself.

Lastly, what some of you may of missed as I shared this early (as a loose 
end from last time):

https://youtu.be/gFEE3w7F0ww

Lex Fridman is a great interviewer and in this case his guest is a member 
of the Python community who has a lot to do with the tools I've been 
introducing (e.g. numpy and Anaconda).

Kirby





*Course Name*: Data Structure and Alg orithms in Python
*Datetime*: 01/29-06/19 Wednesday,Sunday 6:00pm-7:00pm
*Location*: Online10

Thanks,
Sunshine Elite Education 
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] update re Algorithms and Data Structures (pre college)

2022-04-21 Thread kirby urner
What I didn't fully realize, when I signed on as the
Algorithms and Data Structures teacher, for two
groups of 8th graders, is that ADS is pretty much
the property of CPers at the age level.  CPers?
Competitive Programmers.  They join olympiads

,
which present them with problems needing those
special algorithms.  There's a premium placed on
speed, both to come up with a solution, to implement
it, and to have it run at optimal speed.

As the old guy applications programmer with a
philosophy background (Princeton), I'm not a past
champion.  Nor have I had to go through a gauntlet
of job interviews for coding jobs with big companies,
and that's where CPers look next.  Sure, maybe these
olympiads are mostly for a younger crowd, but the
ability to choose the right algorithm quickly is what
will get them a job at the end of the day.  That's the
PR, which I'm just passing along.

My initial approach was somewhat overlapping but
different.  I was more thinking in terms of *Mathematics*
*for the Digital Age* and other discrete math tomes we
have talked about at length in this archives.  Working
backwards from RSA (the public key algorithm), I know
we want to cover Fermat's Little Theorem and Euler's
generalization featuring totients and totatives.  So what
are those?  Let's do some Group Theory while we're at
it and show how the totatives of N, multiplied modulo N,
form a finite group.  Fibonaccis, generating primes,
things of that nature

.

Then, in a more innovative mode, I've worked to expand
data structures to include "structured data" such as json,
html, xml, csv i.e. serialization protocols.  In addition, I've
sought to bring in DataFrames from the array based
computing world of data analysis.  Numpy and pandas.

I think for many in a high school setting, what will serve
them going forward is good old Anaconda and all that
implies.  As a base of operations.  As a main productivity
tool.  Jupyter Notebooks rock, in my opinion.

What I'm attempting, in microcosm, is to make Algorithms
and Data Structures useful to non-CPers as well, i.e.
those not especially interested in or drawn to competitive
programming.  It's not like algorithms and data structures
should go off their radar as a consequence.

The last innovation I'm trying involves keeping things
more right brain i.e. graphical not just lexical.  A graph, or
network, is already a visually accessible data structure.

It's almost a no-brainer to then bring polyhedra into the
picture, as more graphs, with edges and nodes.  Polyhedra
also need to be stored and retrieved somehow, i.e. back
to structured data and SQL.  Indeed, in other writings I
advocate introducing polyhedrons as paradigm objects,
when learning OO, as they're both abstract mathematical
and colorful tangible.  They have attributes.  They come
with methods (scale, rotate, translate...).  Where do we
go from polyhedra?  To divided (tiled) spheres and global
data.  To world maps
.
More data structures.  More
algorithms.  I started a new sandbox intending to import
global data tiles, but that ended up corrupting my old
Mac Pro.  Anaconda snuck in some incompatible upgrades.

So far, I only have one "sandbox"

devoted purely to
polyhedrons in the ADS portion of my repo (much more
elsewhere), a table of relative volumes built with pandas.

The volumes won't seem familiar and the relevance of this
table is not widely echoed in other literature, except in the
matrix of suppressed American philosophy.  One of our
leading futurists, from the 1960s through the early 1980s,
made a big deal out of the tetrahedron and its ability to
serve as a basis for our relative volume concept.  Even a
tetrahedron of edges one could have volume one, in his
recasting.  This is a topic I've posted about extensively here
on edu-sig over the years, and on Math Forum, although
the latter was purged of its public discussion groups,
breaking lots of links.

My attitude is I want to be one of those teachers who took
the Bucky Fuller stuff seriously enough to want to include it
in downstream published open source works.  You'll see if
you go to bfi.org/synergetics that my Github writings

are
currently on tap to give scholars some exposure to the
philosophy in question.  Part of walking my talk is to showcase
said material in a workaday context, namely in an 8th grade
level Algorithms and Data Structures class.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org

[Edu-sig] a curriculum dev in the Silicon Forest

2022-04-03 Thread kirby urner
I'm continuing to develop curriculum for a tiny elite college prep school
smack in the center of the Silicon Forest, a place called Bethany Village,
which specializes in offering after school elective time activities (e.g.
martial arts, foreign language learning). [0]  Nearby:  Intel, Tektronix,
ESI... [1]

The Sunshine Elite School runs both after school enrichment and for-credit
day school programs. I call myself "a developer" or even a "dev", but if
people ask what I develop, I say "curriculum".

I teach four times a week and look for ways to include student work in ways
they permit.  The school already has a Hall of Fame for competitive
tournament winners.  Doing a stellar project around Wordle or Chess would
be another way to develop one's portfolio, through lasting links in the
text itself.

I wonder what other educators here think of the following proposition:

===
Most of the wood pulp published Algorithms and Data Structures (ADS)
textbooks inherit from a day before "array based computing" and therefore
have no "DataFrame" to integrate.  Not as such.

Of course they have 2D arrays (Python: lists of lists), i.e. row and column
data, but not anything as sophisticated as a DataFrame in R or pandas.  So
let's include the DataFrame in a next iteration of ADS!  That's certainly
what I'm doing.[2]

That puts machine learning algorithms within the reach of a pre-college
student.  We needn't dive deep into deep learning.  We're free to dabble.
We're still young and carefree (student attitude).  "Buckle down data
science" comes later, for those who so choose.
===

I see Jupyter Notebooks (Colab, Kaggle Notebooks etc.) as an extension of
the desktop publishing revolution of the 1980s (PageMaker + Apple
LaserWritier == professional quality publications).

I remember working with nonprofits and NGOs and those days (at a place
called CUE), and how excited these organizations were to be able to upgrade
the look and feel of their literature.  The web itself held a similar
promise:  the little guys wouldn't be trounced by the big guys, just
because the big guys were big.

Jupyter Notebooks, with embedded videos and data visualizations etc., put
more of a level playing field under all would-be publishers.  Our content
is potentially as high quality as the content in professional papers and
magazines.  As long as we study our Tufte...

Look how Jake VanderPlas goes back and forth between Notebooks and a wood
pulp (non-interactive, yet standard setting) O'Reilly book. [3]

As a curriculum dev, I'm able to bypass the wood pulp publishers entirely,
using open source tools to create open source assets available to fellow
faculty.  To me, this looks like a quiet revolution against the hegemony of
"those with enough money to dress up" (i.e. make their stuff look pro).

Kirby

Cc:  Wwwanders (Silicon Forest, Doug Strain affiliate)

Citations:

[0]  https://flic.kr/s/aHBqjzJdXN

[1]  https://www.oregonencyclopedia.org/articles/silicon_forest/  (mentions
Doug Strain)

[2]
https://nbviewer.org/github/4dsolutions/elite_school/blob/master/ADS_sandbox_2.ipynb

[3]  https://github.com/jakevdp/PythonDataScienceHandbook
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] EliteSchool Repo meets Stanford GraphBase

2022-03-12 Thread kirby urner
I was following the Wordle craze, looking for a list of five-letter words.

Little did I know I'd stumble upon the Stanford GraphBase.

https://github.com/4dsolutions/elite_school/blob/master/ADS_research_1.ipynb

There's also some Pi Day stuff, for teachers taking advantage of 3-14.

Kirby



Exhibit from March 2022:

Hi Guys --

Our topics today included:

* arbitrary precision numbers as provided by decimal.Decimal or gmpy2
* algorithms for converging to Pi  (one of Ramanujan's and one I learned
from Guido)
* another rear view mirror look at Five Letter Land
* SymPy  https://mpmath.org/

Friendly Repo:

https://nbviewer.org/github/4dsolutions/Python5/blob/master/Pi%20Day%20Fun.ipynb

Friendly Replit:

https://replit.com/@kurner/piday#main.py

In fact we were indeed discovering some of the same Graph Theory facts
about the list of five letter words, that come to light in the Stanford
GraphBase course, authored by Knuth himself (Chinese name "Gartner"):

https://blog.krybot.com/a?ID=0 1800-af2c69d8-40ba-4b02-9cdc-aca2c205be68


https://replit.com/@kurner/fiveland#main.py


I finally got that Regular Expressions sandbox to work:

https://regex101.com/r/k0eF6r/1

I felt it important to bring up the topic of Regular Expressions because
they're used
in many algorithms where the task is to do pattern matching.

See you Monday.  Keep thinking about those projects.  Mandelbrots and
Mandelbulbs:  another topic we touched upon.

Kirby


*Course Name*: Data Structure and Algorithms in Python
*Datetime*: 01/29-06/19 Wednesday,Sunday 6:00pm-7:00pm
*Location*: Online10

Thanks,
Sunshine Elite Education

___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] update from Bridge City (PDX) aka Stump Town

2022-01-26 Thread kirby urner
[ see notes for my guide to names for Portland ]

Greetings Pythonistas --

One of my usual updates regarding curriculum dev from my angle.

These days I've been hacking on:

https://github.com/4dsolutions/elite_school/blob/master/ADS_intro_1.ipynb
https://github.com/4dsolutions/elite_school/blob/master/ADS_intro_2.ipynb
https://github.com/4dsolutions/elite_school/blob/master/ADS_project_1.ipynb

By the .ipynb extension you will see these are specialized JSON files eager
to be fed through a Jupyter Notebook renderer, with or without a live
Python
kernel (or Julia, or...) to back it up.

Github provides decent rendering and Pythonistas such as Jake VanderPlas
(astronomy, U of W, Pycon keynoter) have long used a public repo for their
Python textbooks.  Feed a Github repo Notebook to Google's collab.research
and bingo, you have interactivity!

A related example (a notebook in the wild, Silicon Forest academia.edu):
https://colab.research.google.com/github/4dsolutions/DigitalMathematics/blob/master/MartianMath.ipynb

The "elite school" in question (per URLs) is here in Greater Portland.
The school is owned and operated privately, however the curriculum
materials remain free and open source, unlike at the "public schools"
that eschew copyleft liberality.

Feel free to fork and remix.

The materials are still evolving and are under peer review (consider
yourselves peers if you feel like providing feedback).

The project (3rd notebook listed) is inspired by Wordle which --
at least in my little neck of the woods (idiom) -- seems quite
popular these days.

Kirby


Bridge City:  Portland has many bridges, all of them expected to not
survive the
next serious earthquake.

Stump Town:  refers to how the city got built: by chopping down all the
trees for
miles around, leaving hectares of tree stumps for the user's enjoyment.

Rose City:  lots of roses in the spring, many rose gardens (similar to
Shiraz -- شیراز -- with which Portland hopes to pair as a sister city, with
Seattle hoping for Isfahan). All relevant because Al Khwarizmi (first
Notebook) is
considered Persian.

>From the web, Nicknames for Portland:

   - City of Roses.
   - Stumptown.
   - Rip City.
   - Beervana.
   - PDX.
   - City of Churches.
   - Little Beirut.
   - Forbidden City of the West.
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] changes to github...

2021-12-11 Thread kirby urner
Of relevance to curriculum writers such as myself
is a change in how Github redirects links to the
same repo, if said link is to a Jupyter Notebook.

It used to be that Markup like [Volumes](Volumes.ipynb),
i.e. no path, just a Notebook name, would work in a
Github repo.  A student could jump from Notebook to
Notebook, always in master.

No longer.

Now that link will take you to:
https://notebooks.githubusercontent.com/view/Volumes.ipynb

nbviewer (nbviewer.org), on the other hand, still works
the old way, i.e. a link to another Notebook in the same
repo pulls up that other Notebook.

https://nbviewer.org/github/4dsolutions/elite_school/blob/master/Calc_with_Python.ipynb
(e.g. try Euler's Formula way at the bottom)

My response has been to reiterate to students that if
they want a smooth experience with one of my repos,
the best option is to clone it and use it locally.  That
used to not matter as much.  The next step is to create
their own repos.

On the up side, Github now renders Jupyter Notebook's
embedded LaTeX much more successfully, removing one
of the primary reasons to go to nbviewer in the first place.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: Py310: recursion with match-case

2021-11-20 Thread kirby urner
I've since done it in hoon, taught as "martian computing" at University of
Illinois.

https://github.com/davis68/martian-computing

Hoon version:
https://flic.kr/p/2mKTPas

(base) Kirbys-MacBook-Pro:base mac$ cd gen
(base) Kirbys-MacBook-Pro:gen mac$ cat crystalball.hoon
!:
::  Crystal Ball Numbers
::  https://oeis.org/A005902
::
|=  n=@ud
^-  @ud
?:  =(n 0)
  1
(add (add (mul 10 (mul n n)) 2) $(n (dec n)))
(base) Kirbys-MacBook-Pro:gen mac$

In my world, it's the crystal ball sequence that's front and center,
orthogonal to the computer language.  Maybe that's because OEIS
https://oeis.org/A005901 and https://oeis.org/A005902 both link back to my
website and I tend to use my own websites to teach my stuff (imagine that).

I don't think my Hoon version is tail recursive, but it could be, by a more
experienced hand.  I just heard of Hoon a couple days ago.  Hoon is a
functional system language that compiles to a LISP (nock) and does know the
difference between tail call vs stack deepening.  Python doesn't.

Python points out you often don't need recursion at all (including in this
case) and that recursion isn't maybe as super cool as it thinks it is.
I've got the non-recursive versions on REPL.

Anyway, the computer science angle is important, not just the Blender / CAD
/ CAM.

Kirby


On Tue, Nov 16, 2021 at 5:58 PM kirby urner  wrote:

>
> So are we encouraged to use match-case in recursion instead of if-else?
>
> It's more readable this way maybe:
>
> cubocta310.py:
>
> def cubocta(n):
> """
> https://oeis.org/A005902
> """
> match n:
> case 0: return 1
> case _: return (10*n*n + 2) + cubocta(n - 1)
>
> print([cubocta(i) for i in range(10)])
>
> (py310) Kirbys-MacBook-Pro:School_of_Tomorrow mac$ python cubocta310.py
> [1, 13, 55, 147, 309, 561, 923, 1415, 2057, 2869]
>
> https://flic.kr/p/2mKh2nd
> (image version)
>
> Kirby
>
>
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Py310: recursion with match-case

2021-11-16 Thread kirby urner
So are we encouraged to use match-case in recursion instead of if-else?

It's more readable this way maybe:

cubocta310.py:

def cubocta(n):
"""
https://oeis.org/A005902
"""
match n:
case 0: return 1
case _: return (10*n*n + 2) + cubocta(n - 1)

print([cubocta(i) for i in range(10)])

(py310) Kirbys-MacBook-Pro:School_of_Tomorrow mac$ python cubocta310.py
[1, 13, 55, 147, 309, 561, 923, 1415, 2057, 2869]

https://flic.kr/p/2mKh2nd
(image version)

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: chatbot to teach python?

2021-10-01 Thread kirby urner
When introducing the concept of the REPL, and how not every language has
one, I tend to say "like a chat bot".

In other words, Python the interpreter, talking back (evaluation) is a chat
bot.

"Learn to think like the snake" I say to Grasshopper [1].  When she raises
an exception (hiss), learn from what she's telling you.

Speaking of REPL, I've been deep diving into Teams for Education on Replit
lately.

If anyone here has a Replit account and wants to join one of my teams...

https://flic.kr/s/aHsmWJq9u2  (lots of screenshots of what I've been up to)

Kirby

[1] TV allusion, not to Monty Python, sorry :-D
https://youtu.be/U11bGxlmnVk



On Fri, Oct 1, 2021 at 1:43 AM Jurgis Pralgauskis <
jurgis.pralgaus...@gmail.com> wrote:

> Hi,
>
> as currently chatbots gain popularity, I looked around
>
> seems very primitive https://tinyurl.com/pythonbotchatbot2020
> from
> https://www.researchgate.net/publication/349574948_Python-Bot_A_Chatbot_for_Teaching_Python_Programming
>
> (it's hard to formulate search query for "python teaching bot" -- as there
> are plenty of sites that "teach to make bot with python" :))
>
> Similar for C (uses StackOverflow API) https://rasa.com/showcase/cbot/
> didn't try it live (as needs downloading, installing)
>
> ps.: MathBert https://www.arxiv-vanity.com/papers/2106.07340/
>
> --
> Jurgis Pralgauskis
> tel: 8-616 77613;
> Don't worry, be happy and make things better ;)
> https://galvosukykla.wordpress.com/
>
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: a simple UI for python learners

2021-09-22 Thread kirby urner
I did pip install this and get it working without problems.

As someone who designs curricula, I'm glad to know about it.

Using curses module, not Tk.

Kirby


On Wed, Sep 15, 2021 at 3:58 AM Kent Tong  wrote:

> Hi,
> I have written a small Python package (https://pypi.org/project/lineui/)
> to provide an API to a one-line user interface (like that in a calculator)
> for Python learners.It provides the following features:
>
>- output in the line (left, right or middle aligned).
>- output in the console (the lower box), mainly for debugging.
>- keyboard input.
>- timer input (every second or every 0.05 seconds).
>- schedule a call to a function a certain seconds later.
>- make a beep.With these a Python learner can make apps like: digital
>clock, the classic digit invaders game, slapjack, etc.
>
>
> --
> Kent Tong
> IT author and consultant, child education coach
> ___
> Edu-sig mailing list -- edu-sig@python.org
> To unsubscribe send an email to edu-sig-le...@python.org
> https://mail.python.org/mailman3/lists/edu-sig.python.org/
> Member address: kirby.ur...@gmail.com
>
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: update on Pythonic High School curriculum writing

2021-08-20 Thread kirby urner
Hi Al,

I'm glad you picked up on that link back to Shadowfax.  I've finally picked
up on your initial A. and added that to the hyperlink [1].  I consider this
hardwiring into a sort of textbook (more like a trade book in some respects
-- what's a Jupyter Notebook by genre anyway?) and am happy to showcase
contemporaries hoeing the same row (as in "a tough row to hoe") mas o
meno.  You've been stellar, bar none.

I operate a lot on the Humanities side, conventionally across a chasm from
STEM (C.P. Snow). A chasm better bridged by my curriculum, which I shop
through my Quaker contacts, hoping to start a next chapter in the Quaker
schools story.  They've had a reputation for excellence, e.g. Sidwell.
Pythonic high school math might soon be a thing at some of our brick and
mortar schools.  In the meantime, I'm already teaching online (small
classes, good ratio).

Kirby

[1] the pipeline is such that changes on localhost, git pushed to the repo,
won't show up on nbviewer until maybe the next day, given various caches
and buffers along the route.


On Fri, Aug 20, 2021 at 11:10 AM calcp...@aol.com  wrote:

> Hi Kirby!
>
> Loving all your Jupyter posts!
>
> I used to be very immersed in the 'lambda' calculus side of things as I
> taught CS Honors aka Computer Math since the 1980s as a prerequisite to AP
> CSA/AB. CSH taught several topics in Discrete Mathematics using various
> incarnations of BASIC and homegrown curricula then we switched to Python
> over a decade ago using Gary Litvin's awesome Discrete Math texts. CSA was
> using Pascal and C++ for several years before the switch to Java and we
> covered several Discrete Math topics there as well.
>
> You are correct, however, that my blog is focused on 'delta' calculus of
> late as I finally 'graduated' from teaching High School Math and have been
> teaching Multivariable Calculus for some time now at the local college. So,
> I finally bit the bullet this summer and converted all my SAGE notes for
> that course to Jupyter Notebooks! I'm loving matplotlib, numpy and sympy! I
> really enjoy using markdown and latex instead of plain old hashtag comments
> as well. The latest 2 posts on my blog, http://shadowfaxrant.blogspot.com,
> detail my summer project if you are interested.
>
> BTW, thanx for mentioning my blog in your last post!
>
> Be well,
> Al
>
> A. Jorge García
> Applied Math, Physics & CS
> Nassau Community College
> http://shadowfaxrant.blogspot.com
> http://www.patreon.com/calcpage2020
>
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] update on Pythonic High School curriculum writing

2021-08-20 Thread kirby urner
Here's an updated link to my open source curriculum writing.

https://nbviewer.jupyter.org/github/4dsolutions/elite_school/blob/master/Home.ipynb

Pythonic High School Math one might call it, with bridges to other STEAM
topics, and thence to PATH. [1]

I introduce folks to my Notebooks using nbviewer because the native Github
rendering is less thorough i.e. LaTeX is not interpreted.  LaTeX, Git,
SQL... all important high school topics.

Kirby

[1] I'm not sure how much PATH caught on after Andrew Hacker used it in The
Math Myth. An attempt to map the Humanities with four letters, copying the
STEM idea (Science Technology Engineering Mathematics for those of you not
using this namespace). I've customized PATH to mean Philosophy Anthropology
Theater History, with Theater having an expanded meaning ("all the world is
a stage").  Then the local custom is to expand STEM to STEAM saying A is
for Art and claiming here's a way to bridge the CP Snow Chasm twixt the
Sciences and the Humanities. My wrinkle is to use A for Anthropology (which
includes Art in my account) and to intersect on this Science-Humanities
topic (the study of we humans and our many subcultures i.e. cults).
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] documenting the state of the art (Silicon Forest)

2021-08-13 Thread kirby urner
Pythonic Math in Portland, August 2021:

https://nbviewer.jupyter.org/github/4dsolutions/elite_school/blob/master/Aug11_week_class.ipynb

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: summer school enrichment course: advance high school topics in Python

2021-06-29 Thread kirby urner
On Mon, Jun 28, 2021 at 5:00 PM calcp...@aol.com  wrote:

> Hi Kirby,
> Cool stuff! Meanwhile, back at the college, I'm teaching Multivariable
> Calculus using Jupyter Notebooks with NumPy and SymPy. See my blog if you
> are interested,
> http://shadowfaxrant.blogspot.com
>
>
Yes.  As usual, you're way ahead of me, both in terms of the
hardware and Python.  I've often accessed your online
learning materials, including recorded online sessions.

What I've discovered about the high school market is a lot
of parents, and by extension their kids, are focused on
winning prizes through tournaments i.e. speed contests
that require knowing which algorithms to use and how
to use them (the specific language doesn't matter).

The school I'm teaching at has historically focused on
tournaments run by ACSL (American Computer Science
League) and USACO (USA Computing Olympiad).

Also, given the high school curriculum map is so calculus
heavy, there's not much time left for the number and/or
basic group theory type stuff I consider on the "lambda calc"
track (where ordinary calculus is "delta calc" in contrast).

My preferred model of K-12 is to bifurcate the track around
Algebra (8) and offer two pathways:  delta and lambda calc
tracks (OK to sample both of course).

Thankfully, cryptography is so ubiquitous these days and
so core to security, that we no longer need to worry about
the "relevance" of our alternative topics.

It's only under the heading of "enrichment" during summer
school wherein I have the freedom to explore such as
Euclid's Extended Algorithm, Fermat's Little Theorem,
Euler's Theorem etc.  The mainstream high school
curriculum does not usually motivate study of such
topics, all building to RSA.

The Litvins text used at Phillips Andover (mentioned in
my video) was the one exception we've been discussing
over the years here on edu-sig.  By now, we have
additional crossovers (e.g. Math Adventures
With Python by Peter Farrell) that make no sharp
distinctions between coding and math.  The blurrier
the better.

> Be well,
> A. Jorge Garcia
> Applied Math & CS
> Nassau Community College
> http://www.patreon.com/calcpage2020
>
> PS retired from High School due to pandemic...
>

My Advanced High School Topics with Python is
through a private online school in Greater Portland.

We did go through an historical chapter wherein Oregon's
legislature agreed, in principle, to open up the high
schools to more "lambda calc" topics (discrete math
most people call it).  I was a player, a lobbyist, in
those days.  But in practice, there's still the
artificial divide between math and computer science.

I find the pandemic environment has been helpful
in breaking down that divide, as to use Zoom at all
means having access to a laptop.  Math teachers
trying to get by on Texas Instruments don't have the
same reach and/or clout as they used to, in this
cyber-environment.

Kirby
PS:  have you seen the new TI calculator that
includes Python?
https://education.ti.com/en/products/calculators/graphing-calculators/ti-84-plus-ce-python
Any thoughts?
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] summer school enrichment course: advance high school topics in Python

2021-06-25 Thread kirby urner
When I introduce OOP to high schoolers, I go straight to this word "object"
and link it with the word "thing" in the ordinary sense of the word.

Objects are not meant to be learned as an abstract computer science idea,
but as an adaptation of ordinary language, trying to make reasoning about
the real world expressible in a computer language.

The challenge is not unlike the one faced by the logicians at the turn of
the last century, looking for a "propositional calculus" but with the added
notion of "executability" (the idea of a self-executing logic was there
from the beginning, as appreciated by Ada vis-a-vis the Babbage Engine).

Etymologically, a "thing" is actually a Scandanavian meetup of some kind
i.e. a thing is a meeting of things, which is apropos of a recursive,
fractal, "all the way down" subject such as particle zoo physics.

So what are some paradigm "things" we can sink our teeth into (idiom):

* Atoms (already current in high school -- I'm thinking to sync with
whatever else they're learning)

* Animals (everyone loves dogs and cats and taxonomy applied to "kingdoms"
is a perennial trope in our science culture)

* Polyhedra (probably my most controversial suggestion, but my bridge to
geometry:  figurate and polyhedral number sequences ala OEIS, coordinate
systems, vector spaces...  the rest of high school math.

With Atoms I might just go with a namedtuple and circle back later with a
corresponding @dataclass.

With Animals I have the opportunity to subclass Animal into Dog, Cat and
usually Snake classes. But start with Dog, evolve it, then move some of its
functions to the parent Animal class (e.g. eat) when needing a Cat.

With Polyhedrons I have V, F, E (topological features inventory) e.g. for
subclass Cube that'd be 8, 6, 12.  However Polyhedrons are complex objects,
definable with radial vectors from a center and surface edges as vector
pairs, with faces as rings (literally, cycles) of edges.  This gets us into
relational tables territory i.e. serves as our bridge to SQL.

Evolving Notebooks:

https://nbviewer.jupyter.org/github/4dsolutions/elite_school/blob/master/ObjectOrientedProgramming.ipynb

Related Youtube (by me):

https://youtu.be/muqwC9wvYXM
PORTLAND
Advice to Summer School Teachers
45 views
Jun 23, 2021


Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] following up on edu summit (pycon 2021)

2021-05-13 Thread kirby urner
Greetings all.

Good to see some of you at the Edu Summit.
Many thank you to the organizers for allowing
me to join in the end.

Andre gave a fabulous talk on friendly, the
enhanced, multi-lingual traceback explainer.

My lightning talk came at the end.  For those who
couldn't be there, I'm fleshing it out a bit more
on Youtube -- still in under 5 minutes.

https://youtu.be/B9CvWok7SgU
Lightning Talk (in connection with Edu Summit, Pycon 2021)

We talked a lot about data science, wherein
data visualization is key.  Everyone wants to
learn pandas.

My own curriculum development efforts, informed
by real experience teaching at these grade levels,
focuses on a different kind of "graph", namely the
polyhedrons (edges, nodes...) and 3D graphics more
generally.

That's another kind of visualization, as distinct from
data visualization, that computers are in principle
good at.  We can get there with Python, with Blender
perhaps, so another ray tracer solution.[1]

However we still integrate well with data science
and such, as such tabular structures as provided
by pandas & SQL provide a logical way to store
our polyhedrons.  Relationally.  With edges and
vertices stored separately from the summary rows
i.e. the actual polys by name ("cube"), with V, F, E
(8, 6, 12), maybe relative volumes [2], and tags, like
Platonic, Archimedean, Johnson, Uniform, Space-Filler,
Dual of [ ] etc. etc.

Kirby

[1] e.g. check out Adrian's anti-prism which I've compiled
for a Raspberry Pi.  Not written in Python, but does
output in .pov format for rendering, which is what a
lot of my scripts also do.  A great way to learn XYZ
coordinates and more, no?  http://www.antiprism.com/

[2]
https://nbviewer.jupyter.org/github/4dsolutions/Python5/blob/master/Polyvolumes.ipynb
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Looking forward to Pycon, although Education Summit is full

2021-05-04 Thread kirby urner
I did a proposal for Pycon really early, then realized the Education Summit
was separate.  Now the latter is full and closed.  I'm in the Trainers'
Summit, but the Education Summit is full.  Even to those of us who would
just listen on Zoom?

Oh well, good thing I turned my presentations in Youtube videos.
I had a feeling I wouldn't actually get conference time.

Here they are:

https://youtu.be/rhrITxrRRyA
https://youtu.be/hsGfcqhaPd8

I tend to always be focused on the same themes, where I imagine I have some
competitive advantage maybe?

Maybe I'll connect with some of you around the edges of said Education
Summit, which I used to help plan in the early days.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: Friendly-traceback: useful tool for those teaching Python

2021-02-08 Thread kirby urner
Me: If I ask for type(__builtins__) I get a list of all the things 
dicts can do, not the contents of the module.

Of course I should have said dir(__builtins__) above 
(not type).

Anyway, I was glad to clear this up.  I’m guessing 
the use of both __builtin__ and __builtins__ is not
Spyder’s original idea, but characteristic of the 
I-Python console more generally.

Indeed, my conda environment lets me ask for
ipython directly at the bash shell and sure enough,
it’s the same story.

What about IDLE?  Right, only __builtins__, no 
__builtin__.

Kirby

___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: Friendly-traceback: useful tool for those teaching Python

2021-02-08 Thread kirby urner
Andre:  I think you mean simply  __builtins__, without the dir(). 

I was puzzled by this remark at first but now I’m seeing 
why.

When I boot into the Python shell directly from bash,
and ask for the type of __builtins__ i.e. type(__builtins__),
I get back that it’s a module.  Then dir(__builtins__) lists 
the contents, of the module, same as dir(math) would do.

However, if I’m in the Spyder IDE and ask for the type
of __builtins__, I’m told it’s a dict. If I ask for type(__builtins__)
I get a list of all the things dicts can do, not the contents of
the module.

Ah, but there’s more…in Spyder, I have not only __builtins__
but __builtin__ (singular), and the latter is a module that 
behaves like __builtins__ (plural) in the primitive shell. At
the same time, the primitive shell doesn’t have a __builtin__,
only __builtins__.  Spyder has added complexity.

I’m using the same version of Python (3.9) in both cases.

Kirby


___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: Friendly-traceback: useful tool for those teaching Python

2021-02-03 Thread kirby urner
On Tue, Feb 2, 2021 at 11:28 AM André Roberge 
wrote:

>
>
> On Tue, Feb 2, 2021 at 2:37 PM kirby urner  wrote:
>
>> On Tue, Feb 2, 2021 at 5:48 AM André Roberge 
>> wrote:
>>
>>> Hello everyone,
>>>
>>> For about 20 months now, I have been working on a Python package
>>> intended to help beginners figure out what went wrong when their program
>>> generates a traceback. This package is called Friendly-traceback; you can
>>> find the fairly extensive documentation at
>>> https://aroberge.github.io/friendly-traceback-docs/docs/html/
>>>
>>>
>> Hi André --
>>
>> I'm reading your docs now.
>>
>> When I start into Python with beginners, I'll typically start with:
>>
>> >>> dir( )  # how will HyperKitty mangle this?
>>
>
Hah hah, look what HyperKitty did:

https://mail.python.org/archives/list/edu-sig@python.org/message/C6CF53KBJNLM7CF6QT35VBCCTWBTDNBU/

I'd say HyperKitty is not very friendly to the indigenous Python we used to
share here.


>>
>
>> showing what's in the namespace, the names Python
>> knows when "in" the namespace.
>>
>> But then the question right away arises:  where are
>> print, hex, str, dict... all these names Python knows?
>>
>> Answer (as we all know):  __builtins__
>>
>> So then I do a dir(__builtins__)
>>
>
> I think you mean simply  __builtins__, without the dir().  I use "pretty"
> from Rich (
> https://rich.readthedocs.io/en/latest/introduction.html?highlight=pretty#python-in-the-repl)
> so that dicts are nicely formatted.
>
>
Like in this screenshot:

https://www.flickr.com/photos/kirbyurner/50905387656/in/album-72157660337424600/

You have to feed __builtins__ (not quoted) to dir( ) to dump its contents
as
a list of strings.  That solves the mystery of where quit, range, map,
complex,
abs and so on and on are coming from.  Python knows these names and yet
dir( ) -- with no argument -- does not reveal them to be present in the
top-level
namespace (__main__). I describe __builtins__ as like a "utility belt" of
tools
around your waist, so close at hand that it's unnecessary to import them.

We're expanding out in concentric shells, taking in more and more of
what constitutes "Python".  I introduce my Five Dimensions (or Layers):

0.  Core syntax: keywords and punctuation (including indentation)
1.  __builtins__
2.  __ribs__ i.e. special names, magic methods, the scaffolding
3.  Standard Library (batteries included)
4.  3rd Party ecosystem (from small like friendly-traceback, and rich
all the way to giant frameworks like SQLAlchemy and Twisted -- to
name some of the early big projects  And of course your own RUR-PLE).

I tell students the optimum learning curve is not about mastering all
of level 0, then moving to level 1 and so on (plodding, methodical,
unproductive).  No, it's about spiraling, and going a little deeper
into each level as we progress.  So in the very first lesson I'm likely
to:

(a) talk about the five levels and
(b) dump the contents of __builtins__
(c) remark on the "funny look" of __rib__-syntax.

I'm giving them a sense of the big picture, and how much there is to
know about (e.g. "Python includes about fifty special names but you
will use far fewer than that on a regular basis").

In dumping the contents of builtins, I'm getting my segue to Exceptions
(so much of what's in there are "flags" that might get raised).

I speak very metaphorically e.g. how when you're new to an environment
you're always bumping up against limits, like a baby.  Or you're new to a
certain sport and don't really know the rules yet.  What's a foul?  Can I
pick up the ball and just run with it?  That depends on the namespace,
and the rules. Exceptions are about doing something other than crashing
when a rule is broken.

The environment pushes back, telling you what went wrong.  Python
creates such an environment for us the moment we enter the REPL.
We're free to play in it, to explore, and understanding the Exceptions
are there for our convenience and instruction makes them not scary.
Noobs are conscientiously afraid of "breaking things" and a teacher's
role includes showing safe ways to explore and gain fluency.

>From Exceptions, it's but a short step to try except syntax (level 0) and
Tracebacks (debugger, diagnostics, IDE features, your enhancements
-- level 4).

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: Friendly-traceback: useful tool for those teaching Python

2021-02-02 Thread kirby urner
On Tue, Feb 2, 2021 at 5:48 AM André Roberge 
wrote:

> Hello everyone,
>
> For about 20 months now, I have been working on a Python package intended
> to help beginners figure out what went wrong when their program generates a
> traceback. This package is called Friendly-traceback; you can find the
> fairly extensive documentation at
> https://aroberge.github.io/friendly-traceback-docs/docs/html/
>
>
Hi André --

I'm reading your docs now.

When I start into Python with beginners, I'll typically start with:

>>> dir( )  # how will HyperKitty mangle this?

showing what's in the namespace, the names Python
knows when "in" the namespace.

But then the question right away arises:  where are
print, hex, str, dict... all these names Python knows?

Answer (as we all know):  __builtins__

So then I do a dir(__builtins__)

[ pray to HyperKitty for no mangling ] and they see:

Wow! Lots and Lots of names (so that's where
everyone has been hiding), many with Error
and/or Warning in them.  Those come at the top
as dir returns string elements alphabetically and
capitalized Exceptions list up top (or leftmost).

This will be my bridge to your Friendly-Traceback
utility i.e. here would be an (early, introductory)
example of a 3rd party project aimed at helping
a beginner get the most out of the Python experience.

Tracebacks themselves have that purpose already,
and you're enhancing that existing capability, which is
easy for beginners to understand. Make a good thing
better.

A current weakness in my curriculum is I don't spend
enough time on IDE features relating to debugging and
live inspecting of what's in the namespace.  I demonstrate
a lot using Spyder, assuring them a different IDE is just
fine.  Spyder has features that make it great for screen
sharing Python, such as scrollback, the %magics, embedded
plots...

Anyway, my point is Exceptions and the Tracebacks they
occasion, deserve a direct and early discussion, as any
beginner is likely to stumble across both in the course of
ordinary REPL use.

I'm still adding pages to my most recent iteration of an Elite
School (and I do have synchronous students -- we meet once a
week).  We'll be discussing your innovative enhancements.
Ideally, at least one of us (most likely me) will install it and
do Show & Tell (a Lightning Talk).

Back to reading the docs...

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: Online introductory Python course

2021-02-02 Thread kirby urner
Hi Dave --

Thank you for this excellent online course material re Python and the
geosciences.

I've added a section to my evolving "elite school" repo listing courses and
curriculum
using Jupyter Notebooks, as I want to impress upon my students that this is
how
some of the better schools / teachers are currently sharing material.

I want to impress them with the fact that we're learning some best
practices.

https://nbviewer.jupyter.org/github/4dsolutions/elite_school/blob/master/Home.ipynb
(scroll to bottom for a link to your GeoPython).

In contrast, many high schools do nothing with Jupyter Notebooks.  Given
our
"elite school" status, it's legit to point this out.  Parents like to know
what their
kids are learning is "ahead of the curve" vis-a-vis your run of the mill
high school.

The workflow I encourage with my students is to establish their own presence
on Github and to learn how to clone a repo so they can run the Notebooks
locally (vs in the cloud).  Since I expect them to make Notebooks, I want
them
to have complete localhost control.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: Happy New Year (launching edu-sig 2021)

2021-01-31 Thread kirby urner
So am I supposed to use Markdown?

[New Python Article on 
Citzendium](https://en.citizendium.org/wiki/Python_(programming_language))

1-2-3 testing...
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: Happy New Year (launching edu-sig 2021)

2021-01-31 Thread kirby urner

My apologies for the broken link:

https://en.citizendium.org/wiki/Python_(programming_language)

(the underlying URL was missing the terminal paren)

Thanks for the feedback Wes.

The Github repo is less a textbook than a “tensegrity” of web pages held 
together without a specific serial chronology.

The tour guide teacher is responsible for taking students on useful tours, 
packed with information.

I go in there like the guy with the biggest flashlight on a cave tour (a whole 
maze of caves).

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Happy New Year (launching edu-sig 2021)

2021-01-29 Thread kirby urner
Two exhibits of possible interest:

(1) Citizendium Wiki, not unlike Wikipedia in its goals, but with less
anonymity, has a new article on Python, still a work in progress.

Comments?

They're (we're) looking for more articles with fresh up to date content, on
aspects of the Python ecosystem.

https://en.citizendium.org/wiki/Python_(programming_language)

(2) Here's my latest idea of a contemporary Python class, done in evolving
Jupyter Notebooks, a growing maze of pages to explore and talk about (no
enumeration of lessons).

https://github.com/4dsolutions/elite_school

I use this material with real teenagers, once a week.  I spend a lot of
time talking about Unicode because I'm assuming these students need a lot
of overview.  Python is about opening doors to lots of topics.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: Python (one variable) Equation Solver

2020-11-07 Thread kirby urner
Hi Sergio,

Blender (Blender.org) would be a quirky choice from the
standpoint of seeking merely a decent inline plotting utility,
such as bokeh or matplotlib.  I've used the latter a lot, the
former a little. Blender would be vast overkill if 2D plots
were the only interest.

Since I came to Python (from dBase) seeking 3D geometry
tools, I've been in the neighboring world of Python + POV-Ray
(povray.org), the free ray tracing program, driven by its own
Scene Description Language.  I'd build my vectors, edges
and polyhedrons in pure Python, but have them write out to
POV-Ray in SDL. [1]

A similar strategy is followed by Antiprism (C++ polyhedron
utilities). [2]

Sometimes equation plotting happens inside a more CAD
like context, such as when using bezier curves to delineate
motion.

We also see a bright future for the "physics engine" don't we?
Including 2D ones for kids such as Codesters.com (Python
in the cloud, used in middle schools by me). You get to turn
"gravity" on or off, and/or "bouncy walls". Collision detection...

Visual Python (VPython) has been a major tool for me
as well [3], letting me bypass the ray tracer and go straight
to a VRML like experience (OpenGL). This has been a
project of the Physics Community from the beginning.
We've discussed it here a lot on edu-sig. A guy named
Arthur was using it for an ambitious projective geometry
package.

In recent Youtubes I'm not looking at Python much at all,
but at React + three.js integration.  Just pointing out how
WebGL itself is a theme here, whatever the tool stack.

Common themes in my echo chamber (silo) are 3D
rendering and animation.  Python is getting stronger
in this area.  Blender is Python driven. [4]

Kirby Urner
in Portland Oregon


[1] 20 years ago:
http://4dsolutions.net/ocn/numeracy1.html
http://4dsolutions.net/ocn/oopalgebra.html

[2]
https://www.antiprism.com/programs/off2pov.html
(POV output for geometric studies)

[3] the embedded Youtube shows of Visual Python
https://coffeeshopsnet.blogspot.com/2012/05/hypertoonery.html

[4] a few seconds of my relatively recent work in Blender
https://youtu.be/D1nw1PH4wjs



On Fri, Nov 6, 2020 at 1:14 PM Sergio Rojas  wrote:

>
> Hi Kirby,
>
> In terms of plotting, I would go with matplotlib
> as it is updated as python is updated. I have had
> bad times when using something else. I am unaware of
> Blender, but I'll look around. Any particular feature
> over matplotlib?
>
> Sergio
>
>
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: Python (one variable) Equation Solver

2020-11-01 Thread kirby urner
Greetings Sergio --

That's a beautiful example of a Flask application in that it's so simple as
a front end, yet there's serious work going on in terms of sympy and so
on.  I can envision taking a "tour group" of students through your source
code, not because they're necessarily studying algebra, but because they're
studying Flask and web frameworks more generally.

They probably remember some of the jargon, in terms of 1st, 2nd, 3rd degree
equations, people saying "squared" and "cubed" a lot, but their trajectory
through the curriculum has more to do with understanding HTTP.

That being said, even if the topic goes somewhere else, and we don't pause
to discuss algebra, individual students will bookmark a "trailhead" (as I
call it) and maybe go back to it later, and explore more deeply.

Then comes plotting those equations and what tools should we use there?
Conventionally, we might choose something like matplotlib, however in my
current curriculum we're looking at Blender (also Python) for data
rendering.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: Python (one variable) Equation Solver

2020-10-30 Thread kirby urner
Greetings from Portland, Oregon, Sergio!

I gave your invention a whirl with a random 2nd degree equation:

https://flic.kr/p/2k1Kj9v  (screen shot in my Photostream)

Always glad to see sympy getting a workout.  Flask front end.
Great skills combo!  Cross disciplinary.

Do you share source code somewhere i.e. is this open source?

I use:

http://thekirbster.pythonanywhere.com

to share about "API" and other concepts with Python students,
and have links to the code on Github.  A conventional setup.
I pay very little.

Kirby




On Thu, Oct 29, 2020 at 9:40 AM Sergio Rojas  wrote:

> Hell folks,
>A Python (one variable) Equation Solver is available at
>http://sergior.pythonanywhere.com/
>
>
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: py/js parralel examples/course?

2020-10-15 Thread kirby urner
Greetings Jurgis --

I'd say the answer to only-C compsci in school, or only-Java,
was the phenomenon of Code Schools, with their Bootcamps.
One discovered the short cut into industry was not a compsci
degree, but a crash course in exactly what you're saying: a
combo of py and js.

As you know es6 is looking a lot like Python. I'm coming to
js through React world wherein a recent revolution got all
the developers turning their classes, a new thing, transpiled
by Babel, into functions only.  You could do that now, and
yet preserve precious state in your Component objects. Yes,
I know, that's all JS echo chamber, as seen from the outside
by a classical Python player.  The two worlds combine through
Redux and Django, right?  Learn all that in Code School, forget
college, and land a job.  Leave compsci to the ones wanting
to support whole new languages and so on. It's a big world
with room for many career tracks.

Because JS world has been such a moving target, and because
textbook companies publishing to wood pulp (paper) especially
fear obsolescence, tying the curriculum to a "for the ages" language
has been a pretty good strategy. C isn't going anywhere, C++
either, and they both take you deep into the guts of the machine,
thinking low level bits and bytes, and what better time than when
you're still young in high school and wide open to all this new
information.  Presumably you have time to concentrate and access
the equipment (not a given in many childhoods I realize, with many
fighting for that privilege through adulthood).

I'm not dissing the high school approach therefore, and think the
Code School alternative has been, for many, a good compromise,
as in "no need for more college, time to jump into industry".  PY
has proved more anchoring than JS in that it hasn't morphed so
radically over the years.  Academia has put a lot of weight on it
and it has borne the weight well.  JS inspires functions as objects
(passable as arguments) as much as PY does.

The door I've left open is for colleges and/or high schools to
offer more tracks, a greater variety.  Python has made huge
inroads as everyone's "first language" in the curricula around
here (less so JS, because of the reasons I mentioned -- morphing
so fast).  One needn't abandon the C/C++ track as if it's now
obsolete.  We're just not accustomed to offering so many branch
points in early education.  There's a bias around here towards
college vs. not college bound.  Anyway, long discussion and
much that parallels what you're thinking, I'm thinking.

Kirby in Portland, Oregon
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] HP4E: update (links to Youtube)

2020-10-06 Thread kirby urner
https://youtu.be/GxDxN5tui50
(a few minutes old as of now)

For continuity...  for the elders here, I was
pushing an "HP4E" meme here on edu-sig
and elsewhere, a play on Guido's CP4E but
obviously something else.

The above link is to my Youtube channel [1],
and a 20 minute video just published, further
elucidating said HP4E meme.[2]

Python is in the mix, throughout my channel
and here too, but you won't see any source
code. edu-sig is mentioned in passing.

Feel free to skip.  There's a front door to
this course-in-progress for more context.[3]

I just wanted to provide an update for anyone
curious about my ongoing project, which relates
to American literature (think of me as a lit prof
with some ties to the Python world [4] (or
"Python nation" as I've cast it sometimes)).

Kirby Urner
Portland, OR

[1]  https://www.youtube.com/c/kirbyurner
[2]  https://worldgame.blogspot.com/search?q=HP4E
[3]
https://coffeeshopsnet.blogspot.com/2020/09/heuristics-for-teachers-fall-2020.html
[4] https://worldgame.blogspot.com/2009/03/urner-workshop.html
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] python in context

2020-06-26 Thread kirby urner
Some history:

https://www.quora.com/Is-coding-the-same-as-writing-script/answer/Kirby-Urner

Is coding the same as writing script?
<https://www.quora.com/Is-coding-the-same-as-writing-script>
<https://www.quora.com/profile/Kirby-Urner>
Kirby Urner <https://www.quora.com/profile/Kirby-Urner>
·
1h ago
<https://www.quora.com/Is-coding-the-same-as-writing-script/answer/Kirby-Urner>
Founder at 4D Solutions

I’d say so. Coding is the same as scripting. Writing a program is writing a
script.

However “scripting” has had varying connotations over the years. People
spoke of Perl as a “scripting language” and the idea was a script was more
likely a one-off, a quick and dirty way to get something done in a hurry,
inhouse. Serious software built for the ages would not use a “scripting
language”.

That meaning morphed into “agile” as people (coders) realized that agile
dynamically typed high level languages were indeed suitable for production
code and frameworks. The Perl Mongers (Perl users) were encouraged to
rehabilitate “scripting language” as a term they could use with pride.
JavaScript, at first dismissed as just a mere toy inside the web browser
(then a novelty), became the king of the agiles.

I’d add that “coding” didn’t used to be as popular a synonym for
“programming” as it is today. People used to “learn to program” not “code”.

Guido van Rossum’s Computer Programming for Everybody (CP4E) initiative was
prescient in that coding may now be done in snippets, in the context of a
Jupyter Notebook say, by people who do not consider themselves professional
programmers.

Guido invented Python, another agile or “scripting language” similar to
Perl and later Ruby (Ruby owes more to Perl than Python I’d say).

In contrast to the high level agiles, we still have the “systems” languages
that run faster once written, but take a lot longer to write (C++ being the
standard example of a systems language).

These days, coders are bioengineers, medical doctors, statisticians. Coding
is about using one more tool. You don’t need a degree in computer science.

Again, as the culture keeps changing, so do the connotations of words, even
more so than the denotations.
41 views
View Upvoters
 · Answer requested by Melonie Tuttle
<https://www.quora.com/profile/Melonie-Tuttle-1>
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] python in the movies...

2020-06-16 Thread kirby urner
I've taken a deep dive into Blender recently, you'd have thought earlier
maybe, but I was slow into CAD, doing my work directly in a ray tracer
(POV-Ray, also free open source).

https://nbviewer.jupyter.org/github/4dsolutions/School_of_Tomorrow/blob/master/blender.ipynb

Why not jump right into something full featured even for plotting XY
graphs?  Keep doing those parabolas but add texture / materials, lighting.
Math as theater (a kind of art).

Sure, we can do that in matlabish panda type environments but lets not
forget live ray tracers with fully internalized live Python (like ESRI).
Just import bpy and you have full scripting control over the GUI interface
as well as hooks into all the data, the current context and on and on.

The ergonomics drive the economics i.e. if every student is going to need
hardware up to Blender's capabilities, with GPU(s), then we're beyond "one
laptop per child" to "one (or more) well equipped workspace(s) per child"
(adults need PWSs too, and many have them).  The idea that school is
cramped little desks close together with no room for multiple monitors is
so 1900s.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/
Member address: arch...@mail-archive.com


[Edu-sig] Re: back to school... "1/3" --> float question, just eval?

2020-04-11 Thread kirby urner
Yikes. My attempt at hand-coding markdown links formatting as [word](
http://address) didn't work well at all in the HyperKitty Mailman3 view, my
apologies.

Here are the links again, in the order linked...

This thread:
https://mail.python.org/archives/list/edu-sig@python.org/thread/H6KKJR57V7G4CIPDPJ7FUCXWDHMRUYUT/

My context manager pattern:
https://github.com/4dsolutions/python_camp/blob/master/ContextManager.ipynb

Super fluent thanks to Wes (pull requests):
https://github.com/4dsolutions/python_camp/blob/master/camper_program.py

"Covid Camps" (souvenir):
 https://flic.kr/p/2iLG2qU

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] Re: back to school... "1/3" --> float question, just eval?

2020-04-11 Thread kirby urner
I decided to try replying through the HyperKitty archived interface, where I’ve 
been examining the cosmetics of [our 
thread](https://mail.python.org/archives/list/edu-sig@python.org/thread/H6KKJR57V7G4CIPDPJ7FUCXWDHMRUYUT/
 
)
 to date with a critical eye.  

Also, I see I said “construct manager” a few times when I was meaning “context 
manager” — oh well.

Hyperkitty pops me into an Apple mail client I never use.  Some default Apple 
setting somewhere I suppose I could dig up.  Lets see if this sends or will I 
end up cutting and pasting to Gmail in Chrome.

Yes Wes, you’re pretty close on your educated guess/memory re that 
semi-esoteric species of class (the context manager), wherein ```__enter__``` 
is what actually returns the object of the optional “as” as in:

with DB(“users”) as db:  # <— optional object returned by ```__enter__``` which 
takes no args
indented block
```__exit__``` triggered on exit, has info in args re any exceptions, I use 
*oops to gather up the 3-tuple.
outdented (db stays available but __exit__ will have likely closed the 
connection, e.g. hung up the phone on the database)

The arguments to class DB() go to the optional ```__init__``` as always, 
however ```__enter__``` gets to return the “db” (above) which then becomes 
available to the indented block (suite as Holden calls it) as a potentially 
useful object.  Most typically ```__enter__``` simply returns the self (the 
instance of the context manager class itself). However in principle it’s free 
to return any object it likes, similar to ```__iter__``` (which should at least 
return an iterator, but only self if self is already such, per class generator 
API where ```__next__``` must also be there).

[My 
pattern](https://github.com/4dsolutions/python_camp/blob/master/ContextManager.ipynb
 ) 
is to load up the target object db with a lot of tools for working with the 
database at hand, much as open(filename) may be use with with to create the 
filetype object.  On ```__exit__``` the database closes.  In between, I might 
even db.zap_tables() and db.create_tables().  Sometimes my DB is very 
customized to work with a very specific database. Other times I separate the 
```__enter__``` ```__exit__``` part, could be a parent helper.  The linked 
Notebook gives more context.

Yes, completely agree on Jake Vanderplas as a go to guy for anything both 
pythonic and data scientific.  

From my campsite FAQ:
Q: Where's a good place to begin with data science?
A: Follow Jake Vanderplas  and study his work.

Wes, your pull requests came in smoothly and my current plan is to exhibit this 
program as is, as an example of what [super duper fluent 
Python](https://github.com/4dsolutions/python_camp/blob/master/camper_program.py
 ) 
actually looks like, with unit testing and the whole business.  

I might use git to dig up an old version (say from this last Monday), showing 
how ancient drafts might still be excavated in a repo, and then roll forward 
again, to the way it is now.  That’s what git’s good for kids!

I did the pull request process online for campers to observe, and commented on 
closing the request, how smoothly it all went.

I’m hoping my practice of outlining a course in a hyperlink-rich Jupyter 
Notebook will continue to spread, not that I invented it or anything.  I’m 
telling my campers this generic Notebook technology (not just Jupyter) is what 
their high schools might well be using soon, if not already. 

I’m eager to pack in a lot of serious academic content given these ["covid 
camps”](https://flic.kr/p/2iLG2qU ) aren’t just 
“summer camp”.  They’re a continuation of their ordinary schooling, in a 
homeschooling context.

Kirby 

___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] Re: back to school... "1/3" --> float question, just eval?

2020-04-10 Thread kirby urner
Thank you very much for the pull requests Wes!  I got notification by
email.

They may be against a version that no longer exists, but no matter.  We're
gonna poke around live on camera, starting in about 30 minutes. We go for
2.25 hours with one or two breaks.

I'm taking my campers right into my mailbox and showing through Github how
it all might work, even if I don't actually make it work.

I've got the Daniel Shiffman "Git for Poets" playlist queued up through
[the main Notebook](
https://github.com/4dsolutions/python_camp/blob/master/PyCampNextLevel.ipynb
).

Providing opportunities to soak up knowledge about Git and Github has been
a primary focus of this camp.

My two cohorts so far have differed quite a bit in character.

The first group featured teens eager to dive into deep topics, per the camp
blurb, and got antsy when I didn't talk machine learning right away. This
might be too much a camp for noobs.  I didn't have the Jupyter Notebook
four day outline yet.  They're nervousness is partly what drove me to get
it out there, reassure them our content would match the camp description.

The second group is younger, considers itself adept and into programming,
yet is patiently learning a lot of core Python.  One camper had worked with
his dad on solving that "1/3 --> float" problem.  I incorporated their code
verbatim as a part of our shared process.

I've never shared about the construct manager construct with like middle
schoolers before, however that's a big part of the plan for today. I
[showcase that construct](
https://github.com/4dsolutions/python_camp/blob/master/ContextManager.ipynb)
for
connecting to / working with / disconnecting from databases (in our case
sqlite3 databases).  I tell them they're previewing the high school of
tomorrow.

The School of Tomorrow is a neighboring repo, and crosslinks (hyperlinks)
between that, and this camp, have already appeared.

My recommendation to campers starting from day one is they:

(a) install git locally
(b) git clone the camp repo
(c) create a Github account
(d) fork the camp repo
(e) git clone the forked camp repo

Then they should treat the (b) structure as something to keep updating with
git pull.  Treat my version of the repo as read-only.

However, they can modify and elaborate on their own version of the forked
repo (e), and push changes at will. Harvest ideas from my updates for their
own works in progress. Share links to their own repos through Zoom chat.

My schedule is such that I'm expected on more week of piloting this
curriculum, then shelving it to work on something more data science
oriented, returning to the kid camp scene in early June.  I'll be looking
for ideas on how a strong data science course should go, assuming beginners
but with some Python experience.  Obviously we'll be using numpy,
matplotlib, sklearn and like that.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] Re: back to school... "1/3" --> float question, just eval?

2020-04-09 Thread kirby urner
>
>
> Try the following:
>
> from fractions import Fraction
> float(Fraction("1/3"))
>
> Knowing you, I'm sure you can figure out plenty of useful applications of
> this. :-)
>
> André
>
>
A totally excellent suggestion!

I'm going to share that, by bringing campers here on tour, saying "this is
where Python educators hang out!"

Maybe some of them will want to join us someday.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] back to school... "1/3" --> float question, just eval?

2020-04-09 Thread kirby urner
Here's a thread I'm starting with my campers taking a PyCamp course.

Yesterday we were co-evolving a calculator driven by looping menu.  It does
squares and square roots (one of the campers supplied this logic) and I was
just getting around to introducing the y^x key as some call it, i.e. any
number to any power, Python's pow(num, exp).

Today we'll pick up where we left off.

We used the shared whiteboard to draw radical signs as I intoned about how
pow(3, 3) means like ```3 * 3 * 3```.  Math Adventures in Python.  We might
also say ```3 ** 3``` (and not ```3^3``` like in so many languages).
sqrt(num) is the same as ```num ** (1/2)``` and we can get the 3rd root of
27 with ```27 ** (1/3)```.

[ Sorry for all the markdown by the way, if you're getting a plaintext
version -- an option I'd advocate for browser based viewers of the archives
someday (to see what it looked like way back when, Before Markdown). ]

So here's what we're up against:  say I want to raise 10 to the 1/3rd
power, same as taking a "cube root" of 10 (tetrahedral whatever).  The menu
prompts:

```python

num = float(input("Your number please: > "))  # yes a bit dangerous
exp = float(input("...and your exponent: > "))  #  user wants to do 1/3
```

Of course that last statement raises an exception because float("1/3")
doesn't work (isn't supposed to). What shall we do then?

I'm thinking we parse anything that looks like a legal fraction and do the
floating point conversion from int(p)/int(q).  We won't allow input like
2.1/3.6 just int/int.  I've already preached against eval() but if it
passes my regular expression test first...

Anyway, it's a discussion.  These are like middle schoolers previewing high
school, at a time when kid focused code schools were under some pressure to
convert to "everything online".  I used to drive to the schools.

We don't have to use a regexp!  A good excuse to say what these are
though.  Or test for the pattern but then use split("/") to pry numerator
from denominator, once we know that'll work?

https://github.com/4dsolutions/python_camp/blob/master/camper_program.py
(snapshot -- part of the camp is they watch me git pushing updates to the
camp repo).

Rather perversely, I may set things back between camps i.e. I'll
deliberately revert the code.

Comments?  Code?

Kirby

PS:  I notice Python 3.8 is being rather more generous in its statistics
module. Campers who wander from the base camp fire are likely to find
themselves staring at pdfs and cdfs.
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] a "covid camp" specimen (online curriculum materials)

2020-04-02 Thread kirby urner
A Python camp for teens stuck at home.

[Exhibit](https://github.com/4dsolutions/python_camp/blob/master/README.md
)
(work in progress)
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] Re: My SIR Model

2020-03-24 Thread kirby urner
Awesome!

If you do any kind of Youtube on this specific SIR model I hope you'll link
it from the cell and share it here.

I see some Youtubes like that already (SIR models, including in Python),
but everyone codes a little differently.

I'd like to go back to high school and do it all again from a student
perspective, now that the curriculum and tools are so vastly different.

High school should be for any age, and one keeps going back every 10 years
or so.  Learn it the new way.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] REPL.IT works great for sharing Python examples

2020-03-09 Thread kirby urner
Per usual, we're awash in useful tools, many free, but so little time to
learn to use them, it seems.  And they all keep evolving.

Along those lines:  REPL.IT, favored by many a Python teacher, yet so
little explored by me.  Like with LinkedIn and so many of these Web 2.0
tools, we get so many cool features.

Make a Python program public, using 3.8.1 (that's very current now in March
2020), runnable code, blog embeddable.

Use a Share feature to create a public Notification.

Examples, two of mine from today (tested to work fine on Facebook):

https://repl.it/talk/share/Python-Decorators-for-Composing-Functions/30054

https://repl.it/talk/share/Computing-Volumes-in-Tetravolumes-S-and-E-Modules/30061

Remember to use Markdown to markup these Notifications (which you can
re-edit), same as here on edu-sig where Markdown is the new normal, right?

On the first one, I used an embedded asterisk a lot, for Python
multiplication, only to discover what I learned about the new edu-sig:
Markdown is your friend.

Kirby

PS:  shout out to Jake Vanderplas, the Pycon keynote speaker in Portland
that time, who gets my Stupendous Python Teacher Award. @jakevp


___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] Python 3.8 breaks backward compatibility with math.factorial(Decimal(int))

2020-02-18 Thread kirby urner
Now you'll need to use math.factorial(int(Decimal)) or write your own
factorial function.

The storyline:

Apropos of recent threads experimenting with high precision (arbitrary
precision) numbers as a way to promote interest in "pure math" applications
using Python, I discovered this morning that my Ramanujan Convergence
script on repl.it  was broken all of a
sudden (after working before), and set out to discover why.

Answer:  in Python 3.8, to which repl.it has newly upgraded, math.factorial
no longer accepts Decimal type numbers, even if they're integral
(integers).  You can read the discussion here:
https://bugs.python.org/issue33083

Here's the line of code that broke, and was fixed with explicit castings to
int.

term = (fact(int(c1*i))*(c2 + c3*i))/(pow(fact(int(i)),4)*pow(c4,4*i))

By the time of the final division, the numerator and denominator have been
coerced back into Decimals and so will divide with the expected precision
(set by the context):  Where:

```
c1 = Decimal(4)
c2 = Decimal(1103)
c3 = Decimal(26390)
c4 = Decimal(396)
c5 = Decimal(9801)
```
For more context:

https://github.com/4dsolutions/Python5/blob/master/Pi%20Day%20Fun.ipynb
(I'm updating it now...)

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] 1-2-3 testing mailman 3 archival rendering of Python code

2020-02-06 Thread kirby urner
On Thu, Feb 6, 2020 at 6:17 PM kirby urner  wrote:

>
> Testing:
>
> >>> 2**200 # (that's 2 to the 200th power in Python).
>
>

The double star came out OK but the chevron is interpreted with color
containers 3-levels deep.

So beware using the Python chevron then.  We didn't use to have these
problems right?

Another test:

2**200  # no chevron this time.

Fixed width:

M1 = 2**2-1 = 3
M2 = 2**3-1 = 7
M3 = 2**5-1 = 31
M4 = 2**7-1 = 127
M5 = 2**13-1 = 8191
M6 = 2**17-1 = 131071
M7 = 2**19-1 = 524287
M8 = 2**31-1 = 2147483647

Do I lose the double star?  The Mersenne Primes cut and paste from Spyder
was somewhat of a disaster.

https://flic.kr/p/2iq6NWH  (exhibit)

None of the double stars (exponentiation) rendered.  Check
attachment/original.

We've lost indentation in Python code.

At the Math Forum we could hit a button to see a more plaintext version of
any post, with indentation preserved.

Perhaps something like that (made default view for a Python list?) would
address these issues?

What is the experience of other Python listservs I wonder, regarding this
upgrade to mailman 3?  Any feedback welcome.

Kirby Urner
one of the listowners
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] Re: mailman 3: howzitgoin?

2020-02-06 Thread kirby urner
Testing:

>>> 2**200 # (that's 2 to the 200th power in Python).

The mailman 3 archive is rendering Python code rather poorly right?

I archive more of my experience in this recent Youtube:

https://youtu.be/rpAE_ogXKcE

(recaps some recent threads, takes up the display of Python code through
the archive)

Kirby


On Tue, Feb 4, 2020 at 12:50 PM kirby urner  wrote:

> Looking back in the archive:
>
>
> https://mail.python.org/archives/list/edu-sig@python.org/message/WE5WEZIMTZ7NB7FRZIPEAHLXJHQKGRKF/
>
> The rendering I get turns the double-star of Python exponentiation into
> some kind of boldfacing, like we're in a wiki or using markdown or
> something.
>
> The attachment shows the original content, but requires a download to see.
> Is there a button-click way to redisplay / re-render a post in original
> format?
>
> Nor is my Python source code showing up with indenting.  Do I need to
> format in some new wiki way?
>
> What default settings do we have, to restore Python-friendliness, I
> wonder.
>
> Kirby Urner
> edu-sig listowner
>
>
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] mailman 3: howzitgoin?

2020-02-04 Thread kirby urner
Looking back in the archive:

https://mail.python.org/archives/list/edu-sig@python.org/message/WE5WEZIMTZ7NB7FRZIPEAHLXJHQKGRKF/

The rendering I get turns the double-star of Python exponentiation into
some kind of boldfacing, like we're in a wiki or using markdown or
something.

The attachment shows the original content, but requires a download to see.
Is there a button-click way to redisplay / re-render a post in original
format?

Nor is my Python source code showing up with indenting.  Do I need to
format in some new wiki way?

What default settings do we have, to restore Python-friendliness, I wonder.

Kirby Urner
edu-sig listowner
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] Re: My e-book to teach kids Python is free within the next 24 hours on Amazon

2020-02-04 Thread kirby urner
Thank you Kent.

One of the storylines I introduce in my Python classes, to motivate a use
case project, is the just using a search engine to discover and curate
links is a waste.  The internet if full of rare jewels that the engines
won't know how to rank, simply on the basis of "beaten track" popularity.
Always starting with Google or DuckDuckGo and picking from the top few
things that you see, is like walking into a bookstore and always buying
from the "store picks" near the entrance.

Anyway, your free book will join my database of curated links.  These are
just small csv, jason or sqlite files my students learn Python with, as
they learn to curate and share their own links.  We learn to use
namedtuples and so on.

The early internet was more about link sharing, with resources designed for
that purpose.  There may be less of that now.

Also, I see lots of kids in my work week, as young as 10, so sharing this
bookmark with them makes sense as well.  I'm always promoting Math
Adventures with Python because I think Python is very capable of delivering
on that promise (as Peter Farell has shown).

Earlier in this archives we were mostly in agreement that learning the ins
and outs of RSA (the public crypto system) by the end of high school, was a
worthy benchmark.  Python with its big integers and number / group theory
capabilities, would be key.  We had the textbook at Phillips Andover and so
on.

Kirby


On Sun, Feb 2, 2020 at 8:00 PM Kent Tong  wrote:

> Hi,
>
> If you're interested, you can get it for free at:
>
> https://www.amazon.com/Yes-Kids-can-learn-Python-ebook/dp/B084CY2L43/ref=sr_1_1
>
> Best regards,
> --
> Kent Tong
> IT author and consultant, child education coach
> ___
> Edu-sig mailing list -- edu-sig@python.org
> To unsubscribe send an email to edu-sig-le...@python.org
> https://mail.python.org/mailman3/lists/edu-sig.python.org/
>
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] Re: arbitrary precision computing in K-12

2020-02-03 Thread kirby urner
You won't need Decimal to replace Java's BigInteger of course, as Python's
integers are already big.

Here I just redid your Mersenne Primes exercise using native Python ints,
and also exposing the guts of a probable prime test that seems less flaky
than the one you had to use (set at 50% reliable -- and changing its mind a
lot, as there's randomness involved).

The test I use is the Miller-Rabin test, with a citation to a certain page
number in Knuth.

Here's the output:

runfile('/Users/mac/Documents/School_of_Tomorrow/mersennes.py',
wdir='/Users/mac/Documents/School_of_Tomorrow')
M1 = 2**2-1 = 3
M2 = 2**3-1 = 7
M3 = 2**5-1 = 31
M4 = 2**7-1 = 127
M5 = 2**13-1 = 8191
M6 = 2**17-1 = 131071
M7 = 2**19-1 = 524287
M8 = 2**31-1 = 2147483647
M9 = 2**61-1 = 2305843009213693951
M10 = 2**89-1 = 618970019642690137449562111
M11 = 2**107-1 = 162259276829213363391578010288127
M12 = 2**127-1 = 170141183460469231731687303715884105727
M13 = 2**521-1 =
6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057151
M14 = 2**607-1 =
531137992816767098689588206552468627329593117727031923199444138200403559860852242739162502265229285668889329486246501015346579337652707239409519978766587351943831270835393219031728127

Here's the source code (which thanks calcpage and links to your video in
the opening docstring):

https://github.com/4dsolutions/School_of_Tomorrow/blob/master/mersennes.py

As you'll see from lines 127 on, I do a brute force trial by division at
first, to determine primehood, then switch to this more exotic algorithm
going forward.  It gets them all right.

Once students develop an appetite for big integers, they're going to wonder
about big reals (so called arbitrary precision).  We can switch them to a
full-blown math framework like Sage, but we don't have to, given these
smaller libraries (decimal, gmpy2) are close at hand.

Kirby



On Sun, Feb 2, 2020 at 5:36 PM A. Jorge Garcia  wrote:

> And here's BigInteger at work finding large Mersene Primes.
> https://youtu.be/-Snd7a55FrE
>
> I'm gonna have to do the same in python with Decimal. What about the N()
> method in SAGE and numpy?
>
> Regards,
> Al
>
> Sent from BlueMail <http://www.bluemail.me/r?b=15774>
> On Feb 2, 2020, at 19:18, kirby urner  wrote:
>>
>> Hi Jorge --
>>
>> I agree, it'd be interesting to apply a Riemann Sum algorithm using
>> arbitrary precision as the number crunching type, versus IEEE754.
>>
>> Freed from FORTRAN, you would have that option.  I'll do it now...
>>
>> [ sometime later ]
>>
>> Here's a sandbox version:
>> https://repl.it/@kurner/computepi
>>
>> I'm comparing the convergent Rsum you give with one of Ramanujan's:
>>
>> pi = 3.141591653589626571795976716612836217532486859692
>> start_time = 23183.62579051
>> end_time = 23205.729972367
>> elapsed time = 22.104181857001095 seconds
>>
>> Ramanujan's converges really quickly, after 100 terms:
>>
>> pi = 3.141592653589793238462643383279502884197169399375
>> start_time = 23205.731066136
>> end_time = 23205.838047055
>> elapsed time = 0.10698091900121653 seconds
>>
>> That 2nd answer is correct as far as I'm showing it.  One may tweak the
>> repl to get even more precision.
>>
>> I wonder how fast REPL.it is compared to my R-Pi.  I'll be checking that
>> later.
>>
>> You're getting into clustering, cool!
>>
>> That's a deep topic, with or without converging to Pi, wish I knew more.
>>
>> Kirby
>>
>> On Fri, Jan 31, 2020 at 8:30 PM < calcp...@aol.com> wrote:
>>
>>> Hi Kirby,
>>>
>>> Love your post about arbitrary precision. I wish I had seen it before I
>>> started a project with my students computing PI on a Linux Cluster.
>>> Here's my blog post about our project so far if anyone is interested,
>>>
>>> https://shadowfaxrant.blogspot.com/2019/12/cistheta-2019-2020-meeting-7-121519.html
>>>
>>> Regards,
>>> A. Jorge Garcia
>>> Teacher and Professor
>>> Applied Math, Physics and Computer Science
>>> http://shadowfaxrant.blogspot.com
>>> http://www.youtube.com/calcpage2009
>>>
>>>
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] Re: arbitrary precision computing in K-12

2020-02-02 Thread kirby urner
Hi Jorge --

I agree, it'd be interesting to apply a Riemann Sum algorithm using
arbitrary precision as the number crunching type, versus IEEE754.

Freed from FORTRAN, you would have that option.  I'll do it now...

[ sometime later ]

Here's a sandbox version:
https://repl.it/@kurner/computepi

I'm comparing the convergent Rsum you give with one of Ramanujan's:

pi = 3.141591653589626571795976716612836217532486859692
start_time = 23183.62579051
end_time = 23205.729972367
elapsed time = 22.104181857001095 seconds

Ramanujan's converges really quickly, after 100 terms:

pi = 3.141592653589793238462643383279502884197169399375
start_time = 23205.731066136
end_time = 23205.838047055
elapsed time = 0.10698091900121653 seconds

That 2nd answer is correct as far as I'm showing it.  One may tweak the
repl to get even more precision.

I wonder how fast REPL.it is compared to my R-Pi.  I'll be checking that
later.

You're getting into clustering, cool!

That's a deep topic, with or without converging to Pi, wish I knew more.

Kirby

On Fri, Jan 31, 2020 at 8:30 PM  wrote:

> Hi Kirby,
>
> Love your post about arbitrary precision. I wish I had seen it before I
> started a project with my students computing PI on a Linux Cluster.
> Here's my blog post about our project so far if anyone is interested,
>
> https://shadowfaxrant.blogspot.com/2019/12/cistheta-2019-2020-meeting-7-121519.html
>
> Regards,
> A. Jorge Garcia
> Teacher and Professor
> Applied Math, Physics and Computer Science
> http://shadowfaxrant.blogspot.com
> http://www.youtube.com/calcpage2009
>
>
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] Re: arbitrary precision computing in K-12

2020-01-30 Thread kirby urner
On Thu, Jan 30, 2020 at 4:55 AM Wes Turner  wrote:

>
>
> Are they working on Windows platforms?
> I understand that Python is in the Microsoft App Store now, but conda is
> not.
>
>
Yes.  Oft times these are public school labs and I'm not in charge of what
gets installed.  Always Windows and/or Chromebooks.

The private schools have featured Macs as well.

However they're already using repl.it in the cloud (after Codesters in the
sequence).

My Decimal experiments have been in repl.it:
https://repl.it/@kurner/tetravolumes

I realize one may use Jupyter Notebooks in the cloud as well (e.g. that
free Docker-based service etc., Mybinder I think it's called).

But in this context I'm just sharing exhibits, saying "hit the run button"
and showing it's at least as much fun as a calculator.  Other exhibits
might include Taylor Series or like that Ramanujan algorithm for 1/pi.

Raspberry Pi is also feature in our curriculum segments.  That comes with
Wolfram Language perhaps, more like sympy and Sage, but if we can just dive
in and use Decimal, so much the better (already installed with default OS).

https://flic.kr/s/aHskYSMvKJ
(Photo Album gives the flavor)

Step one might be to get curl or wget and bash installed. Are admin rights
> required to get Windows Subsystem for Linux (WSL) installed?
>
> Apparently, 'certutil' can be used to download over http on Windows
> platforms:
>
> certutil.exe -urlcache -split -f "
> https://download.sysinternals.com/files/PSTools.zip; pstools.zip
>
> Then download and install Miniconda:
>
> - https://docs.conda.io/en/latest/miniconda.html
> 
> - https://docs.anaconda.com/anaconda/install/silent-mode/
>

Useful on Raspberry Pi too I think.
When I teach my 40 hours Python course to adults (I've got another one
starting next week) I always go for conda.

This is BYOD class i.e. they bring a mixed bag as to the OS -- and given
teleteaching, I may not even know if they choose not to tell me.

However, when it comes to this high precision fitting-together of puzzle
geometric pieces, and giving a workout to that Gerald de Jong formula (came
to him on a train in Holland I think it was, a Ramanujan Moment -- he's a
math guy from University of Toronto [1]): that's for my younger students as
well, and I'm not really in a position to micro-manage their computers
either.

Codesters doesn't implement decimal type (a deficiency in Skulpt and
probably by extension in JavaScript?).  However I can use it to import the
graphics in question and display them on screen.





>
>
> certutil.exe -urlcache -split -f "
> https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe;
>
> start /wait "" Miniconda3-latest-Windows-x86_64.exe
> /InstallationType=JustMe /RegisterPython=1 /S /D=%UserProfile%\Miniconda3
>
> Then create an environment and install a few things:
>
> conda create -n maths jupyterlab spyder
> conda activate maths
> conda install -c conda-forge sympy gmpy2 matplotlib safe
>
> Then start jupyterlab or spyder or vscode, or IPython:
>
> jupyterlab
> spyder
> ipython
> # %logstart -o logged.inputandoutput.py
>
>
> But how do you plot 3d graphics in a terminal? In Jupyter notebooks, an
> object's _repr_html_ method will be called before just repr(object) (which
> calls __repr__) in order to get output for the notebook.
>

I've been a big VPython (Visual Python) fan over the years, as when it
comes to 3d, I'm interested in Polyhedrons (e.g. Platonics etc), using
user-crafted Vector classes and such.  For years I relied on ray tracing
i.e. Python code spit out scene description language.  This approach became
widespread e.g. see Antiprism by Adrian (antiprism.com).

At my best, I was getting Game of Life on a 3D hexapent (with modified
rules for 6 and 5 around 1).  My Oregon Curriculum Network website is full
of early VPython experiments (4dsolutions.net/ocn/cp4e.html).

Kirby

[1] Input six edges, get back out volume.  Add 24 of this shape to that
shape and prove outcome is 4.0 to 900 decimal places.  Part of that repl.it
thing.  What I wrote up on Medium (linked top of this thread).
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] Re: arbitrary precision computing in K-12

2020-01-29 Thread kirby urner
Yes, I've especially used gmpy2 and met the maintainer at a user group,
worked at Mentor Graphics as I recall, and was collaborating with Alex
Martelli on getting Python such a library.  Most of my Jupyter Notebooks
exploring high precision are using that.  Trig built right in, and complex
numbers.

Sage is a fantastic amalgamation of underlying tools, however I'm exploring
what a plain vanilla or at most a small install of a 3rd party library (vs.
a whole framework) might handle, as that lets us work in some simpler
environments, maybe just a bash shell in some cases.  I'm picturing
tentative customers not pre-committed to using computers at all (e.g. high
school math students used to Texas Instruments or maybe Casio).

What's just one step away from a calculator?  Calculators remain very
convenient devices and are likely to stay useful in the field.  I like
those solar powered models.  Nowadays more people emulate them on
smartphones.

Now that you've gone to all the trouble to upgrade to a real computer, lets
at least establish you have decent power in the arbitrary precision
department.

What minimal setup would you need to prove that to yourself?

That might help make you a convert if you're still thinking your calculator
might be the more capable device to reach for.  Lets do some circus tricks
with Python, like 2**1000.  Wow!  Long integers are like a revelation.  The
actual answer!  But can we do the same with messy decimal numbers?  That's
where too many settle for floating point, unnecessarily.

But yes, lets not forget the towering achievements all around us here.
We're indeed in a wealthy ecosystem. A lot of the barriers to adoption have
to do with long ingrained habits of mind.  The idea that we have both delta
and lambda calculus now, i.e. the Newtonian calculus stuff and now Alan
Turing and Ada stuff, is another way to help make it all one discipline,
call it what you like.


Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] Re: arbitrary precision computing in K-12

2020-01-29 Thread kirby urner
More concretely, and continuing the arbitrary precision thread, one might
think Python, with its clever duck typing, could take either floating
point, or standard library Decimals, through precisely the same algorithm.

That's so in some cases, but when we get to powering, one can't use the
built-in pow( ) function with pow(Decimal, float), as a workaround for
math.sqrt.  sqrt(float) is fine of course, but you need Decimal.sqrt()
whereas float.sqrt() is a syntax error.  The algorithm has to "know in
advance" what syntax to use, meaning we stray into type detection (what
you'd think we might avoid, given numbers are numbers).

I ended up with something kinda kludgey like this:

def rt2(n):
if "sqrt" in dir(n):
return n.sqrt()
else:
return sqrt(n)
A simple type check would be faster, by why not go all the way and let any
object with a sqrt method use that instead of math.sqrt?

Then I initialize my variables like this:

if high:
a = Decimal('1')
seven = Decimal('7')
five = Decimal('5')
three = Decimal('3')
else:
a = 1
seven = 7
five = 5
three = 3

EF = a * rt2(seven - 3 * rt2(five))
EH = a * (3 - rt2(five))/2
EG = a * EF / 2
FH = a * (rt2(five) - 1)/2
HG = a * EG
GF = a * rt2(three) * EG

Corresponding pictures (if curious):
https://mybizmo.blogspot.com/2020/01/quaker-curriculum-american-literature.html

That way I get my edge lengths as either floating point or decimal,
depending on whether high (for "high precision") is set to True.

Even then though, when I feed these six edges of a tetrahedron to the
volume formula (six edges --> volume), I come up against needing a 2nd root
and end up duplicating the rt2 definition inside the Tetrahedron class as
_rt2.  Details here:

https://repl.it/@kurner/tetravolumes

Mathematica (Wolfram Language) makes all this easier.  But that's not a
workaday coding language most people use.

Given how most other computer languages work, I think introducing IEEE 754
floating points *in contrast with* an arbitrary precision type, is
reassuring to students new to computers.  Why not make the most of Decimal
and/or 3rd party gmpy2?

Show them they really *can* use pi or phi to a thousand places (you'd think
computers would be able to do that).  That's pedagogically important in my
book.  gmpy2 has native trig and allows complex numbers.

Making floating points do all the work and calling those "real numbers"
only adds to the pure math | engineering divide I'd like to see bridged.
Using floating points only leaves the wrong impression that computers are
actually bad at doing ordinary math textbook computations.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] arbitrary precision computing in K-12

2020-01-24 Thread kirby urner
A lot of our archived debates centered around how we might redesign
(reform) the curriculum in light of computer languages, Python in
particular.

What I'm coming to lately is emphasizing arbitrary precision e.g. pi to
literally a thousand places, as an especially attractive feature of
computers in general.

Mere calculators don't usually do arbitrary precision (I remember one Casio
(?) with a scrolled display), but seem more reliable in giving the expected
grade school results vs. answers we might get from using floating points
(IEEE 754), which bring their own form of disillusionment.

In other words, in going from a basic math topic, such as irrational
numbers, to computers, why not emphasize the extrapolation of our
algorithms to large numbers of decimal digits?  Lets compute Phi as (1 +
sqrt(5))/2 to hundreds of digits and check published sources (such
multi-digit comparisons might mean converting to strings).

We've done stuff like that around pi here on edu-sig, computing from
algorithms (one of Ramanujan's in particular).

These arbitrary precision numbers may not have much use in scientific and
engineering applications (because nothing gets measured to that degree of
precision) but I'm talking about bridging from math, so-called "pure math"
in particular.

My approach of late has been to use geometric objects (volumes,
polyhedrons) and check that our computations may be exact to several
hundred decimal points thanks to Python's Decimal.

I also use the 3rd party gmpy2 library.

Here's an essay on Medium if you'd like to read more:
https://medium.com/@kirbyurner/calculator-of-tomorrow-using-arbitrary-precision-8f219b0092d9

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] Python and... ?

2019-12-10 Thread kirby urner
Granted, these two code blocks (below) are far from identical, however the
unittest idea (from JUnit) is alive and well in Rust, which should be
encouraging.

You'll need another crate (module, use cargo install) if you want
AlmostEqual type assertions for floating point work.  I'm doing a lot with
f64.

A reason to wrap these in a single curriculum is one is Agile and one is
System (as we sometimes say) and although I haven't done it myself yet, I
see teachers on Youtube extending Python with Rust.

The Rust language aims to compete in the C++ area e.g. as the basis for a
future Mozilla browser (Servo).  A lot about it is familiar to
Pythonistas.  Synergy is already happening.  Webassembly.

Likely some code schools are already planning a Rust & Python & JavaScript
based track.  I'm dabbling in that also, in the context of my quirky Oregon
high schoolish PATH | STEM curriculum.

https://worldgame.blogspot.com/2019/12/updates-from-ocn.html

Python:

def test_e_module(self):
e0 = D
e1 = root3 * PHI**-1
e2 = rt2((5 - root5)/2)
e3 = (3 - root5)/2
e4 = rt2(5 - 2*root5)
e5 = 1/PHI
tet = Tetrahedron(e0, e1, e2, e3, e4, e5)
self.assertTrue(1/23 > tet.ivm_volume()/8 > 1/24, "Wrong E-mod")

Rust:

#[test]
fn emod() {
let s3: f64 = (9.0_f64/8.0).sqrt();
let phi: f64 = (1.0 + 5_f64.sqrt())/2.0;
let edges = tetrahedron::emod();
let super_rt = 20.0 * s3;
println!("{} {} {}", s3, super_rt, edges.volume());
approx::assert_abs_diff_eq!(edges.volume(),
super_rt* (1.0/120.0) * (1.0/phi.powf(3.0)));
}
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] Re: Edu-sig Digest, Vol 192, Issue 9 Learn Python and what? How to teach about Context Managers (a proposal)

2019-10-31 Thread kirby urner
Thanks for those references Perry.


Would it be possible to share your notebook so I could play with that
> context manager code? I looked on your github, but did not see it:
> https://github.com/4dsolutions?tab=repositories
>
> Cheers,
> Perry
>

Here's a relevant Jupyter Notebook, not exactly the one I used in my
Youtube, but same ideas:

https://github.com/4dsolutions/Python5/blob/master/SQL%20Made%20Simple.ipynb

The sqlite3 database files used in the code live in that same repo.

Let me know if you have any questions about it.
Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] Learn Python and what? How to teach about Context Managers (a proposal)

2019-10-29 Thread kirby urner
Suppose you got this question:

"I'm new to programming and heard that studying two languages, one front
burner, one back burner, is a best practice, as the benefits you get from
'compare and contrast' is like when rubbing two sticks together: you get
fire."

I've been suggesting learning Python (front burner) and...

Go (interfaces vs types, slices, concurrency, garbage collected,
compiled)
Rust  (no garbage collection, immutability the default, learns from Python)
Clojure (LISPish, big on immutability, targets JVM)
J  (successor to APL, very different, uses "parts of speech" -- as in
grammar -- as shoptalk)
JavaScript (humongous stacks and frameworks, Node world, great learning
tools)

what else is especially apropos I wonder.  Of course we run up against SQL
and regexes in the course of teaching plain vanilla Python. Ditto HTML/CSS
(more punctuation to learn in your ordinary language class, e.g. English or
French grammar? -- I call these "over the back fence technologies" in the
Youtube below).

--

On another topic, as an instructor I wonder how to introduce context
managers as a topic and my best answer is:

Take advantage of the sqlite3 module in Standard Library and show a context
manager like:

with DB("ufo_reports") as db:
db.useful_tool( )

where DB is like:

import sqlite3 as sql

class DB:

def __init__(self, dbname):
self.dbname = dbname + ".db"

def __enter__(self):
# make the connection, could be to any SQL engine...
self.conn = sql.connect(self.dbname)
self.curs = self.conn.cursor()
return self  # <-- to take advantage of related tools

def useful_tool(self):
# have a number of methods geared for working with this
# specific database, up to you how generic we're trying to be

# more useful tools go here

def __exit__(self, *oops):
if self.conn:
self.conn.close()
if oops[0]:
# error handling
# yadda yadda
return False # or True
return True

I yak about all this on Youtube.

https://youtu.be/29p3Ckr8SOA

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] teaching kids (and adults) with Python: notes from the field

2019-08-25 Thread kirby urner
Shared Project Space

What I think works well is when the students in the class have their own
shared virtual classroom in which to share Python projects.  These need not
be accessible to the public (people not in the class), but having real time
access to each others' projects -- those voluntarily shared -- creates
community and a sense of shared work.

In the meantime, every student gets a private area in which to work on
projects that aren't shared.

These may be stored in the cloud, with no software locally installed other
than a capable browser.

Or not (local installation of software may be a selling feature).  When
it's BYOD, remind students that they get to upgrade own computer, versus
leaving the cloud-based workshop with nothing installed.

Integrated Graphics

Turtle graphics were a breakthrough in the sense that something graphical
was brought into the projects.  Pythonic turtles, as objects, controlled by
code, don't become irrelevant when the math becomes more complex.[0]

If you're able to go from 2D to 3D, so much the better.  Vpython anyone?

Save Branches, Explore...

At one end of the spectrum, we have "march them through" drills wherein all
students are expected to enter the same code and reap the same rewards, a
working something.  Another approach, somewhat similar, is to hand them the
working something, and then dissect the code.  Work from both directions?

At the other end of the spectrum, one shows them "new tricks" (e.g. event
listening) and then "turns them loose" to explore.  This is where the
shared project space comes in.  Look over the shoulders of your peers, at
what they willingly share.  Remix.  Comment.

In testing new features one creates "exhibits" (like museum exhibits) that
"show off" said features.  Save these as such and then reuse them by
copying forward, to make more elaborate exhibits, up to (including) games.
Games may be shared in completed or part-way form in the classroom pool
(back to the other end of the spectrum).

Rather than insist on always frequenting one place on this spectrum, feel
free to vary the diet.  March through code a little bit.  Then show a
feature with completed shared code.  Then turn them loose to experiment
(that could mean the teacher stops talking, but keeps using the shared chat
stream).

Hands On

Given students opportunities to share code means giving them time to ponder
and write code.  The lecture format assumes students will work offline
later.  The tutorial or workshop approach assumes the students have time to
workout (practice) during the session.

Most of my suggestions above imply time during class in which to create and
share work.  I'm recommending the hands-on workshop mode over the lecture
mode in this case.  In my four hour twice a week format, we have three 20
minute labs per meetup.  In my summer school for kids format, we would
often have 20-30 minute intervals for discovery and exploration.  We had
2.25 hour meetups. [1]

Shared Chat Stream

Even when my students are all in the same room, physically, I encourage
using the chat window, a scrolling record I might study in more depth
later, alluding back to it the next time we meet.  In the stereotypical
historical classroom "note passing" is discouraged by the teacher, but in
this case the convention is flipped and the teacher participates in the
chatter, a way to have synchronous commentary that's not disruptive of the
audio track.  Students may share URLs.  I encourage them to log the chat.

Recent examples (School of Tomorrow playlist):

https://youtu.be/kBjZb-RrgLY  (re phasors...)
https://youtu.be/n57W4BSdx1k  (exercising a "fire at intervals" feature)

These specific examples are Codesters-centric (codesters.com), however my
above summary is not premised on using any specific platform, nor even
language (though I specify Python, this being edu-sig after all).
Codesters is modeled on MIT Scratch in many ways.  Platforms such as
REPL.it have a classroom feature (with which I'm presently less familiar).

Note:  if a coder is making the transition from block-based Scratch to
Python or other lexical (as in non-graphical) language, and finding it
painful, I will sometimes recommend doodling in Scratch while auditing the
Python part.  My emphasis on integrated graphics (above) is against the
current backdrop of many coming to Python by way of MIT Scratch as a first
development environment.

I can well imagine a scenario wherein a teleteacher encourages a virtual
classroom of students to establish their own REPL.it accounts and then
share with one another by pasting URLs to the Zoom chat window (Zoom being
video-audio meetup software).  I may try doing this myself.

These Youtubes are similar to what I'd be sharing during a live
teleteaching gig, such as we did this summer, me in Portland, the middle
school students in Illinois in their own classroom (Carl Sandburg College
computer lab). [2]

I also pick student projects out of the shared pool and talk about them 

[Edu-sig] Re: Module for writing a new type of exercises for programming tutorials

2019-08-05 Thread kirby urner
What are the major sticking points with Jupyter on a mobile device?
>
>

Seems like the Github Jupyter rendering engine sends out CSS @media queries
to detect client format, and if your device below a specific size, the
sever sends you raw JSON instead (the notebook sans rendering).

With any art comes the media it uses.  That all media should be accessible
through a smartphone is not a realistic goal, so then the question becomes
one of priorities.  Tablets are more of a twilight zone.

I found this post on using Jupyter on an Android:
https://www.leouieda.com/blog/scipy-on-android.html

I'd rather see that students are provided with alternative larger format
devices, but maybe that sounds too revolutionary by today's standards. We
used to call it One Laptop per Child.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] Re: Module for writing a new type of exercises for programming tutorials

2019-08-05 Thread kirby urner
Thank you for your contribution Claude. I have been looking at your github
site and eyeballing the source code.

You make a good point about smartphones being so different a device,
because of their small format, than even a laptop computer.  Students with
only phone experience feel unprepared for a shell or prompt, unless you
remind them it's like a chat or messaging window.  Python is talking back.
However trying to use a Python REPL on a cellphone is still not a great
experience (I've tried it).

I see scientific calculators and smartphones in the same category:  devices
too small to be comfortable replacements for what I'll call "a Silicon
Valley desktop" -- leaving it to the reader's imagination how many large
display screens that might mean.

The issue with large format devices is they're not very compatible with the
small "desk-chair" footprint common in many classrooms, especially math
classrooms.  You're expected to have a notebook and take notes.
Calculators fit.  Cell phone are usually frowned upon as a distraction (but
that's where the best calculator apps live).

Having students bring laptops is a compromise.

A fully equipped computer lab is another option.

Like many contemporary authors and curriculum developers, I've been
introducing Jupyter Notebooks as a good mix of skills, as you have both the
Python and the web page design aspects.  Again, none of this works well on
a smartphone.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] exploring a primitive physics engine in emulated Python

2019-08-01 Thread kirby urner
What other Python emulators offer some builtin physics?

Example startup code (no imports required):

stage.set_gravity(3)
escaped = False
stage.disable_ceiling()
stage.set_background_color("black")
b = 1
stage.set_bounce(b)

Codesters embraces turtle graphics but takes it to the next level by
providing:

(a) gravity (numeric)
(b) sprite-level physics (on or off)
(c) bounciness (numeric)
(d) whether walls are bouncy (enable / disable)
(e) collision detection (callback function)

Adding these features requires an event loop type architecture, which
Codesters keeps cleverly hidden i.e. there's no low level asyncio work
required by students.

We do have callback we can fire at set intervals (a user setting).

I make full use of this interval in the first two videos (link below), as I
experiment with some of the parameters mentioned above.

Example 1:  Escape Velocity

def interval():
global escaped
pos = sprite.get_y()
if pos > 100 and not escaped:
escaped = True
sprite.set_gravity_off()
sprite.say("Escape velocity achieved")
sprite.set_x_speed(0.2 *
sprite.get_x_speed())
sprite.set_y_speed(0.2 *
sprite.get_y_speed())

Example 2:  Bounce World

def interval():
global b
stage.set_bounce(b)
b = b - 0.3

Changing bounciness has some perhaps unexpected effects when it goes
negative. Absolute value is what matters.

The last video (3 of 3) goes back to the Powerpoint / slideshow potential
that develops once importing png, gif, jpg "sprites" over the internet is
in the picture.  Codesters supports that.  MIT Scratch offers this
capability as well.

The ability to import graphics is popular with kids, however usually not at
first in the context of making slideshows.  Most of them have yet to be put
on the spot to do Powerpoint or any of those.

However developing one's show and tell presentation skills is a big part of
learning I'd say.  Extending the Show & Tell protocol to include slide
sharing is what Ignite is/was all about, right?  Do people still stage
Ignite events?  Those were cool!

What I need to do more of in Codesters:  explore sound effects.  I wrote
all the parents in my class after OSCON that Codesters didn't have sound.
Then, duh, I found it.  During demo day I encouraged looking in to that
feature.

This was at Carl Sandburg College in Illinois, me connecting remotely from
two time zones away, from Portland.

None of the videos curated here were actually used during that summer camp
(I didn't show any Youtubes, either by me or anyone else, during the actual
2.25 hour meetups -- but I did recommend some for followup [1]).

These give the flavor of the kind of thing we were doing:

http://mybizmo.blogspot.com/2019/07/computing-surface-workouts.html

My apologies for missing the Python booth at OSCON this year.

I saw the stuffed snake, more sensibly sized than mega-sized Naga, our
mascot emeritus.

https://flic.kr/p/26wac5J

(Naga, I still have her, and should eventually donate her to the Python
Language exhibit -- might be some rooms in a bigger Languages Museum
right?).

Kirby

[1]  for middle school aged kids I often recommend Python tutorials by
Socratica on Youtube.  Also 'Warriors of the Net' an ancient classic about
packet switching (the TCP/IP layer).  https://youtu.be/PBWhzz_Gn10

I also showed Math Adventures with Python by Peter Farrell which typifies
the need any math student will have for a bigger screen.  Peter's book
includes rotation matrices applied against polyhedrons, as my curriculum
does.  No sense tackling matrix math on a scientific calculator right?
Even if it's possible.
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] school of tomorrow (another pilot)

2019-07-24 Thread kirby urner
Latest School of Tomorrow 5 min video, recapping some of what we've been
doing in summer school in 2019.  I've done similar pilots at Reed College.
This time we're in Illinois.

https://youtu.be/5_NWt_zjdcw  (Codesters again)

The kids (I have 15 on my roster) need to understand why a flight to China
would go north, not west.  In addition to learning Python.  Actually,
Python emulated in JavaScript.

The Physics Engine is primitive, but having gravity, bouncy walls, speed
variables on each sprite, collision detection, is a still a boon.  Getting
into physics this way makes sense to me.

Kirby

Related links:

http://wikieducator.org/Digital_Math  (parked the source in New Zealand)

https://nbviewer.jupyter.org/github/4dsolutions/School_of_Tomorrow/blob/master/School_of_Tomorrow.ipynb
(includes same video)
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] Calculator of Tomorrow (meme) on Medium

2019-07-11 Thread kirby urner
The Medium curators selected this one for widespread dissemination:

https://medium.com/@kirbyurner/the-calculator-of-tomorrow-39ba87763621

It's on my usual theme:  giving high schoolers a more significant
experience by ditching scientific calculators in favor of "the calculator
of tomorrow".  I.e. instead of a "graphing calculator" we use pandas.

The "of tomorrow" meme is retro futurism.  Remember EPCOT?  Now it's Epcot.

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] anyone going to OSCON?

2019-07-11 Thread kirby urner
I met only a few Pythonistas at OSCON last year.  Van Lindberg and I had a
brief conversation.  Naomi, will I see you there?

I've got a hallway track topic I'd like to pursue.

http://worldgame.blogspot.com/2019/07/open-source-campus.html

Kirby
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


[Edu-sig] Re: Migrating edu-sig to Mailman3/HyperKitty

2019-07-11 Thread kirby urner
None of the hyperlinks to old posts would change right?  If links don't
break, I see no reason not to migrate.

Kirby

(another listowner)
___
Edu-sig mailing list -- edu-sig@python.org
To unsubscribe send an email to edu-sig-le...@python.org
https://mail.python.org/mailman3/lists/edu-sig.python.org/


Re: [Edu-sig] seasonal challenge to calculator dominance in high schools

2019-06-24 Thread kirby urner
On Sun, Jun 23, 2019 at 10:54 PM Wes Turner  wrote:


>
> I grew up in Omaha, NE and the suburbs of St Louis, MO. I don't remember
> when I leaned about the "Old Man River" proposal to build a dome over all
> of East St Louis in 1971
> https://en.wikipedia.org/wiki/Old_Man_River%27s_City_project
>
>
Yes, I still weave OMR into my writings and videos as a good example of a
mega-project and a "city from scratch" (a giant stadium in shape, terraced
on the inside, bleacher seats more like apartment sized), centered around a
central "field" big enough to contain several Olympic-sized sports
facilities, amusement parks, you name it).  It's a design for many cities.
I'd focus on making it easy to disassemble, as we might want to take it
down and recycle.

What would life be like in such a place?  Would they use Python or graphing
calculators?

As a science fiction backdrop, we could create it sooner for the movies
than for real, but why not do both?

We need places to prototype new lifestyles (e.g. "autonomous vehicles").
Exactly what EPCOT was designed to do (it being a first prototype of such a
place, self booting the whole idea of an experimental prototype community
of tomorrow (what EPCOT stands for)).

I've launched the meme :Asylum City: (a kind of EPCOT) which suggests "a
place of refuge" although there's a bit of a "mental hospital" vibe (very
Oregon).

That's OK.  My own neighborhood in Portland is unofficially / informally
referred to as the "Asylum District" by many.  [Dr.] Hawthorne Blvd, the
main street, is named for the doctor who indeed created and ran the first
state mental hospital here in Oregon, under contract from Salem.  Oregon
was later famous for Ken Kesey and 'One Flew Over the Cuckoo's Nest' -- all
good marketing AFAIC (as far as I'm concerned).

https://en.wikipedia.org/wiki/Ken_Kesey

Another famous dome in the STL area, BTW, is of course the Climatron in the
STL botanical gardens.

I've actually visited that one.  I enjoy STL (St. Louis).  I don't think
I've been to Omaha, only Lincoln.

Nebraska was the home state for a planning firm that Libya had contracted
with that my dad worked for when we lived in Italy, and I seem to recall
driving around Europe with "Cornhusker State" license plates, which
everyone would puzzle over.  Was it because we got a tax break for being
tourists?  I don't remember.


>
> The world's largest glazed geodesic dome protects the year-round desert
> environment through hot windy summers and cold snowy winters at the Henry
> Doorly Zoo in Omaha
> https://en.wikipedia.org/wiki/Henry_Doorly_Zoo_and_Aquarium#Desert_Dome
>
> Maybe easier to clean a geodesic dome than a fully-spherical structure.
> Are geodesic domes as or more resilient than regular domes?
> https://www.bfi.org/about-fuller/big-ideas/geodesic-domes
>


The most famous geodesic full sphere, to my knowledge, is that one in
Disney World's EPCOT, dubbed Spaceship Earth.

I see Zurich Zoo has a new geodesic dome elephant house:
https://www.alamy.com/stock-photo/zurich-zoo-elephant-house.html

One tends to go spherical when doing a restaurant or lookout "ball in the
sky" type design, wherein people want to look down.  I'd think floating an
aquarium ball on the ocean (tethered, not tippy) over relatively shallow
tide pools, might be another application, but I haven't searched yet to see
if anyone's doing that.

On ordinary land, there's the "sphere as house-wall boundary" and the
"sphere as greenhouse boundary with other structures inside" model.

The design less tried is the latter, but is closer to Bucky's vision for a
mass-produced environmental bubble.

The idea is to have your free-standing structures inside the dome, leaving
the dome optionally transparent, more like a greenhouse. Privacy and
organization is established with theater prop grade internals, meaning you
can rearrange the floor plan without serious deconstruction, add steps and
remove them.

http://www.4dsolutions.net/satacad/martianmath/mm4.html
(Bucky holding container shipping size deliverable as dome home internals
e.g. kitchen, media room, loft)

http://www.solardome.co.uk/gallery/solardome-pro/  (some models in this
direction)

As the dome gets bigger, one thinks of small communities, even apartments,
scaling up to the "dome over Manhattan" meme.

I never took that meme seriously as an actual proposal (more science
fiction).  The OMR dome, on the other hand, seemed believable, given it's a
city from scratch to begin with.  With Manhattan, we're talking retrofit.
Why not start with a smaller city, like in Simpsons?

The accompanying chatter around the NYC poster, was about the relatively
big surface:volume ratio of radiator-like high rises, versus what it might
cost to keep the whole dome warm, with that more minimalist inside-outside
atmospheric interface.

Even though the dome is huge, it's exposing less surface area to the
outside.  We might use a Python Jupyter Notebook, to work it out.

When it comes to what's actually 

Re: [Edu-sig] seasonal challenge to calculator dominance in high schools

2019-06-23 Thread kirby urner
On Sun, Jun 23, 2019 at 4:12 PM Wes Turner  wrote:


> Yes, my friend Gerald de Jong was a first adapter of "elastic interval
>> geometry" where every "rod" is a tension-compression spring governed by
>> mathematics.  He put creatures made as tensegrities in a simulation and
>> selected for which was able to walk furthest, of course adding a concept of
>> gravity + friction (traction).
>>
>
> TIL about Tensegrity: https://en.wikipedia.org/wiki/Tensegrity
>
>
Good link.

I had the distinction of serving as first webmaster for both BFI (bfi.org
-- Buckminster Fuller Institute) *and* Kenneth Snelson.

https://controlroom.blogspot.com/2008/10/some-prehistory.html

He later got a professional to redo his site but said fine to my keeping
the original we made together.

http://www.grunch.net/snelson/

The two experienced a falling-out and somewhat bitter rivalry after the
Black Mountain college collaboration.  Something of a coup that I could
help bring the two camps closer together.  Kenneth gave me one of his
originals ('Barrel Tower') which sits here on my desk (pretty small, but
too big to go through EWR X-ray, and this was just after 9-11 -- that
October -- so they let me walk it through).

Kenneth let me stay as a guest a few times.  I believe the last time I saw
him I brought my daughter to meet him, and also to attend a Best of Friends
exhibit at Noguchi Museum in Long Island City.  Fond memories.


Does codesters have any features for grading?
>
> https://www.codesters.com/?lang=en
>
> Yup, Codesters has an integrated LMS and automated grading. Can it post
> grades to e.g. Google Classroom?
>
>


I've never fully explored all those features, as the after-school meetups
I've been leading, either present in person or virtually, are non-graded.

We have a place to make notes on what each student is working on, but when
I teach remotely, they may be wearing a hoodie and using an alias, i.e. I'm
thankfully not in a position to issue grades or even be sure who is whom.

However I do make use of the "share and mix" features, similar to MIT
Scratch.

We create a private "swimming pool" wherein any student can toss (share)
project they're working on, not visible to general public, and other
students can grab a copy.  I can bring up student code on the big screen
and discuss it in front of the class, or let them do it.

Show & Tell is a big part of learning to code as a group activity.  Have
students present about their own work, but also observe others commenting
on it as well.

Helping kids in person is more straightforward as I can just look over
their shoulders.  That's what I've been doing around Portland, driving
around to many campuses, both public and private.  It's hard to think of
many other jobs that would have given me access to so many different
academies.  Good opportunity to assess the state of the art.  I worked in
quite a few Windows labs.

A popular Codesters topic is "how do I import pictures I see on the
internet and turn them into sprites?".  Scratch allows this too.

https://www.codesters.com/preview/0da23d529403455092d171134020cc1e/

Scratch is on the whole enjoying a bigger budget and support team is my
impression, and is especially capable around sound (writing programs that
make music for example).  Codesters is not non-auditory.

We could go a lot further with some Pythonic world civilizations game...
"we" being a team of skilled coders (not just little me writing a few
Jupyter Notebooks for other Bucky nut world gamers. :-D).

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
https://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] seasonal challenge to calculator dominance in high schools

2019-06-23 Thread kirby urner
On Sun, Jun 23, 2019 at 12:57 PM Wes Turner  wrote:

>
>
> On Sunday, June 23, 2019, C. Cossé  wrote:
>
>> I'll bet every one of those graphing calcs has also been replicated as a
>> phone app
>>
>
>> That's cool stuff there!  (yours)
>>
>
> Yeah, that's really cool. Was the MoCap (motion capture) done at the
> University of Nebraska Omaha (UNO)? They've a new Biomechanics facility
> next to the soccer field over there.
>
>
Thanks, I think the MoCap was done at a gait analysis lab, before facial
recognition got so good (actually it's not either / or).  They'd like to
know who that guy is over there on the camera based on his distinctive
walk.  However the Dr. Fuller First Person Physics initiative piggy-backed
on all that to study human motion as physics.  Turning on those contrails
was maybe my idea.

"First person physics" was my coin as far as Dr. Bob Fuller (no relation to
Bucky) was concerned, and he made me webmaster for the project.

> There are a bunch of cool videos demoing simulated agents learning to walk
> with evolutionary algorithms (mutation, crossover,  cost function)
> https://github.com/openai/mujoco-py/blob/master/README.md#usage-examples
>
> https://youtube.com/results?search_query=openai+learning+to+walk
>
>
Yes, my friend Gerald de Jong was a first adapter of "elastic interval
geometry" where every "rod" is a tension-compression spring governed by
mathematics.  He put creatures made as tensegrities in a simulation and
selected for which was able to walk furthest, of course adding a concept of
gravity + friction (traction).

https://youtu.be/_II-uESToOs  (done in Java, Gerald an early adopter since
JavaOne, when he came to visit me in Oregon on his way back)

That's the same Gerald I cite in my online Google slides, who came up with
a tetrahedron volume formula very like Euler's, but geared to give output
in tetravolumes. I have it in Python.


By comparison, my old offline graphing calculator is a frustrating piece of
> work with no QWERTY keyboard.
>
>
The issue is the personal workspace (PWS) and providing the ergonomics of
at least a cubicle to people that young.  Once you're college age, you have
a dorm with internet and library study carrels, we hope. But already you're
going into debt for that.

Babies don't know how to drive for Uber, if you know what I mean.

Like how will the younger kids ever get the political clout they'll need,
to get out of that "locker and tiny desk" rat race (eat lunch the nearby
fast food places, how convenient!).

How will they ever find time to develop a private stash of Jupyter
Notebooks in such crowded crushing daycare centers?  Might as well be jail.

At the School of Tomorrow, I assume students are kicked back in private
quarters, like in the movie (the kids each have their own room, not just
the dome kid).

In building a table out of a rolling cart, 2x6's, a melamine sheet, and
> some brackets, I had need for rigid body dynamics; to determine how much
> force would cause the table to fall over. After not finding any existing
> open source software with actual calculations and a few q questions with
> some equations and parameters, I considered trying to add support to
> FreeCAD (with cadquery and Jupyter Notebook) for rollover risk.
>
>

I had a gig sharing CAD online with middle schoolers.  Not Blender.
Something cloud.

Even the schools using Macs found it slow going.  We had Chromebooks as
backup.

What was it called again?  I'm scanning through a plethora of free online
tools and not finding it.

Maybe it was the wifi connection that was slow.  I don't think 3D CAD is
something you just learn in an hour.  The dashboard (GUI) is intimidating,
even though this is a "dumbed down" version.

We're all free to dream of our castle-in-the-sky curriculum (I certainly do
that a lot) wherein the hardware problem has already been solved, but short
of turning high rise floor space -- already used for cubicles -- into high
schools, I'm not sure how to solve the problem.  Making them use itty bitty
calculators or tiny computers is designing for claustrophobia.

One laptop per child (a goal, not an achievement yet), leads to a next
question:  where do you plug it in and get some quality time with it, and
the people reachable through it?  How do you keep it from being stolen
and/or banned in your state?  You're relatively little, surrounded by
bigger people who always think they know better.

Anyway, I think it's great we get to play with physics engines.

Even Codesters, which I use a lot to teach Python (just signed up for more
business), has primitive gravity and bounce effects you can toggle on and
off.

Not a full Python implementation (no yield statement, does include classes).

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
https://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] seasonal challenge to calculator dominance in high schools

2019-06-23 Thread kirby urner
On Sun, Jun 23, 2019 at 12:40 PM C. Cossé  wrote:

> Yes that must be disappointing if 'The House of Tomorrow' didn't convey or
> do justice to the content of his work.
>
>
>
Oh no, it was a fine movie.  Thumbs up.

I'm fully understanding that a fictional audience that has to earn its keep
in popcorn sales is not a didactic work.

I'm just saying that left me an opening, in which to insert my more
thorough and demystifying treatment of what that kid in the movie would
have needed to learn.

There's a scene where he gets hired as the geometry tutor for the kid his
own age with the heart transplant and cool sister.  The supposition is he's
all up on that stuff because he lives in a dome and his Nana is a Bucky
nut.

That's fine as a plot element, but in my version we're making what he
teaches his teen peer far more subversive of the status quo than what's in
that Euclid book.

Anyway, the punk tie-in (they form a band) is perfect as punk let to cyber
punk and kids knowing RSA (seemed pretty futuristic at the time, what with
that starting out as all secret and all).  I've got that component.

Number Theory is making a come back, even as Linear Algebra is enjoying a
renaissance (machine learning).

We look at all that in our School of Tomorrow. :-D  (emoji too, not just
emoticons)
 ♔ 

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
https://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] seasonal challenge to calculator dominance in high schools

2019-06-23 Thread kirby urner
On Sun, Jun 23, 2019 at 12:31 PM C. Cossé  wrote:

> I agree with everything you say, but I'm just talking about day #1 of
> algebra class ... pretty much just an inspirational show and demonstration
> that satisfying capabilities are within their reach
>

Youtube stardom awaits you.  Seriously, the content you have out there is
good quality.

I did a Pygame solar system once but it wasn't laws of physics or anything,
I just had spheres going in circles (with a moon for earth even).  Fun fun!

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
https://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] seasonal challenge to calculator dominance in high schools

2019-06-23 Thread kirby urner
Another modeling activity that's fun is starting with a giant spreadsheet
(maybe a pandas DataFrame) wherein the columns are xyz coordinates of
ballerina body sensors. As we know, the movie industry uses these sensors
routinely, to bring an actor into a virtual reality (e.g. Gollum in Lord of
the Rings).

We had an outfit in Nebraska do the recordings and I translated the sensor
data into stick figure renderings, kind of eerie.

Pipeline:  sensor data (excel) --> python --> povray --> frame-joiner -->
movie

https://youtu.be/38iz0-dopSg
https://youtu.be/3WehC6LxZe8

This requires knowing enough scene description language to have Python
write out coherent scripts, frame after frame, to the rendering engine
(free open source povray).

Lots of coordinate system practice, with movie-making an end result.

I'd like students to have access to Civilization type games but with full
planets rendered as hexapents.  No need to code it from scratch unless they
pay you.  At some point, you need to say "hey, even adults aren't working
this hard for nothing".

Calendar time including timezones and daylight savings definitely core
curriculum, no question, glad we have datetime tools.

Again, back to the end of the calculator era, they suck at calendar
datetime, and besides, the API of a bazzillion little buttons sucks.

Kirby

https://mybizmo.blogspot.com/2006/04/more-first-person-physics.html (First
Person Physics, University of Nebraska)
https://youtu.be/sguOvRlHjn0 (more hypertoons)


On Sun, Jun 23, 2019 at 12:04 PM Wes Turner  wrote:

> Another plotting exercise: MathClock / MathCircle
>
> With X, Y coordinates,
> - Draw a circle
> - Draw a circle around the origin
> - Label degrees (360; Babylonian base 12)
> - Label fractional radians
> - Label 12 hours
> - Label the 60 minutes
> - Draw clock hands
>
> And then do the same with radial coordinates
>
> ... Number representations: change of base; Columns in e.g.
> Pandas; Trigonometry: Sin, Cos
>
>
___
Edu-sig mailing list
Edu-sig@python.org
https://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] seasonal challenge to calculator dominance in high schools

2019-06-23 Thread kirby urner
> No prior knowledge ... it's all on the teacher to be familiar enough to
> walk all over and essentially "drag them through" (the kids=them) the
> process of developing their own quick solar system model.  It would be a
> good team-teaching lesson, one teacher on the white-board lecturing, and
> the other typing the python-translation of the lecture into code on a big
> screen.
>
>
I'm all for opt in on athletics like this, as elective activities.  Like
sprints at a PyCon.  Choose to go, choose which one.

Time spent coding is time away from studying film theory or maybe
perfecting one's drawing or pole vaulting skills.

If one wishes to use canned solar system simulators and not work for hours,
starting with transistors and designing one's own chips, that oughta be
allowed too.

Multi-track, kid driven, more like a theme park. The rides are all there.

If you think you're ready for the PyGame physics course (I was a VPython
avatar, did my hypertoons using it [1]), go for it, and you're only 14.

Other people will postpone that lesson until 41.

Sequencing is more up to them than to any nanny state.[2]

Kirby

[1]  https://youtu.be/7Qzd0Uw-HCM  (simple hypertoon in Visual Python) 40
seconds, no sound

[2]  they say the "nana" in that 'House of Tomorrow' book is more fascist
than in the movie. The movie-makers cast an authentic Bucky fan who had
some of her own footage of being with the guy, which was perfect. To my
ears, they actually dubbed in Bucky's voice in those parts where we
presumably heard him (grainy old footage) -- sounded like an actor to me.
Doesn't matter much. Hollywood has its tricks.
___
Edu-sig mailing list
Edu-sig@python.org
https://mail.python.org/mailman/listinfo/edu-sig


Re: [Edu-sig] seasonal challenge to calculator dominance in high schools

2019-06-23 Thread kirby urner
On Sun, Jun 23, 2019 at 11:28 AM C. Cossé  wrote:

> Hi Kirby,
>
> I think kids should write their own plotting routines to graph their
> functions starting anywhere 3rd-7th grade.
>
>
If they wish to, yes, so many optional branches.

I'm coasting along using everyday office productivity tools that make use
of code, scripts, nevertheless.

But since when in school does a kid get an office, a place to focus on
anything like coding?

In math class, you get a tiny desk, rows and columns, book open.

The calculator is designed to fit on that desk, and be a part of that whole
dynamic.

Very cramped ergonomics.  I question the ethics (= aesthetics).  The status
quo has grown stale.

In one lesson developing a simple solar system in pygame, for example, you
> can teach everything from the meaning of pi, periodic motion, dynamic
> graphics, orders of magnitude, scaling, OOP,  ... all kinds of stuff.  AND
> basically lay the ground-work for developing their own 2D plotting
> software.
>
> -Charlie
>


Yes, that's one way to teach that stuff.  I'm for continuing to curate
content for the various audiences.  Some students love Coding Train and I
can see why.  I've spent some hours with it myself.  Lots of great teachers
out there!

My current project (from whence that calculator page) is a take-off on the
movie 'The House of Tomorrow' wherein the star kid is being raised by his
Nana to be the next Buckminster Fuller.

Of course I'm intrigued, given RBF and Ludwig Wittgenstein (LW) were two
philosophers I've seriously studied.  We all have our hobbies, right?

However, as usual with a fictional work, or even with most documentaries on
the guy (not all): there's zero attention given the actual substance i.e.
the "whole number volumes table" (a meme).

In a 90 minute drama based on a fictional work, there's no time to look at
an actual curriculum (our star is home schooled, but what is he learning?
-- we have no clue, nice dome though -- tourists come check it out, set in
the pre-internet era).

'The School of Tomorrow' is my Github repo designed to provide this missing
puzzle piece, and add back the missing realism. [1]

I explain it all on the videos.

Kirby

[1]  https://youtu.be/UpEJysjcLBY  (recounting the genesis of the project)
___
Edu-sig mailing list
Edu-sig@python.org
https://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] seasonal challenge to calculator dominance in high schools

2019-06-23 Thread kirby urner
Somewhere every summer, I tend to call into question the wisdom of buying
the kids another scientific calculator at the drug store (we call them that
here, pharmacies have calculators hanging on racks at the checkout, to cash
in on gullibility and impulse buys).

This year:
https://nbviewer.jupyter.org/github/4dsolutions/School_of_Tomorrow/blob/master/Sandbox_Example.ipynb

That's of course the read-only version (vs. mybinder.org) with the benefit
of a free video at the bottom, not visible on Github, where I give my
viewers the elevator speech i.e. pitch Jupyter Notebooks using Python as
superior to slaving away with a graphing calculator.

Not that anyone is still using graphing calculators right?  Sorry if I'm
beating a dead horse (idiom).

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
https://mail.python.org/mailman/listinfo/edu-sig


[Edu-sig] Another quick look at Codesters

2019-05-24 Thread kirby urner
I'm involved in a multi-state distance education program where I pop up as
a talking head, remotely. The kids have Chromebooks.  Middle School aged.
Here's a short Youtube about that platform:

https://youtu.be/HMOkOy9pCGo?t=69

(free to sign up, the tool our school uses -- the opening minute or so is
about another curriculum topic, hence the t=)

If you've not seen Codesters before, and have work in the Learning to Code
arena, you might wanna check it out.

Kirby
___
Edu-sig mailing list
Edu-sig@python.org
https://mail.python.org/mailman/listinfo/edu-sig


  1   2   3   4   5   6   7   8   9   10   >