:param io_hash: input/output hash
    :type io_hash: dict
    :returns: boolean indicating whether any job-based object references are found in *io_hash*
963309
def has_local_job_refs(io_hash):
    '''
    
    '''
    q = []

    for field in io_hash:
        if is_job_ref(io_hash[field]):
            if get_job_from_jbor(io_hash[field]).startswith('localjob'):
                return True
        elif isinstance(io_hash[field], list) or isinstance(io_hash[field], dict):
            q.append(io_hash[field])

    while len(q) > 0:
        thing = q.pop()
        if isinstance(thing, list):
            for i in range(len(thing)):
                if is_job_ref(thing[i]):
                    if get_job_from_jbor(thing[i]).startswith('localjob'):
                        return True
                elif isinstance(thing[i], list) or isinstance(thing[i], dict):
                    q.append(thing[i])
        else:
            for field in thing:
                if is_job_ref(thing[field]):
                    if get_job_from_jbor(thing[field]).startswith('localjob'):
                        return True
                elif isinstance(thing[field], list) or isinstance(thing[field], dict):
                    q.append(thing[field])

    return False
15776
def hash(self):
        
        hash_request = etcdrpc.HashRequest()
        return self.maintenancestub.Hash(hash_request).hash
898102
private boolean lookupMemo(Class<?> objectType, Object obj) throws IOException {
		if(!this.useMemo)
			return false;
		if(!objectType.isPrimitive()) {
			int hash = valueCompare ? obj.hashCode() : System.identityHashCode(obj);
			if(memo.containsKey(hash) && (valueCompare ? memo.get(hash).obj.equals(obj) : memo.get(hash).obj == obj)) { // same object or value
				int memo_index = memo.get(hash).index;
				if(memo_index <= 0xff) {
					out.write(Opcodes.BINGET);
					out.write((byte) memo_index);
				} else {
					out.write(Opcodes.LONG_BINGET);
					byte[] index_bytes = PickleUtils.integer_to_bytes(memo_index);
					out.write(index_bytes, 0, 4);
				}
				return true;
			}
		}
		return false;
	}
383441
def lookup(outputs, key)
      out = outputs.find { |o| o.output_key == key }
      out&.output_value
    end
575297
def exists?(type, hash)
      if directory(type, hash) &&
         directory(type, hash).files.head(key_component(type, hash))
        true
      else
        false
      end
    end
412251
def output_hash
      if @output_hash.blank?
        @output_hash = {}
        self.input_array.each do |t|
          if t.kind_of?(Array) || t.kind_of?(ActiveRecord::Relation)
            t.each do |ar_object|
              recurse(ar_object)
            end
          else
            recurse(t)
          end
        end
      end
      @output_hash
    end
1136926
def target_from_hash(hash)
      target = 0
      i = 0
      hash.each_byte do |byte|
        target += byte * (256**i)
        i += 1
      end
      target
    end
1243696
def GetHashObject(self):
    """"""
    hash_object = rdf_crypto.Hash()
    hash_object.num_bytes = self._bytes_read
    for algorithm in self._hashers:
      setattr(hash_object, algorithm, self._hashers[algorithm].digest())
    return hash_object
889703
def get_osdb_hash(self):
        
        if self._osdb_hash is None:
            self._osdb_hash = self._calculate_osdb_hash()
        return self._osdb_hash
994797
def is_job_done(job_id, conn=None):
    
    result = False
    get_done = RBJ.get_all(DONE, index=STATUS_FIELD)
    for item in get_done.filter({ID_FIELD: job_id}).run(conn):
        result = item
    return result
303907
def is_local(self, hadoop_conf=None, hadoop_home=None):
        
        conf = self.hadoop_params(hadoop_conf, hadoop_home)
        keys = ('mapreduce.framework.name',
                'mapreduce.jobtracker.address',
                'mapred.job.tracker')
        for k in keys:
            if conf.get(k, 'local').lower() != 'local':
                return False
        return True
