refined hard
This commit is contained in:
@@ -38,7 +38,10 @@ import pandas as pd
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
import itertools
|
import itertools
|
||||||
import math
|
import math
|
||||||
from tasks import handle_sendemail_unrecognized,handle_sendemail_breakthrough
|
from tasks import (
|
||||||
|
handle_sendemail_unrecognized,handle_sendemail_breakthrough,
|
||||||
|
handle_sendemail_hard
|
||||||
|
)
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from sqlalchemy import create_engine
|
from sqlalchemy import create_engine
|
||||||
@@ -672,7 +675,7 @@ def save_workout_database(f2,r,dosmooth=True,workouttype='rower',
|
|||||||
if res:
|
if res:
|
||||||
isbreakthrough = True
|
isbreakthrough = True
|
||||||
res = datautils.updatecp(delta,cpvalues,r)
|
res = datautils.updatecp(delta,cpvalues,r)
|
||||||
if res2:
|
if res2 and not isbreakthrough:
|
||||||
ishard = True
|
ishard = True
|
||||||
|
|
||||||
# submit email task to send email about breakthrough workout
|
# submit email task to send email about breakthrough workout
|
||||||
|
|||||||
@@ -151,6 +151,7 @@ def isbreakthrough(delta,cpvalues,p0,p1,p2,p3,ratio):
|
|||||||
res = np.sum(cpvalues>pwr)
|
res = np.sum(cpvalues>pwr)
|
||||||
res2 = np.sum(cpvalues>pwr2)
|
res2 = np.sum(cpvalues>pwr2)
|
||||||
|
|
||||||
|
|
||||||
btdf = pd.DataFrame(
|
btdf = pd.DataFrame(
|
||||||
{
|
{
|
||||||
'delta':delta[cpvalues>pwr],
|
'delta':delta[cpvalues>pwr],
|
||||||
|
|||||||
Reference in New Issue
Block a user