def ec_code(**args): label = curve_lmfdb_label(args['conductor'], args['iso'], args['number']) E = WebEC.by_label(label) Ecode = E.code() lang = args['download_type'] code = "%s %s code for working with elliptic curve %s\n\n" % (Comment[lang],Fullname[lang],label) if lang=='gp': lang = 'pari' for k in sorted_code_names: if lang in Ecode[k]: code += "\n%s %s: \n" % (Comment[lang],code_names[k]) code += Ecode[k][lang] + ('\n' if not '\n' in Ecode[k][lang] else '') return code
def ec_code(**args): print("args has keys %s" % to_dict(args).keys()) label = curve_lmfdb_label(args['conductor'], args['iso'], args['number']) E = WebEC.by_label(label) lang = args['download_type'] code = "%s %s code for working with elliptic curve %s\n\n" % (Comment[lang],Fullname[lang],label) if lang=='gp': lang = 'pari' for k in sorted_code_names: if lang in E.code[k]: code += "\n%s %s: \n" % (Comment[lang],code_names[k]) for line in E.code[k][lang]: code += line + "\n" return code
def ec_code(**args): print("args has keys %s" % to_dict(args).keys()) label = curve_lmfdb_label(args['conductor'], args['iso'], args['number']) E = WebEC.by_label(label) lang = args['download_type'] code = "%s %s code for working with elliptic curve %s\n\n" % ( Comment[lang], Fullname[lang], label) if lang == 'gp': lang = 'pari' for k in sorted_code_names: if lang in E.code[k]: code += "\n%s %s: \n" % (Comment[lang], code_names[k]) for line in E.code[k][lang]: code += line + "\n" return code
def ec_code(**args): label = curve_lmfdb_label(args['conductor'], args['iso'], args['number']) E = WebEC.by_label(label) if E == "Invalid label": return elliptic_curve_jump_error(label, {}) if E == "Curve not found": return elliptic_curve_jump_error(label, {}, missing_curve=True) Ecode = E.code() lang = args['download_type'] code = "%s %s code for working with elliptic curve %s\n\n" % (Comment[lang],Fullname[lang],label) if lang=='gp': lang = 'pari' for k in sorted_code_names: if lang in Ecode[k]: code += "\n%s %s: \n" % (Comment[lang],code_names[k]) code += Ecode[k][lang] + ('\n' if '\n' not in Ecode[k][lang] else '') return code
def by_triple_label(conductor,iso_label,number): full_label = curve_lmfdb_label(conductor,iso_label,number) return render_curve_webpage_by_label(full_label)