添加注册登录功能

This commit is contained in:
2025-08-29 00:34:40 +08:00
parent 09065f2ce7
commit 2fe3474d9e
3060 changed files with 29217 additions and 87137 deletions

View File

@@ -10,10 +10,12 @@
from __future__ import annotations
from collections import deque
from collections import namedtuple
import contextlib
import decimal
import gc
from itertools import chain
import pickle
import random
import sys
from sys import getsizeof
@@ -55,15 +57,10 @@ else:
def picklers():
picklers = set()
import pickle
nt = namedtuple("picklers", ["loads", "dumps"])
picklers.add(pickle)
# yes, this thing needs this much testing
for pickle_ in picklers:
for protocol in range(-2, pickle.HIGHEST_PROTOCOL + 1):
yield pickle_.loads, lambda d: pickle_.dumps(d, protocol)
for protocol in range(-2, pickle.HIGHEST_PROTOCOL + 1):
yield nt(pickle.loads, lambda d: pickle.dumps(d, protocol))
def random_choices(population, k=1):