Convert the parameters provided by the configObj into the corresponding
        parameters from an HSTWCS object
433537
def convert_user_pars(wcspars):
    
    default_pars = default_user_wcs.copy()
    for kw in user_hstwcs_pars:
        default_pars[user_hstwcs_pars[kw]] = wcspars[kw]
    return default_pars
639362
def to_abivars(self):
        """"""
        abivars = {
            "ecuteps"   : self.ecuteps,
            "ecutwfn"   : self.ecutwfn,
            "inclvkb"   : self.inclvkb,
            "gwpara"    : self.gwpara,
            "awtr"      : self.awtr,
            "symchi"    : self.symchi,
            "nband"     : self.nband,
            #"gwcalctyp": self.gwcalctyp,
            #"fftgw"    : self.fftgw,
            "optdriver" : self.optdriver,
        }

        # Variables for the Hilber transform.
        if self.use_hilbert:
            abivars.update(self.hilbert.to_abivars())

        return abivars
1328576
def to_hash
      {}.tap { |h|
        model_class.filterrific_available_filters.each do |filter_name|
          param_value = self.send(filter_name)
          case
          when param_value.blank?
            # do nothing
          when param_value.is_a?(Proc)
            # evaluate Proc so it can be serialized
            h[filter_name] = param_value.call
          when param_value.is_a?(OpenStruct)
            # convert OpenStruct to hash
            h[filter_name] = param_value.marshal_dump
          else
            h[filter_name] = param_value
          end
        end
      }
    end
824103
function paramParser(rawParams) {
    if (rawParams === void 0) { rawParams = ''; }
    var /** @type {?} */ map = new Map();
    if (rawParams.length > 0) {
        var /** @type {?} */ params = rawParams.split('&');
        params.forEach(function (param) {
            var /** @type {?} */ eqIdx = param.indexOf('=');
            var _a = eqIdx == -1 ? [param, ''] : [param.slice(0, eqIdx), param.slice(eqIdx + 1)], key = _a[0], val = _a[1];
            var /** @type {?} */ list = map.get(key) || [];
            list.push(val);
            map.set(key, list);
        });
    }
    return map;
}
865192
def params(self):
        
        parser = JinjaInterpolationNamespace()
        parser.read(self.configuration)
        return dict(parser['params'] or {})
603327
def from_config(config):
        
        result = Parameters()
        
        if config == None or len(config) == 0:
            return result
        
        for (key, value) in config.items():
            result.put(key, value)
        
        return result
389552
private <T> T privateMarshallIntoObject(
            AttributeTransformer.Parameters<T> parameters) {

        Class<T> clazz = parameters.getModelClass();
        Map<String, AttributeValue> values = untransformAttributes(parameters);

        final DynamoDBMapperTableModel<T> model = getTableModel(clazz, parameters.getMapperConfig());
        return model.unconvert(values);
    }
707207
function getParamInfo(params, aliases) {
    var paramInfo = { converted: [], list: [], ngrefs: [] };

    _.each(params, function (param) {
        var mappedVal = aliases[param] || param;
        if (mappedVal === 'angular') {
            paramInfo.ngrefs.push(param);
        }
        else {
            paramInfo.list.push(param);
            paramInfo.converted.push(mappedVal);
        }
    });

    return paramInfo;
}
490082
function parametersToArray(parameters) {
    return zipWith(
        (name, { type, description }) => ({
            name,
            type: getTypeName(type),
            description }),
        keys(parameters),
        values(parameters));
}
1366419
def structure_attrs_fromtuple(self, obj, cl):
        # type: (Tuple, Type[T]) -> T
        """"""
        conv_obj = []  # A list of converter parameters.
        for a, value in zip(cl.__attrs_attrs__, obj):  # type: ignore
            # We detect the type by the metadata.
            converted = self._structure_attr_from_tuple(a, a.name, value)
            conv_obj.append(converted)

        return cl(*conv_obj)
