Return a fully-qualified project_transfer_config string.
163332
def project_transfer_config_path(cls, project, transfer_config):
        """"""
        return google.api_core.path_template.expand(
            "projects/{project}/transferConfigs/{transfer_config}",
            project=project,
            transfer_config=transfer_config,
        )
992068
function getComponentConfiguration(name) {
    var config = {};
    if (typeof projectConfig[name] === 'object') {
      config = projectConfig[name];
    }
    if (typeof componentConfig[name] === 'object') {
      if (config == null) config = {};
      config = util.extend(true, config, componentConfig[name]);
    }
    if (typeof appConfig[name] === 'object') {
      if (config == null) config = {};
      config = util.extend(true, config, appConfig[name]);
    }
    function ref(obj, str) {
      return str.split(".").reduce(function(o, x) {
        return o[x]
      }, obj);
    }

    if (config == null) {  // if it's null, we search for inner dotted configs.
      try {
        config = ref(projectConfig, name);
      } catch (e) {
      }
      try {
        config = util.extend(true, config || {}, ref(appConfig, name));
      } catch (e) {
      }
    }
    return config;
  }
82607
def getConfigFile():
    

    fileName = '.wakatime.cfg'

    home = os.environ.get('WAKATIME_HOME')
    if home:
        return os.path.join(os.path.expanduser(home), fileName)

    return os.path.join(os.path.expanduser('~'), fileName)
1232695
function exportProjectConfig(req, res, next) {
  var options = req.connectionOptions;

  forms.exportAppConfig(options, formsResultHandlers(constants.resultTypes.formProjects, req, next));
}
1359569
public function get_project_config_path() {
		$config_files = array(
			'wp-cli.local.yml',
			'wp-cli.yml',
		);

		// Stop looking upward when we find we have emerged from a subdirectory
		// installation into a parent installation
		$project_config_path = Utils\find_file_upward(
			$config_files,
			getcwd(),
			function ( $dir ) {
				static $wp_load_count = 0;
				$wp_load_path         = $dir . DIRECTORY_SEPARATOR . 'wp-load.php';
				if ( file_exists( $wp_load_path ) ) {
					++ $wp_load_count;
				}
				return $wp_load_count > 1;
			}
		);

		$this->project_config_path_debug = 'No project config found';

		if ( ! empty( $project_config_path ) ) {
			$this->project_config_path_debug = 'Using project config: ' . $project_config_path;
		}

		return $project_config_path;
	}
158473
def default_endpoint_from_config(config, option=None):
    """"""
    default_endpoint = config.get('core', {}).get('default')
    project_endpoint = config.get('project',
                                  {}).get('core',
                                          {}).get('default', default_endpoint)
    return Endpoint(
        option or project_endpoint or default_endpoint,
        default=default_endpoint,
        project=project_endpoint,
        option=option
    )
771275
def _translate_config_path(location):
    
    # getting spec path
    package_name, filename = resolve_asset_spec(location.strip())
    if not package_name:
        path = filename
    else:
        package = __import__(package_name)
        path = os.path.join(package_path(package), filename)

    return path
1025765
def project_version(full_version):
    

    project_full_version=full_version
    v = _parse_project_version(full_version)
    name = project_name()
    project_fullname = '-'.join([name,v])

    return _setenv(project_full_version=project_full_version, project_version=v,project_name=name,project_fullname=project_fullname)
229165
def charge_transfer_to_string(self):
        """"""
        ch = self.charge_transfer
        chts = ['\nCharge Transfer\n\nabsorbing atom']
        for i in range(len(ch)):
            for atom, v2 in ch[str(i)].items():
                a = ['\n', atom, '\n', 's   ', str(v2['s']), '\n',
                     'p   ', str(v2['p']), '\n',
                     'd   ', str(v2['d']), '\n',
                     'f   ', str(v2['f']), '\n',
                     'tot ', str(v2['tot']), '\n']
                chts.extend(a)
        return ''.join(chts)
