{{{id=1| x = var('x') K.=NumberField(x^2-x-1) import psage.modform.hilbert.sqrt5.tables as sqrt5 import nosqlite db=nosqlite.Client('/home/psharaba/EC2kdb').db from psage.ellcurve.minmodel.sqrt5 import canonical_model /// }}} {{{id=2| K. = NumberField(x**2-x-1) sqrt5 = K.ideal(2*a-1) custom_hash = lambda self: str(self.pari_hnf()).__hash__() sage.rings.number_field.number_field_ideal.NumberFieldFractionalIdeal.__hash__ = custom_hash eta = lambda alpha: (alpha*alpha).trace() def find_small(alpha): while True: plus=a*alpha minus=alpha/a if eta(plus)", line 1, in File "_sage_input_8.py", line 10, in exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("ZnJvbSBwc2FnZS5tb2Rmb3JtLmhpbGJlcnQuc3FydDUuZWxsY3VydmUgaW1wb3J0IGNvbXB1dGVfYXBsaXN0"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in File "/tmp/tmpMDqzic/___code___.py", line 2, in exec compile(u'from psage.modform.hilbert.sqrt5.ellcurve import compute_aplist' + '\n', '', 'single') File "", line 1, in ImportError: No module named ellcurve }}} {{{id=6| %time IO=[] NH=[] embs=K.embeddings(RR)[1] temp=db('select weq from N2k ORDER BY N') for r in range(len(temp)): A=temp[r][0] A1=eval(A) B=compute(EllipticCurve(K,eval(A)),30) C=[embs(f) for f in A1] IO.append(B) NH.append(C) db.N2k.update({'a_p':str(B).replace(' ',''), 'remove': str(C).replace(' ','')},weq=A) /// }}}