r"""
        Perform the algorithm

        Parameters
        ----------
        n_steps : int
            The number of throats to invaded during this step
16076
def run(self, n_steps=None):
        

        """
        if n_steps is None:
            n_steps = sp.inf

        queue = self.queue
        if len(queue) == 0:
            logger.warn('queue is empty, this network is fully invaded')
            return
        t_sorted = self['throat.sorted']
        t_order = self['throat.order']
        t_inv = self['throat.invasion_sequence']
        p_inv = self['pore.invasion_sequence']

        count = 0
        while (len(queue) > 0) and (count < n_steps):
            # Find throat at the top of the queue
            t = hq.heappop(queue)
            # Extract actual throat number
            t_next = t_sorted[t]
            t_inv[t_next] = self._tcount
            # If throat is duplicated
            while len(queue) > 0 and queue[0] == t:
                # Note: Preventing duplicate entries below might save some time
                t = hq.heappop(queue)
            # Find pores connected to newly invaded throat
            Ps = self.project.network['throat.conns'][t_next]
            # Remove already invaded pores from Ps
            Ps = Ps[p_inv[Ps] < 0]
            if len(Ps) > 0:
                p_inv[Ps] = self._tcount
                Ts = self.project.network.find_neighbor_throats(pores=Ps)
                Ts = Ts[t_inv[Ts] < 0]  # Remove invaded throats from Ts
                [hq.heappush(queue, T) for T in t_order[Ts]]
            count += 1
            self._tcount += 1
        self['throat.invasion_sequence'] = t_inv
        self['pore.invasion_sequence'] = p_inv
493127
def ystep(self):
        """

        self.Y = sp.prox_l1(self.AX + self.U,
                            (self.lmbda / self.rho) * self.wl1)
        super(ConvBPDN, self).ystep()
1237156
def M_step(self):

        

        for k in range(self.K):
            self.rho[k] = self.type_prob[:, k].sum() / self.N

        for k in range(self.K):
            for m in range(self.M):
                temp_prob = np.dot(self.type_prob[:, k],
                                   self.feature_counts[:, m])
                if temp_prob < 1e-99:
                    temp_prob = 1e-99
                self.mu[k, m] = temp_prob / np.dot(self.type_prob[:, k],
                                                   self.observations)
1256373
def __step6(self):
        
        minval = self.__find_smallest()
        for i in range(self.n):
            for j in range(self.n):
                if self.row_covered[i]:
                    self.C[i][j] += minval
                if not self.col_covered[j]:
                    self.C[i][j] -= minval
        return 4
456841
def _step00(self, in_row, tmp_row, out_row):
        
        for key, value in in_row.items():
            in_row[key] = WhitespaceCleaner.clean(value)

        return None, None
666500
def _excerpt_step(n_samples, n_excerpts=None, excerpt_size=None):
    """"""
    assert n_excerpts >= 2
    step = max((n_samples - excerpt_size) // (n_excerpts - 1),
               excerpt_size)
    return step
207552
def iteration_length(N, start=0, step=1):
    '''
    '''
    if N < 0:
        raise ValueError('N cannot be negative')

    if start < 0:
        start += N
        if start < 0:
            raise ValueError('Invalid start value')

    if step < 0:
        step = -step
        new_N = start + 1
        if new_N > N:
            raise ValueError('Invalid parameters')
        N = new_N
        start = 0

    ret = int(math.ceil((N - start) / float(step)))
    return max(0, ret)
839350
def climb_stairs(n):
    
    arr = [1, 1]
    for _ in range(1, n):
        arr.append(arr[-1] + arr[-2])
    return arr[-1]
1039503
def numSteps(self, row):
        
        param = self._parameters[row]
        return self.nStepsForParam(param)
480419
def step(self)->None:
        ""
        # weight decay outside of optimizer step (AdamW)
        if self.true_wd:
            for lr,wd,pg1,pg2 in zip(self._lr,self._wd,self.opt.param_groups[::2],self.opt.param_groups[1::2]):
                for p in pg1['params']: p.data.mul_(1 - wd*lr)
                if self.bn_wd:
                    for p in pg2['params']: p.data.mul_(1 - wd*lr)
            self.set_val('weight_decay', listify(0, self._wd))
        self.opt.step()
1231081
def step(self, observation, argmax_sampling=False):
        
        policy_params, q = self(observation)
        actions = self.action_head.sample(policy_params, argmax_sampling=argmax_sampling)

        # log probability - we can do that, because we support only discrete action spaces
        logprobs = self.action_head.logprob(actions, policy_params)

        return {
            'actions': actions,
            'q': q,
            'logprobs': policy_params,
            'action:logprobs': logprobs
        }
86001
def step1c(self):
        """"""
        if self.ends("y") and self.vowelinstem():
            self.b = self.b[: self.k] + "i" + self.b[self.k + 1 :]
933549
def batch_step(self, batch_idx=None):
        
        if batch_idx is None:
            batch_idx = self.last_batch_idx + 1
        self.last_batch_idx = batch_idx
        for param_group, lr in zip(self.optimizer.param_groups, self.get_lr()):
            param_group['lr'] = lr
4837
def step(self, count=1):
    """"""
    return self._client.send(step=sc_pb.RequestStep(count=count))
669556
def xstep(self):
        
        """

        self.X, self.ss = sp.prox_nuclear(self.S - self.Y - self.U,
                                          1/self.rho)
1075060
def step(self):
        """"""
        op = self.code[self.instruction_pointer]
        self.instruction_pointer += 1
        op(self)
362837
public void performStep() {
        // check for zeros
        for( int i = helper.x2-1; i >= helper.x1; i-- ) {
            if( helper.isZero(i) ) {
                helper.splits[helper.numSplits++] = i;
                helper.x1 = i+1;
                return;
            }
        }

        double lambda;

        if( followingScript ) {
            if( helper.steps > 10 ) {
                followingScript = false;
                return;
            } else {
                // Using the true eigenvalues will in general lead to the fastest convergence
                // typically takes 1 or 2 steps
                lambda = eigenvalues[helper.x2];
            }
        } else {
            // the current eigenvalue isn't working so try something else
            lambda = helper.computeShift();
        }

        // similar transforms
        helper.performImplicitSingleStep(lambda,false);
    }