pyscriptbase 1.0.3__tar.gz → 1.0.5__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.
Files changed (23) hide show
  1. pyscriptbase-1.0.5/PKG-INFO +12 -0
  2. pyscriptbase-1.0.5/pyscriptbase/app.py +19 -0
  3. {pyscriptbase-1.0.3 → pyscriptbase-1.0.5}/pyscriptbase/util.py +13 -2
  4. pyscriptbase-1.0.5/pyscriptbase.egg-info/PKG-INFO +12 -0
  5. {pyscriptbase-1.0.3 → pyscriptbase-1.0.5}/pyscriptbase.egg-info/SOURCES.txt +1 -0
  6. {pyscriptbase-1.0.3 → pyscriptbase-1.0.5}/setup.py +1 -1
  7. pyscriptbase-1.0.3/PKG-INFO +0 -24
  8. pyscriptbase-1.0.3/pyscriptbase.egg-info/PKG-INFO +0 -24
  9. {pyscriptbase-1.0.3 → pyscriptbase-1.0.5}/README.md +0 -0
  10. {pyscriptbase-1.0.3 → pyscriptbase-1.0.5}/pyscriptbase/__init__.py +0 -0
  11. {pyscriptbase-1.0.3 → pyscriptbase-1.0.5}/pyscriptbase/cipher.py +0 -0
  12. {pyscriptbase-1.0.3 → pyscriptbase-1.0.5}/pyscriptbase/database.py +0 -0
  13. {pyscriptbase-1.0.3 → pyscriptbase-1.0.5}/pyscriptbase/env.py +0 -0
  14. {pyscriptbase-1.0.3 → pyscriptbase-1.0.5}/pyscriptbase/net.py +0 -0
  15. {pyscriptbase-1.0.3 → pyscriptbase-1.0.5}/pyscriptbase/panel.py +0 -0
  16. {pyscriptbase-1.0.3 → pyscriptbase-1.0.5}/pyscriptbase/pusher.py +0 -0
  17. {pyscriptbase-1.0.3 → pyscriptbase-1.0.5}/pyscriptbase/script.py +0 -0
  18. {pyscriptbase-1.0.3 → pyscriptbase-1.0.5}/pyscriptbase/webview.py +0 -0
  19. {pyscriptbase-1.0.3 → pyscriptbase-1.0.5}/pyscriptbase.egg-info/dependency_links.txt +0 -0
  20. {pyscriptbase-1.0.3 → pyscriptbase-1.0.5}/pyscriptbase.egg-info/requires.txt +0 -0
  21. {pyscriptbase-1.0.3 → pyscriptbase-1.0.5}/pyscriptbase.egg-info/top_level.txt +0 -0
  22. {pyscriptbase-1.0.3 → pyscriptbase-1.0.5}/setup.cfg +0 -0
  23. {pyscriptbase-1.0.3 → pyscriptbase-1.0.5}/test/test.py +0 -0
@@ -0,0 +1,12 @@
1
+ Metadata-Version: 2.1
2
+ Name: pyscriptbase
3
+ Version: 1.0.5
4
+ Summary: python script base library
5
+ Home-page:
6
+ Author: ASMan
7
+ Author-email:
8
+ Description-Content-Type: text/markdown
9
+
10
+ # Instructions
11
+
12
+ python script base library
@@ -0,0 +1,19 @@
1
+ def getAssistedList(receivers: list[tuple], senders: list[tuple], maxCount: int = 1) -> list[tuple]:
2
+ result = []
3
+ sendMap = {}
4
+
5
+ for sender in senders:
6
+ for _ in range(0, sender[1]):
7
+ for j, receiver in enumerate(receivers):
8
+ if receiver[0] == sender[0] or receiver[1] == 0:
9
+ continue
10
+ key = f"{sender[0]}-{receiver[0]}"
11
+ if key not in sendMap:
12
+ sendMap[key] = 0
13
+ if sendMap[key] >= maxCount:
14
+ continue
15
+ sendMap[key] += 1
16
+ receivers[j] = (receiver[0], receiver[1] - 1)
17
+ result.append((sender[0], receiver[0]))
18
+ break
19
+ return result
@@ -6,7 +6,15 @@ import string
6
6
 
