0.1.15
This commit is contained in:
		| @@ -1,7 +1,7 @@ | |||||||
| [metadata] | [metadata] | ||||||
| # replace with your username: | # replace with your username: | ||||||
| name = guan | name = guan | ||||||
| version = 0.1.14 | version = 0.1.15 | ||||||
| author = guanjihuan | author = guanjihuan | ||||||
| author_email = guanjihuan@163.com | author_email = guanjihuan@163.com | ||||||
| description = An open source python package | description = An open source python package | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| Metadata-Version: 2.1 | Metadata-Version: 2.1 | ||||||
| Name: guan | Name: guan | ||||||
| Version: 0.1.14 | Version: 0.1.15 | ||||||
| Summary: An open source python package | Summary: An open source python package | ||||||
| Home-page: https://py.guanjihuan.com | Home-page: https://py.guanjihuan.com | ||||||
| Author: guanjihuan | Author: guanjihuan | ||||||
|   | |||||||
| @@ -48,12 +48,6 @@ def find_degenerate_points(k_array, eigenvalue_array, precision=1e-2): | |||||||
|     guan.statistics_of_guan_package() |     guan.statistics_of_guan_package() | ||||||
|     return degenerate_k_array, degenerate_eigenvalue_array |     return degenerate_k_array, degenerate_eigenvalue_array | ||||||
|  |  | ||||||
| # 随机获得一个整数,左闭右闭 |  | ||||||
| def get_random_number(start=0, end=1): |  | ||||||
|     import random |  | ||||||
|     rand_number = random.randint(start, end) # [start, end] |  | ||||||
|     return rand_number |  | ||||||
|  |  | ||||||
| # 选取一个种子生成固定的随机整数 | # 选取一个种子生成固定的随机整数 | ||||||
| def generate_random_int_number_for_a_specific_seed(seed=0, x_min=0, x_max=10): | def generate_random_int_number_for_a_specific_seed(seed=0, x_min=0, x_max=10): | ||||||
|     import numpy as np |     import numpy as np | ||||||
| @@ -201,6 +195,14 @@ def encryption_SHA_256(password, salt=''): | |||||||
|     guan.statistics_of_guan_package() |     guan.statistics_of_guan_package() | ||||||
|     return hashed_password |     return hashed_password | ||||||
|  |  | ||||||
|  | # 生成二维码 | ||||||
|  | def creat_qrcode(data="https://www.guanjihuan.com", filename='a', file_format='.png'): | ||||||
|  |     import qrcode | ||||||
|  |     img = qrcode.make(data) | ||||||
|  |     img.save(filename+file_format) | ||||||
|  |     import guan | ||||||
|  |     guan.statistics_of_guan_package() | ||||||
|  |  | ||||||
| # 获取CPU使用率 | # 获取CPU使用率 | ||||||
| def get_cpu_usage(interval=1): | def get_cpu_usage(interval=1): | ||||||
|     import psutil |     import psutil | ||||||
| @@ -552,6 +554,12 @@ def get_current_function_name(): | |||||||
|     guan.statistics_of_guan_package() |     guan.statistics_of_guan_package() | ||||||
|     return current_function_name |     return current_function_name | ||||||
|  |  | ||||||
|  | # 随机获得一个整数,左闭右闭 | ||||||
|  | def get_random_number(start=0, end=1): | ||||||
|  |     import random | ||||||
|  |     rand_number = random.randint(start, end) # [start, end] | ||||||
|  |     return rand_number | ||||||
|  |  | ||||||
| # 获取调用本函数的函数名 | # 获取调用本函数的函数名 | ||||||
| def get_calling_function_name(layer=1): | def get_calling_function_name(layer=1): | ||||||
|     import inspect |     import inspect | ||||||
|   | |||||||
| @@ -403,14 +403,6 @@ def change_directory_by_replacement(current_key_word='code', new_key_word='data' | |||||||
|     import guan |     import guan | ||||||
|     guan.statistics_of_guan_package() |     guan.statistics_of_guan_package() | ||||||
|  |  | ||||||
| # 生成二维码 |  | ||||||
| def creat_qrcode(data="https://www.guanjihuan.com", filename='a', file_format='.png'): |  | ||||||
|     import qrcode |  | ||||||
|     img = qrcode.make(data) |  | ||||||
|     img.save(filename+file_format) |  | ||||||
|     import guan |  | ||||||
|     guan.statistics_of_guan_package() |  | ||||||
|  |  | ||||||
| # 将文本转成音频 | # 将文本转成音频 | ||||||
| def str_to_audio(str='hello world', filename='str', rate=125, voice=1, read=1, save=0, compress=0, bitrate='16k', print_text=0): | def str_to_audio(str='hello world', filename='str', rate=125, voice=1, read=1, save=0, compress=0, bitrate='16k', print_text=0): | ||||||
|     import pyttsx3 |     import pyttsx3 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user