Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -36,9 +36,9 @@ warnings.filterwarnings('ignore')
|
|
36 |
# import yahoo_oauth
|
37 |
import json
|
38 |
#import openpyxl
|
39 |
-
#from sklearn import preprocessing
|
40 |
from datetime import timedelta
|
41 |
-
#import dataframe_image as dfi
|
42 |
# from google.colab import drive
|
43 |
def percentile(n):
|
44 |
def percentile_(x):
|
@@ -46,25 +46,25 @@ def percentile(n):
|
|
46 |
percentile_.__name__ = 'percentile_%s' % n
|
47 |
return percentile_
|
48 |
|
49 |
-
import os
|
50 |
-
#import praw
|
51 |
-
import matplotlib.pyplot as plt
|
52 |
-
import matplotlib.colors
|
53 |
-
import matplotlib.colors as mcolors
|
54 |
-
cmap_sum = matplotlib.colors.LinearSegmentedColormap.from_list("", ["#4285f4","#FFFFFF","#F0E442"])
|
55 |
#import pybaseball
|
56 |
import math
|
57 |
-
import matplotlib.ticker as mtick
|
58 |
-
import matplotlib.ticker as ticker
|
59 |
|
60 |
-
colour_palette = ['#FFB000','#648FFF','#785EF0',
|
61 |
-
|
62 |
-
import matplotlib.colors as mcolors
|
63 |
-
from matplotlib.ticker import FuncFormatter
|
64 |
-
from matplotlib.font_manager import FontProperties
|
65 |
|
66 |
import numpy as np
|
67 |
-
import matplotlib.pyplot as plt
|
68 |
import matplotlib.colors
|
69 |
|
70 |
#x,y,c = zip(*np.random.rand(30,3)*4-2)
|
@@ -387,7 +387,7 @@ def server(input, output, session):
|
|
387 |
'L'+str(n_2)+' PP%': '{:.0%}',
|
388 |
'L'+str(n_3)+' PP%': '{:.0%}',
|
389 |
'Roster%': '{:.0%}',
|
390 |
-
},).background_gradient(cmap=co, subset=[x for x in cols if x.endswith('PP%')]+['Roster%'])
|
391 |
|
392 |
return df_style_bang
|
393 |
|
|
|
36 |
# import yahoo_oauth
|
37 |
import json
|
38 |
#import openpyxl
|
39 |
+
# from sklearn import preprocessing
|
40 |
from datetime import timedelta
|
41 |
+
# import dataframe_image as dfi
|
42 |
# from google.colab import drive
|
43 |
def percentile(n):
|
44 |
def percentile_(x):
|
|
|
46 |
percentile_.__name__ = 'percentile_%s' % n
|
47 |
return percentile_
|
48 |
|
49 |
+
# import os
|
50 |
+
# import praw
|
51 |
+
# import matplotlib.pyplot as plt
|
52 |
+
# import matplotlib.colors
|
53 |
+
# import matplotlib.colors as mcolors
|
54 |
+
# cmap_sum = matplotlib.colors.LinearSegmentedColormap.from_list("", ["#4285f4","#FFFFFF","#F0E442"])
|
55 |
#import pybaseball
|
56 |
import math
|
57 |
+
# import matplotlib.ticker as mtick
|
58 |
+
# import matplotlib.ticker as ticker
|
59 |
|
60 |
+
# colour_palette = ['#FFB000','#648FFF','#785EF0',
|
61 |
+
# '#DC267F','#FE6100','#3D1EB2','#894D80','#16AA02','#B5592B','#A3C1ED']
|
62 |
+
# import matplotlib.colors as mcolors
|
63 |
+
# from matplotlib.ticker import FuncFormatter
|
64 |
+
# from matplotlib.font_manager import FontProperties
|
65 |
|
66 |
import numpy as np
|
67 |
+
# import matplotlib.pyplot as plt
|
68 |
import matplotlib.colors
|
69 |
|
70 |
#x,y,c = zip(*np.random.rand(30,3)*4-2)
|
|
|
387 |
'L'+str(n_2)+' PP%': '{:.0%}',
|
388 |
'L'+str(n_3)+' PP%': '{:.0%}',
|
389 |
'Roster%': '{:.0%}',
|
390 |
+
},).background_gradient(cmap=co, subset=[x for x in cols if x.endswith('PP%')]+['Roster%'])
|
391 |
|
392 |
return df_style_bang
|
393 |
|