Jan Benda

15 papers C 1Journal 12Unranked 1
YearRankTypeTitle / Venue / Authors
2025 J jnl
J. Comput. Neurosci.
Maria Schlungbaum, Alexandra Barayeu, Jan Grewe, Jan Benda, Benjamin Lindner
2018 J jnl
J. Comput. Neurosci.
Manuel Beiran, Alexandra Kruscha, Jan Benda, Benjamin Lindner
2016 J jnl
Biol. Cybern.
Janez Presern, Ales Skorjanc, Tomaz Rodic, Jan Benda
2016 J jnl
CoRR
Friedrich T. Sommer, Thomas Wachtler, Jeffrey L. Teeters, Jan Benda, Andrew P. Davison, Stephen J. Eglen, Richard C. Gerkin, Jeffrey S. Grethe, Jan Grewe, Kenneth D. Harris, Christian Johannes Kellner, Yann Le Franc, Roman Moucek, Dimiter Prodanov, Robert Pröpper, Hyrum L. Sessions, Leslie Smith, Andrey Sobolev, Adrian Stoewer, Barry Wark
2015 J jnl
J. Comput. Neurosci.
Nahal Sharafi, Jan Benda, Benjamin Lindner
2014 ch.
Encyclopedia of Computational Neuroscience
Jan Benda, Joël Tabak
2013 J jnl
J. Comput. Neurosci.
Nahal Sharafi, Jan Benda, Benjamin Lindner
2013 conf
NIPS
Fabian H. Sinz, Anna Stockl, Jan Grewe, Jan Benda
2011 J jnl
Frontiers Neuroinformatics
Jan Grewe, Thomas Wachtler, Jan Benda
2010 J jnl
PLoS Comput. Biol.
Tilo Schwalger, Karin Fisch, Jan Benda, Benjamin Lindner
2010 J jnl
Neural Comput.
Felix Creutzig, Jan Benda, Sandra Wohlgemuth, Andreas Stumpner, Bernhard Ronacher, Andreas V. M. Herz
2008 J jnl
J. Comput. Neurosci.
Jan Benda, Matthias Hennig
2007 C conf
ICEC
David Obdrzálek, Jan Benda
2003 J jnl
Neural Comput.
Jan Benda, Andreas V. M. Herz
2001 J jnl
Neurocomputing
Jan Benda, Matthias Bethge, Matthias Hennig, Klaus Pawelzik, Andreas V. M. Herz
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