merges the given key points with the original points
486765
def merge!(points = {})
      # points must be a Hash
      raise ArgumentError, "key points must be a Hash object" unless points.is_a? Hash
      # ensure the points are all keyed Numeric-ally
      points.each do |key, value|
        raise ArgumentError, "found a point key that is not a Numeric object: #{key.inspect}" unless key.is_a? Numeric
      end

      @points.merge!(points)
      normalize_data
      self
    end
295231
def merge(s, t):
    """"""

    for k, v in t.items():
        if isinstance(v, dict):
            if k not in s:
                s[k] = v
                continue

            s[k] = merge(s[k], v)
            continue

        s[k] = v

    return s
468967
def merge_and_fit(self, track, pairings):
        

        for (self_seg_index, track_seg_index, _) in pairings:
            self_s = self.segments[self_seg_index]
            ss_start = self_s.points[0]
            track_s = track.segments[track_seg_index]
            tt_start = track_s.points[0]
            tt_end = track_s.points[-1]

            d_start = ss_start.distance(tt_start)
            d_end = ss_start.distance(tt_end)

            if d_start > d_end:
                track_s = track_s.copy()
                track_s.points = list(reversed(track_s.points))

            self_s.merge_and_fit(track_s)
        return self
173977
function merge(target) {
  for (var _len = arguments.length, sources = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    sources[_key - 1] = arguments[_key];
  }

  if (!sources.length) return target;
  var source = sources.shift();

  if ((0, _isObject2.default)(target) && (0, _isObject2.default)(source)) {
    for (var key in source) {
      if ((0, _isObject2.default)(source[key])) {
        if (!target[key]) Object.assign(target, _defineProperty({}, key, {}));
        merge(target[key], source[key]);
      } else {
        Object.assign(target, _defineProperty({}, key, source[key]));
      }
    }
  }

  return merge.apply(undefined, [target].concat(sources));
}
1361783
def merge(items, amap, load=False):

    """"""

    for target, source in items:
        if amap.get(target):
            logger.warn('overwriting {0}'.format(target))
        if load:
            amap[target] = open(source).read()
        else:
            amap[target] = source
1076690
def multipointm(self, points):
        """"""
        shapeType = MULTIPOINTM
        points = [points] # nest the points inside a list to be compatible with the generic shapeparts method
        self._shapeparts(parts=points, shapeType=shapeType)
1006331
def merge_vertices(self):
        
        # run unique rows
        unique, inverse = grouping.unique_rows(self.vertices)

        # apply unique mask to vertices
        self.vertices = self.vertices[unique]

        # apply unique mask to colors
        if (self.colors is not None and
                len(self.colors) == len(inverse)):
            self.colors = self.colors[unique]
1315858
def _merge(x, y):
    """"""
    merged = {**x, **y}

    xkeys = x.keys()

    for key in xkeys:
        if isinstance(x[key], dict) and key in y:
            merged[key] = _merge(x[key], y[key])

    return merged
878189
public boolean mergeIn(final BatchPoints that) {
    boolean mergeAble = isMergeAbleWith(that);
    if (mergeAble) {
      this.points.addAll(that.points);
    }
    return mergeAble;
  }
17707
def merge_config(d1, d2):
    '''
    '''
    result = deepcopy(d1)
    elements = deque()
    elements.append((result, d2))

    while elements:
        old, new = elements.popleft()

        new = OrderedDict([(k.lower(), (k, v)) for k, v in new.items()])
        visited_keys = []

        for k, old_value in old.items():
            klow = k.lower()
            if klow in new:
                new_key, new_value = new[klow]
                visited_keys.append(new_key)
                if all(isinstance(e, MutableMapping) for e in (old_value, new_value)):
                    elements.append((old_value, new_value))
                else:
                    old[k] = deepcopy(new_value)

        for k, v in new.values():
            if k not in visited_keys:
                old[k] = deepcopy(v)

    return result
1169935
private void mergeMappings(TypeMap<?, ?> destinationMap) {
    for (Mapping mapping : destinationMap.getMappings()) {
      InternalMapping internalMapping = (InternalMapping) mapping;
      mergedMappings.add(internalMapping.createMergedCopy(
          propertyNameInfo.getSourceProperties(), propertyNameInfo.getDestinationProperties()));
    }
  }
250385
def merge(self, other):
        """"""
        log.debug('Merging: %s and %s' % (self.serialize(), other.serialize()))
        for k in self.keys():
            for new_item in other[k]:
                if new_item not in self[k]:
                    self[k].append(new_item)
        log.debug('Result: %s' % self.serialize())
        return self
