Set the attack strength for the given scanners.
962791
def set_scanner_attack_strength(self, scanner_ids, attack_strength):
        """"""
        for scanner_id in scanner_ids:
            self.logger.debug('Setting strength for scanner {0} to {1}'.format(scanner_id, attack_strength))
            result = self.zap.ascan.set_scanner_attack_strength(scanner_id, attack_strength)
            if result != 'OK':
                raise ZAPError('Error setting strength for scanner with ID {0}: {1}'.format(scanner_id, result))
407029
def attack(self, imgs, targets):
    

    batch_size = self.batch_size
    r = []
    for i in range(0, len(imgs) // batch_size):
      _logger.debug(
          ("Running EAD attack on instance %s of %s",
           i * batch_size, len(imgs)))
      r.extend(
          self.attack_batch(
              imgs[i * batch_size:(i + 1) * batch_size],
              targets[i * batch_size:(i + 1) * batch_size]))
    if len(imgs) % batch_size != 0:
      last_elements = len(imgs) - (len(imgs) % batch_size)
      _logger.debug(
          ("Running EAD attack on instance %s of %s",
           last_elements, len(imgs)))
      temp_imgs = np.zeros((batch_size, ) + imgs.shape[2:])
      temp_targets = np.zeros((batch_size, ) + targets.shape[2:])
      temp_imgs[:(len(imgs) % batch_size)] = imgs[last_elements:]
      temp_targets[:(len(imgs) % batch_size)] = targets[last_elements:]
      temp_data = self.attack_batch(temp_imgs, temp_targets)
      r.extend(temp_data[:(len(imgs) % batch_size)],
               targets[last_elements:])
    return np.array(r)
1368928
function(e) {
 	   inputEx.PasswordField.superclass.onKeyUp.call(this,e);
       if(this.options.strengthIndicator) {
          lang.later( 0, this, this.updateStrengthIndicator);
       }
     }
900311
public void setCiphers(java.util.Collection<Cipher> ciphers) {
        if (ciphers == null) {
            this.ciphers = null;
            return;
        }

        this.ciphers = new java.util.ArrayList<Cipher>(ciphers);
    }
791889
private void createAndSetFilter(final Scanner scanner) {
    QueryUtil.setDataTableScanFilter(scanner, group_bys, row_key_literals, 
        explicit_tags, enable_fuzzy_filter, 
        (end_time == UNSET
        ? -1  // Will scan until the end (0xFFF...).
        : (int) getScanEndTimeSeconds()));
  }
458815
def settargets(self):
        """"""
        # Define the set targets call. Include the path to the script, the database path and files, as well
        # as the taxonomic rank to use
        logging.info('Setting up database')
        self.targetcall = 'cd {} && ./set_targets.sh {} {} --{}'.format(self.clarkpath, self.databasepath,
                                                                        self.database, self.rank)
        #
        subprocess.call(self.targetcall, shell=True, stdout=self.devnull, stderr=self.devnull)
1319613
public void setTargets(java.util.Collection<String> targets) {
        if (targets == null) {
            this.targets = null;
            return;
        }

        this.targets = new java.util.ArrayList<String>(targets);
    }
363222
def setActivations(self, value):
        
        #if self.verify and not self.activationSet == 0:
        #    raise LayerError, \
        #          ('Activation flag not reset. Activations may have been set multiple times without any intervening call to propagate().', self.activationSet)
        Numeric.put(self.activation, Numeric.arange(len(self.activation)), value)
        self.activationSet = 1
28637
public void setSS(java.util.Collection<String> sS) {
        if (sS == null) {
            this.sS = null;
            return;
        }

        java.util.List<String> sSCopy = new java.util.ArrayList<String>(sS.size());
        sSCopy.addAll(sS);
        this.sS = sSCopy;
    }
48299
def _set_scalers(self):
        

        # Set default value for rep_scalers if None
        if self.rep_scalers is None:
            # Draw self-repellent numbers from domain
            domain = [0.8, 1, 1.2]
            gen = RepellentGenerator(domain)
            self._rep_scalers = list(gen.yield_from_domain(self.duration))
        else:
            if len(self.rep_scalers) != self.duration:
                raise ProgramError(
                    'Length of `rep_scalers` must match program duration.')
            self._rep_scalers = self.rep_scalers

        # Set default value for intensity_scalers if None
        if self.intensity_scalers is None:
            # Draw self-repellent numbers from domain
            domain = [0.95, 1, 1.05]
            gen = RepellentGenerator(domain)
            self._intensity_scalers = list(gen.yield_from_domain(self.duration))
        else:
            if len(self.intensity_scalers) != self.duration:
                raise ProgramError(
                    'Length of `intensity_scalers` must match program duration.')
            self._intensity_scalers = self.intensity_scalers
1366776
def set_scan_host_finished(self, scan_id, target, host):
        
        self.scan_collection.set_host_finished(scan_id, target, host)
744477
def _scan(positions):
    """"""
    scores = []
    for start in range(0, len(positions) - 17, 5):
        end = start = 17
        scores.add(_enrichment(positions[start:end], positions[:start], positions[end:]))
629763
@Override
    void setScanResult(final ScanResult scanResult) {
        super.setScanResult(scanResult);
        if (typeParameters != null) {
            for (final TypeParameter typeParameter : typeParameters) {
                typeParameter.setScanResult(scanResult);
            }
        }
        if (this.parameterTypeSignatures != null) {
            for (final TypeSignature typeParameter : parameterTypeSignatures) {
                typeParameter.setScanResult(scanResult);
            }
        }
        if (this.resultType != null) {
            this.resultType.setScanResult(scanResult);
        }
        if (throwsSignatures != null) {
            for (final ClassRefOrTypeVariableSignature throwsSignature : throwsSignatures) {
                throwsSignature.setScanResult(scanResult);
            }
        }
    }
405962
public void setTargets(java.util.Collection<Target> targets) {
        if (targets == null) {
            this.targets = null;
            return;
        }

        this.targets = new java.util.ArrayList<Target>(targets);
    }
350550
def _set_intvals(kws, keys):
        """"""
        for key in keys:
            if key in kws:
                kws[key] = int(kws[key])
736463
public void setArns(java.util.Collection<String> arns) {
        if (arns == null) {
            this.arns = null;
            return;
        }

        this.arns = new java.util.ArrayList<String>(arns);
    }
1253027
def set_rhs(self, rhs):
        """"""
        assert rhs.size == self.id.n
        self._refs.update(rhs=rhs)
        self.id.rhs = self.cast_array(rhs)