mirror of
https://github.com/titanscouting/tra-superscript.git
synced 2024-12-30 19:39:09 +00:00
superscript.py v 0.8.1
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
parent
71adc97277
commit
5b89825f0b
@ -1,5 +1,5 @@
|
||||
{
|
||||
"max-threads": 8,
|
||||
"max-threads": 1,
|
||||
"team": "",
|
||||
"competition": "2020ilch",
|
||||
"key":{
|
||||
|
@ -3,10 +3,12 @@
|
||||
# Notes:
|
||||
# setup:
|
||||
|
||||
__version__ = "0.8.0"
|
||||
__version__ = "0.8.1"
|
||||
|
||||
# changelog should be viewed using print(analysis.__changelog__)
|
||||
__changelog__ = """changelog:
|
||||
0.8.1:
|
||||
- optimized matchloop further by bypassing GIL
|
||||
0.8.0:
|
||||
- added multithreading to matchloop
|
||||
- tweaked user log
|
||||
@ -122,6 +124,7 @@ import json
|
||||
import numpy as np
|
||||
from os import system, name
|
||||
from pathlib import Path
|
||||
from multiprocessing import Pool
|
||||
import matplotlib.pyplot as plt
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
import time
|
||||
@ -148,7 +151,7 @@ def main():
|
||||
print("[OK] configs loaded")
|
||||
|
||||
print("[OK] starting threads")
|
||||
exec_threads = ThreadPoolExecutor(max_workers = config["max-threads"])
|
||||
exec_threads = Pool(processes = config["max-threads"])
|
||||
print("[OK] threads started")
|
||||
|
||||
apikey = config["key"]["database"]
|
||||
@ -230,10 +233,6 @@ def load_match(apikey, competition):
|
||||
|
||||
return d.get_match_data_formatted(apikey, competition)
|
||||
|
||||
def matchloop(apikey, competition, data, tests): # expects 3D array with [Team][Variable][Match]
|
||||
|
||||
global exec_threads
|
||||
|
||||
def simplestats(data_test):
|
||||
|
||||
data = np.array(data_test[0])
|
||||
@ -263,6 +262,10 @@ def matchloop(apikey, competition, data, tests): # expects 3D array with [Team][
|
||||
if test == "regression_sigmoidal":
|
||||
return an.regression(ranges, data, ['sig'])
|
||||
|
||||
def matchloop(apikey, competition, data, tests): # expects 3D array with [Team][Variable][Match]
|
||||
|
||||
global exec_threads
|
||||
|
||||
class AutoVivification(dict):
|
||||
def __getitem__(self, item):
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user