Set torrents to minimum priority level.

        :param infohash_list: Single or list() of infohashes.
187532
def set_min_priority(self, infohash_list):
        
        data = self._process_infohash_list(infohash_list)
        return self._post('command/bottomPrio', data=data)
58906
def toggle_sequential_download(self, infohash_list):
        
        data = self._process_infohash_list(infohash_list)
        return self._post('command/toggleSequentialDownload', data=data)
843301
def priority_level_get
      hash = {}
      hash[:priority] = default_priority
      hash[:lower] = default_priority_forward_thresh_lower
      hash[:upper] = default_priority_forward_thresh_upper
      arr = config_get('interface_hsrp_group', 'priority_level', @get_args)
      if arr
        hash[:priority] = arr[0].to_i
        hash[:lower] = arr[1].to_i if arr[1]
        hash[:upper] = arr[2].to_i if arr[2]
      end
      hash
    end
289862
def info_hash_base32(self):
        
        if getattr(self, '_data', None):
            return b32encode(sha1(bencode(self._data['info'])).digest())
        else:
            raise exceptions.TorrentNotGeneratedException
1073092
def _process_infohash_list(infohash_list):
        
        if isinstance(infohash_list, list):
            data = {'hashes': '|'.join([h.lower() for h in infohash_list])}
        else:
            data = {'hashes': infohash_list.lower()}
        return data
824591
def hsrp_delay_minimum=(val)
      Feature.hsrp_enable if val
      config_set('interface', 'hsrp_delay', name: @name,
                 minimum: 'minimum', min: val, reload: '', rel: '')
    end
769638
def _LowerBoundSearch(partitions, hash_value):
        
        for i in xrange(0, len(partitions) - 1):
            if partitions[i].CompareTo(hash_value) <= 0 and partitions[i+1].CompareTo(hash_value) > 0:
                return i

        return len(partitions) - 1
425613
def get_file_listing_sha(listing_paths: Iterable) -> str:
    """"""

    return sha256(''.join(sorted(listing_paths)).encode('utf-8')).hexdigest()
1322497
def setUploadRateLimit(infoHash, bytesPerSecond)
      raise "upload rate limit must be an Integer, not a #{bytesPerSecond.class}" if bytesPerSecond && ! bytesPerSecond.is_a?(Integer)
      @handler.setUploadRateLimit(infoHash, bytesPerSecond)
    end
1344719
def setUploadRateLimit(infoHash, bytesPerSecond)
      torrentData = @torrentData[infoHash]
      if ! torrentData
        @logger.warn "Asked to set upload rate limit for a non-existent torrent #{QuartzTorrent.bytesToHex(infoHash)}"
        return
      end

      if bytesPerSecond
        if ! torrentData.upRateLimit
          torrentData.upRateLimit = RateLimit.new(bytesPerSecond, 2*bytesPerSecond, 0)
        else
          torrentData.upRateLimit.unitsPerSecond = bytesPerSecond
        end
      else
        torrentData.upRateLimit = nil
      end

      torrentData.peers.all.each do |peer|
        withPeersIo(peer, "setting upload rate limit") do |io|
          io.writeRateLimit = torrentData.upRateLimit
        end
      end
    end
822073
def _set_repositories(self, node):
        '''
        
        '''
        priority = 99

        for repo_id, repo_data in self._data.software.get('repositories', {}).items():
            if type(repo_data) == list:
                repo_data = repo_data[0]
            if repo_data.get('enabled') or not repo_data.get('disabled'):  # RPM and Debian, respectively
                uri = repo_data.get('baseurl', repo_data.get('uri'))
                if not uri:
                    continue
                repo = etree.SubElement(node, 'repository')
                if self.__grains__.get('os_family') in ('Kali', 'Debian'):
                    repo.set('alias', repo_id)
                    repo.set('distribution', repo_data['dist'])
                else:
                    repo.set('alias', repo_data['alias'])
                    if self.__grains__.get('os_family', '') == 'Suse':
                        repo.set('type', 'yast2')  # TODO: Check for options!
                    repo.set('priority', str(priority))
                source = etree.SubElement(repo, 'source')
                source.set('path', uri)  # RPM and Debian, respectively
                priority -= 1
