Return scheduler, based on indicated policy, with appropriate
        parameters.
344590
def _get_scheduler(self, net, policy, **scheduler_kwargs):
        
        if policy not in [CyclicLR, ReduceLROnPlateau] and \
           'last_epoch' not in scheduler_kwargs:
            last_epoch = len(net.history) - 1
            scheduler_kwargs['last_epoch'] = last_epoch

        if policy is CyclicLR and \
           'last_batch_idx' not in scheduler_kwargs:
            scheduler_kwargs['last_batch_idx'] = self.batch_idx_ - 1
        return policy(net.optimizer_, **scheduler_kwargs)
427130
def scheduled(wait=False):
    """"""
    manager.run_scheduled()
    while wait:
        # Loop and try to run scheduled crawlers at short intervals
        manager.run_scheduled()
        time.sleep(settings.SCHEDULER_INTERVAL)
1148346
def process(self, sched, coro):
        """"""

        if self.prio == priority.DEFAULT:
            self.prio = sched.default_priority
758998
boolean schedule(Runnable task,
                   ClassLoader loader,
                   long timeout)
  {
    return schedule(new RunnableItem(task, loader, timeout));
  }
734109
def schedule(self, task):
        """"""
        self.task_manager.register(task)
        self.worker_manager.dispatch(task)
309964
function(ri, Receiver, recv_url, opts) {
    var that = this;
    that.ri = ri;
    that.Receiver = Receiver;
    that.recv_url = recv_url;
    that.opts = opts;
    that._scheduleRecv();
}
418371
def at(time, callable=nil, opts={}, &block)

      do_schedule(:once, time, callable, opts, opts[:job], block)
    end
905553
def returners(opts, functions, whitelist=None, context=None, proxy=None):
    '''
    
    '''
    return LazyLoader(
        _module_dirs(opts, 'returners', 'returner'),
        opts,
        tag='returner',
        whitelist=whitelist,
        pack={'__salt__': functions, '__context__': context, '__proxy__': proxy or {}},
    )
26242
def _determine_scheduled_actions(scheduled_actions, scheduled_actions_from_pillar):
    '''
    
    '''
    tmp = copy.deepcopy(
        __salt__['config.option'](scheduled_actions_from_pillar, {})
    )
    # merge with data from state
    if scheduled_actions:
        tmp = dictupdate.update(tmp, scheduled_actions)
    return tmp
802056
def policy(self):
        
        if self.accepted_ports:
            return 'accept ' + ','.join(map(str, self.accepted_ports))
        elif self.rejected_ports:
            return 'reject ' + ','.join(map(str, self.rejected_ports))
        else:
            return ''
1066522
def createLearningRateScheduler(self, optimizer):
    
    if self.lr_scheduler_class is None:
      return None

    return self.lr_scheduler_class(optimizer, **self.lr_scheduler_params)
613226
def policy(self):
        """"""
        policies = VNXIOPolicy.get(cli=self._cli)
        ret = None
        for policy in policies:
            contained = policy.ioclasses.name
            if self._get_name() in contained:
                ret = VNXIOPolicy.get(name=policy.name, cli=self._cli)
                break
        return ret
484382
def setReturnParameter(self, name, type, namespace=None, element_type=0):
        """"""
        parameter = ParameterInfo(name, type, namespace, element_type)
        self.retval = parameter
        return parameter
22630
def handle_scheduled(self, target):
		
		if not isinstance(target, Handler):
			return target()

		return self._handle_scheduled(target)
891772
def check(actions, request, target=None):
    """"""

    policy_check = utils_settings.import_setting("POLICY_CHECK_FUNCTION")

    if policy_check:
        return policy_check(actions, request, target)

    return True
796206
def schedule(self):
        """"""
        response = requests.get(
            "https://tccna.honeywell.com/WebAPI/emea/api/v1"
            "/%s/%s/schedule" % (self.zone_type, self.zoneId),
            headers=self.client._headers()                                       # pylint: disable=no-member,protected-access
        )
        response.raise_for_status()

        mapping = [
            ('dailySchedules', 'DailySchedules'),
            ('dayOfWeek', 'DayOfWeek'),
            ('temperature', 'TargetTemperature'),
            ('timeOfDay', 'TimeOfDay'),
            ('switchpoints', 'Switchpoints'),
            ('dhwState', 'DhwState'),
        ]

        response_data = response.text
        for from_val, to_val in mapping:
            response_data = response_data.replace(from_val, to_val)

        data = json.loads(response_data)
        # change the day name string to a number offset (0 = Monday)
        for day_of_week, schedule in enumerate(data['DailySchedules']):
            schedule['DayOfWeek'] = day_of_week
        return data
1257845
def call(self, method, args={}, retry=False, retry_policy=None,
             ticket=None, **props):
        """"""
        ticket = ticket or uuid()
        reply_q = self.get_reply_queue(ticket)
        self.cast(method, args, declare=[reply_q], reply_to=ticket, **props)
        return self.AsyncResult(ticket, self)