Parse the user params (-p/--params) and them as a dict.
489686
def parse_user_params(user_params):
    
    if user_params:
        params = {}
        try:
            for param in options.params.split(','):
                param_key, param_value = param.split('=', 1)
                params[param_key] = param_value
        except ValueError as e:
            sys.stdout.write("Invalid params specified. Should be in format: <key=value>[,<key=value>..]\n")
            sys.exit(1)
        return params
    else:
        return {}
282595
def _parse_hparams(hparams):
  
  prefixes = ["agent_", "optimizer_", "runner_", "replay_buffer_"]
  ret = []

  for prefix in prefixes:
    ret_dict = {}
    for key in hparams.values():
      if prefix in key:
        par_name = key[len(prefix):]
        ret_dict[par_name] = hparams.get(key)
    ret.append(ret_dict)

  return ret
1024450
def resolve_params(self, text):
        "  "
        params = MultiValueDict()
        for line in text.split('\n'):
            pair = line.split(':', 1)
            if len(pair) == 2:
                params.appendlist(pair[0].strip(), pair[1].strip())
        return params
797721
def get_parameters_as_dictionary(self, query_string):
        
        pairs = (x.split('=', 1) for x in query_string.split('&'))
        return dict((k, unquote(v)) for k, v in pairs)
195006
def user_parse(data):
        """"""
        user_ = data.get('user', {})
        yield 'id', data.get('user_nsid') or user_.get('id')
        yield 'username', user_.get('username', {}).get('_content')
        first_name, _, last_name = data.get(
            'fullname', {}).get('_content', '').partition(' ')
        yield 'first_name', first_name
        yield 'last_name', last_name
153929
def get_params(self):
        ""
        import inspect
        a = inspect.getargspec(self.__init__)[0]
        out = dict()
        for key in a[1:]:
            value = getattr(self, "_%s" % key, None)
            out[key] = value
        return out
179184
protected void parseParams(Map<String, String> params) {
        generateAlgorithm = indexOf(PARAM_ALGORITHM, DEFAULT_ALGORITHM, SUPPORTED_ALGORITHMS, params.get(PARAM_ALGORITHM));
        generateIterations = parseInt(PARAM_ITERATIONS, params.get(PARAM_ITERATIONS), DEFAULT_ITERATIONS, MINIMUM_ITERATIONS);
        generateSaltSize = parseInt(PARAM_SALTSIZE, params.get(PARAM_SALTSIZE), DEFAULT_SALTSIZE, MINIMUM_SALTSIZE);
        generateKeySize = parseInt(PARAM_KEYSIZE, params.get(PARAM_KEYSIZE), DEFAULT_KEYSIZE, MINIMUM_KEYSIZE);
    }
642853
def parse_params(params)
      args = params.split(/\s+/).map(&:strip)
      invalid_args!(args) unless args.any?

      if args[0].to_s == OEMBED_ARG # TODO: remove after deprecation cycle
        arguments_deprecation_warning(args)
        args.shift
      end

      url, *api_args = args
      ApiRequest.new(url, parse_args(api_args))
    end
225338
def define_parameters(**parameters):
    """"""
    params = []
    for key, value in parameters.items():
        param = dict(ParameterKey=key, ParameterValue=value)
        params.append(param)
    return params
1001658
def get_params_from_list(params_list):
    
    params = {}
    for i in range(0, len(params_list)):
        if '=' not in params_list[i]:
            try:
                if not isinstance(params[key], list): params[key] = [params[key]]
                params[key] += [params_list[i]]
            except KeyError:
                raise ValueError('Pass parameters like `key1=a key2=b c d key3=...`.')
        else:
            key_val = params_list[i].split('=')
            key, val = key_val
            params[key] = convert_string(val)
    return params
1372446
def parse_params(request)
      json = request.body.read
      JSON.parse(json).symbolize_keys if json.is_a?(String) && !json.empty?
    end
405026
def get_param(self):
        
        return dict(userName=self.username, sessionId=self.session_id, database=self.database)
1226522
def user_parse(data):
        """"""
        _user = data.get('oauth', {}).get('user', {})
        yield 'id', _user.get('id')
        yield 'username', _user.get('username')
        first_name, _, last_name = _user.get('display_name').partition(' ')
        yield 'first_name', first_name
        yield 'last_name', last_name
269712
def process_params(self, params):
        '''
        
        '''
        for key, val in params.items():
            if key in LAUNCH_DATA_PARAMETERS and val != 'None':
                if key == 'roles':
                    if isinstance(val, list):
                        # If it's already a list, no need to parse
                        self.roles = list(val)
                    else:
                        # If it's a ',' delimited string, split
                        self.roles = val.split(',')
                else:
                    setattr(self, key, touni(val))
            elif 'custom_' in key:
                self.custom_params[key] = touni(val)
            elif 'ext_' in key:
                self.ext_params[key] = touni(val)
365134
def _query_params(self):
        """"""
        params = {}
        if self.generation is not None:
            params["generation"] = self.generation
        if self.user_project is not None:
            params["userProject"] = self.user_project
        return params
1197045
def getparams(self, param):
        

        return list(cparam for cparam in self.values() if cparam == param)
406110
def parse_range_params(params)
      params.split(';').inject({'q' => '1'}) do |m, p|
        k, v = p.split('=', 2)
        m[k.strip] = v.strip if v
        m
      end
    end