# coding: cp1254 import socket, sys, os, threading from core.colorama import Fore, Style, Back, init init(autoreset=True) try: import dbm except: import anydbm as dbm class Komando: # :) def __init__(self, host="localhost", port=8088, mode="server"): self.mode = mode self.host = host self.port = port self.machine = False self.configureDB() def start(self): if (self.mode == "server"): self.startServer() elif (self.mode == "client"): self.startClient() def configureDB(self): # veritabaný ayarlama print(Fore.YELLOW + "[~] " + Style.RESET_ALL + "Configuring db") self.vt = dbm.open("vt" + os.sep + "komut.db", "c") def addDB(self, **command):
from core.colorama import init, Fore import pandas as pd import numpy as np import matplotlib.pyplot as plt import pylab init() def roundup(x): return int(round(x / 10.0)) * 10 # Calls the initialized functions, to create dataframe and make array team composition def createDataframe(match): df = __createDataFrame(match) teamComposition = __teamComposition(match, df) print(Fore.RED + 'Dataframe is created.') return df, teamComposition # Initialize and create dataframe def __createDataFrame(match): timeline = pd.DataFrame(columns=[ 'id', 'teamId', 'minutes', 'seconds', 'totalSeconds', 'timestamp' ]) for event in match.getEvents(): # if event.findQualifierByQualifierId('56') != None: # print(event.findQualifierByQualifierId('56').getValue()) # if event.hasPlayer():