438102
def from_dict(self,
                  dingos_obj_dict,
                  config_hooks=None,
                  namespace_dict=None,
                  ):
        


        # Instantiate default parameters




        if '@@ns' in dingos_obj_dict.keys():
            top_level_namespace = (namespace_dict.get(dingos_obj_dict.get('@@ns'),None),dingos_obj_dict.get('@@ns'))
        else:
            top_level_namespace = (None,None)

        if not config_hooks:
            config_hooks = {}

        datatype_extractor = config_hooks.get('datatype_extractor', (lambda io, f, i, n, d: False))

        special_ft_handler = config_hooks.get('special_ft_handler', None)

        attr_ignore_predicate = config_hooks.get('attr_ignore_predicate', None)

        force_nonleaf_fact_predicate = config_hooks.get('force_nonleaf_fact_predicate', None)

        if not namespace_dict:
            namespace_dict = {}


        namespace_uri_2_pk_mapping = dict(self._DCM['DataTypeNameSpace'].objects.values_list('uri','id'))


        if not self.is_empty():
            logger.debug("Non-empty info object %s (timestamp %s, pk %s ) is overwritten with new information" % (self.identifier,
                                                                                                                 self.timestamp,
                                                                                                                 self.pk))
            self.clear()


        # Flatten the DingoObjDict

        (flat_list, attrs) = dingos_obj_dict.flatten(attr_ignore_predicate=attr_ignore_predicate,
                                                     force_nonleaf_fact_predicate=force_nonleaf_fact_predicate,
                                                     namespace_dict=namespace_dict)



        for fact in flat_list:

            # Collect the information about all attributes relevant
            # for this node (i.e., they occur either directly on
            # the node or on an ancestor node).

            # The following code was used to generate a attribute dictionary::
            #
            #     attr_info = ExtendedSortedDict()
            #     for attr_node in attrs.keys():
            #         if fact['node_id'].startswith(attr_node):
            #            for (key, value) in attrs[attr_node].items():
            #                attr_info.chained_set(value, 'set', key, attr_node)
            #
            # The dictionary contained full information about also the attributes given
            # to ancestor nodes. So far, we have not required this
            # information for our imports, and thus simplify to a
            # dictionary that only contains the attributes directly
            # associated with the current node.
            #
            # If, at a later stage, we find we need this kind of information,
            # we will can use Django's MultiValueDict to add additional
            # information without changing the signature of the receiving
            # predicate and handler functions.


            attr_info = dict(attrs.get(fact['node_id'],[]))

            #for attr_node in attrs.keys():
            #    if fact['node_id'] == (attr_node):
            #        for (key, value) in attrs[attr_node].items():
            #            attr_info.chained_set(value, 'set', key, attr_node)


            # Fill dictionary with arguments for call to 'add_fact'

            add_fact_kargs = {}
            add_fact_kargs['fact_dt_kind'] = FactDataType.UNKNOWN_KIND
            add_fact_kargs['fact_dt_namespace_name'] = "%s-%s" % (
                self.iobject_family.name, self.iobject_family_revision.name)

            # See whether the datatype extractor has found a datatype for the value

            datatype_found = datatype_extractor(self, fact, attr_info, namespace_dict, add_fact_kargs)

            if not datatype_found:
                add_fact_kargs = {}
                add_fact_kargs['fact_dt_kind'] = FactDataType.NO_VOCAB
                add_fact_kargs['fact_dt_namespace_name'] = DINGOS_NAMESPACE_SLUG
                add_fact_kargs['fact_dt_namespace_uri'] = DINGOS_NAMESPACE_URI
            else:
                # Check whether the datatype extractor added namespace information
                # If not, add some here
                if not 'fact_dt_namespace_uri' in add_fact_kargs:
                    add_fact_kargs['fact_dt_namespace_uri'] = namespace_dict.get(
                        add_fact_kargs['fact_dt_namespace_name'], '%s/%s' % (
                            DINGOS_NAMESPACE_URI, self.iobject_family))

            add_fact_kargs['fact_term_name'] = fact['term']
            add_fact_kargs['fact_term_attribute'] = fact['attribute']
            add_fact_kargs['values'] = [fact['value']]
            add_fact_kargs['node_id_name'] = fact['node_id']
            add_fact_kargs['namespaces'] = fact['namespaces']
            add_fact_kargs['top_level_namespace'] = top_level_namespace

            handler_return_value = True

            logger.debug("Treating fact (before special handler list) %s with attr_info %s and kargs %s" % (fact, attr_info, add_fact_kargs))
            # Below, go through the handlers in the special_ft_handler list --
            # if the predicate returns True for the fact, execute the handler
            # on the fact. If a handler returns False/None, the fact is *not*
            # added. This should only be done, if the handler has added the
            # fact -- otherwise the sequence of node identifiers is messed up!

            if special_ft_handler:
                for (predicate, handler) in special_ft_handler:
                    if predicate(fact, attr_info):
                        handler_return_value = handler(self, fact, attr_info, add_fact_kargs)
                        if not handler_return_value:
                            break
            logger.debug("Treating fact (before special handler list) %s with attr_info %s and kargs %s" % (fact, attr_info, add_fact_kargs))
            if (handler_return_value == True):
                add_fact_kargs['ns_uri_dict'] = namespace_uri_2_pk_mapping
                e2f_obj = self.add_fact(**add_fact_kargs)
            elif not handler_return_value:
                continue
            else:
                e2f_obj = handler_return_value
        self.set_name()
