0.1.70
This commit is contained in:
parent
1e5348e045
commit
4b60064b17
@ -1,7 +1,7 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
# replace with your username:
|
# replace with your username:
|
||||||
name = guan
|
name = guan
|
||||||
version = 0.1.69
|
version = 0.1.70
|
||||||
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.69
|
Version: 0.1.70
|
||||||
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
|
||||||
|
@ -6,7 +6,7 @@ import guan
|
|||||||
def test():
|
def test():
|
||||||
import guan
|
import guan
|
||||||
current_version = guan.get_current_version('guan')
|
current_version = guan.get_current_version('guan')
|
||||||
print(f'\nCongratulations on successfully installing Guan package! The installed version is guan-{current_version}.')
|
print(f'Congratulations on successfully installing Guan package! The installed version is guan-{current_version}.')
|
||||||
|
|
||||||
# 泡利矩阵
|
# 泡利矩阵
|
||||||
@guan.statistics_decorator
|
@guan.statistics_decorator
|
||||||
|
@ -402,6 +402,34 @@ def color_matplotlib():
|
|||||||
color_array = ['tab:blue', 'tab:orange', 'tab:green', 'tab:red', 'tab:purple', 'tab:brown', 'tab:pink', 'tab:gray', 'tab:olive', 'tab:cyan']
|
color_array = ['tab:blue', 'tab:orange', 'tab:green', 'tab:red', 'tab:purple', 'tab:brown', 'tab:pink', 'tab:gray', 'tab:olive', 'tab:cyan']
|
||||||
return color_array
|
return color_array
|
||||||
|
|
||||||
|
# 如果不存在文件夹,则新建文件夹
|
||||||
|
@guan.statistics_decorator
|
||||||
|
def make_directory(directory='./test'):
|
||||||
|
import os
|
||||||
|
if not os.path.exists(directory):
|
||||||
|
os.makedirs(directory)
|
||||||
|
|
||||||
|
# 如果不存在文件,则新建空文件
|
||||||
|
@guan.statistics_decorator
|
||||||
|
def make_file(file_path='./a.txt'):
|
||||||
|
import os
|
||||||
|
if not os.path.exists(file_path):
|
||||||
|
with open(file_path, 'w') as f:
|
||||||
|
pass
|
||||||
|
|
||||||
|
# 读取文本文件内容,如果不存在,则新建空文件
|
||||||
|
@guan.statistics_decorator
|
||||||
|
def read_text_file(file_path='./a.txt'):
|
||||||
|
import os
|
||||||
|
if not os.path.exists(file_path):
|
||||||
|
with open(file_path, 'w') as f:
|
||||||
|
pass
|
||||||
|
return ''
|
||||||
|
else:
|
||||||
|
with open(file_path, 'r') as f:
|
||||||
|
content = f.read()
|
||||||
|
return content
|
||||||
|
|
||||||
# 将变量存到文件
|
# 将变量存到文件
|
||||||
@guan.statistics_decorator
|
@guan.statistics_decorator
|
||||||
def dump_data(data, filename, file_format='.txt'):
|
def dump_data(data, filename, file_format='.txt'):
|
||||||
|
@ -1,13 +1,6 @@
|
|||||||
# Module: others
|
# Module: others
|
||||||
import guan
|
import guan
|
||||||
|
|
||||||
# 如果不存在文件夹,则新建文件夹
|
|
||||||
@guan.statistics_decorator
|
|
||||||
def make_directory(directory='./test'):
|
|
||||||
import os
|
|
||||||
if not os.path.exists(directory):
|
|
||||||
os.makedirs(directory)
|
|
||||||
|
|
||||||
# 获取当前日期字符串
|
# 获取当前日期字符串
|
||||||
@guan.statistics_decorator
|
@guan.statistics_decorator
|
||||||
def get_date(bar=True):
|
def get_date(bar=True):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user