%global _empty_manifest_terminate_build 0 Name: python-classroom-gizmos Version: 0.0b2.dev32 Release: 1 Summary: Several small functions for classroom instruction. License: GNU General Public License v3 or later (GPLv3+) URL: https://github.com/Danseur1/Classroom_gizmos Source0: https://mirrors.nju.edu.cn/pypi/web/packages/db/41/0c1a65e979caa9522cecba301bf1b0579bc6ec0de54137e3642a55494ea4/classroom_gizmos-0.0b2.dev32.tar.gz BuildArch: noarch %description # Classroom Gizmos This is a collection of functions for classroom instruction in introductory physics. This is basically using ipython as a calculator that displays the calculation and the results.
Typical usage to make a set of useful functions available in ipython: from classroom_gizmos.handies import * ## handies *_classroom_gizmos.handies_* is a collection of small functions that are useful from an ipython prompt.
__Note: Imports from astropy, PyQt5, and func_timeout__
Certain functions and functionality are not available when some of the imported packages are unavailable.
The **mine()** function lists all the user functions defined in *_handies.py_*. ### handies defines or imports: cdbn(), osname(), getCCode() hostname(), call(), rad(), deg(), sinD(), cosD(), tanD(), asinD(), acosD(), atanD(), atan2D(), atan2P(), nCr(), comb(), pltsize(), select_file(), select_file_timeout(), getTS(), timeStampStr(), isInstalled(), randomLetter(), randomElement(), count_down() mine() ### Clear screen functions: cls (iPython magic %cls) outputs 23 blank lines. clsall() deletes previous text using ascii control character. Trig Functions in Degrees
    'D' and 'P' trig functions work with degrees.
    'P' inverse functions return only positive angles. greeks ⟶ a string with greek alphabet.
pltsize( w, h, dpi=150) ⟶ resizes plots in matplotlib.
getTS() ⟶ returns a readable time stamp string.
isInstalled( pkgNameStr) ⟶ returns package or None if pkg is not installed.
timeStampStr() ⟶ returns a readable, timestamp string.
From random imports randint and defines randomLetter mine() ⟶ lists what handies.py defines. ### If PyQt5 package is available defines: select_file and select_file_timeout ### From math imports these functions: pi, sqrt, cos, sin, tan, acos, asin, atan, atan2, degrees, radians, log, log10, exp ### When astropy is available: Defines nowMJD(); mjd2date(), date2mjd().
Imports astropy.units as "u", i.e. u.cm or u.GHz ### Misc. The variable __IsInteractive__ is True if in interpreter, False if running from command line.
Line magic *cls* is defined, outputs 23 blank lines to 'clear' screen.<
Sets ipython numeric format to %.5g ## jupyter_file_browser This module implements a file browser that can be used in a Jupyter Notebook. (Not usable in Jupyter lab.)
__Typical Usage:__ from classroom_gizmos.jupyter_file_browser import box, get_file_path box A file select widget will be created below that cell. In a following notebook cell: path = get_file_path() ## returns path of currently selected file in the file select cell. ## 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 packages are installed and information 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. ## BestByMinBefore ### functions decCredit() returns perl code for use in WebAssign answer credit calculations. Convenience functions: BBPdecCredit(), InCdecCredit(), HWdecCredit(), getCCode()
getCCode() is an interactive 'wizard' that has no parameters, but steps through options needed to produce the Perl conditional code for various question types. All functions should have doc strings that give more information about usage and parameters. %package -n python3-classroom-gizmos Summary: Several small functions for classroom instruction. Provides: python-classroom-gizmos BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-classroom-gizmos # Classroom Gizmos This is a collection of functions for classroom instruction in introductory physics. This is basically using ipython as a calculator that displays the calculation and the results.
Typical usage to make a set of useful functions available in ipython: from classroom_gizmos.handies import * ## handies *_classroom_gizmos.handies_* is a collection of small functions that are useful from an ipython prompt.
__Note: Imports from astropy, PyQt5, and func_timeout__
Certain functions and functionality are not available when some of the imported packages are unavailable.
The **mine()** function lists all the user functions defined in *_handies.py_*. ### handies defines or imports: cdbn(), osname(), getCCode() hostname(), call(), rad(), deg(), sinD(), cosD(), tanD(), asinD(), acosD(), atanD(), atan2D(), atan2P(), nCr(), comb(), pltsize(), select_file(), select_file_timeout(), getTS(), timeStampStr(), isInstalled(), randomLetter(), randomElement(), count_down() mine() ### Clear screen functions: cls (iPython magic %cls) outputs 23 blank lines. clsall() deletes previous text using ascii control character. Trig Functions in Degrees
    'D' and 'P' trig functions work with degrees.
    'P' inverse functions return only positive angles. greeks ⟶ a string with greek alphabet.
