def __init__( self, name, notebook ): self.vbox = gtk.VBox() self.name = gtk.Label( name ) notebook.append_page( self.vbox, self.name ) notebook.show_all() self.section = section.section(self.vbox)
def changeSection(self, name): """ Change flow of the conversation :param name: String :return: """ c = con() #return one tuple (id,name) aux = c.getSectionByName(name) #set the section with the id getting in previus step s = section(aux[0]) #change all patterns self.patterns = s.getPatterns()
def init(self): """ Init the chatbot :return: """ #time.ctime(os.path.getmtime('brain.db')) a = analyze() #get MainSection self.sectionActual = a.getSectionMain() if self.sectionActual == -1: print("Nao ha question main!") return 0 #section main s = section(self.sectionActual) #get patterns of the section main self.patterns = s.getPatterns() #get all sections self.sections = a.getSections()
def setSection(self,introductions): self.sections = [] for index in range(0,len(introductions)): self.sections.append(section(introductions[index]))
def __getattr__(self, name): return section(self, name) # called if self.key not exists
def createClassSection(self, classInfo): sections = [[], [], []] for classSection in classInfo: currsection = section.section(classSection) sections[self.classType[currsection.type]].append(currsection) return sections
from section import section section(rotation=True, N_points=int(snakemake.wildcards.N_points), seed=int(snakemake.wildcards.seed), saving_path='', n_slices=int(snakemake.config['SLICES']))
from section import section class Survey: def start_survey(): pass def end(): pass section1 = section( 'Learning', 'This section is about how you are going with the learning in shecodes', ) section1 = section( 'Social', 'This section is about how you are going with the Socially in shecodes') section1 = section( 'Learning', 'This section is about how you are going with the Location and time in shecodes' )