Gets current parameters.

        Returns
        -------
        `(arg_params, aux_params)`
            A pair of dictionaries each mapping parameter names to NDArray values.
977254
def get_params(self):
        
        assert self.binded and self.params_initialized
        self._curr_module._params_dirty = self._params_dirty
        params = self._curr_module.get_params()
        self._params_dirty = False
        return params
816944
def _get_params(func, *args, **kwargs):
    
    params = dict(zip(func.func_code.co_varnames[:len(args)], args))
    if func.func_defaults:
        params.update(dict(zip(
            func.func_code.co_varnames[-len(func.func_defaults):],
            func.func_defaults)))
    params.update(kwargs)

    return params
603353
def get_available_parameters(self):
        

        # At the moment, we rely on regex to extract the list of available
        # parameters. This solution will break if the format of the output
        # changes, but this is the best option that is currently available.

        result = subprocess.check_output([self.script_executable,
                                          '--PrintHelp'], env=self.environment,
                                         cwd=self.path).decode('utf-8')

        # Isolate the list of parameters
        options = re.findall('.*Program\s(?:Options|Arguments):'
                             '(.*)General\sArguments.*',
                             result, re.DOTALL)

        global_options = subprocess.check_output([self.script_executable,
                                                  '--PrintGlobals'],
                                                 env=self.environment,
                                                 cwd=self.path).decode('utf-8')

        # Get the single parameter names
        args = []
        if len(options):
            args += re.findall('.*--(.*?)[?::|=].*', options[0], re.MULTILINE)
        if len(global_options):
            args += [k for k in re.findall('.*--(.*?)[?::|=].*',
                                           global_options, re.MULTILINE) if k
                     not in ['RngRun', 'RngSeed', 'SchedulerType',
                             'SimulatorImplementationType', 'ChecksumEnabled']]
        return sorted(args)
