Several small functions for classroom instruction.
Project description
Classroom Gizmos
This is a collection of functions for classroom instruction in introductory physics.
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>handies
classroom_gizmos.handies is a collection of small functions
that are
useful from an ipython prompt.
Note: Imports from astropy and func_timeout
The mine() function lists all the user functions defined
in handies.py.
handies defines:
nowMJD(); mjd2date(), date2mjd(), cdbn(), osname(),
hostname(), call(), rad(), deg(), sinD(), cosD(), tanD(),
asinD(), acosD(), atanD(), atan2D(), atan2P(), nCr(), comb(),
pltsize(), select_file(), select_file_timeout(),
mine()
Trig Functions in Degrees
'D' and 'P' trig functions work with degrees.
'P' inverse functions return only positive angles.
greek ⟶ string with greek alphabet.
pltsize( w, h, dpi=150) ⟶ resizes plots in matplotlib.
select_file() ⟶ file browser to select a file.
select_file_timeout( seconds) ⟶ file browser with timeout
in seconds. Uses func_timeout package which
will usually be installed if not already installed.
mine() ⟶ lists what handies.py defines.
From math imports:
pi, sqrt, cos, sin, tan, acos, asin, atan, atan2, degrees, radians, log, log10, exp
From astropy
astropy.units as "u", i.e. u.cm or u.GHz
import_install
importInstall()
pkg = importInstall( 'pkg_name')
OR
pkg = importInstall( 'pkg_name, 'PyPI_name')
This function tries to import a specified package and if that fails,
it tries to install the package and then import it.
importInstall was written so that python programs can be
distributed to students without detailed instructions on checking if
package is installed
and on installing the needed packages.
The function returns the package or None.
Warning: importInstall can not install all packages. It is less likely to install a package that is not pure python.
All functions should have doc strings that give more information about usage and parameters.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for classroom_gizmos-0.0b2.dev4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0cab20e4e115b0ef68b830c1db50ae3dfc4df0bfbe207fd7c75523f285de737 |
|
MD5 | b2742ae8a6e64a3aa716a2ce849ca97f |
|
BLAKE2b-256 | d821e195f0fdc2b540b2ef36a2068ccb766c046815c131fc0df08bc9921a3997 |
Hashes for classroom_gizmos-0.0b2.dev4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2732e81746135ca3d8166a7d10fbc0fe359085848c9d46614fbadefd581a166 |
|
MD5 | 82683d5e3e67260a312abde091415cf1 |
|
BLAKE2b-256 | 92faea976133f56a5f1c19629e9164e16ec6634fe5d0e5f6a22fd6b30e81ef56 |