>>> overlapping(0, 5, 6, 7)
    False
    >>> overlapping(1, 2, 0, 4)
    True
    >>> overlapping(5,6,0,5)
    False
777843
def overlapping(start1, end1, start2, end2):
    
    return not ((start1 <= start2 and start1 <= end2 and end1 <= end2 and end1 <= start2) or
                (start1 >= start2 and start1 >= end2 and end1 >= end2 and end1 >= start2))
454437
def overlap(self, x, ctrs, kdtree=None):
        """"""

        q = len(self.within(x, ctrs, kdtree=kdtree))

        return q
917511
public boolean overlaps(Location location) {
         if (location.getBeginPosition()>=getBeginPosition() && location.getBeginPosition() <= getEndPosition()) 
             return true;
         if(location.getBeginPosition() <= getBeginPosition() && location.getEndPosition()>=getBeginPosition()) 
             return true;
        else {
            return false;
        }
    }
895769
def overlapping(self, start, stop):
        
        for event in self:
            if ((start <= event.begin <= stop # if start is between the bonds
            or start <= event.end <= stop) # or stop is between the bonds
            or event.begin <= start and event.end >= stop): # or event is a superset of [start,stop]
                yield event
1118958
protected boolean overlap(Pair<Integer, Integer> expected,
            Pair<Integer, Integer> actual) {
        // // a1 then a2
        // if (a2.getBegin() - a1.getEnd() > 0)
        // return Position.before;
        //
        // // a2 then a1
        // if (a1.getBegin() - a2.getEnd() > 0)
        // return Position.after;
        //
        // // overlap
        // return Position.overlap;
        //

        if (actual.getKey() >= expected.getKey()
                && actual.getValue() <= expected.getValue()) {
            return true;
        }
        return false;

        // full overlap is too lenient
        // if (expected.getKey() < actual.getValue()
        // && actual.getKey() < expected.getValue()) {
        // return true;
        // }
        // return false;

    }
889777
function( pattern, ignoreCase ) {
					var overlap = [ -1 ];
					if ( ignoreCase )
						pattern = pattern.toLowerCase();
					for ( var i = 0; i < pattern.length; i++ ) {
						overlap.push( overlap[ i ] + 1 );
						while ( overlap[ i + 1 ] > 0 && pattern.charAt( i ) != pattern.charAt( overlap[ i + 1 ] - 1 ) )
							overlap[ i + 1 ] = overlap[ overlap[ i + 1 ] - 1 ] + 1;
					}

					this._ = {
						overlap: overlap,
						state: 0,
						ignoreCase: !!ignoreCase,
						pattern: pattern
					};
				}
706465
def overlaps(self, canvas, exclude=[]):
        
        try:
            exclude = list(exclude)
        except TypeError:
            exclude = [exclude]
        exclude.append(self)

        for selfY, row in enumerate(self.image.image()):
            for selfX, pixel in enumerate(row):
                canvasPixelOn = canvas.testPixel(
                    (selfX + self.position[0], selfY + self.position[1]),
                    excludedSprites=exclude
                )
                if pixel and canvasPixelOn:
                    return True
        return False
1365168
public static boolean overlapBounds(float[] amin, float[] amax, float[] bmin, float[] bmax) {
        boolean overlap = true;
        overlap = (amin[0] > bmax[0] || amax[0] < bmin[0]) ? false : overlap;
        overlap = (amin[1] > bmax[1] || amax[1] < bmin[1]) ? false : overlap;
        overlap = (amin[2] > bmax[2] || amax[2] < bmin[2]) ? false : overlap;
        return overlap;
    }
114343
public boolean overlaps(BoundingBox o, double cutoff) {
		if (this==o) return true;
		// x dimension
		if (!areOverlapping(xmin,xmax,o.xmin,o.xmax,cutoff)) {
			return false;
		}
		// y dimension
		if (!areOverlapping(ymin,ymax,o.ymin,o.ymax,cutoff)) {
			return false;
		}
		// z dimension
		if (!areOverlapping(zmin,zmax,o.zmin,o.zmax,cutoff)) {
			return false;
		}
		return true;
	}
1233369
public final boolean overlaps(@NotNull final HourRanges other) {
        final BitSet thisMinutes = this.toMinutes();
        final BitSet otherMinutes = other.toMinutes();
        thisMinutes.and(otherMinutes);
        return !thisMinutes.isEmpty();
    }
384437
def count_overlap( bits1, bits2 ):
    
    b = BitSet( bits1.size )
    b |= bits1
    b &= bits2
    return b.count_range( 0, b.size )
405654
def overlap(self, query, subject):
        """"""
        if (self.pt_within(query[0], subject) or self.pt_within(query[1], subject) or 
            self.pt_within(subject[0], query) or self.pt_within(subject[1], query)):
            return True

        return False
834895
def _overlapping(files):
    
    segments = set()
    for path in files:
        seg = file_segment(path)
        for s in segments:
            if seg.intersects(s):
                return True
        segments.add(seg)
    return False
1061419
@Override
    public boolean overlaps(Range<T> other) {
        dbc.precondition(other != null, "checking for overlaps between a DenseRange<T> and null");
        if (other instanceof DenseRange == false) {
            return other.overlaps(this);
        }
        return !Order.of(comparator, Optional.of(this.begin()), other.end()).isGte() && !Order.of(comparator, Optional.of(other.begin()), this.end()).isGte();
    }
1166587
public boolean overlaps(Span other) {
      return other != null && this.start() < other.end() && this.end() > other.start();
   }
779638
def remove_overlap(self, also_remove_contiguous: bool = False) -> None:
        
        overlap = True
        while overlap:
            overlap = self._remove_overlap_sub(also_remove_contiguous)
        self._sort()
195307
def calculate_overlap(self):
      """"""
      overs = []
      if not self.tx_obj1.range.overlaps(self.tx_obj2.range): return [] # if they dont overlap wont find anything
      for i in range(0,len(self.j1)):
        for j in range(0,len(self.j2)):
          if self.j1[i].overlaps(self.j2[j],tolerance=self.tolerance):
            overs.append([i,j])
      return overs