Return True if the two tiles are both zipped metatiles and contain the
    same set of files with the same contents. This ignores the timestamp of
    the individual files in the zip files, as well as their order or any
    other metadata.
775801
def metatiles_are_equal(tile_data_1, tile_data_2):
    

    try:
        buf_1 = StringIO.StringIO(tile_data_1)
        buf_2 = StringIO.StringIO(tile_data_2)

        with zipfile.ZipFile(buf_1, mode='r') as zip_1:
            with zipfile.ZipFile(buf_2, mode='r') as zip_2:
                return _metatile_contents_equal(zip_1, zip_2)

    except (StandardError, zipfile.BadZipFile, zipfile.LargeZipFile):
        # errors, such as files not being proper zip files, or missing
        # some attributes or contents that we expect, are treated as not
        # equal.
        pass

    return False
765439
def identical_blocks(self):
        
        identical_blocks = []
        for (block_a, block_b) in self._block_matches:
            if self.blocks_probably_identical(block_a, block_b):
                identical_blocks.append((block_a, block_b))
        return identical_blocks
207341
private static boolean doEntryEquals(ZipFile zf1, ZipFile zf2, String path1, String path2) throws IOException {
    InputStream is1 = null;
    InputStream is2 = null;
    try {
      ZipEntry e1 = zf1.getEntry(path1);
      ZipEntry e2 = zf2.getEntry(path2);

      if (e1 == null && e2 == null) {
        return true;
      }

      if (e1 == null || e2 == null) {
        return false;
      }

      is1 = zf1.getInputStream(e1);
      is2 = zf2.getInputStream(e2);
      if (is1 == null && is2 == null) {
        return true;
      }
      if (is1 == null || is2 == null) {
        return false;
      }

      return IOUtils.contentEquals(is1, is2);
    }
    finally {
      IOUtils.closeQuietly(is1);
      IOUtils.closeQuietly(is2);
    }
  }
526666
def is_valid_tile(self, x, y):
        """"""
        x = int(x)
        y = int(y)

        if x < 0:
            return False
        if y < 0:
            return False
        if x > self.size_in_tiles.X:
            return False
        if y > self.size_in_tiles.Y:
            return False

        return True
1150466
def is_same_filename (filename1, filename2):
    """"""
    return os.path.realpath(filename1) == os.path.realpath(filename2)
836930
def has_multiple_timesteps(data):
    """"""
    if "timestep" in data.keys():
        if len(np.unique(data["timestep"])) > 1:
            return True
    return False
509377
def is_same(dir1, dir2):
    
    compared = dircmp(dir1, dir2, IGNORED_FILES)  # ignore the OS X file
    if compared.left_only or compared.right_only or compared.diff_files or compared.funny_files:
        return False
    for subdir in compared.common_dirs:
        if not is_same(os.path.join(dir1, subdir), os.path.join(dir2, subdir)):
            return False
    return True
639885
public static boolean entryEquals(ZipFile zf1, ZipFile zf2, String path1, String path2) {
    try {
      return doEntryEquals(zf1, zf2, path1, path2);
    }
    catch (IOException e) {
      throw ZipExceptionUtil.rethrow(e);
    }
  }
1154758
def is_unzipped_x_duplicate(self, unzipped_x):
        
        return self.is_zipped_x_duplicate(self.space.zip_inputs(np.atleast_2d(unzipped_x)))
662010
private Collection<Tile> getSharedNeigbors(Tile tile1, Tile tile2)
    {
        final Collection<Tile> neighbors1 = map.getNeighbors(tile1);
        final Collection<Tile> neighbors2 = map.getNeighbors(tile2);
        final Collection<Tile> sharedNeighbors = new HashSet<>(2);
        for (final Tile neighbor : neighbors1)
        {
            if (neighbors2.contains(neighbor))
            {
                sharedNeighbors.add(neighbor);
            }
        }
        neighbors1.clear();
        neighbors2.clear();
        return sharedNeighbors;
    }
275693
def matches(self, a, b, **config):
        
        package_a = self.processor._u2p(a['msg']['update']['title'])[0]
        package_b = self.processor._u2p(b['msg']['update']['title'])[0]
        if package_a != package_b:
            return False
        return True
489729
def in_same_box(self, a, b):
        """"""
        assert a in self.micro_indices
        assert b in self.micro_indices

        for part in self.partition:
            if a in part and b in part:
                return True

        return False
918207
def has_better_coverage(self):
        
        for filename in self.files():
            if self.diff_total_misses(filename) > 0:
                return False
        return True
233434
def add_tile(self, address, tile):
        

        if address in self._tiles:
            raise ArgumentError("Tried to add two tiles at the same address", address=address)

        self._tiles[address] = tile
1199843
def visible_tile_layers(self):
        
        return (i for (i, l) in enumerate(self.layers)
                if l.visible and isinstance(l, TiledTileLayer))
742972
public boolean isMatch() {
        if (totalKotsuKantsu != 4) {
            return false;
        }

        int tileNum = janto.getTile().getNumber();
        if (tileNum != 1 && tileNum != 9) {
            return false;
        }

        //刻子が全て一九牌か
        for (Kotsu kotsu : kotsuList) {
            tileNum = kotsu.getTile().getNumber();
            if (tileNum != 1 && tileNum != 9) {
                return false;
            }
        }

        //ここまできたら見つかっている
        return true;
    }
61323
def _hashes_match(self, a, b):
        """"""
        if len(a) != len(b):
            return False
        diff = 0
        if six.PY2:
            a = bytearray(a)
            b = bytearray(b)
        for x, y in zip(a, b):
            diff |= x ^ y
        return not diff