Interpret parameters from TEAL/configObj interface as set interactively
        by the user and build the new WCS instance
169936
def run(configObj,wcsmap=None):
    

    distortion_pars = configObj['Distortion Model']

    outwcs = build(configObj['outwcs'], configObj['wcsname'],
            configObj['refimage'], undistort = configObj['undistort'],
            usecoeffs=distortion_pars['applycoeffs'], coeffsfile=distortion_pars['coeffsfile'],
            **configObj['User WCS Parameters'])
542489
def load(theTask, canExecute=True, strict=True, defaults=False):
    
    return teal(theTask, parent=None, loadOnly=True, returnAs="dict",
                canExecute=canExecute, strict=strict, errorsToTerm=True,
                defaults=defaults)
1049702
protected WComponent createUI() {
		// Check if the parameter COMPONENT_TO_LAUNCH_PARAM_KEY has been
		// configured with the name of a component to launch.

		WComponent sharedApp;

		uiClassName = getComponentToLaunchClassName();

		if (uiClassName == null) {
			sharedApp = new WText(
					"You need to set the class name of the WComponent you want to run.<br />"
					+ "Do this by setting the parameter \""
					+ COMPONENT_TO_LAUNCH_PARAM_KEY
					+ "\" in your \"local_app.properties\" file.<br />"
					+ "Eg.  <code>" + COMPONENT_TO_LAUNCH_PARAM_KEY
					+ "=com.github.bordertech.wcomponents.examples.picker.ExamplePicker</code>");

			((WText) sharedApp).setEncodeText(false);
		} else {
			UIRegistry registry = UIRegistry.getInstance();
			sharedApp = registry.getUI(uiClassName);

			if (sharedApp == null) {
				sharedApp = new WText(
						"Unable to load the component \""
						+ uiClassName
						+ "\".<br />"
						+ "Either the component does not exist as a resource in the classpath,"
						+ " or is not a WComponent.<br />"
						+ "Check that the parameter \""
						+ COMPONENT_TO_LAUNCH_PARAM_KEY
						+ "\" is set correctly.");

				((WText) sharedApp).setEncodeText(false);
			}
		}

		return sharedApp;
	}
101898
function init(options) {
  options = options || {}
  var port = options.port || 6466
  global.client = global.client || socketIOClient(`http://localhost:${port}`)
  client = global.client
  log.debug(`Started global js socketIO client for ${process.env.ADAPTER} at ${port}`)
  client.emit('join', ioid) // first join for serialization
  client.on('disconnect', client.disconnect)
  client.on('take', hasher.handle) // add listener
  
  // add methods
  client.pass = pass
  client.clientPass = clientPass
  return client
}
199766
protected void initSettingsObject() {

        Object o;

        if (CmsStringUtil.isEmpty(getParamAction())) {
            o = new CmsVfsImportExportHandler();
        } else {
            // this is not the initial call, get the job object from session
            o = getDialogObject();
        }

        if (!(o instanceof CmsElementChangeLocaleSettings)) {
            // create a new export handler object
            m_settings = new CmsElementChangeLocaleSettings();
        } else {
            // reuse export handler object stored in session
            m_settings = (CmsElementChangeLocaleSettings)o;
        }

    }
730783
def _make_wcsgeom_from_config(config):
        """"""

        binning = config['binning']
        binsz = binning['binsz']
        coordsys = binning.get('coordsys', 'GAL')
        roiwidth = binning['roiwidth']
        proj = binning.get('proj', 'AIT')
        ra = config['selection']['ra']
        dec = config['selection']['dec']
        npix = int(np.round(roiwidth / binsz))
        skydir = SkyCoord(ra * u.deg, dec * u.deg)

        wcsgeom = WcsGeom.create(npix=npix, binsz=binsz,
                                 proj=proj, coordsys=coordsys,
                                 skydir=skydir)
        return wcsgeom
