Did I find the right examples for you? yes no      Crawl my project      Python Jobs

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

src/p/y/pylehash-HEAD/examples/bulletin.py   pylehash(Download)
    def do_subscribe_taps(self, board):
        h = pylehash.hash.hexhash(board)
        t = pylehash.Telex(other_dict={'.tap': [
                {'is': {'+board': h}}
            ]})
        for s in self.switch.ends.near(h):
            self.switch.send(telex=t, to=s)
 
    def subscribe(self, board):
        h = pylehash.hash.hexhash(board)
    def post(self, board, msg):
        h = pylehash.hash.hexhash(board)
        t = pylehash.Telex(other_dict={'+board': h, '+msg': msg})
        for s in self.switch.ends.near(h):
            self.switch.send(telex=t, to=s)

src/p/y/pylehash-HEAD/pylehash/tests/test_pylehash.py   pylehash(Download)
    def test_hexhash_arbitrary_string(self):
        test_hash = 'a94a8fe5ccb19ba61c4c0873d391e987982fbbd3'
        assert hash.hexhash('test') == test_hash
 
    def test_hexhash_ipp_str(self):
        ipp_hash = 'bc117be99339576519af05e91d51376feabd4706'
        assert hash.hexhash('127.0.0.1:5555') == ipp_hash
    def test_hexhash_ipp_tuple(self):
        ipp_hash = 'bc117be99339576519af05e91d51376feabd4706'
        assert hash.hexhash(('127.0.0.1',5555)) == ipp_hash
 
    def test_hexbin_short(self):
    def test_distance_supports_hash_ipptuple_or_end(self):
        a = hash.distance(selfipp, faripp)
        b = hash.distance(hash.hexhash(selfipp), hash.hexhash(faripp))
        c = hash.distance(hash.hexhash(selfipp), faripp)
        d = hash.distance(selfipp, hash.hexhash(faripp))