调用 LeanEngine 上的远程代码
    :param name: 需要调用的远程 Cloud Code 的名称
    :type name: string_types
    :param params: 调用参数
    :return: 调用结果
198344
def run(_cloud_func_name, **params):
    
    response = leancloud.client.post('/functions/{0}'.format(_cloud_func_name), params=params)
    content = response.json()
    return utils.decode(None, content)['result']
93640
async def AddCloud(self, cloud, name):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Cloud',
                   request='AddCloud',
                   version=3,
                   params=_params)
        _params['cloud'] = cloud
        _params['name'] = name
        reply = await self.rpc(msg)
        return reply
871813
def param(self, name, default=None):
        ''''''
        if not name in self.params:
            return default
        return self.params[name]
175764
private static CloudErrorType toCloudErrorType(String code) {
        if ("Throttling".equals(code)) {
            return CloudErrorType.THROTTLING;
        } else if ("TooManyBuckets".equals(code)) {
            return CloudErrorType.QUOTA;
        } else if ("SignatureDoesNotMatch".equals(code)) {
            return CloudErrorType.AUTHENTICATION;
        } else {
            return CloudErrorType.GENERAL;
        }
    }
26258
def formatted_param_type(ptype):
    """"""
    pt_name = ptype["name"]
    if pt_name.startswith("<byname>"):
        pt_name = pt_name.replace("<byname>[", "=> ")[:-1]
    elif pt_name.startswith("<repeated>"):
        pt_name = pt_name.replace("<repeated>[", "")[:-1] + "*"
    return pt_name
648511
function Param(name,defaults,typ){
	// could have introduced bugs by moving back to identifier here
	this._traversed = false;
	this._name = name;
	this._defaults = defaults;
	this._typ = typ;
	this._variable = null;
}
1272505
def types(cls, **kwargs):
    """"""
    named = {name: factory(Arguments._fields.index(name), name)
             for name, factory in six.iteritems(kwargs)}
    return cls(**named)
279154
def _set_bucket(self, type, name):
        
        if type:
            self._cfg['bucket_type'] = type
        if name:
            self._cfg['bucket_name'] = name
        self.bucket = self._client.bucket_type(self._cfg['bucket_type']
                                               ).bucket(self._cfg['bucket_name'])
        self.index_name = "%s_%s" % (self._cfg['bucket_type'], self._cfg['bucket_name'])
        return self
277479
def getParamsByName(elem, name):
	
	name = StripParamName(name)
	return elem.getElements(lambda e: (e.tagName == ligolw.Param.tagName) and (e.Name == name))
263422
def mimetype_params(self):
        

        def on_update(d):
            self.headers["Content-Type"] = dump_options_header(self.mimetype, d)

        d = parse_options_header(self.headers.get("content-type", ""))[1]
        return CallbackDict(d, on_update)
1372027
def get_type_data(name):
    
    name = name.upper()
    try:
        return {
            'authority': 'okapia.net',
            'namespace': 'string match types',
            'identifier': name,
            'domain': 'String Match Types',
            'display_name': STRING_MATCH_TYPES[name] + ' String Match Type',
            'display_label': STRING_MATCH_TYPES[name],
            'description': ('The string match type for the ' +
                            STRING_MATCH_TYPES[name])
        }
    except KeyError:
        raise NotFound('String Type: ' + name)
980361
def get_type_name(type_):
    

    if type_ is None:
        return ""
    if isinstance(type_, string_types):
        return type_
    elif isinstance(type_, list):
        assert len(type_) == 1
        return "[%s]" % get_type_name(type_[0])
    elif isinstance(type_, dict):
        assert len(type_) == 1
        key, value = list(type_.items())[0]
        return "{%s: %s}" % (get_type_name(key), get_type_name(value))
    elif type_.__module__ in ("__builtin__", "builtins"):
        return type_.__name__
    else:
        return "%s.%s" % (type_.__module__, type_.__name__)
340533
def type_name(cls):
        
        if cls.__type_name__:
            type_name = cls.__type_name__.lower()
        else:
            camelcase = re.compile(r'([a-z])([A-Z])')
            ccase = lambda s: camelcase.sub(lambda v: '{0}_{1}'.format(v.group(1), v.group(2)), s)

            type_name = ccase(cls.__name__)
            # trim to less than 48 characters or cassandra will complain
            type_name = type_name[-48:]
            type_name = type_name.lower()
            type_name = re.sub(r'^_+', '', type_name)
            cls.__type_name__ = type_name

        return type_name
368693
def valid_params?(name, size)
      return raise TypeError.new("A 'name' should be a string") if name.class != String
      return raise TypeError.new("A 'size' should be an integer") if size.class != Integer

      true
    end
530334
public TypeName findParameterType(String name) {
		for (Pair<String, TypeName> item : parameters) {
			if (item.value0.equals(name)) {
				return item.value1;
			}
		}
		return null;
	}
1142558
def getParam(self, name=None):
        
        if 'parameters' in self.keys():
            l = {x['name']: x['value'] for x in self['parameters'].values()}
            if name:
                if name in l.keys():
                    return l[name]
                else:
                    return False
            else:
                return l
1153913
def get_param_names
      code, message, value = @server.call("getParamNames", @caller_id)
      case code
      when 1
        return value
      when -1
        raise message
      else
        return false
      end
    end