3ad426916f203c5b96afa08a1ba627cad38d2d33,pwnagotchi/mesh/peer.py,Peer,__init__,#Peer#Any#,8

Before Change


        self.session_id = obj["session_id"]
        self.last_channel = obj["channel"]
        self.rssi = obj["rssi"]
        self.adv = obj["advertisement"]

    def update(self, new):
        if self.name() != new.name():
            logging.info("peer %s changed name: %s -> %s" % (self.full_name(), self.name(), new.name()))

After Change


class Peer(object):
    def __init__(self, obj):
        now = time.time()
        just_met = datetime.now().strftime("%Y-%m-%dT%H:%M:%S")
        self.first_met = parse_rfc3339(obj.get("met_at", just_met))
        self.first_seen = parse_rfc3339(obj.get("detected_at", just_met))
        self.prev_seen = parse_rfc3339(obj.get("prev_seen_at", just_met))
        self.last_seen = now  // should be seen_at
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: evilsocket/pwnagotchi
Commit Name: 3ad426916f203c5b96afa08a1ba627cad38d2d33
Time: 2019-10-23
Author: evilsocket@gmail.com
File Name: pwnagotchi/mesh/peer.py
Class Name: Peer
Method Name: __init__


Project Name: zhanghang1989/PyTorch-Encoding
Commit Name: 09bff70b46b4f0149e0f470874825b650935565a
Time: 2020-04-04
Author: zhang.hang@rutgers.edu
File Name: setup.py
Class Name:
Method Name:


Project Name: aws/sagemaker-python-sdk
Commit Name: eea56fcf16d8d535a6539d4ce6bbddb6df013322
Time: 2018-10-12
Author: icywang.rui@gmail.com
File Name: tests/unit/test_utils.py
Class Name:
Method Name: test_secondary_training_status_message_status_not_changed