[Edu-sig] Two Jupyter Notebook exhibits

kirby urner kirby.urner at gmail.com
Thu Sep 27 18:15:53 EDT 2018


I'm on a listserv where colleges and universities compare notes for using
nbgrader, while serving Jupyter Notebooks locally, as part of the
curriculum delivery architecture.

My way of sharing is less cloud-based in that I invite students to run the
course notebooks locally, each booting to localhost:8888 using the JN
server that comes with Anaconda.  Or install with pip. They're getting me
live, closed circuit, and we're able to discuss the materials in real time
with no central server, other than shared Github repos and a course Google
Drive.  The difference is I'm not grading.  There's no requirement to turn
stuff in, just optional workouts during the tutorials.  More like at a
Pycon or OSCON.

Steve Holden was showing me JNs long before now, and I'm still far from
expert.

I appreciate them for many reasons, not the least of which is supporting
LaTeX.  The technology is also a meeting ground for folks from many walks
of life, given how the back end kernel need no longer be only Python.

I'm able to compare Python directly with JavaScript, in the same notebook
(such comparisons are worth making [1]).

===

Two exhibits:

This first one is from just this morning.  A Facebook friend has found a
numeric pattern, and what I see is an excuse to:

1) practice some LaTeX
2) show off Python generators
3) show off unittest
4) share about "evil" eval

The Decimal class does not support trig, so I'm not in a position to use it
as I did in the case of verifying the cited Ramanujan expression for 1/pi.

https://github.com/4dsolutions/Python5/blob/master/VerifyArctan.ipynb

The second:

Graphene & Quadrays is about using an obscure Vector class to create a hex
grid or hex mesh, written out by Python in Scene Description Language, and
changing to XYZ only at this last opportunity.  POV-Ray (free open source,
povray.org) doesn't understand about Quadrays.

However my algorithm for generating the mesh depends on the Python set type
and its ability to prevent duplicates, especially when the set members are
all 4-tuples of integers.  Floating point numbers get fuzzy and create
false negatives i.e. they're treated as different when they're not.  All
integer coordinates do not suffer from this deficiency.  Lots more about
Quadrays in my repo, or see Wikipedia.

[ I'm not saying XY coordinates cannot be overlaid on a grid of hexagons in
clever ways.  Many people have contributed nifty hex grid algorithms.  I'm
just showing another application for a coordinate system almost no one has
ever heard of.  I enjoy sharing esoterica.[2] ]

Quadrays assign integer coordinates not only to hexagonal mesh points, but
to the volume-filling equivalent FCC (=CCP) = rhombic dodecahedrons
space-filling matrix.  I take that up in a connected Notebook. [3]

https://github.com/4dsolutions/Python5/blob/master/GrapheneWithQrays.ipynb

====

ENDNOTES

[1]
https://medium.com/@kirbyurner/as-a-python-instructor-i-tend-to-recommend-a-polyglot-approach-learn-a-minimum-of-two-languages-243a0ed05eeb

[2]  https://www.redblobgames.com/grids/hexagons/
is an authoritative website on the topic.

[3]
https://github.com/4dsolutions/Python5/blob/master/Generating%20the%20FCC.ipynb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/edu-sig/attachments/20180927/d86585e7/attachment.html>


More information about the Edu-sig mailing list