Adds ``mv`` to ``a_hash``

    Args:
       a_hash (`Hash`): the secure hash, e.g created by hashlib.md5
       mv (:class:`MetricValue`): the instance to add to the hash
543956
def update_hash(a_hash, mv):
    
    if mv.labels:
        signing.add_dict_to_hash(a_hash, encoding.MessageToPyValue(mv.labels))
    money_value = mv.get_assigned_value(u'moneyValue')
    if money_value is not None:
        a_hash.update(b'\x00')
        a_hash.update(money_value.currencyCode.encode('utf-8'))
1034869
def symbolize_keys(hash)
      hash.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
    end
1044583
def update_from_hash(hash)
      j = self
      #update top line params
      j.update_attributes(:active => hash['active'],
                          :trigger => hash['trigger'])
      (1..5).to_a.each do |s_idx|
        stage_string = hash["stage#{s_idx.to_s}"]
        s = Stage.find_by_path("#{j.path}/stage#{s_idx.to_s}")
        if stage_string.to_s.length==0
          #delete this stage and all stages after
          if s
            j = s.job
            j.stages[(s.idx-1)..-1].each{|ps| ps.delete}
            #just in case
            s.delete
          end
          break
        elsif s.nil?
          #create this stage
          s = Stage.find_or_create_by_path("#{j.path}/stage#{s_idx.to_s}")
        end
        #parse command string, update stage with it
        s_handler, call, param_string = [""*3]
        stage_string.split(" ").ie do |spls|
          s_handler = spls.first.split(".").first
          call = spls.first.split(".").last
          param_string = spls[1..-1].join(" ").strip
        end
        s.update_attributes(:call=>call, :handler=>s_handler, :param_string=>param_string)
      end
      return j.reload
    end
199137
def add(self, key, value):
        # type: (Hashable, Any) -> None
        
        dict.setdefault(self, key, []).append(value)
711903
def add_entry(e)
      @entries.push(e)
      if @md5_to_entries.has_key?(e.md5)
        @md5_to_entries[e.md5].push(e)
      else
        @md5_to_entries[e.md5] = [e]
      end
    end
274172
def _generate_hash(self):
        
        
        self.hash = None
        str_hash = ''
        
        for key, val in self._get_params().iteritems():
            str_hash += smart_str(val)
        
        # Append the encryption string
        str_hash += self._service.encryption_key
        
        # Set md5 hash on the object
        self.hash = hashlib.md5(str_hash).hexdigest()
506856
def push(tuple)
      key = bin_key(tuple)
      @hash[key] ||= TupleBin.new
      @hash[key].add(tuple)
    end
786326
def file_hash(path, hash_type='md5'):
    
    if os.path.exists(path):
        h = getattr(hashlib, hash_type)()
        with open(path, 'rb') as source:
            h.update(source.read())
        return h.hexdigest()
    else:
        return None
109000
def hash_to_model(klass_name, hash)
      model_klass =
        if self.class.const_defined?(klass_name, false)
          self.class.const_get(klass_name)
        else
          self.class.const_set(klass_name, Class.new(BaseModel))
        end
      model_klass.new(api, hash)
    end
161262
def update(other_hash)
      if other_hash.is_a? Hash
        super(other_hash)
      else
        other_hash.to_hash.each_pair do |key, value|
          if block_given?
            value = yield(key, value)
          end
          self[key] = value
        end
        self
      end
    end
899489
def str_append_hash(*args):
    
    ret_hash = ""
    for i in args:
        ret_hash += str(i).lower()

    return hash(ret_hash)
724427
def meta_data_hash(self, obj_hash=None):
        
        if obj_hash is None:
            obj_hash = hashlib.sha256()
        self.update_meta_data_hash(obj_hash)
        return obj_hash
124274
def mix_hash(self, data: bytes):
        
        self.h = self.noise_protocol.hash_fn.hash(self.h + data)
1107261
def update(other_hash)
      other_hash.each_pair { |key, value| regular_writer(convert_key(key), convert_value(value)) }
      self
    end
1040970
public static Hasher putMetricValue(Hasher h, MetricValue value) {
    Signing.putLabels(h, value.getLabelsMap());
    return h;
  }
1085640
def add_properties(hash)
      hash.each do |identity, property|
        @properties[flexible identity] ||= property.class.new
        @properties[flexible identity].concat property
      end
      update_human_readable_methods
    end
107681
def add(self, val):
        
        return cache.lpush(self.key, json.dumps(val) if self.serialize else val)