pyscriptbase 1.0.2__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.2 → pyscriptbase-1.0.4}/PKG-INFO +1 -1
- pyscriptbase-1.0.4/pyscriptbase/app.py +19 -0
- {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/net.py +28 -0
- {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase.egg-info/PKG-INFO +1 -1
- {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase.egg-info/SOURCES.txt +1 -0
- {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/setup.py +1 -1
- {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/README.md +0 -0
- {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/__init__.py +0 -0
- {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/cipher.py +0 -0
- {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/database.py +0 -0
- {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/env.py +0 -0
- {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/panel.py +0 -0
- {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/pusher.py +0 -0
- {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/script.py +0 -0
- {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/util.py +0 -0
- {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/webview.py +0 -0
- {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase.egg-info/dependency_links.txt +0 -0
- {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase.egg-info/requires.txt +0 -0
- {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase.egg-info/top_level.txt +0 -0
- {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/setup.cfg +0 -0
- {pyscriptbase-1.0.2 → 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
|
|
@@ -358,6 +358,34 @@ class CloudRequest:
|
|
|
358
358
|
params=params,
|
|
359
359
|
)
|
|
360
360
|
|
|
361
|
+
def delete(
|
|
362
|
+
self,
|
|
363
|
+
url: str,
|
|
364
|
+
body: str = None,
|
|
365
|
+
headers: dict = None,
|
|
366
|
+
isJson=True,
|
|
367
|
+
isXml=False,
|
|
368
|
+
isCookie=False,
|
|
369
|
+
allow_redirects=True,
|
|
370
|
+
timeout: int = 5,
|
|
371
|
+
maxTry=3,
|
|
372
|
+
params: dict = {},
|
|
373
|
+
):
|
|
374
|
+
return self.__req__(
|
|
375
|
+
method="DELETE",
|
|
376
|
+
url=url,
|
|
377
|
+
body=body,
|
|
378
|
+
headers=headers,
|
|
379
|
+
isJson=isJson,
|
|
380
|
+
isXml=isXml,
|
|
381
|
+
isCookie=isCookie,
|
|
382
|
+
allow_redirects=allow_redirects,
|
|
383
|
+
timeout=timeout,
|
|
384
|
+
maxTry=maxTry,
|
|
385
|
+
params=params,
|
|
386
|
+
)
|
|
387
|
+
|
|
388
|
+
|
|
361
389
|
def __req__(
|
|
362
390
|
self,
|
|
363
391
|
method: str,
|
|
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
|