1317073
public void setClusterInfoList(java.util.Collection<ClusterInfo> clusterInfoList) {
        if (clusterInfoList == null) {
            this.clusterInfoList = null;
            return;
        }

        this.clusterInfoList = new java.util.ArrayList<ClusterInfo>(clusterInfoList);
    }
146776
def add_priority(self, name, **attrs):
        
        return Priorities(self.requester).create(self.id, name, **attrs)
419992
def low(data, **kwargs):
    '''
    
    '''
    st_kwargs = __salt__.kwargs
    __opts__['grains'] = __grains__
    chunks = [data]
    st_ = salt.client.ssh.state.SSHHighState(
            __opts__,
            __pillar__,
            __salt__,
            __context__['fileclient'])
    for chunk in chunks:
        chunk['__id__'] = chunk['name'] if not chunk.get('__id__') else chunk['__id__']
    err = st_.state.verify_data(data)
    if err:
        return err
    file_refs = salt.client.ssh.state.lowstate_file_refs(
            chunks,
            _merge_extra_filerefs(
                kwargs.get('extra_filerefs', ''),
                __opts__.get('extra_filerefs', '')
                )
            )
    roster = salt.roster.Roster(__opts__, __opts__.get('roster', 'flat'))
    roster_grains = roster.opts['grains']

    # Create the tar containing the state pkg and relevant files.
    trans_tar = salt.client.ssh.state.prep_trans_tar(
            __context__['fileclient'],
            chunks,
            file_refs,
            __pillar__,
            st_kwargs['id_'],
            roster_grains)
    trans_tar_sum = salt.utils.hashutils.get_hash(trans_tar, __opts__['hash_type'])
    cmd = 'state.pkg {0}/salt_state.tgz pkg_sum={1} hash_type={2}'.format(
            __opts__['thin_dir'],
            trans_tar_sum,
            __opts__['hash_type'])
    single = salt.client.ssh.Single(
            __opts__,
            cmd,
            fsclient=__context__['fileclient'],
            minion_opts=__salt__.minion_opts,
            **st_kwargs)
    single.shell.send(
            trans_tar,
            '{0}/salt_state.tgz'.format(__opts__['thin_dir']))
    stdout, stderr, _ = single.cmd_block()

    # Clean up our tar
    try:
        os.remove(trans_tar)
    except (OSError, IOError):
        pass

    # Read in the JSON data and return the data structure
    try:
        return salt.utils.json.loads(stdout)
    except Exception as e:
        log.error("JSON Render failed for: %s\n%s", stdout, stderr)
        log.error(six.text_type(e))

    # If for some reason the json load fails, return the stdout
    return stdout
872778
def set_throttle(self, name):
        
        if name.lower() == "null":
            name = "NULL"
        if name.lower() == "none":
            name = ''

        if name not in self._engine.known_throttle_names:
            if self._engine._rpc.throttle.up.max(xmlrpc.NOHASH, name) == -1:
                if self._engine._rpc.throttle.down.max(xmlrpc.NOHASH, name) == -1:
                    raise error.UserError("Unknown throttle name '{}'".format(name))
            self._engine.known_throttle_names.add(name)

        if (name or "NONE") == self.throttle:
            self._engine.LOG.debug("Keeping throttle %r on torrent #%s" % (self.throttle, self._fields["hash"]))
            return

        active = self.is_active
        if active:
            self._engine.LOG.debug("Torrent #%s stopped for throttling" % (self._fields["hash"],))
            self.stop()
        self._make_it_so("setting throttle %r on" % (name,), ["throttle_name.set"], name)
        if active:
            self._engine.LOG.debug("Torrent #%s restarted after throttling" % (self._fields["hash"],))
            self.start()
1016375
def add_trackers(self, infohash, trackers):
        
        data = {'hash': infohash.lower(),
                'urls': trackers}
        return self._post('command/addTrackers', data=data)
1188708
def decrease_priority(self, infohash_list):
        
        data = self._process_infohash_list(infohash_list)
        return self._post('command/decreasePrio', data=data)