Several small functions for classroom instruction.
Project description
Classroom Gizmos
This is a collection of functions for classroom instruction in introductory physics.
handies
classroom_gizmos.handies is a collection of small functions that are useful from an ipython prompt. the mine() function lists all the user functions defined in handies.py
handies defines:
nowMJD(); mjd2date(), date2mjd() cdbn(); cdWD(), cdpy1d(), osname(), hostname(), call(), select_file( timeout=65) rad(), deg(), sinD(), cosD(), tanD(), asinD(), acosD(), atanD(), atan2D(), atan2P() 'D' and 'P' functions work with degrees. 'P' inverse functions return only positive angles. Defines nCr AKA comb or imports from math if available. greek ➞ string with greek alphabet. pltsize( w, h) ➞ resizes plots in matplotlib, units are inches select_file() ➞ uses file browser to select a file. mine() ➞ lists what handies.py defines. From math imports: pi, sqrt, degrees, radians, cos, sin, tan, atan2, asin, acos, atan, and log, log10, exp From astropy units as "u", i.e. u.cm or u.GHz
import_install
This function tries to import a specified package and if that fails, it tries to install the package and then import it. import_install was written so that python programs can be distributed to students without detailed instructions on checking and installing the needed packages. This capability seems especially important for using Google's Colab which deletes installed packages after a short period of non-use.
Warning: import_install 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.0b1.dev5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94892ea483280786431dc9d41bdeda8d4a44a5aa6babe4b69a9cdc91c6df4019 |
|
MD5 | f49a08b145a86838a94090ef9df13d7b |
|
BLAKE2b-256 | 85e7e7f26191d7bbf7cb395bfcb4e18248fa92298f6ca4f716fd5808130a5e4d |
Hashes for classroom_gizmos-0.0b1.dev5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 971fd0f984a5b2aa90ec75424d890c5eae2bce47bf5ad3e1d8fb011eb7f95616 |
|
MD5 | a08c3fb17411f1ff708d82edbe20b9b7 |
|
BLAKE2b-256 | 72ef85474c5f36201ff7d4fc97249c6115e682f7c9ff7c59007b0ddc7261d454 |