def __init__(self, TableId="315898", listValues=None, time="Semaine", outPutFrequency=1.0, login="", password=""):
		"""
		TODO Gérer time = None

			@TableId :file path of model
			@listValues : numbers or strings of considered columns
			@time : name of time column
			@outPutFrequency : sigma step
			@login : required google login 
			@password : required google password
		"""
		if not listValues: listValues = ["Temperature"]

		Generator.__init__(self, TableId, listValues)
		
		self.time = time
		self.outPutFrequency = outPutFrequency
		self.V = self.initDictionnaryValues(listValues)

		if(self.sourceName!="" and len(self.V.keys())>0):
			for columns in self.V.keys():
				
				myRequester = Request(self.sourceName,self.time,columns,login, password) #ID TABLE | ANNEE
				
				self.V[columns] = myRequester.getListData() # time list
			
			self.T = myRequester.getListTime() # value list
			self.state = {'status':'ACTIVE','sigma':self.T[0]}
		else:
			self.state = {'status':'ACTIVE','sigma':INFINITY}
Ejemplo n.º 2
0
	def __init__(self, sourceName="265331", annee="1995"):
		""" Constructor.
		"""

		ExternalGen.__init__(self)

		# local copy
		self.sourceName = sourceName
		self.annee= annee

		if(self.sourceName!="" and self.annee!=""):
			myRequester = Request(self.sourceName,"Semaine",self.annee) #ID TABLE | ANNEE
			self.V = myRequester.getListData() # time list
			self.T = myRequester.getListTime() # value list
			print self.V
			print self.T
			sig = self.T[0] if self.T != [] else INFINITY
		else:
			sig = INFINITY
			
		self.state = {	'status':	'ACTIVE', 'sigma':	sig}
Ejemplo n.º 3
0
    def __init__(self, sourceName="265331", annee="1995"):
        """ Constructor.
		"""

        ExternalGen.__init__(self)

        # local copy
        self.sourceName = sourceName
        self.annee = annee

        if (self.sourceName != "" and self.annee != ""):
            myRequester = Request(self.sourceName, "Semaine",
                                  self.annee)  #ID TABLE | ANNEE
            self.V = myRequester.getListData()  # time list
            self.T = myRequester.getListTime()  # value list
            print self.V
            print self.T
            sig = self.T[0] if self.T != [] else INFINITY
        else:
            sig = INFINITY

        self.state = {'status': 'ACTIVE', 'sigma': sig}
Ejemplo n.º 4
0
    def __init__(self,
                 TableId="315898",
                 listValues=None,
                 time="Semaine",
                 outPutFrequency=1.0,
                 login="",
                 password=""):
        """
		TODO Gérer time = None

			@TableId :file path of model
			@listValues : numbers or strings of considered columns
			@time : name of time column
			@outPutFrequency : sigma step
			@login : required google login 
			@password : required google password
		"""
        if not listValues: listValues = ["Temperature"]

        Generator.__init__(self, TableId, listValues)

        self.time = time
        self.outPutFrequency = outPutFrequency
        self.V = self.initDictionnaryValues(listValues)

        if (self.sourceName != "" and len(self.V.keys()) > 0):
            for columns in self.V.keys():

                myRequester = Request(self.sourceName, self.time, columns,
                                      login, password)  #ID TABLE | ANNEE

                self.V[columns] = myRequester.getListData()  # time list

            self.T = myRequester.getListTime()  # value list
            self.state = {'status': 'ACTIVE', 'sigma': self.T[0]}
        else:
            self.state = {'status': 'ACTIVE', 'sigma': INFINITY}