pyscriptbase 1.0.3__tar.gz → 1.0.4__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.
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/PKG-INFO +1 -1
- pyscriptbase-1.0.4/pyscriptbase/app.py +19 -0
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/pyscriptbase.egg-info/PKG-INFO +1 -1
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/pyscriptbase.egg-info/SOURCES.txt +1 -0
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/setup.py +1 -1
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/README.md +0 -0
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/pyscriptbase/__init__.py +0 -0
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/pyscriptbase/cipher.py +0 -0
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/pyscriptbase/database.py +0 -0
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/pyscriptbase/env.py +0 -0
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/pyscriptbase/net.py +0 -0
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/pyscriptbase/panel.py +0 -0
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/pyscriptbase/pusher.py +0 -0
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/pyscriptbase/script.py +0 -0
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/pyscriptbase/util.py +0 -0
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/pyscriptbase/webview.py +0 -0
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/pyscriptbase.egg-info/dependency_links.txt +0 -0
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/pyscriptbase.egg-info/requires.txt +0 -0
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/pyscriptbase.egg-info/top_level.txt +0 -0
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/setup.cfg +0 -0
- {pyscriptbase-1.0.3 → pyscriptbase-1.0.4}/test/test.py +0 -0
|
@@ -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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|