def make_selection(self, use_all_notes=False, refresh_user_data=True): self.refresh_user_data = refresh_user_data self.use_all_notes = use_all_notes self.all_notes = [x for x in note_mapping if x['clef'] in self.clef] if self.use_all_notes: self.selection = self.all_notes else: try: u = User_data('45') u.get_data(self.refresh_user_data) u.calc_hitrate() u.get_bad_performance() u.make_selection(self.all_notes) self.selection = u.selection except: print ('Couldn\'t load user data') print ('using all notes') self.selection = self.all_notes else: print ('Using only notes with poor user performance') return u
def make_selection(self, use_all_notes=False, refresh_user_data=True): self.refresh_user_data = refresh_user_data self.use_all_notes = use_all_notes self.all_notes = [x for x in note_mapping if x['clef'] in self.clef] if self.use_all_notes: self.selection = self.all_notes else: try: u = User_data('45') u.get_data(self.refresh_user_data) u.calc_hitrate() u.get_bad_performance() u.make_selection(self.all_notes) self.selection = u.selection except: print('Couldn\'t load user data') print('using all notes') self.selection = self.all_notes else: print('Using only notes with poor user performance') return u