941858
def check_against_chunks(self, chunks):
        # type: (Iterator[bytes]) -> None
        
        gots = {}
        for hash_name in iterkeys(self._allowed):
            try:
                gots[hash_name] = hashlib.new(hash_name)
            except (ValueError, TypeError):
                raise InstallationError('Unknown hash name: %s' % hash_name)

        for chunk in chunks:
            for hash in itervalues(gots):
                hash.update(chunk)

        for hash_name, got in iteritems(gots):
            if got.hexdigest() in self._allowed[hash_name]:
                return
        self._raise(gots)
143266
public function isListedInCache($lookup_hash)
  {
    // by default no match in cache
    $matched_listnames=null;
    
    $hex_lookup_hash=bin2hex($lookup_hash);
    
    foreach($this->getLists() as $listname => $liststate){
      $listdir=$this->getListStorageDir($listname);
      if(!is_dir($listdir)){
        $this->debugLog('isListedInCache() no list directory found for list '.$listname);
        continue;
      }
      if(!is_file($listdir.$this->fullhash_cache_filename)){
        //$this->debugLog('isListedInCache() no fullcache file found for list '.$listname);
        // no cache file, nothing to look up
        continue;
      }
      $cached_hashes=explode("\n",file_get_contents($listdir.$this->fullhash_cache_filename));
      foreach($cached_hashes as $cache_entry){
        $cache_parts=explode(';',$cache_entry);
        // 0:prefix;1:fullhash;2:expire_timestamp
        if($cache_parts[0]===substr($hex_lookup_hash,0,strlen($cache_parts[0]))){
          // ok prefix hash match 
          if(is_null($matched_listnames)){
            $matched_listnames=array();
          }
          // test against full hash
          if($cache_parts[1]===$hex_lookup_hash){
            // full hash match
            if($cache_parts[2]<time()){
              // expired full match must result in cache-miss so it gets re-fetched
              return null;
            }
            $matched_listnames[]=$listname;
            // we can skip to the next list
            continue(2);
          }
        }
      }
    }
    
    if(is_null($matched_listnames)){
      // we still have a complete cache miss, as a last resort
      // check if the prefix is in the negative cache file
      if(is_file($this->storage_dir.$this->fullhash_cache_filename)){
        // negative cache file
        $negative_prefixes=explode("\n",file_get_contents($this->storage_dir.$this->fullhash_cache_filename));
        foreach($negative_prefixes as $cache_entry){
          $cache_parts=explode(';',$cache_entry);
          // 0:prefix;1:expire_timestamp
          if($cache_parts[0]===substr($hex_lookup_hash,0,strlen($cache_parts[0]))){
            // ok prefix hash match 
            if(is_null($matched_listnames)){
              $matched_listnames=array();
            }
            if($cache_parts[1]<time()){
              // expired prefix match must result in cache-miss so it gets re-fetched
              return null;
            }
          }
        }
      }
      
    }
    
    return $matched_listnames;
  }
312391
def _check_source(cls, source_file_hash, source):
        
        embedding_name = cls.__name__.lower()
        if source not in source_file_hash:
            raise KeyError('Cannot find pre-trained source {} for token embedding {}. '
                           'Valid pre-trained file names for embedding {}: {}'.format(
                               source, embedding_name, embedding_name,
                               ', '.join(source_file_hash.keys())))
1140939
def get_hash(input_string):
    

    # Check if the input looks like a link to a movie:
    if os.path.islink(input_string):
        directory, movie_hash = os.path.split(os.readlink(input_string))
        input_string = movie_hash

    return input_string.lower()
319039
def lookup_blob(hash_value):
    
    try:
        blob = BlobStorage.objects.get(sha256=hash_value)
    except:
        return "Blob not found"
    return blob.content
1010930
def get_hash(self):
        
        if self._hash is None:
            self._hash = self._source.get_hash(self._handle).strip()
        return self._hash