Пример #1
0
 def __init__(self, **kwargs):
     Document.__init__(self, **kwargs)
     self.caller_phone = PhoneNumber.standardize(kwargs.get('caller_phone'))
     self.dialed_phone = PhoneNumber.standardize(kwargs.get('dialed_phone'))
     self.answer_phone = PhoneNumber.standardize(kwargs.get('answer_phone'))
     self.timestamp = CallTimeStamp.standardize(kwargs.get('timestamp'))
     self.duration = CallDuration.sanitize(kwargs.get('duration'))
Пример #2
0
    def __init__(self, facebook_id, nome, *args, **kwargs):
        Document.__init__(self, *args, **kwargs)

        if not nome:
            raise ValueError('nome')

        if not facebook_id:
            raise ValueError('facebook_id')

        self.nome = nome
        self.facebook_id = facebook_id
Пример #3
0
    def __init__(self, **data):
        location = data['location']
        try:
            tlsverify = data['tlsverify']
            logger = data['logger']
            mbox_resource_connector = data['resource_connector']
            Resource.__init__(self, location=location,
                              tlsverify=tlsverify,
                              logger=logger,
                              resource_connector=mbox_resource_connector)
        except KeyError:
            pass
        
        Document.__init__(self)

        self.location = location
        self.last_updated = datetime.now()
Пример #4
0
 def __init__(self, *args, **kwargs):
     Document.__init__(self, *args, **kwargs)
     if self.classifier:
         self.clf = pickle.loads(str(self.classifier))
     else:
         self.clf = None
Пример #5
0
    def __init__(self, *args, **kwargs):
        Document.__init__(self, *args, **kwargs)

        if 'password' in kwargs:
            self.password = kwargs['password']
Пример #6
0
 def __init__(self, facebook_id, nome,  *args, **kwargs):
     Document.__init__(self, *args, **kwargs)
     self.nome = nome
     self.facebook_id = facebook_id
Пример #7
0
 def __init__(self, username='', password='', email='', **kwargs):
     Document.__init__(self, **kwargs)
     self.username = username
     self.password = password
     self.email = email
Пример #8
0
 def __init__(self, *args, **kwargs):
     Document.__init__(self, *args, **kwargs)
     self._gateway = None
Пример #9
0
 def __init__(self, *args, **kwargs):
     Document.__init__(self, *args, **kwargs)
     self.data_criacao = datetime.now()