Returns a config table.
335703
def config_table(settings):
    """"""
    table = formatting.KeyValueTable(['name', 'value'])
    table.align['name'] = 'r'
    table.align['value'] = 'l'
    table.add_row(['Username', settings['username'] or 'not set'])
    table.add_row(['API Key', settings['api_key'] or 'not set'])
    table.add_row(['Endpoint URL', settings['endpoint_url'] or 'not set'])
    table.add_row(['Timeout', settings['timeout'] or 'not set'])
    return table
206377
def get_config(self, model):
        """"""
        if not inspect.isclass(model):
            model = model.__class__
        return self.configs.get(self.get_model_name(model))
75941
def _get_config():
    '''
    
    '''
    cfg = os.path.expanduser('~/.dockercfg')
    try:
        fic = open(cfg)
        try:
            config = json.loads(fic.read())
        finally:
            fic.close()
    except Exception:
        config = {'rootPath': '/dev/null'}
    if not 'Configs' in config:
        config['Configs'] = {}
    return config
627195
function _getConfig() {
        var copy = {},
            property;

        for (property in _config) {
            if (_config.hasOwnProperty(property)) {
                copy[property] = _config[property];
            }
        }
 
        return copy;
    }
1071811
private Table getTable(String name)
   {
      Table table = m_tables.get(name);
      if (table == null)
      {
         table = EMPTY_TABLE;
      }
      return table;
   }
606666
def get_tables_and_gsis():
    
    table_names = set()
    configured_tables = get_configured_tables()
    not_used_tables = set(configured_tables)

    # Add regexp table names
    for table_instance in list_tables():
        for key_name in configured_tables:
            try:
                if re.match(key_name, table_instance.table_name):
                    logger.debug("Table {0} match with config key {1}".format(
                        table_instance.table_name, key_name))

                    # Notify users about regexps that match multiple tables
                    if table_instance.table_name in [x[0] for x in table_names]:
                        logger.warning(
                            'Table {0} matches more than one regexp in config, '
                            'skipping this match: "{1}"'.format(
                                table_instance.table_name, key_name))
                    else:
                        table_names.add(
                            (
                                table_instance.table_name,
                                key_name
                            ))
                        not_used_tables.discard(key_name)
                else:
                    logger.debug(
                        "Table {0} did not match with config key {1}".format(
                            table_instance.table_name, key_name))
            except re.error:
                logger.error('Invalid regular expression: "{0}"'.format(
                    key_name))
                sys.exit(1)

    if not_used_tables:
        logger.warning(
            'No tables matching the following configured '
            'tables found: {0}'.format(', '.join(not_used_tables)))

    return sorted(table_names)
421660
protected function getTableState()
    {
        $table  = [];
        $config = $this->config['state'];

        foreach ($this->states as $state)
        {

            if (in_array($state, array_keys($config)))
            {
                $table[] = $config[$state];
            }
        }

        $table = array_sort($table, function($value)
        {
            return $value['position'];
        });

        return $table;
    }
975450
def get_default_config_help(self):
        
        config = super(MySQLHandler, self).get_default_config_help()

        config.update({
        })

        return config
596251
def get_config(self):
        
        config = self._kwargs.copy()
        config.update({
            'metric': self.__class__.__name__,
            'name': self.name,
            'output_names': self.output_names,
            'label_names': self.label_names})
        return config
622282
def _gen_property_table(self):
        
        headers = ['Property Name', 'Type', 'Value', 'Default Value']

        table = []
        for propval in sorted(self._properties.itervalues(),
                              key=lambda pval: pval.name.upper()):
            table.append([propval.name,
                np.dtype(propval.dtype).name,
                getattr(self, propval.name),
                propval.default])

        return table, headers
1360432
def get_configuration(self):
        
        mapping = {}
        settings = self.get_settings()
        for record in self.context.getAnalyses():
            uid = record.get("service_uid")
            setting = settings.get(uid, {})
            config = {
                "partition": record.get("partition"),
                "hidden": setting.get("hidden", False),
            }
            mapping[uid] = config
        return mapping
484305
def table(self):
        """"""
        dimensions = max_dimensions(self.table_data, self.padding_left, self.padding_right)[:3]
        return flatten(self.gen_table(*dimensions))
1086251
def get_default_config(self):
        
        config = super(MySQLHandler, self).get_default_config()

        config.update({
        })

        return config
1154693
def get_config(self):
        
        # Fill this dict with config data
        return {
            'hash_name': self.hash_name,
            'dim': self.dim,
            'bin_width': self.bin_width,
            'projection_count': self.projection_count,
            'normals': self.normals
        }
633216
protected function getTables()
    {
        if (empty($this->config['tables'])) {
            return '';
        }
        $tables = [];
        // Tables specified in both tables and structureTables should only
        // export their structure. @see getStructureTables().
        $allTables = array_diff($this->config['tables'], $this->config['structureTables']);
        foreach ($allTables as $table) {
            $tables[] = escapeshellarg($table);
        }
        return implode($tables);
    }
129561
def eigen_table(self):
        """"""
        idx = ["Eigenvalue", "Variability (%)", "Cumulative (%)"]
        table = pd.DataFrame(
            np.array(
                [self.eigenvalues, self.inertia, self.cumulative_inertia]
            ),
            columns=["F%s" % i for i in range(1, self.keep + 1)],
            index=idx,
        )

        return table
770499
public Configuration[] getConfigurations(String name) {
        ArrayList<Configuration> valuesList = new ArrayList<Configuration>();

        logger.info("Getting data for {}", name);

        PreparedStatement statement = null;
        ResultSet results = null;

        try (Connection sqlConnection = sqlService.getConnection()) {

            String queryString = "SELECT * FROM " + Constants.DB_TABLE_CONFIGURATION;
            if (name != null) {
                queryString += " WHERE " + Constants.DB_TABLE_CONFIGURATION_NAME + "=?";
            }

            statement = sqlConnection.prepareStatement(queryString);
            if (name != null) {
                statement.setString(1, name);
            }

            results = statement.executeQuery();
            while (results.next()) {
                Configuration config = new Configuration();
                config.setValue(results.getString(Constants.DB_TABLE_CONFIGURATION_VALUE));
                config.setKey(results.getString(Constants.DB_TABLE_CONFIGURATION_NAME));
                config.setId(results.getInt(Constants.GENERIC_ID));
                logger.info("the configValue is = {}", config.getValue());
                valuesList.add(config);
            }
        } catch (SQLException sqe) {
            logger.info("Exception in sql");
            sqe.printStackTrace();
        } finally {
            try {
                if (results != null) {
                    results.close();
                }
            } catch (Exception e) {
            }
            try {
                if (statement != null) {
                    statement.close();
                }
            } catch (Exception e) {
            }
        }

        if (valuesList.size() == 0) {
            return null;
        }

        return valuesList.toArray(new Configuration[0]);
    }