929638
def get_project_root():
    """"""
    cfg = get_project_configuration()
    # At this point it can be sure that the configuration file exists
    # Now make sure the project structure exists
    for dirname in ["raw-datasets",
                    "preprocessed",
                    "feature-files",
                    "models",
                    "reports"]:
        directory = os.path.join(cfg['root'], dirname)
        if not os.path.exists(directory):
            os.makedirs(directory)

    raw_yml_path = pkg_resources.resource_filename('hwrt', 'misc/')

    # TODO: How to check for updates if it already exists?
    raw_data_dst = os.path.join(cfg['root'], "raw-datasets/info.yml")
    if not os.path.isfile(raw_data_dst):
        raw_yml_pkg_src = os.path.join(raw_yml_path, "info.yml")
        shutil.copy(raw_yml_pkg_src, raw_data_dst)

    # Make sure small-baseline folders exists
    for dirname in ["models/small-baseline", "feature-files/small-baseline",
                    "preprocessed/small-baseline"]:
        directory = os.path.join(cfg['root'], dirname)
        if not os.path.exists(directory):
            os.makedirs(directory)

    # Make sure small-baseline yml files exist
    paths = [("preprocessed/small-baseline/", "preprocessing-small-info.yml"),
             ("feature-files/small-baseline/", "feature-small-info.yml"),
             ("models/small-baseline/", "model-small-info.yml")]
    for dest, src in paths:
        raw_data_dst = os.path.join(cfg['root'], "%s/info.yml" % dest)
        if not os.path.isfile(raw_data_dst):
            raw_yml_pkg_src = os.path.join(raw_yml_path, src)
            shutil.copy(raw_yml_pkg_src, raw_data_dst)

    return cfg['root']
713628
def _config():
    '''
    
    '''
    status_url = __salt__['config.get']('nagios.status_url') or \
        __salt__['config.get']('nagios:status_url')
    if not status_url:
        raise CommandExecutionError('Missing Nagios URL in the configuration.')

    username = __salt__['config.get']('nagios.username') or \
        __salt__['config.get']('nagios:username')
    password = __salt__['config.get']('nagios.password') or \
        __salt__['config.get']('nagios:password')
    return {
        'url': status_url,
        'username': username,
        'password': password
    }
1150790
def get_config(self):
        
        # Create a dummy report object if necessary
        channels = [sect.rsplit('_')[0] for sect in self.config.sections(suffix='_channel')]
        channels.sort()
        disabled_apps = [app for app in self._config_apps.keys() if app not in self._apps]
        return u''.join([
            u"\n--- %s configuration ---" % __package__,
            u"\nConfiguration file: %s" % self.config.cfgfile,
            u"\nConfiguration directory: %s" % self.confdir,
            u"\nConfigured applications: %s" % ', '.join(self._config_apps.keys()),
            u"\nDisabled applications: %s" % ', '.join(disabled_apps) if disabled_apps else '',
            u"\nFilter fields: %s" % ', '.join(self.config.options('fields')),
            u"\nOutput channels: %s" % ', '.join(channels) if channels else u'No channels defined',
            u"\nReports: %s\n" % ', '.join(
                [section[:-7] for section in self.config.sections(suffix='_report')]
            ),
            ''
        ])
1374864
def get_config():
    """"""
    from os import environ
    from os.path import expanduser
    from pathlib import Path
    import yaml

    def pexp(p):
        try:
            return Path(p).expanduser()
        except AttributeError:
            # python 3.4
            return Path(expanduser(p))

    paths = [environ.get("METAPACK_CONFIG"), '~/.metapack.yaml', '/etc/metapack.yaml']

    for p in paths:

        if not p:
            continue

        p = pexp(p)

        if p.exists():
            with p.open() as f:
                config = yaml.safe_load(f)
                if not config:
                    config = {}

                config['_loaded_from'] = str(p)
                return config

    return None
1272609
def get_config(self,sec,opt):
    
    return string.strip(self.__cp.get(sec,opt))
790495
def get_default_config(self):
        
        config = super(RiemannHandler, self).get_default_config()

        config.update({
            'host': '',
            'port': 123,
            'transport': 'tcp',
        })

        return config
486011
def scan_config_path(cls, project, scan_config):
        """"""
        return google.api_core.path_template.expand(
            "projects/{project}/scanConfigs/{scan_config}",
            project=project,
            scan_config=scan_config,
        )
107467
def to_api_repr(self):
        """"""

        source_refs = [
            {
                "projectId": table.project,
                "datasetId": table.dataset_id,
                "tableId": table.table_id,
            }
            for table in self.sources
        ]

        configuration = self._configuration.to_api_repr()
        _helpers._set_sub_prop(configuration, ["copy", "sourceTables"], source_refs)
        _helpers._set_sub_prop(
            configuration,
            ["copy", "destinationTable"],
            {
                "projectId": self.destination.project,
                "datasetId": self.destination.dataset_id,
                "tableId": self.destination.table_id,
            },
        )

        return {
            "jobReference": self._properties["jobReference"],
            "configuration": configuration,
        }