def upload_files(self, upload): if upload.sources == "sources": return methods.Methods(upload, self.open_file(upload)).upload_sources() if upload.sources == "translations": return methods.Methods( upload, self.open_file(upload)).upload_translations()
def __init__(self, problem): self.methods = methods.Methods() # Information about the method self.method = problem[0] self.auxiliary_method = problem[1] self.order = problem[2] # Information about the problem self.ts = self.get_ts(problem[3]) self.h = problem[3][1] self.ys = problem[4] + [0] * (len(self.ts) - len(problem[4]) ) # Complets the list of ys with 0s # Information about the function self.f_expr = problem[5]
def __init__(self, input_file=None, should_print=True, verbose=False, should_plot=False): # Definindo os símbolos t e y que serão usados nas funções de entrada self.t, self.y = sympy.symbols("t y") # Os métodos que podem ser resolvidos self.methods = methods.Methods() # O modulo de apresentação dos resultados self.plotter = plotter.Plotter() if input_file is not None: with open(input_file) as input_data: for problem_definition in input_data: problem = self.get_problem_from_definition( problem_definition) self.solve(problem, should_print=should_print, verbose=verbose, should_plot=should_plot)
def createMethObj(self): self.meth = meth.Methods()
def download_project(self, download): return methods.Methods(download, self.open_file(download)).download_project()
def list_files(self, list_f): return methods.Methods(list_f, self.open_file(list_f)).list_project_files()
def test(self, test): return methods.Methods(test, self.open_file(test)).test()
msg = form.getvalue('text') if (msg == None): msg = "" param1 = getIntValue(form.getvalue('param1')) param2 = getIntValue(form.getvalue('param2')) param3 = getIntValue(form.getvalue('param3')) param4 = getIntValue(form.getvalue('param4')) param5 = getIntValue(form.getvalue('param5')) param6 = getIntValue(form.getvalue('param6')) PORT = 8008 HOST = '127.0.0.1' # Symbolic name meaning all available interfaces s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((HOST, PORT)) drawer = methods.Methods() #drawer.displayObjects() if (operation == 0): #print "Adding New Line" drawer.addLine((param1, param2), (param3, param4)) serializedMessage = pickle.dumps( (drawer.obj[-1], 1, None, username, (None, None))) s.send(serializedMessage + "end") elif (operation == 1): #print "Adding New Triangle" drawer.addTriangle((param1, param2), (param3, param4), (param5, param6)) serializedMessage = pickle.dumps( (drawer.obj[-1], 1, None, username, (None, None))) s.send(serializedMessage + "end")