368847
def get_parameters(self, graph=None):
        
        g = graph if graph is not None else self.tf_graph

        with g.as_default():
            with tf.Session() as self.tf_session:
                self.tf_saver.restore(self.tf_session, self.model_path)

                return {
                    'W': self.W.eval(),
                    'bh_': self.bh_.eval(),
                    'bv_': self.bv_.eval()
                }
590613
function getJavaScriptParameterList(parameters, returnType) {
    var result = []

    result.push("<table>")
    parameters.forEach(function(parameter){
        result.push("<tr>")
        result.push("<td>" + Indent2 + "<span class='parameterName'>" + parameter.name + ",</span>")
        result.push("<td><span class='tdIndent'>// " + getIdlType(parameter.type) + "</span>")
    })

    result.push("<tr>")
    result.push("<td>" + Indent2 + "<span class='parameterName'>callback</span>")
    result.push("<td><span class='tdIndent'>// function(error, " + getIdlType(returnType) + ")</span>")

    result.push("</table>")
    return result.join("\n") + Indent
}
1034890
def flattrize(hsh)
      config = {}
      hsh.to_hash.each { |k, v|
        if new_key = k.to_s.match(/\Aflattr_(.*)\z/)
          config[new_key[1]] = v
        else
          config[k] = v
        end
      }

      config
    end
1039791
def from_object(updates):
    ""
    import sys
    config = sys.modules[__name__]
    
    prefix = config.__name__.split('.')[0].upper()
    keys = [k for k in config.__dict__ if \
        k != from_object.__name__ and not k.startswith('_')]
    get_value = lambda c, k: hasattr(c, k) and getattr(c, k) or None
    for key in keys:
        prefix_key = '%s_%s' % (prefix, key)
        value = get_value(updates, prefix_key) or get_value(updates, key)
        if value: setattr(config, key, value)
686244
function getParams(args, proto, ObjName) {

    if (null == proto) {
        logger.error('No proto File Configured！');
        return {};
    } else if (typeof proto == "string") {
        if (fs.existsSync(proto)) {
            proto = ProtoBuf.loadProtoFile(proto);
        } else if (fs.existsSync(proto + ".proto")) {
            proto = ProtoBuf.loadProtoFile(proto + ".proto");
        } else {
            return {};
        }
    }

    var Obj = proto.build(ObjName);
    var msg = Obj.decode64(args);
    debug && logger.trace("Load Data From Client [ %s ]", JSON.stringify(msg));
    return msg;
}
685315
@Override
    protected Object[] convertParameters(Object[] params) {
        List<Object> converted = getBinding().getKeyBinding().getKeyParameters(Arrays.asList(params));
        return converted.toArray(new Object[converted.size()]);
    }