810991
def get_parameters(self):
        
        import argparse
        parser = argparse.ArgumentParser(add_help=False)

        # without parameter
        parser.add_argument("-i", "--interactive", action="store_true", dest="stdin_open")
        parser.add_argument("-d", "--detach", action="store_true", dest="detach")
        parser.add_argument("-t", "--tty", action="store_true", dest="tty")
        parser.add_argument("--init", action="store_true", dest="init")
        parser.add_argument("--privileged", action="store_true", dest="privileged")
        parser.add_argument("-P", "--publish-all", action="store_true", dest="publish_all_ports")
        parser.add_argument("--read-only", action="store_true", dest="read_only")
        parser.add_argument("--rm", action="store_true", dest="remove")

        # string parameter
        parser.add_argument("--entrypoint", action="store", dest="entrypoint")
        parser.add_argument("-h", "--hostname", action="store", dest="hostname")
        parser.add_argument("--name", action="store", dest="name")
        parser.add_argument("--ipc", action="store", dest="ipc_mode")
        parser.add_argument("--isolation", action="store", dest="isolation")
        parser.add_argument("--mac-address", action="store", dest="mac_address")
        parser.add_argument("-m", "--memory", action="store", dest="mem_limit")
        parser.add_argument("--network", action="store", dest="network")
        parser.add_argument("--platform", action="store", dest="platform")
        parser.add_argument("--runtime", action="store", dest="runtime")
        parser.add_argument("--stop-signal", action="store", dest="stop_signal")
        parser.add_argument("-u", "--user", action="store", dest="user")
        parser.add_argument("-w", "--workdir", action="store", dest="working_dir")

        # int parameter
        parser.add_argument("--pids-limit", action="store", dest="pids_limit", type=int)

        # list parameter
        parser.add_argument("-e", "--env", action="append", dest="env_variables")
        parser.add_argument("--cap-add", action="append", dest="cap_add")
        parser.add_argument("--cap-drop", action="append", dest="cap_drop")
        parser.add_argument("--device", action="append", dest="devices")
        parser.add_argument("--dns", action="append", dest="dns")
        parser.add_argument("--group-add", action="append", dest="group_add")
        parser.add_argument("--mount", action="append", dest="mounts")
        parser.add_argument("-v", "--volume", action="append", dest="volumes")

        # dict parameter
        parser.add_argument("-l", "--label", action="append", dest="labels")
        parser.add_argument("-p", "--publish", action="append", dest="port_mappings")

        # health
        parser.add_argument("--health-cmd", action="store", dest="health_cmd")
        parser.add_argument("--health-interval", action="store", dest="health_interval", type=int)
        parser.add_argument("--health-retries", action="store", dest="health_retries", type=int)
        parser.add_argument("--health-timeout", action="store", dest="health_timeout", type=int)
        parser.add_argument("--no-healthcheck", action="store_true", dest="no_healthcheck")

        args, _ = parser.parse_known_args(args=self.options)
        command = self.arguments

        options_dict = vars(args)

        # create Healthcheck object
        if not options_dict.pop("no_healthcheck", None):
            options_dict["healthcheck"] = Healthcheck(
                test=options_dict.pop("health_cmd", None),
                interval=options_dict.pop("health_interval", None),
                timeout=options_dict.pop("health_timeout", None),
                retries=options_dict.pop("health_retries", None)
            )
        else:
            options_dict['healthcheck'] = None

        # parse dictionary
        # {'name': 'separator'}
        with_dictionary_parameter = {'labels': '='}
        for name, separator in with_dictionary_parameter.items():
            if options_dict[name] is not None:
                dictionary = {}
                for item in options_dict[name]:
                    try:
                        key, value = item.split(separator)
                        dictionary[key] = value
                    except ValueError:
                        dictionary = options_dict[name]
                        raise ConuException('Wrong format of dictionary: {name}'.format(name=name))
                        break
                options_dict[name] = dictionary

        # parse ports
        # create dictionary according to https://docker-py.readthedocs.io/en/stable/containers.html
        if options_dict['port_mappings'] is not None:
            dictionary = {}
            for port_string in options_dict['port_mappings']:
                colon_count = port_string.count(':')
                if colon_count == 2:
                    split_array = port_string.split(':')
                    if split_array[1] == '':
                        # format - ip::containerPort
                        # create dictionary - {'1111/tcp': ('127.0.0.1', None)}
                        dictionary[split_array[2]] = (split_array[0], None)
                    else:
                        # format - ip:hostPort:containerPort
                        # create dictionary - {'1111/tcp': ('127.0.0.1', 1111)}
                        dictionary[split_array[2]] = (split_array[0], int(split_array[1]))
                elif colon_count == 1:
                    # format - hostPort:containerPort
                    # create dictionary - {'2222/tcp': 3333}
                    split_array = port_string.split(':')
                    dictionary[split_array[1]] = int(split_array[0])
                elif colon_count == 0:
                    # format - containerPort
                    # create dictionary - {'2222/tcp': None}
                    dictionary[port_string] = None
                else:
                    raise ConuException('Wrong format of port mappings')

            options_dict['port_mappings'] = dictionary

        container_parameters = DockerContainerParameters(cap_add=options_dict['cap_add'],
                                                         cap_drop=options_dict['cap_drop'],
                                                         command=command, detach=options_dict['detach'],
                                                         devices=options_dict['devices'], dns=options_dict['dns'],
                                                         entrypoint=options_dict['entrypoint'],
                                                         env_variables=options_dict['env_variables'],
                                                         group_add=options_dict['group_add'],
                                                         healthcheck=options_dict['healthcheck'],
                                                         hostname=options_dict['hostname'],
                                                         init=options_dict['init'],
                                                         ipc_mode=options_dict['ipc_mode'],
                                                         isolation=options_dict['isolation'],
                                                         labels=options_dict['labels'],
                                                         mac_address=options_dict['mac_address'],
                                                         mem_limit=options_dict['mem_limit'],
                                                         mounts=options_dict['mounts'],
                                                         name=options_dict['name'],
                                                         network=options_dict['network'],
                                                         pids_limit=options_dict['pids_limit'],
                                                         platform=options_dict['platform'],
                                                         port_mappings=options_dict['port_mappings'],
                                                         privileged=options_dict['privileged'],
                                                         publish_all_ports=options_dict['publish_all_ports'],
                                                         read_only=options_dict['read_only'],
                                                         remove=options_dict['remove'],
                                                         runtime=options_dict['runtime'],
                                                         stdin_open=options_dict['stdin_open'],
                                                         stop_signal=options_dict['stop_signal'],
                                                         tty=options_dict['tty'],
                                                         user=options_dict['user'],
                                                         volumes=options_dict['volumes'],
                                                         working_dir=options_dict['working_dir']
                                                         )

        return container_parameters
