Nada Sbihi

18 papers A* 1A 1B 2C 1Misc 1Journal 6Unranked 6
YearRankTypeTitle / Venue / Authors
2026 J jnl
IEEE Access
Acheraf Dine Aboudou, Assia Naja, Sara Mobsite, Nada Sbihi, Mounir Ghogho
2025 conf
BIOSTEC (2): HEALTHINF
Hasna El Haji, Nada Sbihi, Kaoutar El Handri, Adil Bahaj, Mohammed Elkasri, Amine Souadka, Mounir Ghogho
2024 B conf
IWCMC
Hajar Rezzouqi, Assia Naja, Nada Sbihi, Houda Benbrahim, Mounir Ghogho
2024 B conf
IWCMC
Hajar Rezzouqi, Assia Naja, Nada Sbihi, Mounir Ghogho
2023 J jnl
IEEE Access
Youness Moukafih, Nada Sbihi, Mounir Ghogho, Kamel Smaïli
2022 C conf
EDUCON
Ibrahim Rahhal, Kathleen M. Carley, Ismail Kassou, Nada Sbihi
2022 Misc conf
AI
Youness Moukafih, Abdelghani Ghanem, Karima Abidi, Nada Sbihi, Mounir Ghogho, Kamel Smaïli
2021 conf
AI*IA
Youness Moukafih, Nada Sbihi, Mounir Ghogho, Kamel Smaïli
2020 J jnl
J. Ambient Intell. Smart Environ.
Ihsane Gryech, Mounir Ghogho, Hajar Elhammouti, Nada Sbihi, Abdellatif Kobbane
2020 J jnl
Sensors
Ihsane Gryech, Yassine Ben-Aboud, Bassma Guermah, Nada Sbihi, Mounir Ghogho, Abdellatif Kobbane
2018 conf
IntelliSys (1)
Hajar Rezzouqi, Ihsane Gryech, Nada Sbihi, Mounir Ghogho, Houda Benbrahim
2017 conf
UNet
Nada Sbihi, Ihsane Gryech, Mounir Ghogho
2016 conf
NETYS
Nada Sbihi, Mounir Ghogho
2013 J jnl
CoRR
James Roberts, Nada Sbihi
2013 A conf
ITC
James Roberts, Nada Sbihi
2012 A* conf
INFOCOM
Sara Oueslati, James Roberts, Nada Sbihi
2012 J jnl
CoRR
Christine Fricker, Philippe Robert, James Roberts, Nada Sbihi
2012 conf
INFOCOM Workshops
Christine Fricker, Philippe Robert, James Roberts, Nada Sbihi
redb/utils/push_to_elastic.py
← Index redb/utils/push_to_elastic.py python
import json
import os
#from redb.settings import elasticsearch as es
from elasticsearch import Elasticsearch
from dataclasses import asdict
from dotenv import load_dotenv

class Utils():
    """
    Utility class for pushing

    """
    @staticmethod
    def push_to_elastic(sample_dict):
        """
        Pushes the sample_dict to elastic search
        """
        load_dotenv()
        ELASTIC_ENDPOINT = os.getenv("ELASTIC_HOST")
        ELASTIC_ENFORCE_SSL = os.getenv("ELASTIC_ENFORCE_SSL", False) == "True"
        ELASTIC_USER = os.getenv("ELASTIC_USER")
        ELASTIC_PASSWORD = os.getenv("ELASTIC_PASSWORD")
        ELASTIC_BINARIES_COLLECTION = os.getenv(
            "ELASTIC_BINARIES_COLLECTION", "redb_test"
        )
        es = Elasticsearch(
            ELASTIC_ENDPOINT,
            verify_certs=ELASTIC_ENFORCE_SSL,
            basic_auth=(ELASTIC_USER, ELASTIC_PASSWORD),
            maxsize=20,
            retry_on_timeout=True,
            timeout=30,
        )

        try:
            dict_dump = json.dumps(sample_dict)
        except Exception as e:
            print(f"Error: {e}")
            return False
        elastic = es.index(index=ELASTIC_BINARIES_COLLECTION, body=dict_dump)
        return True
    
    def push_to_index(sample_dict, index_name):
        """
        Pushes the sample_dict to elastic search
        """
        load_dotenv()
        ELASTIC_ENDPOINT = os.getenv("ELASTIC_HOST")
        ELASTIC_ENFORCE_SSL = os.getenv("ELASTIC_ENFORCE_SSL", False) == "True"
        ELASTIC_USER = os.getenv("ELASTIC_USER")
        ELASTIC_PASSWORD = os.getenv("ELASTIC_PASSWORD")
        ELASTIC_BINARIES_COLLECTION = index_name
        
        es = Elasticsearch(
            ELASTIC_ENDPOINT,
            verify_certs=ELASTIC_ENFORCE_SSL,
            basic_auth=(ELASTIC_USER, ELASTIC_PASSWORD),
            maxsize=20,
            retry_on_timeout=True,
            timeout=30,
        )

        try:
            dict_dump = json.dumps(sample_dict)
        except Exception as e:
            print(f"Error: {e}")
            return False
        elastic = es.index(index=ELASTIC_BINARIES_COLLECTION, body=dict_dump)
        return True