709995
function( wcs, options, callback ) {
	if ( typeof options === 'function' ) {
		callback = options;
		options = null;
	}
	if ( !Array.isArray( wcs ) ) {
		wcs = [wcs];
	}
	options = options || {};
	addExtraOptions( [ 'force', 'quiet', 'revision', 'depth', 'ignoreExternals' ], options );
	executeSvn( [ 'update' ].concat( wcs ), options, callback );
}
1155345
function build(argv, skyPagesConfig, webpack) {

  const lintResult = tsLinter.lintSync();
  const isAot = skyPagesConfig &&
    skyPagesConfig.skyux &&
    skyPagesConfig.skyux.compileMode === 'aot';

  if (lintResult.exitCode > 0) {
    return Promise.reject(lintResult.errors);
  } else {
    localeAssetsProcessor.prepareLocaleFiles();
    const name = argv.serve ? buildServe : buildCompiler;

    return name(argv, skyPagesConfig, webpack, isAot);
  }
}
258752
private void buildGui(RibbonBarInfo barInfo, MapWidget mapWidget) {
		if (null == barInfo) {
			throw new IllegalArgumentException("RibbonBarLayout cannot be built without RibbonBarInfo configuration.");
		}
		for (RibbonGroupInfo groupInfo : barInfo.getGroups()) {
			RibbonGroupLayout group = new RibbonGroupLayout(groupInfo.getTitle());
			for (RibbonColumnInfo columnInfo : groupInfo.getColumns()) {
				RibbonColumn ribbonColumn = RibbonColumnRegistry.getRibbonColumn(columnInfo.getType(),
						columnInfo.getTools(), columnInfo.getParameters(), mapWidget);
				if (ribbonColumn != null) {
					group.addColumn(ribbonColumn);
				}
			}
			addGroup(group);
		}
	}
1128157
private void buildUI() {

		// Attribute select:
		attributeSelect = new SelectItem("attributeItem");
		attributeSelect.setWidth(140);
		attributeSelect.setShowTitle(false);
		attributeSelect.setValueMap(getSearchableAttributes(layer));
		attributeSelect.setHint(I18nProvider.getSearch().gridChooseAttribute());
		attributeSelect.setShowHintInField(true);

		attributeSelect.setValidateOnChange(true);
		attributeSelect.setShowErrorStyle(true);
		attributeSelect.setRequired(true);

		// Operator select:
		operatorSelect = new SelectItem("operatorItem");
		operatorSelect.setDisabled(true);
		operatorSelect.setWidth(140);
		operatorSelect.setShowTitle(false);

		operatorSelect.setValidateOnChange(true);
		operatorSelect.setShowErrorStyle(true);
		operatorSelect.setRequired(true);

		// Value form item:
		valueItem = new AttributeFormItem("valueItem");
		valueItem.setShowTitle(false);
		valueItem.setDisabled(true);
		valueItem.setWidth(150);

		// Mechanisms:
		attributeSelect.addChangedHandler(new ChangedHandler() {

			public void onChanged(ChangedEvent event) {
				selectedAttribute = getSelectedAttribute();
				if (selectedAttribute != null) {
					// Adjust operator value map and enabled:
					operatorSelect.setDisabled(false);
					String[] operators = getOperatorsForAttributeType(selectedAttribute);
					operatorSelect.setValueMap(operators);
					operatorSelect.setValue(operators[0]);

					// Adjust value form item and enable:
					valueItem.setAttributeInfo(selectedAttribute);
					valueItem.setDisabled(false);
					valueItem.setWidth(form.getWidth() - 290);
				}
			}
		});

		// Finalize:
		form = new DynamicForm();
		form.setNumCols(6);
		form.setHeight(26);
		form.setWidth100();
		form.setFields(attributeSelect, operatorSelect, valueItem);
		addChild(form);
	}
1106648
def setConnStringForWindows():
    
    global _dbConnectString
    from peek_platform.file_config.PeekFileConfigABC import PeekFileConfigABC
    from peek_platform.file_config.PeekFileConfigSqlAlchemyMixin import \
        PeekFileConfigSqlAlchemyMixin
    from peek_platform import PeekPlatformConfig

    class _WorkerTaskConfigMixin(PeekFileConfigABC,
                           PeekFileConfigSqlAlchemyMixin):
        pass

    PeekPlatformConfig.componentName = peekWorkerName

    _dbConnectString = _WorkerTaskConfigMixin().dbConnectString
518599
function( wc, options, callback ) {
	if ( typeof options === 'function' ) {
		callback = options;
		options = null;
	}
	options = options || {};
	addExtraOptions( [ 'quiet', 'depth' ], options );
	executeSvnXml( [ 'status', wc ], options, callback );
}
714164
def start
      resolve_parameters

      version_info = version_info @service, @version
      env_variables = version_info["envVariables"] || {}
      beta_settings = version_info["betaSettings"] || {}
      cloud_sql_instances = beta_settings["cloud_sql_instances"] || []
      image = version_info["deployment"]["container"]["image"]

      config = build_config command, image, env_variables, cloud_sql_instances
      file = ::Tempfile.new ["cloudbuild_", ".json"]
      begin
        ::JSON.dump config, file
        file.flush
        Util::Gcloud.execute [
            "builds", "submit",
            "--no-source",
            "--config=#{file.path}",
            "--timeout=#{@timeout}"]
      ensure
        file.close!
      end
    end
