Ejemplo n.º 1
0
 def __init__(self):
     """-1 is used as invalid value everywhere"""
     self.__api = Bittrex(API_KEY, API_SECRET)
     self.__data = Data()
     self.__last_valid_data = Data()
     self.__market_sum = dict()
     self.__market_sum_last_valid = dict()
     self.__validity_vector = dict()
     self.__market_sum_validity_vector = np.full(NUM_OF_SAMPLES, -1, int)
Ejemplo n.º 2
0
 def get_words_num(self):
     my_map = self.script_map
     ret = {}
     for col in my_map:
         x = col['person']
         count = len(Data.get_token(col['text']))
         ret[x] = count if x not in ret.keys() else ret[x] + count
     return ret
Ejemplo n.º 3
0
 def get_tokens(self):
     ret = []
     for col in self.script_map:
         ret += Data.get_token(col['text'])  # col['text'].lower().split()
     return ret
Ejemplo n.º 4
0
 def get_char_tokens(self, person):
     ret = []
     for col in self.script_map:
         if col['person'].upper() == person.upper():
             ret += Data.get_token(col['text'])
     return ret
Ejemplo n.º 5
0
 def __init__(self, name):
     self.movie_name = name
     self.soup = bs(Data.script(name), features='html.parser')
     self.script_map = FirstFormatter.get_script_map(self.soup)