pltsize( w, h, dpi=150) ⟶ resizes plots in matplotlib.
getTS() ⟶ returns a readable time stamp string.
isInstalled( pkgNameStr) ⟶ returns package or None if pkg is not installed.
timeStampStr() ⟶ returns a readable, timestamp string.
From random imports randint and defines randomLetter mine() ⟶ lists what handies.py defines. ### If PyQt5 package is available defines: select_file and select_file_timeout ### From math imports these functions: pi, sqrt, cos, sin, tan, acos, asin, atan, atan2, degrees, radians, log, log10, exp ### When astropy is available: Defines nowMJD(); mjd2date(), date2mjd().
Imports astropy.units as "u", i.e. u.cm or u.GHz ### Misc. The variable __IsInteractive__ is True if in interpreter, False if running from command line.
Line magic *cls* is defined, outputs 23 blank lines to 'clear' screen.<
Sets ipython numeric format to %.5g ## jupyter_file_browser This module implements a file browser that can be used in a Jupyter Notebook. (Not usable in Jupyter lab.)
__Typical Usage:__ from classroom_gizmos.jupyter_file_browser import box, get_file_path box A file select widget will be created below that cell. In a following notebook cell: path = get_file_path() ## returns path of currently selected file in the file select cell. ## 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 packages are installed and information 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. ## BestByMinBefore ### functions decCredit() returns perl code for use in WebAssign answer credit calculations. Convenience functions: BBPdecCredit(), InCdecCredit(), HWdecCredit(), getCCode()
getCCode() is an interactive 'wizard' that has no parameters, but steps through options needed to produce the Perl conditional code for various question types. All functions should have doc strings that give more information about usage and parameters. %package help Summary: Development documents and examples for classroom-gizmos Provides: python3-classroom-gizmos-doc %description help # Classroom Gizmos This is a collection of functions for classroom instruction in introductory physics. This is basically using ipython as a calculator that displays the calculation and the results.
Typical usage to make a set of useful functions available in ipython: from classroom_gizmos.handies import * ## handies *_classroom_gizmos.handies_* is a collection of small functions that are useful from an ipython prompt.
__Note: Imports from astropy, PyQt5, and func_timeout__
Certain functions and functionality are not available when some of the imported packages are unavailable.
The **mine()** function lists all the user functions defined in *_handies.py_*. ### handies defines or imports: cdbn(), osname(), getCCode() hostname(), call(), rad(), deg(), sinD(), cosD(), tanD(), asinD(), acosD(), atanD(), atan2D(), atan2P(), nCr(), comb(), pltsize(), select_file(), select_file_timeout(), getTS(), timeStampStr(), isInstalled(), randomLetter(), randomElement(), count_down() mine() ### Clear screen functions: cls (iPython magic %cls) outputs 23 blank lines. clsall() deletes previous text using ascii control character. Trig Functions in Degrees
    'D' and 'P' trig functions work with degrees.
    'P' inverse functions return only positive angles. greeks ⟶ a string with greek alphabet.
pltsize( w, h, dpi=150) ⟶ resizes plots in matplotlib.
getTS() ⟶ returns a readable time stamp string.
isInstalled( pkgNameStr) ⟶ returns package or None if pkg is not installed.
timeStampStr() ⟶ returns a readable, timestamp string.
From random imports randint and defines randomLetter mine() ⟶ lists what handies.py defines. ### If PyQt5 package is available defines: select_file and select_file_timeout ### From math imports these functions: pi, sqrt, cos, sin, tan, acos, asin, atan, atan2, degrees, radians, log, log10, exp ### When astropy is available: Defines nowMJD(); mjd2date(), date2mjd().
Imports astropy.units as "u", i.e. u.cm or u.GHz ### Misc. The variable __IsInteractive__ is True if in interpreter, False if running from command line.
Line magic *cls* is defined, outputs 23 blank lines to 'clear' screen.<
Sets ipython numeric format to %.5g ## jupyter_file_browser This module implements a file browser that can be used in a Jupyter Notebook. (Not usable in Jupyter lab.)
__Typical Usage:__ from classroom_gizmos.jupyter_file_browser import box, get_file_path box A file select widget will be created below that cell. In a following notebook cell: path = get_file_path() ## returns path of currently selected file in the file select cell. ## 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 packages are installed and information 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. ## BestByMinBefore ### functions decCredit() returns perl code for use in WebAssign answer credit calculations. Convenience functions: BBPdecCredit(), InCdecCredit(), HWdecCredit(), getCCode()
getCCode() is an interactive 'wizard' that has no parameters, but steps through options needed to produce the Perl conditional code for various question types. All functions should have doc strings that give more information about usage and parameters. %prep %autosetup -n classroom-gizmos-0.0b2.dev32 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-classroom-gizmos -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Wed May 31 2023 Python_Bot - 0.0b2.dev32-1 - Package Spec generated