shancx 1.50__tar.gz → 1.60__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: shancx
3
- Version: 1.50
3
+ Version: 1.60
4
4
  Summary: A simple timer decorator
5
5
  Home-page: https://gitee.com/shancx
6
6
  Author: Your Name
@@ -4,7 +4,7 @@ from setuptools import setup, find_packages
4
4
 
5
5
  setup(
6
6
  name='shancx',
7
- version='1.50',
7
+ version='1.60',
8
8
  packages=find_packages(),
9
9
  description='A simple timer decorator',
10
10
  long_description=open('README.md').read(),
@@ -32,9 +32,7 @@ print_handler.setFormatter(formatter) # 设置屏幕上显示的格式
32
32
  loggers.addHandler(print_handler)
33
33
 
34
34
 
35
-
36
-
37
- def tim_tor(func):
35
+ def Tim_Tor(func):
38
36
  def wrapper(*args, **kwargs):
39
37
  start_time = time.time()
40
38
  result = func(*args, **kwargs)
@@ -43,3 +41,14 @@ def tim_tor(func):
43
41
  loggers.info(f"{func.__name__} took {end_time - start_time:.4f} seconds")
44
42
  return result
45
43
  return wrapper
44
+
45
+
46
+
47
+
48
+
49
+ from itertools import product
50
+ from multiprocessing import Pool
51
+ def Mul_Ess(map_fun,tuple_list):
52
+ with Pool(31) as p:
53
+ P_data = p.map(map_fun, tuple_list)
54
+ return P_data
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: shancx
3
- Version: 1.50
3
+ Version: 1.60
4
4
  Summary: A simple timer decorator
5
5
  Home-page: https://gitee.com/shancx
6
6
  Author: Your Name
@@ -1,7 +1,6 @@
1
1
  README.md
2
2
  setup.py
3
3
  shancx/__init__.py
4
- shancx/util_log.py
5
4
  shancx.egg-info/PKG-INFO
6
5
  shancx.egg-info/SOURCES.txt
7
6
  shancx.egg-info/dependency_links.txt
@@ -1,33 +0,0 @@
1
-
2
- #!/usr/bin/python
3
- # -*- coding: utf-8 -*-
4
- # @Time : 2023/09/27 下午8:52
5
- # @Author : shanchangxi
6
- # @File : util_log.py
7
-
8
- import logging # 引入logging模块
9
- from logging import handlers
10
- # from util.util_dir import *
11
-
12
- # 第一步,创建一个logger
13
- logger = logging.getLogger()
14
- logger.setLevel(logging.INFO) # Log等级开关
15
-
16
- # 第二步,创建一个handler,用于写入日志文件
17
- log_name = 'project.log'
18
- logfile = log_name
19
-
20
- time_rotating_file_handler = handlers.TimedRotatingFileHandler(filename=logfile, when='D', encoding='utf-8')
21
- time_rotating_file_handler.setLevel(logging.INFO) # 输出到file的log等级的开关
22
-
23
- # 第三步,定义handler的输出格式
24
- formatter = logging.Formatter("%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s")
25
- time_rotating_file_handler.setFormatter(formatter)
26
-
27
- # 第四步,将handler添加到logger里面
28
- logger.addHandler(time_rotating_file_handler)
29
-
30
- # 如果需要同時需要在終端上輸出,定義一個streamHandler
31
- print_handler = logging.StreamHandler() # 往屏幕上输出
32
- print_handler.setFormatter(formatter) # 设置屏幕上显示的格式
33
- logger.addHandler(print_handler)
File without changes
File without changes