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

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

src/d/a/Dandelion-Message-Service-HEAD/dandelionpy/dandelion/gui/gui.py   Dandelion-Message-Service(Download)
 
        if sign and receiver_:
            m = dandelion.message.create(msg, timestamp=int(time.time()), sender=self._identity, receiver=receiver_)
            self._db.add_messages([m])
        elif sign:
            m = dandelion.message.create(msg, timestamp=int(time.time()), sender=self._identity)
            self._db.add_messages([m])
        elif receiver_:
            m = dandelion.message.create(msg, timestamp=int(time.time()), receiver=receiver_)
            self._db.add_messages([m])
        else:
            m = dandelion.message.create(msg, timestamp=int(time.time()))
            self._db.add_messages([m])
 

src/d/a/Dandelion-Message-Service-HEAD/dandelionpy/dandelion/ui.py   Dandelion-Message-Service(Download)
 
        if sign and receiver_:
            m = dandelion.message.create(msg, timestamp=int(time.time()), sender=self._identity, receiver=receiver_)
            self._db.add_messages([m])
        elif sign:
            m = dandelion.message.create(msg, timestamp=int(time.time()), sender=self._identity)
            self._db.add_messages([m])
        elif receiver_:
            m = dandelion.message.create(msg, timestamp=int(time.time()), receiver=receiver_)
            self._db.add_messages([m])
        else:
            m = dandelion.message.create(msg, timestamp=int(time.time()))
            self._db.add_messages([m])
 

src/d/a/Dandelion-Message-Service-HEAD/dandelionpy/dandelion/test/database_test.py   Dandelion-Message-Service(Download)
        id1 = dandelion.identity.generate()
        id2 = dandelion.identity.generate()
        second_msg = dandelion.message.create('Another Single Message', sender=id1, receiver=id2)
        second_cookie = db.add_messages([second_msg])
        self.assertNotEqual(second_cookie, None)
        id2 = dandelion.identity.generate()
        first_msg_list = [Message('A'), Message('B'), Message('III', timestamp=3),
                          dandelion.message.create("W Sender", sender=id1),
                          dandelion.message.create("W Receiver", receiver=id2),
                          dandelion.message.create("W Sender And Receiver", sender=id1, receiver=id2)]
        m1 = Message('M1')
        m2 = Message('M2')
        m3 = dandelion.message.create('M3', 1337, id1, id2)
 
        db.add_identities([id1])