Skip to content

Instantly share code, notes, and snippets.



Last active Jul 11, 2016
What would you like to do?
from datetime import datetime, timedelta
from repository_base import Repository
class FakeRepository(Repository):
def get_data(self,topic_name, numdays):
# Create some test data
# Three values from yesterday and three values from today
dataPoint = (
values = []
labels = []
for value,time in dataPoint:
if (time > (today - timedelta(numdays))):
return labels, values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment