@classmethod
    def conn(cls):
        config = cls.config
        try:
            conn_driver_dict = {}
            conf_to_driver_map = {'host':'host',
                                  'username':'user',
                                  'password':'password',
                                  'revision_db_name':'database',
                                  'port':'port'}
            for conf_key, conf_value in config.iteritems():
                try:
                    driver_key = conf_to_driver_map[conf_key]
                    driver_value = conf_value

                    # NOTE: Vertica Python driver requires non-unicode strings
                    if isinstance(driver_value, unicode):
                        driver_value = str(driver_value)

                    conn_driver_dict[driver_key] = driver_value

                except KeyError:
                    pass

            conn = vertica_python.connect(conn_driver_dict)
        except Exception, e:
            raise DbError("Cannot connect to Vertica Db: %s\n"
                          "Ensure that the server is running and you can connect normally"
                          % e.message)

        return conn
Calculates the nonconformity score of a set of samples.
dataset/ETHPy150Open appnexus/schema-tool/schematool/db/_vertica.py/VerticaDb.conn--crossover with--dataset/ETHPy150Open donlnz/nonconformist/nonconformist/nc.py/BaseNc.calc_nc