Determines whether this Data has partition hash or not.

        :return: (bool), ``true`` if Data has partition hash, ``false`` otherwise.
489423
def has_partition_hash(self):
        
        return self._buffer is not None \
               and len(self._buffer) >= HEAP_DATA_OVERHEAD \
               and unpack_from(FMT_BE_INT, self._buffer, PARTITION_HASH_OFFSET)[0] != 0
166584
def exists(self, **kwargs):
        """"""
        kwargs.pop('partition', None)
        kwargs['transform_name'] = True
        return self._exists(**kwargs)
1271124
def is_zonefile_cached( zonefile_hash, zonefile_dir, validate=False):
    
    zonefile_path = atlas_zonefile_path(zonefile_dir, zonefile_hash)
    zonefile_path_legacy = atlas_zonefile_path_legacy(zonefile_dir, zonefile_hash)

    res = False
    for zfp in [zonefile_path, zonefile_path_legacy]:
        
        if not os.path.exists(zfp):
            continue

        if validate:
            data = _read_atlas_zonefile(zfp, zonefile_hash)
            if data:
                # yup!
                res = True
                break

        else:
            res = True
            break

    return res
782697
def IsNTFS(self):
    
    tsk_fs_type = self.GetFsType()
    return tsk_fs_type in [
        pytsk3.TSK_FS_TYPE_NTFS, pytsk3.TSK_FS_TYPE_NTFS_DETECT]
1196676
private boolean hasHashChanged(Set<RegData> regData) {
        for (RegData el : regData) {
            if (hasHashChanged(mHasher, el)) {
                return true;
            }
        }
        return false;
    }
845079
private boolean hasHashChanged(Set<RegData> regData) {
        for (RegData el : regData) {
            if (hasHashChanged(mHasher, el)) {
                Log.d("CHANGED", el.getURLExternalForm());
                return true;
            }
        }
        return false;
    }
329004
public boolean hasDataRecords() {
		long blkNum = (Long) getVal(OFFSET_TS_BLOCKID, BIGINT).asJavaVal();
		return blkNum != NO_SLOT_BLOCKID ? true : false;
	}
264356
public function hasUniqueHash()
    {
        $hash = $this->hashWorkingRecord->{$this->hashDbField} ?: $this->encrypt();

        $list = $this->hashWorkingRecord->get()->filter($this->hashDbField, $hash);

        if($this->hashWorkingRecord->ID) {
            $list = $list->exclude('ID', $this->hashWorkingRecord->ID);
        }

        return !($list->exists());
    }
892850
def is_contains(self, data):
        
        if not data:
            return False
        data = self._compress_by_md5(data)
        result = True
        # cut the first two place,route to different block by block_num
        name = self.key + str(int(data[0:2], 16) % self.block_num)
        for h in self.hash_function:
            local_hash = h.hash(data)
            result = result & self.server.getbit(name, local_hash)
        return result
576644
def Equals(self, other):
        
        if other is None:
            return False
        if other.PrevHash.ToBytes() == self.PrevHash.ToBytes() and other.PrevIndex == self.PrevIndex:
            return True
        return False
575297
def exists?(type, hash)
      if directory(type, hash) &&
         directory(type, hash).files.head(key_component(type, hash))
        true
      else
        false
      end
    end
867017
def p2pkh?
      return false unless chunks.size == 5
      [OP_DUP, OP_HASH160, OP_EQUALVERIFY, OP_CHECKSIG] ==
          (chunks[0..1]+ chunks[3..4]).map(&:ord) && chunks[2].bytesize == 21
    end
230996
def check_partition():
    
    
    all_index           = walk_data(sess, oid_hrStorageIndex, helper)[0]
    all_descriptions    = walk_data(sess, oid_hrStorageDescr, helper)[0]
    # we need the sucess flag for the error handling (partition found or not found)
    sucess              = False

    # here we zip all index and descriptions to have a list like
    # [('Physical memory', '1'), ('Virtual memory', '3'), ('/', '32'), ('/proc/xen', '33')]
    zipped = zip(all_index, all_descriptions)
    
    for partition in zipped:
        index       = partition[0]
        description = partition[1]
        
        if partition_found(disk, description):
            # we found the partition
            sucess = True

            # receive all values we need
            unit    =   float(get_data(sess, oid_hrStorageAllocationUnits + "." + index, helper))
            size    =   float(get_data(sess, oid_hrStorageSize + "." + index, helper))
            used    =   float(get_data(sess, oid_hrStorageUsed + "." + index, helper))

            if size == 0 or used == 0:
                # if the host return "0" as used or size, then we have a problem with the calculation (devision by zero)
                helper.exit(summary="Received value 0 as StorageSize or StorageUsed: calculation error", exit_code=unknown, perfdata='')

            # calculate the real size (size*unit) and convert the results to the target unit the user wants to see
            used_result     = convert_to_XX(calculate_real_size(used), unit, targetunit)
            size_result     = convert_to_XX(calculate_real_size(size), unit, targetunit)
            
            # calculation of the used percentage
            percent_used    = used_result / size_result * 100
            
            # we need a string and want only two decimals
            used_string     = str(float("{0:.2f}".format(used_result)))
            size_string     = str(float("{0:.2f}".format(size_result)))
            percent_string  = str(float("{0:.2f}".format(percent_used)))
            
            if percent_used < 0 or percent_used > 100:
                # just a validation that percent_used is not smaller then 0% or lager then 100%                
                helper.exit(summary="Calculation error - second counter overrun?", exit_code=unknown, perfdata='')                   
            
            # show the summary
            helper.add_summary("%s%% used (%s%s of %s%s) at '%s'" % (percent_string, used_string, targetunit, size_string, targetunit, description))
            # add the metric in percent. 
            helper.add_metric(label='percent used',value=percent_string, min="0", max="100", uom="%")
                    
    else:
        if not sucess:
            # if the partition was not found in the data output, we return an error
            helper.exit(summary="Partition '%s' not found" % disk, exit_code=unknown, perfdata='')
737593
def status(self):
        """"""
        if all(os.path.exists(p.path) for p in self.parts): return 'splitted'
        return False
628424
def in_use(self):
        """"""
        if self.is_mounted or self.is_unlocked:
            return True
        if self.is_partition_table:
            for device in self._daemon:
                if device.partition_slave == self and device.in_use:
                    return True
        return False
765455
def is_valid_continuous_partition_object(partition_object):
    
    if (partition_object is None) or ("weights" not in partition_object) or ("bins" not in partition_object):
        return False
    if("tail_weights" in partition_object):
        if (len(partition_object["tail_weights"])!=2):
            return False
        comb_weights=partition_object["tail_weights"]+partition_object["weights"]
    else:
        comb_weights=partition_object["weights"]
    # Expect one more bin edge than weight; all bin edges should be monotonically increasing; weights should sum to one
    if (len(partition_object['bins']) == (len(partition_object['weights']) + 1)) and \
            np.all(np.diff(partition_object['bins']) > 0) and \
            np.allclose(np.sum(comb_weights), 1):
        return True
    return False
1171567
def knows_block(blockhash)
      return true if @chain.include?(blockhash)
      @block_queue.queue.any? {|(block, proto)| block.header.full_hash == blockhash }
    end