DippyAI commited on
Commit
f1e0372
·
verified ·
1 Parent(s): 5ac1ca9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -25,7 +25,7 @@ def calculate_win_rate(df):
25
  for j in range(n):
26
  if i != j:
27
  if iswin(df.loc[i, 'total_score'], df.loc[j, 'total_score'],
28
- df.loc[i, 'block'], df.loc[j, 'block']):
29
  win_counts[i] += 1
30
 
31
  return win_counts / (n - 1) # Divide by (n-1) as each row isn't compared with itself
@@ -79,6 +79,7 @@ def leaderboard_dashboard():
79
 
80
  # Convert the data to a DataFrame
81
  minerboard = pd.DataFrame(minerboard_data)
 
82
  minerboard.loc[minerboard['status'] == 'FAILED', 'total_score'] = 0
83
 
84
  minerboard['status'] = minerboard['status'].map(lambda status: status_emojis.get(status, status))
 
25
  for j in range(n):
26
  if i != j:
27
  if iswin(df.loc[i, 'total_score'], df.loc[j, 'total_score'],
28
+ df.loc[i, 'block'], df.loc[j, 'block']) and df.loc[i, 'real_status'] == 'COMPLETED':
29
  win_counts[i] += 1
30
 
31
  return win_counts / (n - 1) # Divide by (n-1) as each row isn't compared with itself
 
79
 
80
  # Convert the data to a DataFrame
81
  minerboard = pd.DataFrame(minerboard_data)
82
+ minerboard['real_status'] = minerboard['status']
83
  minerboard.loc[minerboard['status'] == 'FAILED', 'total_score'] = 0
84
 
85
  minerboard['status'] = minerboard['status'].map(lambda status: status_emojis.get(status, status))