mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2025-09-05 22:47:22 +00:00
Merge branch 'master' of https://github.com/titanscout2022/tr2022-strategy
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,5 @@
|
|||||||
2022,4,5,10,15,8,954978,84,74
|
4,5,10,15,8,954978,84,74
|
||||||
2011,3,6,9,12,15,7,856,9
|
3,6,9,12,15,7,856,9
|
||||||
1101,4,16,32,64,128,2,4234,-56
|
4,16,32,64,128,2,4234,-56
|
||||||
821374,7,8,9,79.33333333,170.3333333,636647,5874.666667,-121
|
7,8,9,79.33333333,170.3333333,636647,5874.666667,-121
|
||||||
5,4,8,8,103.8333333,230.3333333,1114135,7949.666667,-186
|
4,8,8,103.8333333,230.3333333,1114135,7949.666667,-186
|
||||||
|
|
@@ -1,5 +1,5 @@
|
|||||||
2022,1,2,3,4,5,6,7,8
|
1,2,3,4,5,6,7,8
|
||||||
2011,5,6,7,8,9,10,11,12
|
5,6,7,8,9,10,11,12
|
||||||
1101,1000,2000,3000,4000,5000,6000,7000,8000
|
1000,2000,3000,4000,5000,6000,7000,8000
|
||||||
821374,0,0,0,0,0,0,0,1
|
0,0,0,0,0,0,0,1
|
||||||
5,3,5,6,7,8.5,9.8,11.1,12.4
|
3,5,6,7,8.5,9.8,11.1,12.4
|
||||||
|
|
@@ -1 +1 @@
|
|||||||
2022, 21, 23, 39, 50, 89, 97, 191, 213, 233, 236, 272, 289, 308, 310, 314, 317, 329, 355, 428, 436
|
21, 23, 39, 50, 89, 97, 191, 213, 233, 236, 272, 289, 308, 310, 314, 317, 329, 355, 428, 436
|
|
@@ -3,9 +3,11 @@
|
|||||||
#Notes:
|
#Notes:
|
||||||
#setup:
|
#setup:
|
||||||
|
|
||||||
__version__ = "1.0.5.002"
|
__version__ = "1.0.5.003"
|
||||||
|
|
||||||
__changelog__ = """changelog:
|
__changelog__ = """changelog:
|
||||||
|
1.0.5.003:
|
||||||
|
- hotfix: actually pushes data correctly now
|
||||||
1.0.5.002:
|
1.0.5.002:
|
||||||
- more information given
|
- more information given
|
||||||
- performance improvements
|
- performance improvements
|
||||||
@@ -36,7 +38,7 @@ __author__ = (
|
|||||||
"Arthur Lu <arthurlu@ttic.edu>, "
|
"Arthur Lu <arthurlu@ttic.edu>, "
|
||||||
"Jacob Levine <jlevine@ttic.edu>,"
|
"Jacob Levine <jlevine@ttic.edu>,"
|
||||||
)
|
)
|
||||||
|
s
|
||||||
import firebase_admin
|
import firebase_admin
|
||||||
from firebase_admin import credentials
|
from firebase_admin import credentials
|
||||||
from firebase_admin import firestore
|
from firebase_admin import firestore
|
||||||
@@ -72,7 +74,7 @@ def titanservice():
|
|||||||
|
|
||||||
end = time.time()
|
end = time.time()
|
||||||
|
|
||||||
print("[OK] loaded data in " + str(end - start) + "seconds")
|
print("[OK] loaded data in " + str(end - start) + " seconds")
|
||||||
|
|
||||||
#assumes that team number is in the first column, and that the order of teams is the same across all files
|
#assumes that team number is in the first column, and that the order of teams is the same across all files
|
||||||
#unhelpful comment
|
#unhelpful comment
|
||||||
@@ -117,10 +119,10 @@ def titanservice():
|
|||||||
|
|
||||||
measure_stats.append(teams[i] + list(analysis.basic_stats(line, 0, 0)) + list(analysis.histo_analysis(line, 1, -3, 3)) + ofbest_curve + r2best_curve)
|
measure_stats.append(teams[i] + list(analysis.basic_stats(line, 0, 0)) + list(analysis.histo_analysis(line, 1, -3, 3)) + ofbest_curve + r2best_curve)
|
||||||
|
|
||||||
stats.append(list(measure_stats))
|
stats.append(list(measure_stats))
|
||||||
nishant = []
|
nishant = []
|
||||||
|
|
||||||
for i in range(len(scores)):
|
for i in range(len(scores)):
|
||||||
|
|
||||||
ofbest_curve = [None]
|
ofbest_curve = [None]
|
||||||
r2best_curve = [None]
|
r2best_curve = [None]
|
||||||
@@ -168,21 +170,23 @@ def titanservice():
|
|||||||
score_out = {}
|
score_out = {}
|
||||||
|
|
||||||
#print(stats)
|
#print(stats)
|
||||||
|
|
||||||
|
#print(stats[0])
|
||||||
|
|
||||||
for i in range(len(teams)):
|
#for i in range(len(teams)):
|
||||||
json_out[str(teams[i][0])] = (stats[0][i])
|
# json_out[str(teams[i][0])] = (stats[0][i])
|
||||||
|
|
||||||
for i in range(len(teams)):
|
for i in range(len(teams)):
|
||||||
score_out[str(teams[i][0])] = (nishant[i])
|
score_out[str(teams[i][0])] = (nishant[i])
|
||||||
|
|
||||||
print(json_out)
|
|
||||||
|
|
||||||
#print(json_out.get('5'))
|
#print(json_out.get('5'))
|
||||||
|
|
||||||
location = db.collection(u'stats').document(u'stats-noNN')
|
location = db.collection(u'stats').document(u'stats-noNN')
|
||||||
for i in range(len(teams)):
|
for i in range(len(teams)):
|
||||||
general_general_stats = location.collection(teams[i][0])
|
general_general_stats = location.collection(teams[i][0])
|
||||||
|
|
||||||
for j in range(len(files)):
|
for j in range(len(files)):
|
||||||
|
json_out[str(teams[i][0])] = (stats[j][i])
|
||||||
general_general_stats.document(files[j]).set({'stats':json_out.get(teams[i][0])})
|
general_general_stats.document(files[j]).set({'stats':json_out.get(teams[i][0])})
|
||||||
|
|
||||||
for i in range(len(teams)):
|
for i in range(len(teams)):
|
||||||
@@ -232,7 +236,7 @@ def service():
|
|||||||
time.sleep(300 - (end - start)) #executes once every 5 minutes
|
time.sleep(300 - (end - start)) #executes once every 5 minutes
|
||||||
|
|
||||||
warnings.simplefilter("ignore")
|
warnings.simplefilter("ignore")
|
||||||
# Use a service account
|
#Use a service account
|
||||||
cred = credentials.Certificate('keys/keytemp.json')
|
cred = credentials.Certificate('keys/keytemp.json')
|
||||||
firebase_admin.initialize_app(cred)
|
firebase_admin.initialize_app(cred)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user