125210
public static void merge(List<PathDetail> pathDetails, List<PathDetail> otherDetails) {
        // Make sure that the PathDetail list is merged correctly at via points
        if (!pathDetails.isEmpty() && !otherDetails.isEmpty()) {
            PathDetail lastDetail = pathDetails.get(pathDetails.size() - 1);
            if (lastDetail.getValue().equals(otherDetails.get(0).getValue())) {
                lastDetail.setLast(otherDetails.get(0).getLast());
                otherDetails.remove(0);
            }
        }

        pathDetails.addAll(otherDetails);
    }
1092673
static boolean mergeVertices(Point pt_1, Point pt_2, double w_1,
			int rank_1, double w_2, int rank_2, Point pt_res, double[] w_res,
			int[] rank_res) {
		assert (!pt_1.isEmpty() && !pt_2.isEmpty());
		boolean res = pt_1.equals(pt_2);

		if (rank_1 > rank_2) {
			pt_res = pt_1;
			if (w_res != null) {
				rank_res[0] = rank_1;
				w_res[0] = w_1;
			}
			return res;
		} else if (rank_2 > rank_1) {
			pt_res = pt_2;
			if (w_res != null) {
				rank_res[0] = rank_1;
				w_res[0] = w_1;
			}
			return res;
		}

		pt_res = pt_1;
		Point2D pt2d = new Point2D();
		mergeVertices2D(pt_1.getXY(), pt_2.getXY(), w_1, rank_1, w_2, rank_2,
				pt2d, w_res, rank_res);
		pt_res.setXY(pt2d);
		return res;
	}
126178
void mergeEdges_(int edge1, int edge2) {
		// dbg_check_edge_(edge1);
		int cluster_1 = getEdgeCluster(edge1, 0);
		int cluster2 = getEdgeCluster(edge1, 1);
		int cluster21 = getEdgeCluster(edge2, 0);
		int cluster22 = getEdgeCluster(edge2, 1);

		int originVertices1 = getEdgeOriginVertices(edge1);
		int originVertices2 = getEdgeOriginVertices(edge2);
		m_edge_vertices.concatenateLists(originVertices1, originVertices2);
		if (edge2 == getClusterFirstEdge(cluster_1))
			setClusterFirstEdge_(cluster_1, edge1);
		if (edge2 == getClusterFirstEdge(cluster2))
			setClusterFirstEdge_(cluster2, edge1);

		disconnectEdge_(edge2);// disconnects the edge2 from the clusters.
		deleteEdge_(edge2);

		if (!((cluster_1 == cluster21 && cluster2 == cluster22) || (cluster2 == cluster21 && cluster_1 == cluster22))) {
			// Merged edges have different clusters (clusters have not yet been
			// merged)
			// merge clusters before merging the edges
			getClusterXY(cluster_1, pt_1);
			getClusterXY(cluster21, pt_2);
			if (pt_1.isEqual(pt_2)) {
				if (cluster_1 != cluster21) {
					mergeClusters_(cluster_1, cluster21);
					assert (!m_modified_clusters.hasElement(cluster21));
				}
				if (cluster2 != cluster22) {
					mergeClusters_(cluster2, cluster22);
					assert (!m_modified_clusters.hasElement(cluster22));
				}
			} else {
				if (cluster2 != cluster21) {
					mergeClusters_(cluster2, cluster21);
					assert (!m_modified_clusters.hasElement(cluster21));
				}
				if (cluster_1 != cluster22) {
					mergeClusters_(cluster_1, cluster22);
					assert (!m_modified_clusters.hasElement(cluster22));
				}
			}
		} else {
			// Merged edges have equal clusters.
		}
		// dbg_check_edge_(edge1);
	}
1106995
def _merge_cluster(old, new):
    """"""
    logger.debug("_merge_cluster: %s to %s" % (old.id, new.id))
    logger.debug("_merge_cluster: add idls %s" % old.loci2seq.keys())
    for idl in old.loci2seq:
        # if idl in new.loci2seq:
        #    new.loci2seq[idl] = list(set(new.loci2seq[idl] + old.loci2seq[idl]))
        # new.loci2seq[idl] = old.loci2seq[idl]
        new.add_id_member(old.loci2seq[idl], idl)
    return new
52617
static void merge(Map<ConfigurationKey, Object> original, Map<ConfigurationKey, Object> toMerge, String mergedSourceDescription) {
        for (Entry<ConfigurationKey, Object> entry : toMerge.entrySet()) {
            Object existing = original.get(entry.getKey());
            if (existing != null) {
                ConfigurationLogger.LOG.configurationKeyAlreadySet(entry.getKey().get(), existing, entry.getValue(), mergedSourceDescription);
            } else {
                original.put(entry.getKey(), entry.getValue());
            }
        }
    }