def build_and_run(): data = json.loads(request.data) if 'code' not in data or 'lang' not in data: return 'No code and language' code = data['code'] lang = data['lang'] result = eu.build_and_run(code, lang) return jsonify(result)
def builder(): data = json.loads(request.data) if 'code' not in data or 'language' not in data: return 'Executor - please provide user codes and language' code = data['code'] language = data['language'] print 'executor.py - get called with code %s in %s' % (code, language) result = eu.build_and_run(code, language) return jsonify(result)
def build_and_run(): data = request.get_json() if 'usercode' not in data or 'language' not in data: return 'You should provide "code" and "language"' code = data['usercode'] lang = data['language'] print("API get called with code: %s in %s" % (code, lang)) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): data = json.loads(request.data) if 'code' not in data or 'lang' not in data: return 'You should provide both "code" and "data"' code = data['code'] lang = data['lang'] print 'API go called with code %s in %s' % (code, lang) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): data = request.get_json() if 'code' not in data or 'lang' not in data: return 'you should provide "code" and "lang"' code = data['code'] lang = data['lang'] print('API got call with code: %s in %s' % (code, lang)) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): data = json.loads(request.data) if 'code' not in data or 'language' not in data: return "Should provide both 'code' and 'language'" code = data['code'] language = data['language'] print 'API go called with code %s in %s' % (code, language) result = eu.build_and_run(code, language) return jsonify(result)
def getResults(): print("getResults") data = request.get_json() if 'code' not in data or 'lang' not in data: return 'You should provide "code and "lang"' code = data['code'] lang = data['lang'] print("api got called with code: %s in %s" % (code, lang)) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): data = request.get_json() if 'code' not in data or 'lang' not in data: return 'You should provide "code" and "lang"' code = data['code'] lang = data['lang'] print("API got called with code: %s in %s" % (code, lang)) # return jsonify({'build': 'build jajaja', 'run': 'run from oajsfoaij'}) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): data = json.loads(request.data) if 'code' not in data or 'language' not in data: return "Should provide both 'code' and 'language'" code = data['code'] language = data['language'] print 'API go called with code %s in %s' % (code, language) result = eu.build_and_run(code, language) return jsonify(result)
def result(): data = request.get_json() if 'code' not in or 'lang' not in data: return 'You Should Provide code and language.' code = data['code'] lang = data['lang'] print("API get called with code: %s in %s" % (code, lang)) # return jsonify('build':'build jajajaja', 'run':'run from sdf'); result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): data = json.loads(request.data) if 'code' not in data or 'lang' not in data: return "You should provide both 'code' and 'lang'" code = data['code'] lang = data['lang'] print "API got called with code: %s in %s" % (code, lang) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): data = request.get_json() if 'user_code' not in data or 'selected_lang' not in data: return 'You should provide "code" and "lang"' elif (data['selected_lang'] == 'python'): return 'Python function not implemented yet.' user_code = data['user_code'] selected_lang = data['selected_lang'] result = eu.build_and_run(user_code, selected_lang) return jsonify(result)
def build_and_run(): print "get called!" data = json.loads(request.data) if 'code' not in data or 'lang' not in data: return "You should provide both 'code' and 'lang'" code = data['code'] lang = data['lang'] print "API got called with code %s in %s" % (code, lang) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): data = request.get_json() if 'code' not in data or 'lang' not in data: return 'You should provide "code" or "data"' code = data['code'] lang = data['lang'] print("API got called with code : %s and language : %s" % (code, data)) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): data = json.loads(request.data) if 'code' not in data or 'lang' not in data: return 'You should provide both "code" and "lang"' code = data['code'] lang = data['lang'] print('API got called with code: {} in {}'.format(code, lang)) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): data = request.get_json() if 'code' not in data or 'lang' not in data: return 'Please submit your code or select your language' code = data['code'] lang = data['lang'] print("API got called with code: %s in %s" % (code, lang)) #return jsonify({'build':'Build successfuly','run':'Run successfully'}) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): #print('executor got payload: %s', request.data) data = json.loads(request.data) if 'code' not in data or 'lang' not in data: return 'missing data' code = data['code'] lang = data['lang'] print 'API go called with code %s in %s' % (code, lang) result = eu.build_and_run(lang, code) return json.dumps(result)
def build_and_run(): data = json.loads(request.data) if 'code' not in data or 'lang' not in data: return 'you should provide both code and lang' code = data['code'] lang = data['lang'] print 'API got called with code %s in %s' % (code, lang) # return jsonify({'build': 'build from flask', 'run': 'hello from flask'}) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): data = json.loads(request.data) ## here, we got data: it's a dict, ## when refering to a dict: data['propName'] ## make sense when json obj is converted to a dict if 'code' not in data or 'lang' not in data: return 'wrong data sent to me, dude' code = data['code'] lang = data['lang'] print 'I got u bro: %s and %s' % (code, lang) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): print "Got called: %s " % (request.data) print type(request.data) data = json.loads(request.data) print data if "code" not in data or "lang" not in data: return "you should provide both 'code 'and 'lang'" code = data['code'] lang = data['lang'] print "API got called with code: %s in %s" % (code, lang) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): data = request.get_json() if 'code' not in data or 'lang' not in data: return 'No code or language found' code = data['code'] lang = data['lang'] print("API got called with code: %s in %s" % (code, lang)) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): data = json.loads(request.data) if 'code' not in data or 'lang' not in data: return 'You should provide both code and language!' code = data['code'] lang = data['lang'] print 'API got called with code %s in %s' %(code, lang) result = eu.build_and_run(code, lang) # convert object to json format string return jsonify(result)
def build_and_run(): data = json.loads(request.data) if 'code' not in data or 'lang' not in data: return 'You should provide both "code" and "lang"' code = data['code'] lang = data['lang'] print "API got called with code: %s in %s" % (code, lang) # return jsonify({'build': 'hahaha build done', 'run': 'houhouhou run done'}) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): data = json.loads(request.data) #data=request.data #print(request.data) if 'code' not in data or 'lang' not in data: return "You should provide both 'code' and 'lang'" code = data['code'] lang = data['lang'] print "API GOT CALLED WITH CODE:%s in %s" %(code,lang) result = eu.build_and_run(code,lang) return jsonify(result)
def build_and_run(): data = request.get_json() if 'code' not in data or 'lang' not in data: return 'You should provide "code" and "lang"' code = data['code'] lang = data['lang'] # %s: string place holder print("API got called with code: %s in %s" % (code, lang)) result = eu.build_and_run(code, lang) # conver object to json format return jsonify(result)
def build_and_run(): data = json.loads(request.data) if 'code' not in data or 'lang' not in data: return 'Completely Error' code = data['code'] lang = data['lang'] print "Got request in %s" % (lang) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): print("Got called with {}.".format(request.data)) data = json.loads(request.data) if 'code' not in data or 'lang' not in data: return 'You should provide both code and language.' code = data['code'] lang = data['lang'] print('API called with code: {} in {}'.format(code, lang)) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): # get data from node server and check its validity data = request.get_json() if 'code' not in data or 'lang' not in data: return 'Invalid input from Node server' code = data['code'] lang = data['lang'] print("Executor receives request to execute: [%s]: %s" % (lang, code)) result = eu.build_and_run(code, lang) return jsonify(result) # send data to network --> serialization
def build_and_run(): data = request.get_json() if 'code' not in data or 'lang' not in data: return 'Please provide "code" and "language"' code = data['code'] lang = data['lang'] print("executor API got called with code: %s in %s" % (code, lang)) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): print("dbug") data = json.loads(request.data) if 'code' not in data or 'lang' not in data: return 'invalid data received, not data or language set' print("dbug") code = data['code'] lang = data['lang'] print('API got called with code %s in %s' % (code, lang)) #return jsonify({'build': 'build from flask', 'run': 'hello from flask'}) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): print("GOT CALLED !!!!!!!!!!!!!!!!!!!!!!") print("hahahah {} end!!!!".format(request)) data = json.loads(request.data) if 'code' not in data or 'lang' not in data: return "You should provide code and language! " code = data['code'] lang = data['lang'] print("API got called with code:{} in {}".format(code, lang)) result = eu.build_and_run(code, lang) return jsonify(result)
def build_and_run(): """ Build and Run """ print "Got called %s" % (request.data) data = json.loads(request.data) if "code" not in data or "lang" not in data: return "You should provide both code and lang!" code = data["code"] lang = data["lang"] result = eu.build_and_run(code, lang) return jsonify(result)