Chan-Mo Park

14 papers A* 1A 1B 2C 1Misc 1Journal 5Unranked 3
YearRankTypeTitle / Venue / Authors
2006 J jnl
IEEE Trans. Syst. Man Cybern. Part A
Namgyu Kim, Woontack Woo, Gerard J. Kim, Chan-Mo Park
2005 J jnl
Presence Teleoperators Virtual Environ.
Sangyoon Lee, Gaurav S. Sukhatme, Gerard Jounghyun Kim, Chan-Mo Park
2003 J jnl
Comput. Animat. Virtual Worlds
Kyung Ha Min, In-Kwon Lee, Chan-Mo Park
2002 A conf
IROS
Sangyoon Lee, Gaurav S. Sukhatme, Gerard Jounghyun Kim, Chan-Mo Park
2002 B conf
VRST
Gun A. Lee, Gerard Jounghyun Kim, Chan-Mo Park
2001 J jnl
Parallel Process. Lett.
Sangyoon Lee, Chan-Ik Park, Chan-Mo Park
2001 J jnl
Comput. Graph.
Kyung Ha Min, In-Kwon Lee, Chan-Mo Park
2000 conf
Eurographics (Short Presentations)
Kyung Ha Min, In-Kwon Lee, Chan-Mo Park
2000 A* conf
VR
Namgyu Kim, Gerard Jounghyun Kim, Chan-Mo Park, Inseok Lee, Sung H. Lim
1997 conf
APDC
Sangyoon Lee, Chan-Ik Park, Chan-Mo Park
1996 Misc conf
PDPTA
Sangyoon Lee, Chan-Ik Park, Chan-Mo Park
1996 conf
RTS
Tae-Young Choe, Chan-Ik Park, Chan-Mo Park, Byung-Seop Kim
1996 B conf
COMPSAC
K. H. Kim, Cuong Nguyen, Chan-Mo Park
1993 C conf
ISADS
Cheeha Kim, Chan-Mo Park, Jinhyoun Youn
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