Dynamic Switch
        Set the sampler parameters for dynamic back off
    Inputs :
        max_steps :
            maximum back-off steps to be taken
    Optional Inputs: 
        opts : ({})
        dictionary containing fancy options
323903
def dynamic(self, max_steps, opts={}):
        
        self._dynamic = True

        # begin checks      
        try : 
            self._max_steps = int(max_steps)
        except :
            raise TypeError("input 1 (max_steps) has to be an integer")
            return 0
        try : 
            assert self._max_steps >= 0
        except : 
            raise Warning("input 1 (max_steps) has to be non-negative. Setting (max_steps) to 0.")
            self._max_steps = 0

        self._opts = opts
735560
def limit_step(self, step):
        """"""
        if self.qmax is None:
            return step
        else:
            return np.clip(step, -self.qmax, self.qmax)
922008
def choose(self, prompt, items, default=None):
        
        if default is not None and (default >= len(items) or default < 0):
            raise IndexError
        prompt = prompt if prompt is not None else "Choose from following:"
        self.show(prompt + '\n')
        self.show("\n".join(number(items)))  # show the items
        prompt = "Enter number of chosen item"
        prompt += " [{0}]: ".format(default) if default is not None else ': '
        return items[self.input(
            curry(filter_int, default=default, start=0, stop=len(items)),
            prompt
        )]
179117
def adjust_opts(in_opts, config):
    
    memory_adjust = config["algorithm"].get("memory_adjust", {})
    out_opts = []
    for opt in in_opts:
        if opt.startswith("-Xmx") or (opt.startswith("-Xms") and memory_adjust.get("direction") == "decrease"):
            arg = opt[:4]
            opt = "{arg}{val}".format(arg=arg,
                                      val=adjust_memory(opt[4:],
                                                        memory_adjust.get("magnitude", 1),
                                                        memory_adjust.get("direction"),
                                                        maximum=memory_adjust.get("maximum")))
        out_opts.append(opt)
    return out_opts
143900
def create_sampler(self, inputs, targets, input_reader=None, target_reader=None, 
        input_transform=None, target_transform=None, co_transform=None,
        input_return_processor=None, target_return_processor=None, co_return_processor=None):
        
        pass
1198187
def _expand_inputs(step, steps=None):
    
    if steps is None:
        steps = set()

    for arg in step._kwargs.values():
        if isinstance(arg, Step):
            _expand_inputs(arg, steps=steps)
        elif util.is_instance_collection(arg, Step):
            for s in util.get_collection_values(arg):
                _expand_inputs(s, steps=steps)

    steps.add(step)
    return steps
921612
def global_option_proc(switches, &block)
      lambda do |value|
        unless active_command.nil?
          active_command.proxy_options << [Runner.switch_to_sym(switches.last), value]
        end
        yield value if block && !value.nil?
      end
    end
909652
public static int cudnnSoftmaxBackward(
        cudnnHandle handle, 
        int algo, 
        int mode, 
        Pointer alpha, 
        cudnnTensorDescriptor yDesc, 
        Pointer y, 
        cudnnTensorDescriptor dyDesc, 
        Pointer dy, 
        Pointer beta, 
        cudnnTensorDescriptor dxDesc, 
        Pointer dx)
    {
        return checkResult(cudnnSoftmaxBackwardNative(handle, algo, mode, alpha, yDesc, y, dyDesc, dy, beta, dxDesc, dx));
    }
1190529
def option_set ( opt_form, opt_app )
      if opt_app.param then
	# option parameter buit-in option name by '='
	if opt_form[:n].include? '=' then
	  opt_app.value = opt_form[:n].split('=')[-1]
	  return ''
	end
	# option parameter buit-in option name
	if opt_form[:t] == OPTION_PREFIX_SHORT and
	   opt_form[:n].length > opt_app.shortname.length then
	  opt_app.value = opt_form[:n][opt_app.shortname.length, opt_form[:n].length - opt_app.shortname.length]
	  return ''
	end
	# option parameter present in next ARGV.
	if opt_form[:i].next >= ARGV.size then
          puts "fatal error: unable to find argument for option '#{opt_form[:n]}'."
          exit
	end
	# if next argument is a option.
	arg = ARGV[opt_form[:i].next]
        if getopt( arg )[:n] != '' then
          puts "fatal error: miss argument for option '#{opt_form[:t]}#{opt_form[:n]}'."
          exit
        end
	opt_app.value = arg
	return arg
      else
	opt_app.value = true
      end
      return ''
    end
141779
def add_step(self, setting, duration):
        
        if len(self._prog_steps) < 10:
            self._prog_steps.append(ProgramStep(self, setting, duration))
        else:
            raise IndexError("Maximum of 10 steps are allowed")
763567
def options_policy(skip_invalid, warn_on_skip):
    
    settings = (Options.skip_invalid, Options.warn_on_skip)
    (Options.skip_invalid, Options.warn_on_skip) = (skip_invalid, warn_on_skip)
    yield
    (Options.skip_invalid, Options.warn_on_skip) = settings
206298
def _prepare_sort_options(self, has_pk):
        
        sort_options = {}
        if self._sort is not None and not has_pk:
            sort_options.update(self._sort)
        if self._sort_limits is not None:
            if 'start' in self._sort_limits and 'num' not in self._sort_limits:
                self._sort_limits['num'] = -1
            elif 'num' in self._sort_limits and 'start' not in self._sort_limits:
                self._sort_limits['start'] = 0
            sort_options.update(self._sort_limits)
        if not sort_options and self._sort is None:
            sort_options = None
        return sort_options
1319506
def predict_maxprob(self, x, **kwargs):
        
        return self.base_estimator_.predict(x.values, **kwargs)
528766
def _init_default_values(self):
        
        # Do not filter out invalid event values
        self["filtering"]["remove invalid events"] = False
        # Enable filters switch is mandatory
        self["filtering"]["enable filters"] = True
        # Limit events integer to downsample output data
        self["filtering"]["limit events"] = 0
        # Polygon filter list
        self["filtering"]["polygon filters"] = []
        # Defaults to no hierarchy parent
        self["filtering"]["hierarchy parent"] = "none"
        # Check for missing min/max values and set them to zero
        for item in dfn.scalar_feature_names:
            appends = [" min", " max"]
            for a in appends:
                self["filtering"][item + a] = 0
219693
def setMaxRandom(self, value):
        
        self._maxRandom = value
        for layer in self.layers:
            layer._maxRandom = value
761727
def fix_config(self, options):
        
        options = super(ForLoop, self).fix_config(options)

        opt = "min"
        if opt not in options:
            options[opt] = 1
        if opt not in self.help:
            self.help[opt] = "The minimum for the loop (included, int)."

        opt = "max"
        if opt not in options:
            options[opt] = 10
        if opt not in self.help:
            self.help[opt] = "The maximum for the loop (included, int)."

        opt = "step"
        if opt not in options:
            options[opt] = 1
        if opt not in self.help:
            self.help[opt] = "The step size (int)."

        return options
263280
def set_bpp(self, bpp):
        
        self.bpp = bpp
        self.maxc = 2 ** self.bpp - 1
        self._set_dtype()
        self.calc_cmap()
        self.recalc(callback=False)