Merge branch 'release/v10.43' into develop
This commit is contained in:
+2
-2
@@ -2007,9 +2007,9 @@ def read_df_sql(id):
|
|||||||
f = 'media/strokedata_{id}.parquet.gz'.format(id=id)
|
f = 'media/strokedata_{id}.parquet.gz'.format(id=id)
|
||||||
df = pd.read_parquet(f)
|
df = pd.read_parquet(f)
|
||||||
except OSError:
|
except OSError:
|
||||||
rowdata,row = getrowdata(id=ids[0])
|
rowdata,row = getrowdata(id=id)
|
||||||
if rowdata and len(rowdata.df):
|
if rowdata and len(rowdata.df):
|
||||||
data = dataprep(rowdata.df,id=ids[0],bands=True,otwpower=True,barchart=True)
|
data = dataprep(rowdata.df,id=id,bands=True,otwpower=True,barchart=True)
|
||||||
df = pd.read_parquet(f)
|
df = pd.read_parquet(f)
|
||||||
|
|
||||||
df = df.fillna(value=0)
|
df = df.fillna(value=0)
|
||||||
|
|||||||
+6
-6
@@ -130,8 +130,8 @@ def handle_c2_import_stroke_data(c2token,
|
|||||||
|
|
||||||
authorizationstring = str('Bearer ' + c2token)
|
authorizationstring = str('Bearer ' + c2token)
|
||||||
headers = {'Authorization': authorizationstring,
|
headers = {'Authorization': authorizationstring,
|
||||||
'user-agent': 'sanderroosendaal',
|
'user-agent': 'sanderroosendaal',
|
||||||
'Content-Type': 'application/json'}
|
'Content-Type': 'application/json'}
|
||||||
url = "https://log.concept2.com/api/users/me/results/"+str(c2id)+"/strokes"
|
url = "https://log.concept2.com/api/users/me/results/"+str(c2id)+"/strokes"
|
||||||
s = requests.get(url,headers=headers)
|
s = requests.get(url,headers=headers)
|
||||||
if s.status_code == 200:
|
if s.status_code == 200:
|
||||||
@@ -191,10 +191,10 @@ def getagegrouprecord(age,sex='male',weightcategory='hwt',
|
|||||||
distance=2000,duration=None,indf=pd.DataFrame()):
|
distance=2000,duration=None,indf=pd.DataFrame()):
|
||||||
|
|
||||||
if not duration:
|
if not duration:
|
||||||
try:
|
try:
|
||||||
df = indf[indf['distance'] == distance]
|
df = indf[indf['distance'] == distance]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
df = pd.DataFrame()
|
df = pd.DataFrame()
|
||||||
else:
|
else:
|
||||||
duration = 60*int(duration)
|
duration = 60*int(duration)
|
||||||
df = indf[indf['duration'] == duration]
|
df = indf[indf['duration'] == duration]
|
||||||
|
|||||||
Reference in New Issue
Block a user