Deletes records associated with a particular hash

    :param str hash: The hash

    :rtype int: The number of records deleted
546892
def delete_io( hash ):
    
    global CACHE_
    load_cache(True)
    record_used('cache', hash)
    num_deleted = len(CACHE_['cache'].get(hash, []))
    if hash in CACHE_['cache']:
        del CACHE_['cache'][hash]
    write_out()
    return num_deleted
1338164
def delete(options = {})
      return each({ match: '*', count: 500, max_iterations: 1_000_000, batch_size: 500 }.merge(options)) do |keys|
        @connection.del(*keys)
      end
    end
382493
def delete_by_hash(self, file_hash):
        
        full_path = self.file_path_from_hash(file_hash)

        return self.delete_by_path(full_path)
1160904
def loss_count_hash
      @loss_count_hash ||= matches.each_with_object(Hash.new(0)) { |match, hash| hash[get_match_loser(match)] += 1 }
    end
798483
def delete(path, params)
      headers = {}

      request('DELETE', path, nil, headers) do |resp|
        yield(resp) if block_given?
      end
    end
248282
def delete_one(self, id_):
                
        url = "https://api.knackhq.com/v1/objects/%s/records/%s" % (
            self.key, id_)
        res = self.delete(url)
        return res
135808
def delete_multi(self, keys):
        
        if not keys:
            return

        # We allow partial keys to attempt a delete, the backend will fail.
        current = self.current_batch
        in_batch = current is not None

        if not in_batch:
            current = self.batch()
            current.begin()

        for key in keys:
            current.delete(key)

        if not in_batch:
            current.commit()
1224663
def delete(self):
        
        del_query = self._clone()

        # The delete is actually 2 queries - one to find related objects,
        # and one to delete. Make sure that the discovery of related
        # objects is performed on the same database as the deletion.
        del_query._clear_ordering()
        connection = self.model._meta.dj_connection

        connection.connection.delete_by_query(indices=connection.database, doc_types=self.model._meta.db_table,
                                              query=del_query._build_query())
        connection.connection.indices.refresh(indices=connection.database)
        # Clear the result cache, in case this QuerySet gets reused.
        self._result_cache = None
1189664
def delete_by_pattern(pattern, count: DEFAULT_COUNT)
      result, elapsed = timed do
        digests = all(pattern: pattern, count: count)
        batch_delete(digests)
        digests.size
      end

      log_info("#{__method__}(#{pattern}, count: #{count}) completed in #{elapsed}ms")

      result
    end
456456
def delete_unless_alive
      deleted = []
      @hash.each do |key, bin|
        bin.delete_if do |tuple|
          if tuple.alive?
            false
          else
            deleted.push(tuple)
            true
          end
        end
      end
      deleted
    end
159098
public function removeQueryHash($hash)
    {
        $queryHashes =& $this->getArchive()->getByRef('query_hashes', array());
        unset($queryHashes[array_search($hash, $queryHashes)]);
        $queryHashes = array_values($queryHashes);
    }
678275
def collect_hash hash , next_level
      hash.each do |a,b|
        next_level << a
        next_level << b
      end
    end
163058
def delete(self, id):
        
        resp = self.client.accounts.delete(id)
        self.display(resp)
133085
def delete_vector(self, hash_name, bucket_keys, data):
        
        with self.redis_object.pipeline() as pipeline:
            for key in bucket_keys:
                redis_key = self._format_redis_key(hash_name, key)
                rows = [(row, pickle.loads(row).get('data'))
                        for row in self._get_bucket_rows(hash_name, key)]
                for _, id_data in rows:
                    if id_data == data:
                        break
                else:
                    # Deleted data is not present in this bucket
                    continue
                pipeline.delete(redis_key)
                pipeline.rpush(redis_key, *(row for row, id_data in rows
                                            if id_data != data))
            pipeline.execute()
66413
def delete_many(self, uris):
        
        cache_keys = (self._build_cache_key(uri) for uri in uris)
        self._delete_many(cache_keys)
364627
def hash(self, hash):
        
        self.md5 = None
        self.sha1 = None
        self.sha256 = None
        if (hash is None):
            return
        hash_seen = set()
        errors = []
        for entry in hash.split():
            (hash_type, value) = entry.split(':', 1)
            if (hash_type in hash_seen):
                errors.append("Ignored duplicate hash type %s" % (hash_type))
            else:
                hash_seen.add(hash_type)
                if (hash_type == 'md5'):
                    self.md5 = value
                elif (hash_type == 'sha-1'):
                    self.sha1 = value
                elif (hash_type == 'sha-256'):
                    self.sha256 = value
                else:
                    errors.append("Ignored unsupported hash type (%s)" %
                                  (hash_type))
        if (len(errors) > 0):
            raise ValueError(". ".join(errors))
1044952
def delete_if # :yields: [key, value]
        del_keys = keys.dup
        del_keys.delete_if { |k| yield( k, fetch( k ) ) == false }
        del_keys.each { |k| delete( k ) }
        self
    end