Search for words, documents, images, videos, news, maps and text translation using the DuckDuckGo.com search engine. Downloading files and images to a local hard drive.
VQD_DICT - delete first key if len(VQD_DICT)>32768
from random import choice, randint
import objsize
td = dict()
for i in range(1, 70000):
#td[f"test word {i}"] = f"3-313604123259606289599999999542149999999-{(313604123259606289595796089749796290645 - i):<09}"
td[f"word {i}"] = f"3-313604123259606289599999999542149999999-{i:<039}"
#print(td)
if i > 32000 and i % 1024 == 0:
print(f"{i=}")
print(f"{len(td)=}", int(objsize.get_exclusive_deep_size(td))) #/ 1_048_576), "Mb")
VQD_DICT - delete first key if len(VQD_DICT)>32768