#!/usr/bin/env python3
|
|
# -*- coding: utf8 -*-
|
|
# Copyright (c) 2020 Roberto Treviño Cervantes
|
|
|
|
#########################################################################
|
|
# #
|
|
# This file is part of FUTURE (Powered by Monad). #
|
|
# #
|
|
# FUTURE is free software: you can redistribute it and/or modify #
|
|
# it under the terms of the GNU General Public License as published by #
|
|
# the Free Software Foundation, either version 3 of the License, or #
|
|
# (at your option) any later version. #
|
|
# #
|
|
# FUTURE is distributed in the hope that it will be useful, #
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
|
# GNU General Public License for more details. #
|
|
# #
|
|
# You should have received a copy of the GNU General Public License #
|
|
# along with FUTURE. If not, see <https://www.gnu.org/licenses/>. #
|
|
# #
|
|
#########################################################################
|
|
|
|
import lmdb, base64, hnswlib, bson
|
|
import numpy as np
|
|
from Monad import Monad, getSentenceMeanVector
|
|
|
|
imageDBIndex = lmdb.open("./peer_registry", readonly=True)
|
|
with imageDBIndex.begin() as imageDBTransaction:
|
|
imageDBSelector = imageDBTransaction.cursor()
|
|
for key, value in imageDBSelector:
|
|
print(key, value)
|