diff options
Diffstat (limited to 'python-bae0n-utils.spec')
-rw-r--r-- | python-bae0n-utils.spec | 370 |
1 files changed, 370 insertions, 0 deletions
diff --git a/python-bae0n-utils.spec b/python-bae0n-utils.spec new file mode 100644 index 0000000..cefe88c --- /dev/null +++ b/python-bae0n-utils.spec @@ -0,0 +1,370 @@ +%global _empty_manifest_terminate_build 0 +Name: python-bae0n-utils +Version: 0.1.2 +Release: 1 +Summary: Utility functions to be used in Python +License: MIT License +URL: https://github.com/aeonwilliams/bae0n_utils/blob/main/README.md +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/84/f6/0af452486b48a21b3e8bd876561f7dfd919ef9bb3dc7abf44f4b08bfb4ef/bae0n-utils-0.1.2.tar.gz +BuildArch: noarch + +Requires: python3-Pillow +Requires: python3-numpy +Requires: python3-pandas +Requires: python3-pathlib + +%description +# bae0n_utils + +Collection of utility functions to be used in Python. + +### ColoredText(r, g, b, text) +#### ex: print(ColoredText(255, 0, 0, 'Hello World')) +Displays colored text in the console. + +params: +- r - Value from 0-255 for Red +- g - Value from 0-255 for Green +- b - Value from 0-255 for Blue +- text - Text to display with color + +Returns: + Modified text string, now with the given color. + +### FitCellsToWindow +#### ex: FitCellsToWindow() +Fits Jupyter cells to window size. + +### ActivateCellDoneSound +#### ex: ActivateCellDoneSound(url='https://bigsoundbank.com/UPLOAD/mp3/0116.mp3') +Plays a sound effect when a cell is complete. Currently kind of buggy with a failed cell. + +params: +- url (optional) - url of the sound you want to play. Accepts .wav and .mp3 + +### ActivateCellFailSound +#### ex: ActivateCellFailSound() +Plays a sound effect if the cell execution fails. + +### ClearDir +#### ex: ClearDir('./images') +Removes all files from a directory. + +params: +- path - The source directory of the images to turn into a gif. Must include preceding ./, should not include ending / +- safe_del - Prompts user input for confirmation if set to True. + Default Value: True + +### MakeGif +#### ex: MakeGif('./data', './', 'test', 100, 'jpg') +Turns a directory of images into a gif. + +params: +- source_dir - The source directory of the images to turn into a gif. Must include preceding ./ +- out_dir - The directory to save the gif to. Must include preceding ./ +- gif_name - The name of the gif. Do not include filetype. +- duration - Number of frames in the gif...I think. +- file_type - File extension for the images. Do not include preceding . + +### CorrMatrixAnalysis +Displays in depth analysis of the correlation between features. Currently only addresses correlation of dependent feature to independent features, but will be updated soon. + +params: +- df - The dataframe to analyze. +- dep_feature - The dependent feature. + +#### example call: +df = pd.read_csv('Iris.csv') + +CorrMatrixAnalysis(df, 'species') + +Example output: +``` +Features With High Correlation to diagnosis: + -0.79 - concave points_worst + -0.78 - perimeter_worst + -0.78 - concave points_mean + -0.78 - radius_worst + -0.74 - perimeter_mean + -0.73 - area_worst + -0.73 - radius_mean + -0.71 - area_mean + + Features With Moderate Correlation to diagnosis: + -0.70 - concavity_mean + -0.66 - concavity_worst + -0.60 - compactness_mean + -0.59 - compactness_worst + -0.57 - radius_se + -0.56 - perimeter_se + -0.55 - area_se + + Features With No Correlation to diagnosis: + -0.29 - compactness_se + -0.25 - concavity_se + -0.08 - fractal_dimension_se + 0.07 - smoothness_se + -0.04 - id + 0.01 - fractal_dimension_mean + 0.01 - texture_se + 0.01 - symmetry_se +``` + +Many thanks to my muse for the constant inspiration, great ideas, and support <3 + + + +%package -n python3-bae0n-utils +Summary: Utility functions to be used in Python +Provides: python-bae0n-utils +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-bae0n-utils +# bae0n_utils + +Collection of utility functions to be used in Python. + +### ColoredText(r, g, b, text) +#### ex: print(ColoredText(255, 0, 0, 'Hello World')) +Displays colored text in the console. + +params: +- r - Value from 0-255 for Red +- g - Value from 0-255 for Green +- b - Value from 0-255 for Blue +- text - Text to display with color + +Returns: + Modified text string, now with the given color. + +### FitCellsToWindow +#### ex: FitCellsToWindow() +Fits Jupyter cells to window size. + +### ActivateCellDoneSound +#### ex: ActivateCellDoneSound(url='https://bigsoundbank.com/UPLOAD/mp3/0116.mp3') +Plays a sound effect when a cell is complete. Currently kind of buggy with a failed cell. + +params: +- url (optional) - url of the sound you want to play. Accepts .wav and .mp3 + +### ActivateCellFailSound +#### ex: ActivateCellFailSound() +Plays a sound effect if the cell execution fails. + +### ClearDir +#### ex: ClearDir('./images') +Removes all files from a directory. + +params: +- path - The source directory of the images to turn into a gif. Must include preceding ./, should not include ending / +- safe_del - Prompts user input for confirmation if set to True. + Default Value: True + +### MakeGif +#### ex: MakeGif('./data', './', 'test', 100, 'jpg') +Turns a directory of images into a gif. + +params: +- source_dir - The source directory of the images to turn into a gif. Must include preceding ./ +- out_dir - The directory to save the gif to. Must include preceding ./ +- gif_name - The name of the gif. Do not include filetype. +- duration - Number of frames in the gif...I think. +- file_type - File extension for the images. Do not include preceding . + +### CorrMatrixAnalysis +Displays in depth analysis of the correlation between features. Currently only addresses correlation of dependent feature to independent features, but will be updated soon. + +params: +- df - The dataframe to analyze. +- dep_feature - The dependent feature. + +#### example call: +df = pd.read_csv('Iris.csv') + +CorrMatrixAnalysis(df, 'species') + +Example output: +``` +Features With High Correlation to diagnosis: + -0.79 - concave points_worst + -0.78 - perimeter_worst + -0.78 - concave points_mean + -0.78 - radius_worst + -0.74 - perimeter_mean + -0.73 - area_worst + -0.73 - radius_mean + -0.71 - area_mean + + Features With Moderate Correlation to diagnosis: + -0.70 - concavity_mean + -0.66 - concavity_worst + -0.60 - compactness_mean + -0.59 - compactness_worst + -0.57 - radius_se + -0.56 - perimeter_se + -0.55 - area_se + + Features With No Correlation to diagnosis: + -0.29 - compactness_se + -0.25 - concavity_se + -0.08 - fractal_dimension_se + 0.07 - smoothness_se + -0.04 - id + 0.01 - fractal_dimension_mean + 0.01 - texture_se + 0.01 - symmetry_se +``` + +Many thanks to my muse for the constant inspiration, great ideas, and support <3 + + + +%package help +Summary: Development documents and examples for bae0n-utils +Provides: python3-bae0n-utils-doc +%description help +# bae0n_utils + +Collection of utility functions to be used in Python. + +### ColoredText(r, g, b, text) +#### ex: print(ColoredText(255, 0, 0, 'Hello World')) +Displays colored text in the console. + +params: +- r - Value from 0-255 for Red +- g - Value from 0-255 for Green +- b - Value from 0-255 for Blue +- text - Text to display with color + +Returns: + Modified text string, now with the given color. + +### FitCellsToWindow +#### ex: FitCellsToWindow() +Fits Jupyter cells to window size. + +### ActivateCellDoneSound +#### ex: ActivateCellDoneSound(url='https://bigsoundbank.com/UPLOAD/mp3/0116.mp3') +Plays a sound effect when a cell is complete. Currently kind of buggy with a failed cell. + +params: +- url (optional) - url of the sound you want to play. Accepts .wav and .mp3 + +### ActivateCellFailSound +#### ex: ActivateCellFailSound() +Plays a sound effect if the cell execution fails. + +### ClearDir +#### ex: ClearDir('./images') +Removes all files from a directory. + +params: +- path - The source directory of the images to turn into a gif. Must include preceding ./, should not include ending / +- safe_del - Prompts user input for confirmation if set to True. + Default Value: True + +### MakeGif +#### ex: MakeGif('./data', './', 'test', 100, 'jpg') +Turns a directory of images into a gif. + +params: +- source_dir - The source directory of the images to turn into a gif. Must include preceding ./ +- out_dir - The directory to save the gif to. Must include preceding ./ +- gif_name - The name of the gif. Do not include filetype. +- duration - Number of frames in the gif...I think. +- file_type - File extension for the images. Do not include preceding . + +### CorrMatrixAnalysis +Displays in depth analysis of the correlation between features. Currently only addresses correlation of dependent feature to independent features, but will be updated soon. + +params: +- df - The dataframe to analyze. +- dep_feature - The dependent feature. + +#### example call: +df = pd.read_csv('Iris.csv') + +CorrMatrixAnalysis(df, 'species') + +Example output: +``` +Features With High Correlation to diagnosis: + -0.79 - concave points_worst + -0.78 - perimeter_worst + -0.78 - concave points_mean + -0.78 - radius_worst + -0.74 - perimeter_mean + -0.73 - area_worst + -0.73 - radius_mean + -0.71 - area_mean + + Features With Moderate Correlation to diagnosis: + -0.70 - concavity_mean + -0.66 - concavity_worst + -0.60 - compactness_mean + -0.59 - compactness_worst + -0.57 - radius_se + -0.56 - perimeter_se + -0.55 - area_se + + Features With No Correlation to diagnosis: + -0.29 - compactness_se + -0.25 - concavity_se + -0.08 - fractal_dimension_se + 0.07 - smoothness_se + -0.04 - id + 0.01 - fractal_dimension_mean + 0.01 - texture_se + 0.01 - symmetry_se +``` + +Many thanks to my muse for the constant inspiration, great ideas, and support <3 + + + +%prep +%autosetup -n bae0n-utils-0.1.2 + +%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-bae0n-utils -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.2-1 +- Package Spec generated |