7
7
  def generateRandomPhoneUA():
8
8
  # 手机设备品牌与型号
9
- devices = ["Samsung Galaxy S21", "Xiaomi Mi 11", "Google Pixel 6", "Huawei P40", "OPPO Reno5", "Vivo X60", "OnePlus 9"]
9
+ devices = [
10
+ "Samsung Galaxy S21",
11
+ "Xiaomi Mi 11",
12
+ "Google Pixel 6",
13
+ "Huawei P40",
14
+ "OPPO Reno5",
15
+ "Vivo X60",
16
+ "OnePlus 9",
17
+ ]
10
18
 
11
19
  # 操作系统版本
12
20
  os_versions = ["Android 11", "Android 12", "Android 13"]
@@ -78,9 +86,12 @@ def daysDifference(date_str: str) -> int:
78
86
  return days_diff
79
87
 
80
88
 
81
- def threadPool(func, args, num=5):
89
+ def threadPool(func, args, num=5) -> list:
82
90
  # 启用线程池
83
91
  executor = ThreadPoolExecutor(max_workers=num)
84
92
  tasks = [executor.submit(func, arg, index + 1) for index, arg in enumerate(args)]
93
+ results = []
85
94
  for future in as_completed(tasks):
86
95
  data = future.result()
96
+ results.append(data)
97
+ return results
@@ -0,0 +1,12 @@
1
+ Metadata-Version: 2.1
2
+ Name: pyscriptbase
3
+ Version: 1.0.5
4
+ Summary: python script base library
5
+ Home-page:
6
+ Author: ASMan
7
+ Author-email:
8
+ Description-Content-Type: text/markdown
9
+
10
+ # Instructions
11
+
12
+ python script base library
@@ -1,6 +1,7 @@
1
1
  README.md
2
2
  setup.py
3
3
  pyscriptbase/__init__.py
4
+ pyscriptbase/app.py
4
5
  pyscriptbase/cipher.py
5
6
  pyscriptbase/database.py
6
7
  pyscriptbase/env.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="pyscriptbase", # 包名
5
- version="1.0.3", # 版本号
5
+ version="1.0.5", # 版本号
6
6
  packages=find_packages(), # 自动查找包
7
7
  author="ASMan",
8
8
  author_email="",
@@ -1,24 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: pyscriptbase
3
- Version: 1.0.3
4
- Summary: python script base library
5
- Home-page:
6
- Author: ASMan
7
- Author-email:
8
- Description-Content-Type: text/markdown
9
- Requires-Dist: loguru
10
- Requires-Dist: selenium
11
- Requires-Dist: pymysql
12
- Requires-Dist: pycryptodome
13
- Requires-Dist: pyyaml
14
- Requires-Dist: xmltodict
15
- Requires-Dist: prettytable
16
- Requires-Dist: pyjwt
17
- Requires-Dist: fake_useragent
18
- Requires-Dist: beautifulsoup4
19
- Requires-Dist: requests
20
- Requires-Dist: lxml
21
-
22
- # Instructions
23
-
24
- python script base library
@@ -1,24 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: pyscriptbase
3
- Version: 1.0.3
4
- Summary: python script base library
5
- Home-page:
6
- Author: ASMan
7
- Author-email:
8
- Description-Content-Type: text/markdown
9
- Requires-Dist: loguru
10
- Requires-Dist: selenium
11
- Requires-Dist: pymysql
12
- Requires-Dist: pycryptodome
13
- Requires-Dist: pyyaml
14
- Requires-Dist: xmltodict
15
- Requires-Dist: prettytable
16
- Requires-Dist: pyjwt
17
- Requires-Dist: fake_useragent
18
- Requires-Dist: beautifulsoup4
19
- Requires-Dist: requests
20
- Requires-Dist: lxml
21
-
22
- # Instructions
23
-
24
- python script base library
File without changes
File without changes
File without changes