Did I find the right examples for you? yes no

All Samples(26)  |  Call(26)  |  Derive(0)  |  Import(0)

src/s/e/seal-0.4.0-rc2/seal/seqal/mapper.py   seal(Download)
            ordered_pair = self.__order_pair(pair)
 
            record = protobuf_mapping.serialize_pair(ordered_pair)
            # emit with the left coord
            key = self.get_hit_key(ordered_pair[0])

src/s/e/seal-0.4.0-rc2/tests/seal/seqal/test_reducer.py   seal(Download)
    def test_emit_on_left_key(self):
        # load pair 1
        p = test_utils.pair1()
        # use the first read to create the map-reduce key
        self.__ctx.add_value(test_utils.make_key(p[0]), proto.serialize_pair(p))
    def test_duplicate_pairs(self):
        # Two identical pairs.  Ensure only one is emitted
        p = test_utils.pair1()
        # use the first read to create the map-reduce key
        self.__ctx.add_value(test_utils.make_key(p[0]), proto.serialize_pair(p))
        self.__ctx.add_value(test_utils.make_key(p[0]), proto.serialize_pair(p)) # add it twice
    def test_duplicate_pairs_no_discard(self):
        # Two identical pairs.  Ensure only one is emitted
        p = test_utils.pair1()
        # use the first read to create the map-reduce key
        self.__ctx.add_value(test_utils.make_key(p[0]), proto.serialize_pair(p))
        self.__ctx.add_value(test_utils.make_key(p[0]), proto.serialize_pair(p)) # add it twice

src/s/e/seal-0.4.0-rc2/tests/seal/lib/io/test_protobuf_mapping.py   seal(Download)
    def __pipe_pair_through(self, pair):
        message = io.serialize_pair(pair)
        return io.unserialize_pair(message)
 
    def __compare_pair(self, pair1, pair2):