My fitness app
"""with open('Daily Summaries.csv', 'r') as f:
read_data = f.read()
print(read_data)"""
# steps = []
# for line in open("Daily Summaries.csv"):
# step = line.split()[4]
# steps.append (step)
# for i in range (10):
# # print "Data point #" +str(i)
# print ":)"*i
test_steps = [32, 45, 75, 88, 92, 84, 79, 63, 42, 20, 32, 56, 62, 49, 43]
for i in range(len(test_steps)):
print int(test_steps[i])*"#"
print
print
#from matplotlib import pyplot as plt
#
def mk_float(s):
s = s.strip()
try:
return float(s)
except ValueError:
return 0.0
steps = []
lazys = []
date = []
for line in open("Daily Summaries.csv"):
step = mk_float(line.split(',')[11])
lazy = mk_float(line.split(',')[15])
steps.append(step)
lazys.append(lazy)
print(step)
for data_index in range(len(steps)):
thousands_steps = int(steps[data_index]/1000)
million_lazys = int(lazys[data_index]/10000000)
print "#",str(data_index).rjust(3),":", str(thousands_steps).rjust(2),"Thousand Steps:", million_lazys*':| ',(thousands_steps*'$').rjust(31-million_lazys*3, '.')
# x = range(len(steps))
# y = steps
# plt.plot(x,y)
# plt.title('Steps')
# plt.ylabel('Y axis')
# plt.xlabel('X axis')
# plt.show()
read_data = f.read()
print(read_data)"""
# steps = []
# for line in open("Daily Summaries.csv"):
# step = line.split()[4]
# steps.append (step)
# for i in range (10):
# # print "Data point #" +str(i)
# print ":)"*i
test_steps = [32, 45, 75, 88, 92, 84, 79, 63, 42, 20, 32, 56, 62, 49, 43]
for i in range(len(test_steps)):
print int(test_steps[i])*"#"
#from matplotlib import pyplot as plt
#
def mk_float(s):
s = s.strip()
try:
return float(s)
except ValueError:
return 0.0
steps = []
lazys = []
date = []
for line in open("Daily Summaries.csv"):
step = mk_float(line.split(',')[11])
lazy = mk_float(line.split(',')[15])
steps.append(step)
lazys.append(lazy)
print(step)
for data_index in range(len(steps)):
thousands_steps = int(steps[data_index]/1000)
million_lazys = int(lazys[data_index]/10000000)
print "#",str(data_index).rjust(3),":", str(thousands_steps).rjust(2),"Thousand Steps:", million_lazys*':| ',(thousands_steps*'$').rjust(31-million_lazys*3, '.')
# x = range(len(steps))
# y = steps
# plt.plot(x,y)
# plt.title('Steps')
# plt.ylabel('Y axis')
# plt.xlabel('X axis')
# plt.show()
# 8 : 5 Thousand Steps: :| :| :| :| ..............$$$$$
# 9 : 4 Thousand Steps: :| :| :| :| :| :| :| ......$$$$
# 10 : 0 Thousand Steps: :| :| :| :| :| :| :| :| .......
# 11 : 3 Thousand Steps: :| :| :| :| :| :| :| .......$$$
# 12 : 0 Thousand Steps: :| :| :| :| :| :| :| :| .......
# 13 : 1 Thousand Steps: :| :| :| :| :| :| :| :| ......$
# 14 : 9 Thousand Steps: :| :| :| :| :| :| :| .$$$$$$$$$
# 15 : 6 Thousand Steps: :| :| :| :| :| :| .......$$$$$$
# 16 : 4 Thousand Steps: :| :| :| :| :| :| :| ......$$$$
# 17 : 0 Thousand Steps: :| :| :| :| :| :| :| :| .......
# 18 : 6 Thousand Steps: :| :| :| :| :| :| :| ....$$$$$$
# 19 : 2 Thousand Steps: :| :| :| :| :| :| :| :| .....$$
# 20 : 1 Thousand Steps: :| :| :| :| :| :| :| :| ......$
# 21 : 4 Thousand Steps: :| :| :| :| ...............$$$$
# 9 : 4 Thousand Steps: :| :| :| :| :| :| :| ......$$$$
# 10 : 0 Thousand Steps: :| :| :| :| :| :| :| :| .......
# 11 : 3 Thousand Steps: :| :| :| :| :| :| :| .......$$$
# 12 : 0 Thousand Steps: :| :| :| :| :| :| :| :| .......
# 13 : 1 Thousand Steps: :| :| :| :| :| :| :| :| ......$
# 14 : 9 Thousand Steps: :| :| :| :| :| :| :| .$$$$$$$$$
# 15 : 6 Thousand Steps: :| :| :| :| :| :| .......$$$$$$
# 16 : 4 Thousand Steps: :| :| :| :| :| :| :| ......$$$$
# 17 : 0 Thousand Steps: :| :| :| :| :| :| :| :| .......
# 18 : 6 Thousand Steps: :| :| :| :| :| :| :| ....$$$$$$
# 19 : 2 Thousand Steps: :| :| :| :| :| :| :| :| .....$$
# 20 : 1 Thousand Steps: :| :| :| :| :| :| :| :| ......$
# 21 : 4 Thousand Steps: :| :| :| :| ...............$$$$