Construct a list of BuilderConfigs.

  Construct a list of 75 Cifar10CorruptedConfig objects, corresponding to
  the 15 corruption types and 5 severities.

  Returns:
    A list of 75 Cifar10CorruptedConfig objects.
184433
def _make_builder_configs():
  
  config_list = []
  for corruption in _CORRUPTIONS:
    for severity in range(1, 6):
      config_list.append(
          Cifar10CorruptedConfig(
              name=corruption + '_' + str(severity),
              version='0.0.1',
              description='Corruption method: ' + corruption +
              ', severity level: ' + str(severity),
              corruption_type=corruption,
              severity=severity,
          ))
  return config_list
184930
def _get_corrupted_example(self, x):
    
    corruption_type = self.builder_config.corruption_type
    severity = self.builder_config.severity

    return {
        'gaussian_noise': corruptions.gaussian_noise,
        'shot_noise': corruptions.shot_noise,
        'impulse_noise': corruptions.impulse_noise,
        'defocus_blur': corruptions.defocus_blur,
        'frosted_glass_blur': corruptions.frosted_glass_blur,
        'zoom_blur': corruptions.zoom_blur,
        'fog': corruptions.fog,
        'brightness': corruptions.brightness,
        'contrast': corruptions.contrast,
        'elastic': corruptions.elastic,
        'pixelate': corruptions.pixelate,
        'jpeg_compression': corruptions.jpeg_compression,
    }[corruption_type](x, severity)
610774
private ConfigurationBuilder getQueryCacheConfig() {
      ConfigurationBuilder cfgBuilder = new ConfigurationBuilder();
      cfgBuilder
            .clustering().cacheMode(CacheMode.LOCAL)
            .transaction().transactionMode(TransactionMode.NON_TRANSACTIONAL)
            .expiration().maxIdle(ENTRY_LIFESPAN, TimeUnit.SECONDS)
            .memory().evictionType(EvictionType.COUNT).size(MAX_ENTRIES);
      return cfgBuilder;
   }
919458
def list_build_configuration_set_records(page_size=200, page_index=0, sort="", q=""):
    
    data = list_build_configuration_set_records_raw(page_size, page_index, sort, q)
    if data:
        return utils.format_json_list(data)
709402
public List<BType> getBuilderList() {
    if (externalBuilderList == null) {
      externalBuilderList = new BuilderExternalList<MType, BType, IType>(this);
    }
    return externalBuilderList;
  }
1276200
def build(self):
        
        self.defined_gates = set(STANDARD_GATE_NAMES)
        prog = self._recursive_builder(self.operation,
                                       self.gate_name,
                                       self.control_qubits,
                                       self.target_qubit)
        return prog
661012
public List<Construction> getNextConstructions() {
	List<Construction> constructions = new ArrayList<Construction>();
	for (T item : kernelItems) {
	    Construction element = item.getNext();
	    if (element != null) {
		constructions.add(element);
	    }
	}
	for (T item : nonKernelItems) {
	    Construction element = item.getNext();
	    if (element != null) {
		constructions.add(element);
	    }
	}
	return constructions;
    }
867372
public List<Resource> buildResources() {
        List<Resource> resources = new ArrayList<Resource>();
        for (ResourceBuilder builder : _resourceBuilders) {
            Resource resource = builder.build();
            if (resource != null) {
                resources.add(resource);
            }
        }
        return resources;
    }
1332723
function buildConfig(
  config, items, item, inheritableConfigs = {}, visitedItems = []
) {
  let { id } = item

  if (visitedItems.includes(id)) {
    throw new Error(`Item "${id}" has cyclic dependencies`)
  }

  let _extends = item.extends || DEFAULT
  let inheritedConfig = inheritableConfigs[_extends]
  visitedItems.push(id)

  if (!inheritedConfig) {
    let parent = findOneById(items, _extends)

    if (!parent) {
      throw new Error(`Item "${id}" tries to extend a non-existent item`)
    }

    parent = buildConfig(
      config, items, parent, inheritableConfigs, visitedItems
    )
    inheritedConfig = extractInheritableConfig(config, parent)
    inheritableConfigs[parent.id] = inheritedConfig
  }

  return mergeConfigs(inheritedConfig, item)
}
843364
private List<CmsSelectWidgetOption> getRebuildModeWidgetConfiguration() {

        List<CmsSelectWidgetOption> result = new ArrayList<CmsSelectWidgetOption>();
        String rebuildMode = getSearchIndexIndex().getRebuildMode();
        result.add(new CmsSelectWidgetOption("auto", "auto".equals(rebuildMode)));
        result.add(new CmsSelectWidgetOption("manual", "manual".equals(rebuildMode)));
        result.add(new CmsSelectWidgetOption("offline", "offline".equals(rebuildMode)));
        return result;
    }
1259648
def _build(self):
    
    if "w" not in self._initializers:
      stddev = 1 / math.sqrt(np.prod(self._shape))
      self._initializers["w"] = tf.truncated_normal_initializer(stddev=stddev)

    self._w = tf.get_variable("w",
                              shape=self._shape,
                              dtype=self._dtype,
                              initializer=self._initializers["w"],
                              partitioner=self._partitioners.get("w", None),
                              regularizer=self._regularizers.get("w", None))
    return self._w
1262970
def list_build_configurations_for_project(id=None, name=None, page_size=200, page_index=0, sort="", q=""):
    
    data = list_build_configurations_for_project_raw(id, name, page_size, page_index, sort, q)
    if data:
        return utils.format_json_list(data)
1073990
def steps_for_spec(builder, spec, processed_modules=None):
    '''
    
    '''
    if processed_modules is None:
        processed_modules = set()
    steps = []
    for module in spec.get('depends_on', []):
        if module not in processed_modules:
            processed_modules.add(module)
            steps.extend(steps_for_spec(
                builder,
                module.fbcode_builder_spec(builder),
                processed_modules
            ))
    steps.extend(spec.get('steps', []))
    return steps
210280
def configureAndBuild(self, nocompressjs=False):
        
        jsb = self.createCleanJsbConfig()
        self.buildFromJsbString(jsb, nocompressjs)
719740
private List<Config> getConfigForAllMBeans(Set<ObjectInstance> mBeanObjects) {
		List<Config> configs = new Vector<Config>();
		for (ObjectInstance objectInstance : mBeanObjects) {
			Config configMB = scanOneMBeanObject(objectInstance);
			configs.add(configMB);
		}
		return configs;
	}
725426
def builds(self, confs):
        """"""
        self._named_builds = {}
        self._builds = []
        for values in confs:
            if len(values) == 2:
                self._builds.append(BuildConf(values[0], values[1], {}, {}, self.reference))
            elif len(values) == 4:
                self._builds.append(BuildConf(values[0], values[1], values[2], values[3],
                                              self.reference))
            elif len(values) != 5:
                raise Exception("Invalid build configuration, has to be a tuple of "
                                "(settings, options, env_vars, build_requires, reference)")
            else:
                self._builds.append(BuildConf(*values))
361292
def _create_specs(self):
        

        raw_specs = self._get_raw_specs(self.config)
        spec = self._configobj_factory(infile=None,
                                       _inspec=True
                                       )

        for section, options in self.config.items():

            if section == 'global':
                continue

            if 'module' in options:
                module = options['module']
            else:
                raise ConfigMissingValue(section, 'module')

            spec.merge(self._configspec_factory(section=section,
                                                module=module,
                                                infile=raw_specs[module]
                                                )
                       )

        return spec