Returns a mapping of UID -> setting
349845
def get_settings(self):
        
        settings = self.context.getAnalysisServicesSettings()
        mapping = dict(map(lambda s: (s.get("uid"), s), settings))
        return mapping
232626
private static KNXMediumSettings getMedium(String id)
	{
		if (id.equals("tp0"))
			return TPSettings.TP0;
		else if (id.equals("tp1"))
			return TPSettings.TP1;
		else if (id.equals("p110"))
			return new PLSettings(false);
		else if (id.equals("p132"))
			return new PLSettings(true);
		else if (id.equals("rf"))
			return new RFSettings(null);
		else
			throw new KNXIllegalArgumentException("unknown medium");
	}
655917
def _get_mapping(parser, mapped):
    """"""
    if mapped in parser.mappings:
        return parser.mappings[mapped]
    else:
        return mapped + ".f90"
1045085
def uid(self):
        
        if not self._uid:
            if self.config.daemon.user:
                self._uid = pwd.getpwnam(self.config.daemon.user).pw_uid
            else:
                self._uid = os.getuid()
        return self._uid
296707
def get_all(self, uids: Iterable[int]) -> Mapping[int, Record]:
        
        return {uid: self._records[uid] for uid in uids
                if uid in self._records}
396137
protected Map<String, List<Object>> toSeedMap(final String uid) {
        final List<Object> values = Collections.singletonList((Object) uid);
        final String usernameAttribute = this.usernameAttributeProvider.getUsernameAttribute();
        final Map<String, List<Object>> seed = Collections.singletonMap(usernameAttribute, values);
        if (this.logger.isDebugEnabled()) {
            this.logger.debug("Created seed map='" + seed + "' for uid='" + uid + "'");
        }
        return seed;
    }
458942
def getuname(self, uid):
        
        uid = int(uid)
        try:
            return self.uidsmap[uid]
        except KeyError:
            pass

        try:
            name = pwd.getpwuid(uid)[0]
        except (KeyError, AttributeError):
            name = "uid=%d" % uid

        self.uidsmap[uid] = name
        return name
85346
async def get_setting(self, service: str, method: str, target: str):
        
        return await self.services[service][method](target=target)
777057
public function findByUid($uid, array $querySettings = ['respectSysLanguage' => false]) {
    if ($uid && $uid > 0) {
      // Create a new query.
      $query = $this->createquery();

      // Apply the passed query settings.
      $query = $this->applyQuerySettings($query, $querySettings);

      // Set the query constraints.
      $query->matching($query->equals('uid', $uid));

      // Execute the query and get the first object.
      $result = $query->execute()->getFirst();

      return $result;
    }

    return null;
  }
219723
def set_identifier(self, uid):
        

        self.uid = uid

        self.set_unique_metadata('DC', 'identifier', self.uid, {'id': self.IDENTIFIER_ID})
1198556
def settings_get(self, block_id, settings):
        ''''''

        block = self._get_blocks([block_id.hex()])[0]

        block_header = BlockHeader()
        block_header.ParseFromString(block.header)

        try:
            settings_view = self._settings_view_factory.create_settings_view(
                block_header.state_root_hash)
        except KeyError:
            LOGGER.error(
                'Settings from block %s requested, but root hash %s was '
                'missing. Returning no setting values.',
                block_id.hex(),
                block_header.state_root_hash)
            # The state root does not exist, which may indicate a pruned root
            # from a dropped fork or an invalid state.
            return []

        result = []
        for setting in settings:
            try:
                value = settings_view.get_setting(setting)
            except KeyError:
                # if the key is missing, leave it out of the response
                continue

            result.append((setting, value))

        return result
607569
def get_uids(self, filename=None):
        
        self._update()
        return [Abook._gen_uid(self._book[entry]) for entry in self._book.sections()]
81191
def settings(self):
        
        if not self._settings:
            data = self.query(Settings.key)
            self._settings = Settings(self, data)
        return self._settings
169676
def where_uniqable(uid)
      where_sql = key_uid?(uid) ?
                      uniqable_fields.map { |r| "#{table_name}.#{r} = :uid" }.join(' OR ') :
                      "#{table_name}.#{self.primary_key} = :uid"
      where(where_sql, uid: uid)
    end
1003303
public function getMappingSetting(Mapping $inquirerMapping, $propertyName, $settingKey)
    {
        foreach ($this as $memberMapping) {
            /** @var $memberMapping Mapping */
            if ($inquirerMapping->getType()->getName() === $memberMapping->getType()->getName()
                && $inquirerMapping->getType()->getIndex()->getName() === $memberMapping->getType()->getIndex()->getName()
            ) {
                return $memberMapping->getPropertyByPath([$propertyName, $settingKey]);
            }
        }

        return null;
    }
62841
def _es_data(settings):
        
        return {k: settings[k] for k in (ConsoleWidget.SETTING_DATA_FORMATING,
                                         ConsoleWidget.SETTING_DATA_TYPE)}
449269
function setupUGID(uid, gid) {
    if (uid) {
        if (!gid) {
            gid = uid;
        }

        try {
            process.setgid(gid);
            util.log('changed gid to ' + gid);
            process.setuid(uid);
            util.log('changed uid to ' + uid);
        } catch (e) {
            util.log('Failed to set uid/gid to ' + [uid, gid].join('/') +
                ' Error: ' + e.message);
        }
    }
}