1098804
def get_params():
    
    parser = argparse.ArgumentParser()
    parser.add_argument("--connect-timeout",
                        type=float,
                        default=10.0,
                        help="ZK connect timeout")
    parser.add_argument("--run-once",
                        type=str,
                        default="",
                        help="Run a command non-interactively and exit")
    parser.add_argument("--run-from-stdin",
                        action="store_true",
                        default=False,
                        help="Read cmds from stdin, run them and exit")
    parser.add_argument("--sync-connect",
                        action="store_true",
                        default=False,
                        help="Connect synchronously.")
    parser.add_argument("--readonly",
                        action="store_true",
                        default=False,
                        help="Enable readonly.")
    parser.add_argument("--tunnel",
                        type=str,
                        help="Create a ssh tunnel via this host",
                        default=None)
    parser.add_argument("--version",
                        action="store_true",
                        default=False,
                        help="Display version and exit.")
    parser.add_argument("hosts",
                        nargs="*",
                        help="ZK hosts to connect")
    params = parser.parse_args()
    return CLIParams(
        params.connect_timeout,
        params.run_once,
        params.run_from_stdin,
        params.sync_connect,
        params.hosts,
        params.readonly,
        params.tunnel,
        params.version
    )
1221911
def load_param(params, ctx=None):
    """"""
    if ctx is None:
        ctx = mx.cpu()
    save_dict = mx.nd.load(params)
    arg_params = {}
    aux_params = {}
    for k, v in save_dict.items():
        tp, name = k.split(':', 1)
        if tp == 'arg':
            arg_params[name] = v.as_in_context(ctx)
        if tp == 'aux':
            aux_params[name] = v.as_in_context(ctx)
    return arg_params, aux_params
264717
def get_parameters(self, packet_count=None):
        
        params = super(InMemCapture, self).get_parameters(packet_count=packet_count)
        params += ['-i', '-']
        return params
841134
def get_params(self):
        
        return self.enabled, self.size, self.chunk_delay, self.start_delay
709432
def parameters(self):
        
        pyname = self.pyname
        if isinstance(pyname, pynames.ImportedName):
            pyname = pyname._get_imported_pyname()
        if isinstance(pyname, pynames.DefinedName):
            pyobject = pyname.get_object()
            if isinstance(pyobject, pyobjects.AbstractFunction):
                return pyobject.get_param_names()
147260
def params(self):
        
        paramlist = [b.params for b in self.bases if b.params.has_value]

        if len(paramlist) == 0:
            return Parameter()
        else:
            return paramlist if len(paramlist) > 1 else paramlist[0]
555730
def _get_clean_parameters(kwargs):
        
        return dict((k, v) for k, v in kwargs.items() if v is not None)
336706
def params(self):
        
        payload = self.payload
        d = {}
        for i, p in enumerate(payload["currentConfiguration"]):
            type_name = p["typeName"]
            cp = payload["configurationParameters"][i]["message"]
            name = cp["parameterName"]
            if type_name == "BTMParameterQuantity":
                try:
                    v = q(p["message"]["expression"])
                except:
                    v = q(p["message"]["value"], p["message"]["units"])
            elif type_name == "BTMParameterBoolean":
                v = p["message"]["value"]
            elif type_name == "BTMParameterEnum":
                enum = p["message"]["value"]
                enum_map = {d['message']['option']: i for i, d in enumerate(cp['options'])}
                v = cp['options'][enum_map[enum]]['message']['optionName']
            d[name] = v
        return d
458139
def get_record_params(args):
    
    name, rtype, content, ttl, priority = (
        args.name, args.rtype, args.content, args.ttl, args.priority)
    return name, rtype, content, ttl, priority
699297
def get_params(self):
        
        params = Data.get_params(self)
        params.update(BaseGraph.get_params(self))
        return params
13096
def parameters_dict(self):
        
        d = {}
        for k, v in self.__dict__.items():
            if not k.startswith("_"):
                d[k] = v
        return d
664639
def params(self):
        
        if self._GETPOST is None:
            self._GETPOST = MultiDict(self.GET)
            self._GETPOST.update(dict(self.POST))
        return self._GETPOST
528753
def params(self):
        """"""
        ret = {}
        for rd in self.decorators:
            args = rd.args
            kwargs = rd.kwargs
            if param in rd:
                is_required =  kwargs.get('required', 'default' not in kwargs)
                ret[args[0]] = {'required': is_required, 'other_names': args[1:], 'options': kwargs}

        return ret