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

All Samples(34)  |  Call(23)  |  Derive(0)  |  Import(11)

src/t/e/tempodb-python-HEAD/tempodb/demo/tempodb-write-demo.py   tempodb-python(Download)
import datetime
import random
from tempodb import Client, DataPoint
 
# Modify these with your credentials found at: http://tempo-db.com/manage/
    # 1440 minutes in one day
    for min in range (1, 1441):
        data.append(DataPoint(date, random.random() * 50.0))
        date = date + datetime.timedelta(minutes=1)
 

src/h/o/HomeCoolingPi-HEAD/PostTemperature/PostTemperature.py   HomeCoolingPi(Download)
import RPi_Temp
import plotlyClient
from tempodb import Client, DataPoint
 
 
 
		try:
			data = [DataPoint(datetime.now(), curNestTemp)]
			tempo_client.write_key("temp1", data)
			#data = [{ 'key':'temp1', 'v':curNestTemp}]
 
		try:
			data = [DataPoint(datetime.now(), curWUTemp)]
			tempo_client.write_key("temp2", data)
			#data = [{ 'key':'temp2', 'v':curWUTemp}]
 
		try:
			data = [DataPoint(datetime.now(), curRPiTemp)]
			tempo_client.write_key("temp3", data)
		except:
 
		try:
			data = [DataPoint(datetime.now(), curArduinoTemp)]
			tempo_client.write_key("temp4", data)
		except:

src/m/q/mqtt2cloud-HEAD/libs/services/TempoDB.py   mqtt2cloud(Download)
__license__ = 'GPL v3'
 
from tempodb import Client, DataPoint
from datetime import datetime
from CloudService import CloudService
        db =  self._databases[database]
        client = Client(db['api_key'], db['api_secret'])
        data = [DataPoint(datetime.now(), float(value))]
        client.write_key(series, data)
 

src/p/r/probe-0.0.2/probe/outputs.py   probe(Download)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from datetime import datetime
try: # make it optional!
    from tempodb import Client, DataPoint
    def send(self, key, value):
        self.client.write_key(
            key,
            [DataPoint(datetime.now(), value)]
        )

src/t/e/tempodb-pandas-0.1.1/tempodb_pandas/__init__.py   tempodb-pandas(Download)
from pandas import Series
from numpy import negative
from tempodb import DataPoint
 
 
def fromPandas(series):
    # I'm missing Haskell's zipWith here...
    return [DataPoint(x[0], x[1]) for x in zip(series.index, series)]
 
 

src/t/e/tempodb-python-HEAD/tempodb/client.py   tempodb-python(Download)
 
import tempodb
from tempodb import DataPoint, DataSet, DeleteSummary, Series, Summary
 
 

src/t/e/tempodb-0.5.0/tempodb/client.py   tempodb(Download)
 
import tempodb
from tempodb import DataPoint, DataSet, DeleteSummary, Series, Summary
 
 

src/h/o/HomeCoolingPi-HEAD/PostTemperature/plotlyClient.py   HomeCoolingPi(Download)
import plotly
import sys
from tempodb import Client, DataPoint
from time import sleep, localtime, strftime
from datetime import datetime, timedelta

src/t/e/tempodb-python-HEAD/tests/client/tests.py   tempodb-python(Download)
 
import tempodb
from tempodb import Client, DataPoint, DataSet, Series, Summary
 
 
        dataset = self.client.read_id('id', start, end)
 
        expected = DataSet(Series('id', 'key'), start, end, [DataPoint(start, 12.34)], Summary())
        self.client.session.get.assert_called_once_with(
            'https://example.com/v1/series/id/id/data/?start=2012-03-27T00%3A00%3A00&end=2012-03-28T00%3A00%3A00',
        dataset = self.client.read_key('key1', start, end)
 
        expected = DataSet(Series('id', 'key1'), start, end, [DataPoint(start, 12.34)], Summary())
        self.client.session.get.assert_called_once_with(
            'https://example.com/v1/series/key/key1/data/?start=2012-03-27T00%3A00%3A00&end=2012-03-28T00%3A00%3A00',
        dataset = self.client.read_key('ke:y/1', start, end)
 
        expected = DataSet(Series('id', 'ke:y/1'), start, end, [DataPoint(start, 12.34)], Summary())
        self.client.session.get.assert_called_once_with(
            'https://example.com/v1/series/key/ke%3Ay%2F1/data/?start=2012-03-27T00%3A00%3A00&end=2012-03-28T00%3A00%3A00',
        datasets = self.client.read(start, end, keys=['key1'])
 
        expected = [DataSet(Series('id', 'key1'), start, end, [DataPoint(start, 12.34)], Summary())]
        self.client.session.get.assert_called_once_with(
            'https://example.com/v1/data/?start=2012-03-27T00%3A00%3A00&end=2012-03-28T00%3A00%3A00&key=key1',

src/t/e/tempodb-python-HEAD/tests/base/dataset_tests.py   tempodb-python(Download)
from unittest2 import TestCase
 
from tempodb import DataPoint, DataSet, Series, Summary
 
 
    def test_init(self):
        start = datetime.datetime(2012, 1, 1)
        end = datetime.datetime(2012, 1, 2)
        series = Series("id", "key")
        data = [DataPoint(start, 12.34), DataPoint(end, 23.45)]

  1 | 2  Next