Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
AndrewVSutherland
GitHub Repository: AndrewVSutherland/lmfdb
Path: blob/main/scripts/belyi/bad_galois_orbits.py
1127 views
1
def check_galois_data(rec):
2
return (len(rec['triples']) == (len(rec['base_field'])-1))
3
4
def delete_bad_galois_orbits():
5
from lmfdb import db
6
bad_galmaps = []
7
bad_passports = []
8
for rec in db.belyi_galmaps.search(): # should probably make the table name a variable...
9
if not check_galois_data(rec):
10
bad_galmaps.append(rec['label'])
11
bad_passports.append(rec['plabel'])
12
for lab in bad_galmaps:
13
db.belyi_galmaps.delete({'label':lab})
14
for plab in bad_passports:
15
db.belyi_passports.delete({'plabel':plab})
16
return "Removed %d galmaps and %d passports with bad Galois data" % (len(bad_galmaps), len(bad_passports))
17
18