Return a list of hdf5 tables name PyMCsamples.
437506
def _gettables(self):
        

        groups = self._h5file.list_nodes("/")
        if len(groups) == 0:
            return []
        else:
            return [
                gr.PyMCsamples for gr in groups if gr._v_name[:5] == 'chain']
1238534
def hdu_list(self):
        
        hdu_list = fits.HDUList()

        hdu = _table_to_bintable(self.source_table)
        hdu.name = 'sources'
        hdu_list.append(hdu)

        hdu = _table_to_bintable(self.event_table)
        hdu.name = 'events'
        hdu_list.append(hdu)

        hdu = self.image
        hdu.name = 'image'
        hdu_list.append(hdu)

        return hdu_list
1288340
def get_tables(self, db_name, pattern):
    
    self.send_get_tables(db_name, pattern)
    return self.recv_get_tables()
230368
def list_tables(self):
        
        lines = output_lines(self.exec_psql('\\dt'))
        return [line.split('|') for line in lines]
170605
def get_hdrs(flds_all, **kws):
    """"""
    # Return Headers if the user explicitly lists them.
    hdrs = kws.get('hdrs', None)
    if hdrs is not None:
        return hdrs
    # User may specify a subset of fields or a column order using prt_flds
    if 'prt_flds' in kws:
        return kws['prt_flds']
    # All fields in the namedtuple will be in the headers
    return flds_all
1262819
def list_tables(self):
        
        q = 'SELECT Distinct TABLE_NAME FROM information_schema.TABLES'
        res = self.quick(q, context='MYDB', task_name='listtables', system=True)
        # the first line is a header and the last is always empty
        # also, the table names have " as the first and last characters
        return [l[1:-1]for l in res.split('\n')[1:-1]]
1185960
def get_user_tables(conn):
    """"""

    query_string = "select schemaname, relname from pg_stat_user_tables;"
    with conn.cursor() as cursor:
        cursor.execute(query_string)
        tables = cursor.fetchall()

    return tables
763338
def db_tables(name, **connection_args):
    '''
    
    '''
    if not db_exists(name, **connection_args):
        log.info('Database \'%s\' does not exist', name)
        return False

    dbc = _connect(**connection_args)
    if dbc is None:
        return []
    cur = dbc.cursor()
    s_name = quote_identifier(name)
    # identifiers cannot be used as values
    qry = 'SHOW TABLES IN {0}'.format(s_name)
    try:
        _execute(cur, qry)
    except MySQLdb.OperationalError as exc:
        err = 'MySQL Error {0}: {1}'.format(*exc.args)
        __context__['mysql.error'] = err
        log.error(err)
        return []

    ret = []
    results = cur.fetchall()
    for table in results:
        ret.append(table[0])
    log.debug(ret)
    return ret
501549
def getsubtables(self):
        """"""
        keyset = self.getkeywords()
        names = []
        for key, value in keyset.items():
            if isinstance(value, str) and value.find('Table: ') == 0:
                names.append(_do_remove_prefix(value))
        return names
1334858
def get_table_list(self, cursor):
        

        cursor.execute("""
            SELECT c.relname, c.relkind
            FROM pg_catalog.pg_class c
            LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
            WHERE c.relkind IN ('r', 'v', '')
                AND n.nspname = '%s'
                AND pg_catalog.pg_table_is_visible(c.oid)""" % self.connection.schema_name)

        return [TableInfo(row[0], {'r': 't', 'v': 'v'}.get(row[1]))
                for row in cursor.fetchall()
                if row[0] not in self.ignored_tables]
1285614
def list_tables():
    
    tables = []

    try:
        table_list = DYNAMODB_CONNECTION.list_tables()
        while True:
            for table_name in table_list[u'TableNames']:
                tables.append(get_table(table_name))

            if u'LastEvaluatedTableName' in table_list:
                table_list = DYNAMODB_CONNECTION.list_tables(
                    table_list[u'LastEvaluatedTableName'])
            else:
                break

    except DynamoDBResponseError as error:
        dynamodb_error = error.body['__type'].rsplit('#', 1)[1]

        if dynamodb_error == 'ResourceNotFoundException':
            logger.error('No tables found')
        elif dynamodb_error == 'AccessDeniedException':
            logger.debug(
                'Your AWS API keys lack access to listing tables. '
                'That is an issue if you are trying to use regular '
                'expressions in your table configuration.')
        elif dynamodb_error == 'UnrecognizedClientException':
            logger.error(
                'Invalid security token. Are your AWS API keys correct?')
        else:
            logger.error(
                (
                    'Unhandled exception: {0}: {1}. '
                    'Please file a bug report at '
                    'https://github.com/sebdah/dynamic-dynamodb/issues'
                ).format(
                    dynamodb_error,
                    error.body['message']))

    except JSONResponseError as error:
        logger.error('Communication error: {0}'.format(error))
        sys.exit(1)

    return tables
138912
def get_table_columns(self):
        """"""
        query = 'SELECT * FROM "{schema}"."{table}" limit 0'.format(table=self.table_name, schema=self.schema)
        return get_columns(self.cc, query)
144076
def get_field_names(self):
        
        field_names = []
        for table in self.tables:
            field_names.extend(table.get_field_names())
        for join_item in self.joins:
            field_names.extend(join_item.right_table.get_field_names())
        return field_names
90711
def tables(self):
        
        if self._check_db() == False:
            return
        try:
            pmodels = self._tables()
            if pmodels is None:
                return
            num = len(pmodels)
            s = "s"
            if num == 1:
                s = ""
            msg = "Found " + colors.bold(str(num)) + " table" + s + ":\n"
            msg += "\n".join(pmodels)
            self.info(msg)
        except Exception as e:
            self.err(e, "Can not print tables")
1241718
def get_table_names(engine: Engine) -> List[str]:
    
    insp = Inspector.from_engine(engine)
    return insp.get_table_names()
25180
def get_column_keys_and_names(table):
    
    ins = inspect(table)
    return ((k, c.name) for k, c in ins.mapper.c.items())
245073
def get_table_names(self, connection, schema=None, **kw):
        
        return self._get_table_or_view_names('r', connection, schema, **kw)