1064244
function (options) {
  var userOptions = options || {};
  var configFile = userOptions.configFile;

  var compile = through.obj(function (file, encoding, cb) {

    if (file.isNull()) {
      return cb();
    }
    if (file.isStream()) {
      this.emit('error', new PluginError(PLUGIN_NAME, 'Streams are not supported!'));
      return cb();
    }

    // load our config from sassLint and the user provided options if available
    file.sassConfig = lint.getConfig(userOptions, configFile);
    // save the config file within the file object for access when this file is piped around
    file.userOptions = userOptions;
    file.configFile = configFile;

    // lint the file and pass the user defined options and config path to sass lint to handle
    try {
      file.sassLint = [
        lint.lintFileText({
          'text': file.contents,
          'format': path.extname(file.path).replace('.', ''),
          'filename': path.relative(process.cwd(), file.path)
        }, userOptions, configFile)];
    } catch(e) {
      this.emit('error', new PluginError(PLUGIN_NAME, e.message));
    }

    this.push(file);
    cb();
  });
  return compile;
}
1026445
private void buildUI() {

		// Attribute select:
		attributeSelect = new SelectItem("attributeItem");
		attributeSelect.setWidth(140);
		attributeSelect.setShowTitle(false);
		attributeSelect.setValueMap(org.geomajas.gwt.client.widget.attribute.AttributeCriterionPane.
				getSearchableAttributes(layer));
		attributeSelect.setHint(I18nProvider.getSearch().gridChooseAttribute());
		attributeSelect.setShowHintInField(true);

		attributeSelect.setValidateOnChange(true);
		attributeSelect.setShowErrorStyle(true);
		attributeSelect.setRequired(true);

		// Operator select:
		operatorSelect = new SelectItem("operatorItem");
		operatorSelect.setDisabled(true);
		operatorSelect.setWidth(140);
		operatorSelect.setShowTitle(false);

		operatorSelect.setValidateOnChange(true);
		operatorSelect.setShowErrorStyle(true);
		operatorSelect.setRequired(true);

		// Value form item:
		valueItem = new AttributeFormItem("valueItem");
		valueItem.setShowTitle(false);
		valueItem.setDisabled(true);
		valueItem.setWidth(150);

		// Mechanisms:
		attributeSelect.addChangedHandler(new ChangedHandler() {
			public void onChanged(ChangedEvent event) {
				attributeChanged();
			}
		});

		// Finalize:
		DynamicForm form = new DynamicForm();
		form.setNumCols(6);
		form.setHeight(26);
		form.setFields(attributeSelect, operatorSelect, valueItem);
		addChild(form);
	}
199029
private Arguments createProgramArguments(TwillContext context, Map<String, String> configs) {
    Map<String, String> args = ImmutableMap.<String, String>builder()
      .put(ProgramOptionConstants.INSTANCE_ID, Integer.toString(context.getInstanceId()))
      .put(ProgramOptionConstants.INSTANCES, Integer.toString(context.getInstanceCount()))
      .put(ProgramOptionConstants.RUN_ID, context.getApplicationRunId().getId())
      .putAll(Maps.filterKeys(configs, Predicates.not(Predicates.in(ImmutableSet.of("hConf", "cConf")))))
      .build();

    return new BasicArguments(args);
  }
1374566
private T buildInstance(CommandLine cli) {
    String[] constructorArgs = new String[this.constructor.getParameterTypes().length];
    for (Option option : cli.getOptions()) {
      if (this.constructoArgumentsMap.containsKey(option.getOpt())) {
        int idx = this.constructoArgumentsMap.get(option.getOpt());
        constructorArgs[idx] = option.getValue();
      }
    }

    T embeddedGobblin;
    try {
      embeddedGobblin = this.constructor.newInstance((Object[]) constructorArgs);
      return embeddedGobblin;
    } catch (IllegalAccessException | InvocationTargetException | InstantiationException exc) {
      throw new RuntimeException("Could not instantiate " + this.klazz.getName(), exc);
    }
  }