1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
|
%global _empty_manifest_terminate_build 0
Name: python-math22
Version: 2.2
Release: 1
Summary: useful math functions
License: MIT License
URL: https://baidu.com
Source0: https://mirrors.aliyun.com/pypi/web/packages/31/3a/d40e7329920a65e80a3e89d99c6f234a0846f06629c16d67c48072abb365/math22-2.2.tar.gz
BuildArch: noarch
%description
This project provides 10 functions that can help mathematics computation and code evaluation.
Is_prime (num) function is used to judge whether a number is prime. Input should be a number above zero and output is true or false.
Function of is_square(num) is used to judge if a number is square number by commutating its square root. input should be a number above zero and result is true or false.
The quad_equation_1unknown (a, b, c) function is used to compute the root of equation of two degree. 3 input values are coefficients of equation. the results are roots of quadratic equation with one unknown. If there is no solution for this equation, the result will be “none”. If all inputs are zero, the result will be “not an equation”
The function of fib(num) is to compute the nth number in Fibonacci sequence .
The functions [random _method1(len1), random_method2(len1) and random_all(len1)] can provide a random password with an input length of password. The function “random_method1” includes all letters (both upper case and lower case). The function “random_method2” includes all letters and numbers. The function “random_all” includes all printable characters (except whitespaces).
The next function is “level(string1)” that is used to evaluate level of password. You should give a string object to the function and it will return the strength grade of this password. The levels from good to bad are [perfect, very good, very strong, average, low and too low]. It has an attach function “level_store” and it is only used to support the “level” function.
The function of encode(st) is used to encode a string by using an encryption algorithm. Every character of this string will be replaced by next character in alphabet. The space will be replaced to the character “!”.
(there is a new object too,but it's not completed)
(version 2.1.7, 3rd January, 2020 add)
Function “line_equation_2unknown(a, b, u, c, d, v)”gives the root of a linear equation in two unknowns ”ax+by=u, cx+dy=v”.If it has no roots, the result will be none.
(version 2.2, 15st February, 2020 add)
Function "base_convert(before, after, num)" is used to convert the base of <num> from <before> to <after>.
<num> must be a string.<before> and <after> must be bigger than 1 and smaller than 63.The order is 0-9,a-z,A-Z.
If there’s a new version, the descriptions of the new functions will be add into the text.
This project is created by a 12-year-old student. You can send emails to 2691475984@qq.com to contact with me.
%package -n python3-math22
Summary: useful math functions
Provides: python-math22
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-math22
This project provides 10 functions that can help mathematics computation and code evaluation.
Is_prime (num) function is used to judge whether a number is prime. Input should be a number above zero and output is true or false.
Function of is_square(num) is used to judge if a number is square number by commutating its square root. input should be a number above zero and result is true or false.
The quad_equation_1unknown (a, b, c) function is used to compute the root of equation of two degree. 3 input values are coefficients of equation. the results are roots of quadratic equation with one unknown. If there is no solution for this equation, the result will be “none”. If all inputs are zero, the result will be “not an equation”
The function of fib(num) is to compute the nth number in Fibonacci sequence .
The functions [random _method1(len1), random_method2(len1) and random_all(len1)] can provide a random password with an input length of password. The function “random_method1” includes all letters (both upper case and lower case). The function “random_method2” includes all letters and numbers. The function “random_all” includes all printable characters (except whitespaces).
The next function is “level(string1)” that is used to evaluate level of password. You should give a string object to the function and it will return the strength grade of this password. The levels from good to bad are [perfect, very good, very strong, average, low and too low]. It has an attach function “level_store” and it is only used to support the “level” function.
The function of encode(st) is used to encode a string by using an encryption algorithm. Every character of this string will be replaced by next character in alphabet. The space will be replaced to the character “!”.
(there is a new object too,but it's not completed)
(version 2.1.7, 3rd January, 2020 add)
Function “line_equation_2unknown(a, b, u, c, d, v)”gives the root of a linear equation in two unknowns ”ax+by=u, cx+dy=v”.If it has no roots, the result will be none.
(version 2.2, 15st February, 2020 add)
Function "base_convert(before, after, num)" is used to convert the base of <num> from <before> to <after>.
<num> must be a string.<before> and <after> must be bigger than 1 and smaller than 63.The order is 0-9,a-z,A-Z.
If there’s a new version, the descriptions of the new functions will be add into the text.
This project is created by a 12-year-old student. You can send emails to 2691475984@qq.com to contact with me.
%package help
Summary: Development documents and examples for math22
Provides: python3-math22-doc
%description help
This project provides 10 functions that can help mathematics computation and code evaluation.
Is_prime (num) function is used to judge whether a number is prime. Input should be a number above zero and output is true or false.
Function of is_square(num) is used to judge if a number is square number by commutating its square root. input should be a number above zero and result is true or false.
The quad_equation_1unknown (a, b, c) function is used to compute the root of equation of two degree. 3 input values are coefficients of equation. the results are roots of quadratic equation with one unknown. If there is no solution for this equation, the result will be “none”. If all inputs are zero, the result will be “not an equation”
The function of fib(num) is to compute the nth number in Fibonacci sequence .
The functions [random _method1(len1), random_method2(len1) and random_all(len1)] can provide a random password with an input length of password. The function “random_method1” includes all letters (both upper case and lower case). The function “random_method2” includes all letters and numbers. The function “random_all” includes all printable characters (except whitespaces).
The next function is “level(string1)” that is used to evaluate level of password. You should give a string object to the function and it will return the strength grade of this password. The levels from good to bad are [perfect, very good, very strong, average, low and too low]. It has an attach function “level_store” and it is only used to support the “level” function.
The function of encode(st) is used to encode a string by using an encryption algorithm. Every character of this string will be replaced by next character in alphabet. The space will be replaced to the character “!”.
(there is a new object too,but it's not completed)
(version 2.1.7, 3rd January, 2020 add)
Function “line_equation_2unknown(a, b, u, c, d, v)”gives the root of a linear equation in two unknowns ”ax+by=u, cx+dy=v”.If it has no roots, the result will be none.
(version 2.2, 15st February, 2020 add)
Function "base_convert(before, after, num)" is used to convert the base of <num> from <before> to <after>.
<num> must be a string.<before> and <after> must be bigger than 1 and smaller than 63.The order is 0-9,a-z,A-Z.
If there’s a new version, the descriptions of the new functions will be add into the text.
This project is created by a 12-year-old student. You can send emails to 2691475984@qq.com to contact with me.
%prep
%autosetup -n math22-2.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-math22 -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 2.2-1
- Package Spec generated
|