├── .coveragerc ├── .environment.yml ├── .github └── workflows │ ├── autopep8.yml │ ├── generate-matrix.py │ ├── generate_autopep8codes.py │ ├── matrix_includes.json │ └── python-package.yml ├── .gitignore ├── CONTRIBUTORS.yaml ├── Development.md ├── GettingStarted.md ├── Inventory.md ├── LICENSE ├── Postgres_FAQ.md ├── README.md ├── StyleGuide.md ├── codestyle.sh ├── lmfdb ├── __init__.py ├── abvar │ ├── __init__.py │ └── fq │ │ ├── __init__.py │ │ ├── download.py │ │ ├── isog_class.py │ │ ├── main.py │ │ ├── search_parsing.py │ │ ├── stats.py │ │ ├── templates │ │ ├── abvarfq-count-results.html │ │ ├── abvarfq-index.html │ │ ├── abvarfq-refine-search.html │ │ └── show-abvarfq.html │ │ ├── test_av.py │ │ ├── test_browse_page.py │ │ └── web_abvar.py ├── api │ ├── __init__.py │ ├── api.py │ ├── templates │ │ ├── api-stats.html │ │ ├── api.html │ │ ├── apidata.html │ │ ├── apischema.html │ │ ├── collection.html │ │ └── database_options.html │ └── test_api.py ├── api2 │ ├── __init__.py │ ├── api2.py │ ├── searchers.py │ ├── static │ │ └── viewer.js │ ├── templates │ │ ├── api.css │ │ ├── api2.html │ │ ├── api_demo.html │ │ ├── base_pretty.html │ │ ├── example.html │ │ └── view.html │ └── utils.py ├── app.py ├── artin_representations │ ├── __init__.py │ ├── cyc_alt_res_engine.py │ ├── main.py │ ├── math_classes.py │ ├── templates │ │ ├── artin-representation-galois-orbit.html │ │ ├── artin-representation-index.html │ │ ├── artin-representation-set-show.html │ │ └── artin-representation-show.html │ └── test_artin_representation.py ├── belyi │ ├── __init__.py │ ├── belyi_TODO.txt │ ├── labels.txt │ ├── main.py │ ├── templates │ │ ├── belyi_base.html │ │ ├── belyi_browse.html │ │ ├── belyi_galmap.html │ │ ├── belyi_passport.html │ │ └── embedded_belyi_map.html │ ├── test_belyi.py │ └── web_belyi.py ├── bianchi_modular_forms │ ├── __init__.py │ ├── bianchi_modular_form.py │ ├── templates │ │ ├── bmf-browse.html │ │ ├── bmf-field_dim_table.html │ │ ├── bmf-newform.html │ │ └── bmf-space.html │ ├── test_bmf.py │ └── web_BMF.py ├── characters │ ├── HeckeCharacters.py │ ├── ListCharacters.py │ ├── TinyConrey.py │ ├── __init__.py │ ├── main.py │ ├── pari_search_test.sage │ ├── templates │ │ ├── CharFamily.html │ │ ├── CharGroup.html │ │ ├── Character.html │ │ ├── CharacterCommon.html │ │ ├── CharacterGaloisOrbit.html │ │ ├── CharacterGroupTable.html │ │ ├── CharacterNavigate.html │ │ ├── CharacterTable.html │ │ ├── ConductorList.html │ │ ├── Hecke.html │ │ ├── ModulusList.html │ │ ├── OrderList.html │ │ └── character_refine_search.html │ ├── test_characters.py │ ├── utils.py │ └── web_character.py ├── classical_modular_forms │ ├── __init__.py │ ├── cmf_TODO.txt │ ├── cmf_test_pages.py │ ├── code-form.yaml │ ├── code-space.yaml │ ├── code.yaml │ ├── download.py │ ├── eta.yaml │ ├── main.py │ ├── templates │ │ ├── cmf_browse.html │ │ ├── cmf_dimension_search_results.html │ │ ├── cmf_dimension_space_search_results.html │ │ ├── cmf_dimension_table_display.html │ │ ├── cmf_embedded_newform.html │ │ ├── cmf_full_gamma1_space.html │ │ ├── cmf_newform.html │ │ ├── cmf_newform_common.html │ │ ├── cmf_refine_search.html │ │ ├── cmf_space.html │ │ ├── cmf_space_trace_search_results.html │ │ ├── cmf_trace_display.html │ │ └── cmf_trace_search_results.html │ ├── test_cmf.py │ ├── test_cmf2.py │ ├── web_newform.py │ └── web_space.py ├── cluster_pictures │ ├── __init__.py │ ├── cluster_picture.py │ ├── test_clusterpicture.py │ └── web_cluster_picture.py ├── crystals │ ├── __init__.py │ ├── main.py │ └── templates │ │ ├── crystals-index.html │ │ ├── crystals.html │ │ └── littelmann-paths.html ├── doc_chars.rst ├── ecnf │ ├── WebEllipticCurve.py │ ├── __init__.py │ ├── code.yaml │ ├── ecnf_stats.py │ ├── ecnf_test_pages.py │ ├── isog_class.py │ ├── main.py │ ├── searchers.py │ ├── templates │ │ ├── ecnf-by-degree.html │ │ ├── ecnf-by-signature.html │ │ ├── ecnf-curve.html │ │ ├── ecnf-index.html │ │ ├── ecnf-isoclass.html │ │ └── ecnf-stats.html │ ├── test_ecnf.py │ └── test_isog_class.py ├── elliptic_curves │ ├── __init__.py │ ├── code.yaml │ ├── congruent_numbers.py │ ├── elliptic_curve.py │ ├── isog_class.py │ ├── searchers.py │ ├── templates │ │ ├── bhkssw.html │ │ ├── congruent_number_data.html │ │ ├── ec-curve.html │ │ ├── ec-index.html │ │ ├── ec-isoclass.html │ │ ├── ec-padic-data.html │ │ ├── ec-stats.html │ │ ├── single_congruent_number.html │ │ └── sw_ecdb.html │ ├── test_browse_page.py │ ├── test_ell_curves.py │ └── web_ec.py ├── galois_groups │ ├── Database-info │ ├── __init__.py │ ├── code.yaml │ ├── main.py │ ├── templates │ │ ├── character-table.html │ │ ├── gg-error.html │ │ ├── gg-index.html │ │ └── gg-show-group.html │ ├── test_galoisgroup.py │ └── transitive_group.py ├── genus2_curves │ ├── __init__.py │ ├── code.yaml │ ├── g2c_test_pages.py │ ├── main.py │ ├── templates │ │ ├── g2c_browse.html │ │ ├── g2c_curve.html │ │ └── g2c_isogeny_class.html │ ├── test_genus2_curves.py │ └── web_g2c.py ├── groups │ ├── __init__.py │ ├── abstract │ │ ├── __init__.py │ │ ├── circles.py │ │ ├── code.yaml │ │ ├── groups_test_pages.py │ │ ├── main.py │ │ ├── stats.py │ │ ├── templates │ │ │ ├── abstract-index.html │ │ │ ├── abstract-show-group.html │ │ │ ├── abstract-show-subgroup.html │ │ │ ├── auto_gens_page.html │ │ │ ├── character_table.html │ │ │ ├── character_table_page.html │ │ │ ├── diagram_page.html │ │ │ ├── rational_character_table.html │ │ │ └── rational_character_table_page.html │ │ ├── test_abstract_groups.py │ │ ├── test_browse_page.py │ │ ├── verify.py │ │ └── web_groups.py │ ├── glnC │ │ ├── __init__.py │ │ ├── main.py │ │ └── templates │ │ │ ├── glnC-index.html │ │ │ └── glnC-show-group.html │ └── glnQ │ │ ├── __init__.py │ │ ├── main.py │ │ └── templates │ │ ├── glnQ-index.html │ │ └── glnQ-show-group.html ├── half_integral_weight_forms │ ├── __init__.py │ ├── half_integral_form.py │ └── templates │ │ ├── half_integral_weight_form.html │ │ ├── half_integral_weight_form_all.html │ │ └── half_integral_weight_form_search.html ├── hecke_algebras │ ├── __init__.py │ ├── hecke_algebras_stats.py │ ├── main.py │ ├── templates │ │ ├── hecke_algebras-error.html │ │ ├── hecke_algebras-index.html │ │ ├── hecke_algebras-search.html │ │ ├── hecke_algebras-single.html │ │ └── hecke_algebras_l_adic-single.html │ └── test_hecke_algebras.py ├── higher_genus_w_automorphisms │ ├── __init__.py │ ├── code.yaml │ ├── hgcwa_stats.py │ ├── main.py │ ├── templates │ │ ├── hgcwa-index.html │ │ ├── hgcwa-show-family.html │ │ ├── hgcwa-show-passport.html │ │ ├── hgcwa-stats-groups-per-genus.html │ │ ├── hgcwa-stats.html │ │ └── hgcwa-topological-action.html │ └── test_hgcwa.py ├── hilbert_modular_forms │ ├── __init__.py │ ├── hilbert_field.py │ ├── hilbert_modular_form.py │ ├── hmf_data_format.txt │ ├── hmf_data_format_new.txt │ ├── hmf_stats.py │ ├── q_expansion.py │ ├── templates │ │ ├── hilbert_modular_form.html │ │ ├── hilbert_modular_form_all.html │ │ ├── hmf_by_degree.html │ │ └── hmf_stats.html │ ├── test_hmf.py │ └── web_HMF.py ├── homepage │ ├── __init__.py │ ├── boxes.py │ ├── index_boxes.yaml │ ├── random.py │ ├── sidebar.py │ └── sidebar.yaml ├── hypergm │ ├── __init__.py │ ├── data_dump_hgm.txt │ ├── hodge.py │ ├── main.py │ ├── plot.py │ ├── templates │ │ ├── hgm-index.html │ │ ├── hgm-show-motive.html │ │ └── hgm_family.html │ ├── test_hgm.py │ └── web_family.py ├── knowledge │ ├── __init__.py │ ├── knowl.py │ ├── main.py │ └── templates │ │ ├── knowl-broken-links.html │ │ ├── knowl-columns.html │ │ ├── knowl-comment-history.html │ │ ├── knowl-diff-core.html │ │ ├── knowl-diff.html │ │ ├── knowl-edit.html │ │ ├── knowl-history.html │ │ ├── knowl-index.html │ │ ├── knowl-knowl-history.html │ │ ├── knowl-orphans.html │ │ ├── knowl-review-recent.html │ │ ├── knowl-show.html │ │ └── knowl-test.html ├── lattice │ ├── __init__.py │ ├── isom.py │ ├── lattice_stats.py │ ├── main.py │ ├── templates │ │ ├── lattice-error.html │ │ ├── lattice-index.html │ │ └── lattice-single.html │ └── test_lattice.py ├── lfunctions │ ├── HodgeTransformations.py │ ├── Lfunction.py │ ├── LfunctionComp.py │ ├── LfunctionDatabase.py │ ├── LfunctionLcalc.py │ ├── LfunctionPlot.py │ ├── Lfunction_base.py │ ├── Lfunctionutilities.py │ ├── __init__.py │ ├── main.py │ ├── templates │ │ ├── Lfunction.html │ │ ├── LfunctionContents.html │ │ ├── LfunctionEulerSearchResults.html │ │ ├── LfunctionNavigate.html │ │ ├── LfunctionSimple.html │ │ ├── LfunctionTraceSearchResults.html │ │ ├── MaassformGL2.html │ │ ├── MaassformGLn.html │ │ ├── cuspformGL2.html │ │ ├── ellipticcurve.html │ │ └── genus2curve.html │ └── test_lfunctions.py ├── lmfdb_database.py ├── local_fields │ ├── __init__.py │ ├── main.py │ ├── templates │ │ ├── lf-index.html │ │ └── lf-show-field.html │ └── test_localfields.py ├── logger │ ├── __init__.py │ ├── start.py │ └── utils.py ├── maass_forms │ ├── __init__.py │ ├── main.py │ ├── plot.py │ ├── templates │ │ ├── maass_browse.html │ │ ├── maass_browse_graph.html │ │ └── maass_form.html │ ├── test_maass.py │ └── web_maassform.py ├── modl_galois_representations │ ├── __init__.py │ ├── main.py │ ├── templates │ │ ├── modlgal_browse.html │ │ └── modlgal_rep.html │ └── web_modlgal.py ├── modlmf │ ├── __init__.py │ ├── main.py │ ├── modlmf_stats.py │ └── templates │ │ ├── modlmf-error.html │ │ ├── modlmf-index.html │ │ ├── modlmf-search.html │ │ └── modlmf-single.html ├── modular_curves │ ├── __init__.py │ ├── family.py │ ├── isog_class.py │ ├── main.py │ ├── templates │ │ ├── family.html │ │ ├── lat_diagram_page.html │ │ ├── modcurve.html │ │ ├── modcurve_browse.html │ │ ├── modcurve_family.html │ │ └── modcurve_isoclass.html │ ├── test_modular_curves.py │ ├── upload.py │ └── web_curve.py ├── motives │ ├── __init__.py │ ├── main.py │ └── templates │ │ ├── hypergeometric-index.html │ │ ├── motive-error.html │ │ └── motive-index.html ├── nfutils │ ├── __init__.py │ └── psort.py ├── number_fields │ ├── Database-info │ ├── __init__.py │ ├── code.yaml │ ├── draw_spectrum.py │ ├── number_field.py │ ├── templates │ │ ├── class_group_data.html │ │ ├── galois_groups.html │ │ ├── nf-index.html │ │ ├── nf-show-field.html │ │ ├── nf-statistics.html │ │ └── number_field_space.html │ ├── test_numberfield.py │ └── web_number_field.py ├── permutations │ ├── __init__.py │ ├── main.py │ └── templates │ │ ├── permutations-index.html │ │ └── permutations.html ├── riemann │ ├── __init__.py │ ├── main.py │ └── stieltjes │ │ ├── __init__.py │ │ ├── stieltjes.py │ │ └── templates │ │ ├── getone.html │ │ └── stieltjes.html ├── sato_tate_groups │ ├── __init__.py │ ├── main.py │ ├── templates │ │ ├── st_browse.html │ │ └── st_display.html │ └── test_st.py ├── siegel_modular_forms │ ├── DESIGN_CONSIDERATIONS.md │ ├── __init__.py │ ├── dimensions.py │ ├── family.py │ ├── family_data.py │ ├── sample.py │ ├── siegel_core.py │ ├── siegel_modular_form.py │ ├── smf_test_pages.py │ ├── templates │ │ ├── ModularForm_GSp4_Q_Sp4Zj.html │ │ ├── ModularForm_GSp4_Q_dimensions.html │ │ ├── ModularForm_GSp4_Q_family.html │ │ ├── ModularForm_GSp4_Q_full_level_space.html │ │ ├── ModularForm_GSp4_Q_index.html │ │ ├── ModularForm_GSp4_Q_sample.html │ │ ├── ModularForm_GSp4_Q_search_results.html │ │ └── includes │ │ │ ├── dimension_table.html │ │ │ └── form_for_dimension_table_search.html │ └── test_siegel_modular_forms.py ├── static │ ├── default_robots.txt │ ├── diff_match_patch.js │ ├── favicon.ico │ ├── graphs │ │ └── graph.js │ ├── groups.js │ ├── images │ │ ├── 1dot.svg │ │ ├── 2dot.svg │ │ ├── 389a.png │ │ ├── 3dot.svg │ │ ├── 4dot.svg │ │ ├── MaassExample.png │ │ ├── Riemann.jpg │ │ ├── Riemann.png │ │ ├── SL4.svg │ │ ├── Sp4.svg │ │ ├── announcements.png │ │ ├── back_disabled.jpg │ │ ├── back_disabled.png │ │ ├── back_enabled.jpg │ │ ├── back_enabled.png │ │ ├── back_enabled_hover.png │ │ ├── bg-container.png │ │ ├── bg-editor-bbcode.png │ │ ├── bg-editor-dotclear.png │ │ ├── bg-editor-html.png │ │ ├── bg-editor-json.png │ │ ├── bg-editor-markdown.png │ │ ├── bg-editor-textile.png │ │ ├── bg-editor-wiki.png │ │ ├── bg-editor-xml.png │ │ ├── bg-editor.png │ │ ├── black-asc.gif │ │ ├── black-desc.gif │ │ ├── black-unsorted.gif │ │ ├── bold.png │ │ ├── browseGraphChar_1_20.svg │ │ ├── browseGraphChar_1_20.svgz │ │ ├── browseGraphChar_1_25.svg │ │ ├── browseGraphChar_1_35.svg │ │ ├── browseGraphHoloNew_0.501.svg │ │ ├── browseGraphHoloNew_1.svg │ │ ├── browseGraphHolo_22_14_2a.svg │ │ ├── browseGraphHolo_22_14_3a.svg │ │ ├── browseGraphHolo_22_14_4a.svg │ │ ├── browseGraphHolo_22_14_5a.svg │ │ ├── citations.png │ │ ├── cite.png │ │ ├── code.png │ │ ├── compute.png │ │ ├── copy.svg │ │ ├── disk-load.png │ │ ├── disk-save.png │ │ ├── fame.png │ │ ├── families.png │ │ ├── forward_disabled.jpg │ │ ├── forward_disabled.png │ │ ├── forward_enabled.jpg │ │ ├── forward_enabled.png │ │ ├── forward_enabled_hover.png │ │ ├── github.png │ │ ├── gl3eigs.png │ │ ├── h1.png │ │ ├── h2.png │ │ ├── h3.png │ │ ├── h4.png │ │ ├── h5.png │ │ ├── h6.png │ │ ├── handle.png │ │ ├── italic.png │ │ ├── key_degree2.png │ │ ├── knowledge.png │ │ ├── link.png │ │ ├── list-bullet.png │ │ ├── list-numeric.png │ │ ├── lmfdb-logo-alpha.png │ │ ├── lmfdb-logo-beta.png │ │ ├── lmfdb-logo.png │ │ ├── lmfdb-logo.svg │ │ ├── lmfdbmap.svg │ │ ├── map.png │ │ ├── menu.png │ │ ├── next.png │ │ ├── pencil.png │ │ ├── picture.png │ │ ├── plot.png │ │ ├── preview.png │ │ ├── previous.png │ │ ├── progress-green.gif │ │ ├── quotes.png │ │ ├── raw_to_tset.svg │ │ ├── related.png │ │ ├── search.png │ │ ├── search2.png │ │ ├── smalluniverse.png │ │ ├── sort_asc.png │ │ ├── sort_asc_disabled.png │ │ ├── sort_both.png │ │ ├── sort_desc.png │ │ ├── sort_desc_disabled.png │ │ ├── sp_image.png │ │ ├── submenu.png │ │ ├── tset_to_raw.svg │ │ ├── ui-bg_diagonals-thick_18_b81900_40x40.png │ │ ├── ui-bg_diagonals-thick_20_666666_40x40.png │ │ ├── ui-bg_glass_100_f6f6f6_1x400.png │ │ ├── ui-bg_glass_100_fdf5ce_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_gloss-wave_35_f6a828_500x100.png │ │ ├── ui-bg_highlight-soft_100_eeeeee_1x100.png │ │ ├── ui-bg_highlight-soft_75_ffe45c_1x100.png │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_228ef1_256x240.png │ │ ├── ui-icons_ef8c08_256x240.png │ │ ├── ui-icons_ffd27a_256x240.png │ │ ├── ui-icons_ffffff_256x240.png │ │ ├── url-ext.gif │ │ └── url.png │ ├── jquery.column.min.js │ ├── jquery.markitup.js │ ├── jquery.markitup.markdown.js │ ├── jquery.tablesorter.js │ ├── js │ │ └── snap.svg-min.js │ ├── knowl_diff.js │ ├── knowl_edit.js │ ├── knowl_history.js │ ├── knowl_review.js │ ├── lmfdb.js │ ├── lmfdbmap │ │ ├── lmfdbmap_code.js │ │ ├── math_descriptions.js │ │ └── snap.svg-min.js │ ├── markdown.css │ ├── markitup.css │ ├── modcurve.js │ ├── notify.min.js │ ├── raw_typeset.js │ ├── robots.txt │ ├── showdown.min.js │ └── validate.js ├── symL │ ├── __init__.py │ ├── symL.py │ └── sympowlmfdb.py ├── templates │ ├── 404.html │ ├── 500.html │ ├── 503.html │ ├── about.html │ ├── acknowledgment.html │ ├── base.html │ ├── bigpicture.html │ ├── checklist-fs.html │ ├── checklist.html │ ├── citation.html │ ├── contact.html │ ├── count_results.html │ ├── datasets.html │ ├── debug_info.html │ ├── display_stats.html │ ├── double.html │ ├── download_search_results.html │ ├── dummy_download_search_results.html │ ├── dynamic_stats.html │ ├── dynamic_stats_input.html │ ├── embedded_results.html │ ├── form.html │ ├── forward_back.html │ ├── hidden_search_inputs.html │ ├── homepage.html │ ├── index-boxes.html │ ├── interesting.html │ ├── knowl-defs.html │ ├── lucant.html │ ├── management.html │ ├── matches.html │ ├── mergely.html │ ├── motives.html │ ├── multi.html │ ├── not_yet_implemented.html │ ├── problem.html │ ├── quadratic_twists │ │ ├── iso_class.html │ │ └── quadratic_twists.html │ ├── raw │ │ ├── index.html │ │ └── query.html │ ├── refine_search_form.html │ ├── search.html │ ├── search_results.html │ ├── search_results_table.html │ ├── sidebar.html │ ├── single.html │ ├── stat_1d.html │ ├── stat_2d.html │ ├── style.css │ ├── universe.html │ ├── universe │ │ └── lmfdbmap │ │ │ ├── lmfdbmap.svg │ │ │ └── lmfdbmap_style.css │ ├── upload_data.html │ └── workshops.html ├── tensor_products │ ├── __init__.py │ ├── galois_reps.py │ ├── main.py │ └── templates │ │ ├── tensor_products_index.html │ │ └── tensor_products_navigate.html ├── tests │ ├── __init__.py │ ├── test_acknowlegments.py │ ├── test_dynamic_knowls.py │ ├── test_external.py │ ├── test_homepage.py │ ├── test_root.py │ ├── test_spelling.py │ ├── test_template_namespace.py │ ├── test_tensor_products.py │ ├── test_utils.py │ └── test_workshoplinks.py ├── typed_data │ ├── Lfunction_types.py │ ├── __init__.py │ ├── standard_types.py │ └── type_generation.py ├── uploads │ ├── process.py │ └── verify.py ├── users │ ├── __init__.py │ ├── main.py │ ├── pwdmanager.py │ ├── recaptcha.py │ ├── templates │ │ ├── register.html │ │ ├── user-detail.html │ │ ├── user-info.html │ │ ├── user-list.html │ │ └── user-uploads.html │ └── test_users.py ├── utils │ ├── __init__.py │ ├── cocalcwrap.py │ ├── color.py │ ├── common_regex.py │ ├── config.py │ ├── display_stats.py │ ├── downloader.py │ ├── interesting.py │ ├── names_and_urls.py │ ├── random_wrap.py │ ├── search_boxes.py │ ├── search_columns.py │ ├── search_parsing.py │ ├── search_wrapper.py │ ├── trace_hash.py │ ├── uploader.py │ ├── utilities.py │ └── web_display.py ├── verify │ ├── __init__.py │ ├── follower.py │ ├── gps │ │ └── gps_gl2zhat_fine.py │ ├── mf │ │ ├── mf.py │ │ ├── mf_gamma1.py │ │ ├── mf_gamma1_portraits.py │ │ ├── mf_hecke_cc.py │ │ ├── mf_hecke_lpolys.py │ │ ├── mf_hecke_nf.py │ │ ├── mf_hecke_traces.py │ │ ├── mf_newform_portraits.py │ │ ├── mf_newforms.py │ │ ├── mf_newspace_portraits.py │ │ └── mf_newspaces.py │ ├── modcurve │ │ └── modcurve_modelmaps.py │ ├── verification.py │ └── verify_tables.py ├── website.py └── zeros │ ├── __init__.py │ ├── main.py │ └── zeta │ ├── __init__.py │ ├── platt_zeros.py │ ├── templates │ └── zeta.html │ └── zetazeros.py ├── perfmon ├── ECQpages.txt ├── HMFpages.txt ├── NFpages.txt ├── README.md ├── random_timings.sh └── tcurl.sh ├── requirements.txt ├── scripts ├── __init__.py ├── abvar │ ├── fix_quotes.py │ └── fq_isog.py ├── artin_representations │ ├── extract_art.py │ ├── import_art_nf.py │ ├── old-import_art_nf.py │ └── pull-reps.py ├── belyi │ ├── README.md │ ├── Schema.md │ ├── __init__.py │ ├── bad_galois_orbits.py │ ├── find_friends.py │ ├── format_plane_model.py │ ├── new_labels.py │ ├── old │ │ ├── db.py │ │ ├── make_test_tables.py │ │ ├── sample_example.py │ │ └── update_db.py │ ├── passport_new_attrs.py │ └── primitive.py ├── bianchi_modular_forms │ ├── import_bianchi_dimensions.py │ └── import_bianchi_forms.py ├── classical_modular_forms │ ├── README.md │ ├── check_ap2_amn_parallel.py │ ├── compare_hecke_cc_data.py │ ├── populate_analytic_ranks_in_mf_newforms.py │ ├── populate_embeddings_mf_hecke_cc.py │ ├── populate_euler_factors.py │ ├── populate_trace_hash_Lfunctions.py │ └── utils.psql ├── ecnf │ ├── __init__.py │ ├── bmf_check.py │ ├── elliptic_curve_to_ecnf_format.py │ └── hmf_check_find.py ├── elliptic_curves │ ├── import_ec_lfunction_data.py │ └── import_padic_ecdata.py ├── galois_groups │ └── import_gg_data.py ├── genus2_curves │ ├── g2LocSolv.py │ └── load_ratpts.py ├── groups │ └── Make-images │ │ ├── Readme │ │ ├── dump-group-names.py │ │ ├── dump-modcurve-names.py │ │ ├── images │ │ └── eq.tex │ │ ├── load-imgs.py │ │ ├── load-modcurve-imgs.py │ │ └── mytar ├── half_integral_weight_modular_forms │ └── half_int_weight_mf.py ├── hecke_algebras │ ├── hecke_algebras.py │ ├── hecke_algebras_db_stats.py │ ├── hecke_algebras_l_adic.py │ ├── hecke_algebras_mod_l_data.py │ ├── hecke_algebras_orbits.py │ └── hecke_algebras_single_orbit_data.py ├── higher_genus_w_automorphisms │ ├── hgcwa_complete_table.py │ ├── import_cap_data.py │ └── unique_groups_table.py ├── hmf │ ├── .gitignore │ ├── WebHMF.py │ ├── __init__.py │ ├── check_conjugates.py │ ├── convert_hecke_eigenvalues │ │ └── hecke_eigenvals.py │ ├── hmf-count-aps.sage │ ├── hmf-dump-fldpoly.sage │ ├── hmf-extra-data-dump.sage │ ├── import_hmf_data.py │ ├── import_hmf_data_fix_permuted_primes.py │ ├── import_hmf_data_gnu_phase_0.py │ ├── import_hmf_data_new_Galois_squarefull_forms.py │ ├── make-lp-file.sage │ ├── recompute_AL.py │ ├── recompute_AL_modp.py │ └── recompute_Galois_squarefull_forms.py ├── hypergm │ ├── import_hgm.py │ └── import_hgmfam.py ├── import_overwrite_generic.py ├── lattices │ ├── add_q_expansion_theta.py │ ├── lattice.py │ ├── lattice_db_stats.py │ └── lattice_nf.py ├── lfunctions │ ├── build_Lfunction_db.py │ ├── build_Lfunction_db_2.py │ ├── insert_zeros.py │ ├── populate_origin_ECQ.py │ └── populate_trace_hash_ECQG2Q.py ├── local_fields │ ├── import_fields.py │ └── lfprep.gp ├── maass │ └── import_maass_and_maass_lfun.py ├── modl_galois_representations │ └── import_modl.py ├── modlmf │ └── modlmf.py ├── number_fields │ ├── Readme │ ├── dump-label-data.py │ ├── import_galois_modules.py │ ├── import_nf_data.py │ └── prep.gp ├── reports │ ├── __init__.py │ ├── fill_inventory.py │ ├── inventory_legacy_uploader.py │ ├── inventory_patchup.py │ ├── jsonify_db_structure.py │ └── upload_helpers.py ├── sato_tate │ └── smallgroups.m └── siegel_modular_forms │ └── Yoshida_Lift.py ├── start-lmfdb.py ├── test.sh ├── tox.ini └── user-manager.py /.coveragerc: -------------------------------------------------------------------------------- 1 | # .coveragerc to control coverage.py 2 | [run] 3 | #branch = True 4 | #parallel = True 5 | 6 | [report] 7 | # Regexes for lines to exclude from consideration 8 | exclude_lines = 9 | # Have to re-enable the standard pragma 10 | pragma: no cover 11 | 12 | # Don't complain about missing debug-only code: 13 | def __repr__ 14 | if self\.debug 15 | 16 | # Don't complain if tests don't hit defensive assertion code: 17 | raise AssertionError 18 | raise NotImplementedError 19 | 20 | # Don't complain if non-runnable code isn't run: 21 | if 0: 22 | if __name__ == .__main__.: 23 | 24 | ignore_errors = True 25 | 26 | -------------------------------------------------------------------------------- /.environment.yml: -------------------------------------------------------------------------------- 1 | ## This is a conda environment file. 2 | ## Use it as follows: 3 | ## 4 | ## conda env create -f environment.yml 5 | ## 6 | ## See https://towardsdatascience.com/a-guide-to-conda-environments-bc6180fc533 7 | ## or https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html 8 | name: lmfdb 9 | channels: 10 | - conda-forge 11 | - defaults 12 | dependencies: 13 | - python 14 | - sage=10.4 15 | - tox 16 | - flask 17 | - werkzeug 18 | - parallel 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | password* 2 | secret_key 3 | secrets.ini 4 | config.ini 5 | 6 | *.pyc 7 | *.pyo 8 | *.so 9 | *.o 10 | *.c 11 | *.swp 12 | *~ 13 | 14 | 15 | flasklog 16 | slow_queries.log 17 | 18 | # Testing files 19 | htmlcov 20 | .coverage* 21 | .pytest_cache/ 22 | 23 | # vim swap files 24 | .*.sw? 25 | # backup files 26 | *~ 27 | paul_scripts 28 | 29 | local.sh 30 | 31 | .DS_Store 32 | .idea/ 33 | LMFDBinventory.log 34 | LMFDBtransactions_inv.log 35 | 36 | scripts/groups/Make-images/images/*.png 37 | -------------------------------------------------------------------------------- /codestyle.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # This script uses pep8 / autopep8 to find Python style errors 3 | # or even fixes them. 4 | # Usage: ./codestyle.sh or ./codestyle.sh [path/to/python/file ...] 5 | 6 | # Note: When using this codestyle fixing utility, don't forget that it 7 | # might introduce a lot of changes. That could be hard to merge! 8 | 9 | # increased line length. might get shorter in time ... for now even ignored 10 | #ARGS='--max-line-length=120 --ignore=E501' 11 | # E271 multiple spaces after keyword 12 | # E272 multiple spaces before keyword 13 | # E703 statement ends with a semicolon 14 | # E713 test for membership should be ‘not in’ 15 | # E714 test for object identity should be ‘is not’ 16 | # E722 do not use bare except, specify exception instead 17 | ARGS='--select=E271,E272,E703,E713,E714,E722' 18 | 19 | SAGE_COMMAND=$SAGE 20 | if [[ "$SAGE_COMMAND" == "" ]]; then 21 | SAGE_COMMAND=sage 22 | fi 23 | echo "Using Sage command $SAGE_COMMAND" 24 | 25 | # WARN: we set the aggressive flag 26 | AUTOPEP="$SAGE_COMMAND -python -m autopep8 -i --aggressive $ARGS" 27 | CODESTYLE="$SAGE_COMMAND -python -m pycodestyle $ARGS" 28 | 29 | if [ -n "$1" ]; then 30 | $AUTOPEP "$@" 31 | else 32 | cd `dirname "$0"` 33 | find lmfdb -iname '*.py' | xargs $CODESTYLE 34 | fi 35 | -------------------------------------------------------------------------------- /lmfdb/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | # psycodict was added as a dependency on May 10, 2024; we provide a useful error message for people upgrading 3 | try: 4 | import psycodict 5 | assert psycodict 6 | except ImportError: 7 | print('Missing dependency; try running "sage -pip install -r requirements.txt" in the LMFDB home folder.') 8 | raise 9 | 10 | from .lmfdb_database import db 11 | assert db 12 | -------------------------------------------------------------------------------- /lmfdb/abvar/__init__.py: -------------------------------------------------------------------------------- 1 | from lmfdb.app import app 2 | from lmfdb.logger import make_logger 3 | from flask import Blueprint 4 | 5 | abvar_page = Blueprint( 6 | "abvar", __name__, template_folder="templates", static_folder="static" 7 | ) 8 | abvar_logger = make_logger(abvar_page) 9 | 10 | 11 | @abvar_page.context_processor 12 | def body_class(): 13 | return {"body_class": "abvar"} 14 | 15 | 16 | app.register_blueprint(abvar_page, url_prefix="/Variety/Abelian") 17 | 18 | # API2 has been disabled for now 19 | #from lmfdb.api2.searchers import register_search_function 20 | #register_search_function( 21 | # "abvar", 22 | # "Abelian varieties", 23 | # "Search over abelian varieties", 24 | # auto_search="av_fqisog", 25 | # inv=["av", "av_fqisog"], 26 | #) 27 | -------------------------------------------------------------------------------- /lmfdb/abvar/fq/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | abvarfq_page = Blueprint("abvarfq", __name__, template_folder="templates", static_folder="static") 7 | abvarfq_logger = make_logger(abvarfq_page) 8 | 9 | 10 | @abvarfq_page.context_processor 11 | def body_class(): 12 | return {"body_class": "abvarfq"} 13 | 14 | from . import main 15 | assert main 16 | 17 | app.register_blueprint(abvarfq_page, url_prefix="/Variety/Abelian/Fq") 18 | -------------------------------------------------------------------------------- /lmfdb/abvar/fq/search_parsing.py: -------------------------------------------------------------------------------- 1 | from lmfdb.utils.search_parsing import ( 2 | search_parser, 3 | nf_string_to_label, 4 | _parse_subset, 5 | ) 6 | 7 | 8 | @search_parser # see SearchParser.__call__ for actual arguments when calling 9 | def parse_nf_string(inp, query, qfield): 10 | fields = [nf_string_to_label(field) for field in inp.split(",")] 11 | _parse_subset(fields, query, qfield, mode=None, radical=None, product=None, cardinality=None) 12 | 13 | 14 | @search_parser # (clean_info=True, default_field='galois_group', default_name='Galois group', default_qfield='galois') # see SearchParser.__call__ for actual arguments when calling 15 | def parse_galgrp(inp, query, qfield): 16 | from lmfdb.galois_groups.transitive_group import complete_group_codes 17 | try: 18 | gcs = complete_group_codes(inp) 19 | groups = [str(n) + "T" + str(t) for n, t in gcs] 20 | _parse_subset(groups, query, qfield, mode=None, radical=None, product=None, cardinality=None) 21 | except NameError: 22 | raise ValueError("It needs to be a group label, such as C5 or 5T1, or a comma separated list of such labels.") 23 | -------------------------------------------------------------------------------- /lmfdb/abvar/fq/templates/abvarfq-count-results.html: -------------------------------------------------------------------------------- 1 | {% extends 'abvarfq-refine-search.html' %} 2 | 3 | {% block show_results %} 4 | 5 | {% include 'count_results.html' %} 6 | 7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /lmfdb/abvar/fq/templates/abvarfq-refine-search.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | 3 | {% block content %} 4 | 5 | {% if info.stats %} 6 |

7 | {{info.stats|safe}} 8 |

9 | {% endif %} 10 | 11 | {% include 'refine_search_form.html' %} 12 | 13 | {% if info.search_type == 'DynStats' %} 14 |

Note that the abelian varieties in the database may not be {{ KNOWL('rcs.rigor.av.fq', title='representative') }}.

15 | {% endif %} 16 | 17 | {% block show_results %}{% endblock %} 18 | {% include 'debug_info.html' %} 19 | 20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /lmfdb/api/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | api_page = Blueprint("API", __name__, template_folder='templates', static_folder="static") 7 | api_logger = make_logger(api_page) 8 | 9 | @api_page.context_processor 10 | def body_class(): 11 | return {'body_class': 'api'} 12 | 13 | from . import api 14 | assert api # silence pyflakes 15 | 16 | from .api import datapage 17 | assert datapage 18 | 19 | app.register_blueprint(api_page, url_prefix="/api") 20 | -------------------------------------------------------------------------------- /lmfdb/api/templates/apischema.html: -------------------------------------------------------------------------------- 1 | Show schema 2 | 3 | 25 | -------------------------------------------------------------------------------- /lmfdb/api/templates/collection.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 | 5 | 16 | 17 |
18 | Formats: 19 | - HTML 20 | - YAML 21 | - JSON 22 | - {{ timestamp }} 23 | {% if not single_object %} 24 | - next page 25 | {% endif %} 26 |
27 |
28 | Query: {{ query_unquote }} 29 |
30 |
31 | {% include "apischema.html" %} 32 |
33 | 34 | {% if single_object %} 35 |
36 | {{ pretty(data[0]) }} 37 | {% else %} 38 |
    39 | {% for entry in data %} 40 |
  1. 41 | {{ rec_id }}: {{ entry.get(rec_id) }}
    42 | {{ pretty(entry,id=False) }} 43 |
  2. 44 | {% endfor %} 45 |
46 | {% endif %} 47 | 48 | {% endblock %} 49 | -------------------------------------------------------------------------------- /lmfdb/api/templates/database_options.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | 3 | {% block content %} 4 | 5 |
6 |

7 | The LMFDB contains two types of underlying data: the main PostgreSQL database and a collection of auxiliary datasets. There are three options available for accessing large parts of the main database. 8 |

9 |
10 | 11 |

Downloads from search result pages

12 | 13 |
14 | {{KNOWL_INC('intro.download_search')}} 15 |
16 | 17 |

The API

18 | 19 |
20 | {{KNOWL_INC('intro.api')}} 21 |
22 | 23 |

Direct SQL connection

24 | 25 |
26 | {{KNOWL_INC('intro.direct_sql')}} 27 |
28 | 29 |

SQL Mirror Access

30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 |
hostdevmirror.lmfdb.xyz
port5432
dbnamelmfdb
userlmfdb
passwordlmfdb
53 | 54 | {% endblock %} 55 | -------------------------------------------------------------------------------- /lmfdb/api2/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | assert app # keeps pyflakes happy 4 | from lmfdb.logger import make_logger 5 | assert make_logger # keeps pyflakes happy 6 | from flask import Blueprint 7 | 8 | __version__ = "1.0.0" 9 | 10 | api2_page = Blueprint("API2", __name__, template_folder='templates', static_folder="static") 11 | 12 | from . import api2 13 | assert api2 14 | 15 | app.register_blueprint(api2_page, url_prefix="/api2") 16 | -------------------------------------------------------------------------------- /lmfdb/api2/templates/api.css: -------------------------------------------------------------------------------- 1 | 2 | .disabledbutton{ 3 | background-color : {{color.button_background_inactive}} !important; 4 | color : #b3b3b3; 5 | border: 2px solid {{color.button_border_inactive}}; 6 | } 7 | -------------------------------------------------------------------------------- /lmfdb/api2/templates/example.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | {% block content %} 3 | You have reached this page because you have gone to an api2 page that has triangular brackets for part of its URL. This is probably an example URL from the documentation. Please replace the section in triangular brackets with an appropriate specific value. 4 | {% endblock %} 5 | -------------------------------------------------------------------------------- /lmfdb/api2/templates/view.html: -------------------------------------------------------------------------------- 1 | {% extends "base_pretty.html" %} 2 | 3 | 4 | {% block extra_script %} 5 | 6 | 15 | 24 | {% endblock extra_script %} 25 | 26 | {% block title_block %} API2 Data {% endblock title_block %} 27 | 28 | {% block main_body %} 29 |
30 |

Showing records ??? of 0 returned by API for {{data_url}} 31 |

32 |
33 |
34 | 35 |
36 |

37 |
38 | 39 | 40 |
41 | 42 | {% endblock main_body %} 43 | -------------------------------------------------------------------------------- /lmfdb/artin_representations/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | artin_representations_page = Blueprint( 7 | "artin_representations", __name__, template_folder='templates', static_folder="static") 8 | artin_logger = make_logger("artin", hl=True) 9 | 10 | # artin_logger.info("Initializing Artin representations blueprint") 11 | 12 | 13 | @artin_representations_page.context_processor 14 | def body_class(): 15 | return {'body_class': 'artin_representations'} 16 | 17 | from . import main 18 | assert main # silence pyflakes 19 | 20 | app.register_blueprint(artin_representations_page, url_prefix="/ArtinRepresentation") 21 | 22 | # API2 has been disabled for now 23 | #from lmfdb.api2.searchers import register_search_function 24 | #register_search_function( 25 | # "artin_representations", 26 | # "Artin representations", 27 | # "Search over Artin representations", 28 | # auto_search = 'artin_reps' 29 | #) 30 | -------------------------------------------------------------------------------- /lmfdb/artin_representations/templates/artin-representation-set-show.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 |

5 |

6 |
7 | 8 | 9 | 10 | 11 | {# #} 12 | 13 | 14 | 15 | 16 |

{% for artin in object %} 17 |

18 | {# #} 19 | 20 | {% endfor %} 21 | 22 |
Defining polynomial of the {{ KNOWL('artin.number_field', title='Artin number field') }}SizeAbstract isomorphism typeCharacter values on conjugacy classes
${{ artin.index() }}$${{artin.number_field_galois_group().polynomial().latex()}}$${{artin.number_field_galois_group().size()}}$${{artin.number_field_galois_group().G_name()}}$${{artin.character().display()}}$
23 |
24 |
25 |

26 | 27 | {% endblock %} 28 | -------------------------------------------------------------------------------- /lmfdb/belyi/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | belyi_page = Blueprint( 7 | "belyi", __name__, template_folder="templates", static_folder="static" 8 | ) 9 | belyi_logger = make_logger(belyi_page) 10 | 11 | 12 | @belyi_page.context_processor 13 | def body_class(): 14 | return {"body_class": "belyi"} 15 | 16 | 17 | from . import main 18 | assert main # silence pyflakes 19 | 20 | app.register_blueprint(belyi_page, url_prefix="/Belyi") 21 | -------------------------------------------------------------------------------- /lmfdb/belyi/labels.txt: -------------------------------------------------------------------------------- 1 | 7T7-[6,10,4]-61-52-421-g1 2 | 7T7-6a10b4c-61-52-421-g1 3 | 7T7-61-52-421-g1 4 | 7T7.61.52.421 5 | 7T7.6+1.5+2.4+2+1 6 | 7T7.6_1.5_2.4_2_1 7 | 7T7-6.1-5.2-4.2.1 8 | 7T7-6.1_5.2_4.2.1 // this one! 9 | -------------------------------------------------------------------------------- /lmfdb/belyi/templates/belyi_browse.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 |
5 | {{ info.stats.short_summary | safe}} 6 |
7 | 8 |

Browse

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
By {{ KNOWL('belyi.degree', title='degree')}}:{% for rnge in info.degree_list %} {{rnge}}  {% endfor %}
Some interesting Belyi maps or a random Belyi map
Search for passports
22 | 23 |

{{ KNOWL('intro.search', 'Search') }}

24 | 27 | 28 |

Find

29 | 30 |
31 | {{ info.search_array.jump_box(info) | safe }} 32 |
33 | 34 | 35 | {% if DEBUG %} 36 |
37 |
38 | Info was: {{info}} 39 |
40 | {% endif %} 41 | 42 | {% endblock %} 43 | -------------------------------------------------------------------------------- /lmfdb/belyi/templates/belyi_passport.html: -------------------------------------------------------------------------------- 1 | {% extends 'belyi_base.html' %} 2 | {% block subcontent %} 3 | 4 |

Galois orbits

5 | 6 | 7 | 8 |
{{ KNOWL('belyi.pass_size', title="Passport size") }}:  ${{data.pass_size}}$
{{ KNOWL('belyi.num_orbits', title="Number of Galois orbits") }}:  ${{data.num_orbits}}$
9 | 10 | 11 | 12 | 13 | {% for g in data.galmapdata %} 14 | 15 | 16 | 27 | 28 | 29 | {% endfor %} 30 | 31 |
LabelOrbit sizeBase fieldRepresentative triple
{{g[0]}}${{g[2]}}$ 17 | {% if g[3]['in_LMFDB'] %} 18 | {{ g[3].base_field.knowl()|safe }} 19 | {% if not g[3]['isQQ'] %} 20 | ; {{ KNOWL('nf.generator', 'Generator') }} \(\nu\), with {{ KNOWL('nf.minimal_polynomial', 'minimal polynomial') }} 21 | {{ g[3].base_field.latex_poly }}. 22 | {% endif %} 23 | {% else %} 24 | \(\mathbb{Q}(\nu)\); {{ KNOWL('nf.generator', 'Generator') }} \(\nu\), with {{ KNOWL('nf.minimal_polynomial', 'minimal polynomial') }} ${{ g[3].base_field }}$. 25 | {% endif %} 26 | ${{g[4]}},{{g[5]}},{{g[6]}}$
32 | 33 |

34 | 35 | {% endblock %} 36 | -------------------------------------------------------------------------------- /lmfdb/belyi/templates/embedded_belyi_map.html: -------------------------------------------------------------------------------- 1 | {% extends 'belyi_base.html' %} 2 | {% block subcontent %} 3 | 4 | 5 |

Permutation triple

6 | ${{ data.triple }}$ 7 | 8 |

Curve

9 |

10 | \(\displaystyle {{data.curve}}\) 11 | {% if data.g == 0 %} 12 | , with affine coordinate $x$ 13 | {% endif %} 14 |

15 | 16 |

Map

17 | {% if data.g == 0 %} 18 |

\(\displaystyle \phi(x) = {{data.map}}\)

19 | {% else %} 20 |

\(\displaystyle \phi(x,y) = {{data.map}}\)

21 | {% endif %} 22 | 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /lmfdb/bianchi_modular_forms/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | bmf_page = Blueprint("bmf", __name__, template_folder='templates', static_folder="static") 7 | bmf_logger = make_logger(bmf_page) 8 | 9 | 10 | @bmf_page.context_processor 11 | def body_class(): 12 | return {'body_class': 'bmf'} 13 | 14 | from . import bianchi_modular_form 15 | assert bianchi_modular_form 16 | 17 | app.register_blueprint(bmf_page, url_prefix="/ModularForm/GL2/ImaginaryQuadratic") 18 | -------------------------------------------------------------------------------- /lmfdb/characters/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | characters_page = Blueprint("characters", __name__, template_folder='templates', 7 | static_folder="static") 8 | logger = make_logger(characters_page) 9 | 10 | 11 | @characters_page.context_processor 12 | def body_class(): 13 | return {'body_class': 'characters'} 14 | 15 | from . import main 16 | assert main # silence pyflakes 17 | 18 | app.register_blueprint(characters_page, url_prefix="/Character") 19 | -------------------------------------------------------------------------------- /lmfdb/characters/templates/CharFamily.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | 3 | {% block description %} 4 | 5 | {# First character groups #} 6 | 7 |

{{type}} character groups of first conductors

8 | 9 | 10 | 11 | {% for h in headers %} 12 | 13 | {% endfor %} 14 | 15 | 16 | 17 | {% for mod, ord, struct, chars in contents %} 18 | 19 | 25 | 26 | 27 | {% for mod,num,tex,prim in chars %} 28 | 34 | {% endfor %} 35 | 36 | {% endfor %} 37 | 38 |
{{h}}
20 | 22 | {{ mod }} 23 | 24 | {{ord}}{{struct}} 29 | 31 | {{ tex }} 32 | 33 |
39 | 40 | {% endblock %} 41 | 42 | -------------------------------------------------------------------------------- /lmfdb/characters/templates/CharacterGaloisOrbit.html: -------------------------------------------------------------------------------- 1 | {% extends 'CharacterCommon.html' %} 2 | 3 | {% block subcontent %} 4 | 5 | {% if contents %} 6 | {# Characters #} 7 |

{%if rowtruncate%}First {{contents|count}} of {{degree}} {{KNOWL('character.dirichlet',title='characters')}}{% else %}{{KNOWL('character.dirichlet',title='Characters')}}{%endif%} in Galois orbit

8 | 9 | 10 | 11 | {% for h in headers %} {% endfor %} 12 | {% for v in groupelts %} {% endfor %} 13 | 14 | 15 | 16 | {% for char, values in contents %} 17 | 18 | 26 | {% for value in values %} {% endfor %} 27 | 28 | {% endfor %} 29 | 30 |
{{h}} \({{v}}\)
19 | {% with mod,num,tex,prim = char %} 20 | 22 | {{ tex }} 23 | 24 | {% endwith %} 25 | {{value}}
31 | {% endif %} 32 | 33 | {% endblock %} -------------------------------------------------------------------------------- /lmfdb/characters/templates/Hecke.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | 3 | {% block description %} 4 | 5 | 6 |

7 | A Hecke character is a (finite order) character on the ideals 8 | of a number field $K$. Such a character factors over the 9 | ray class group $Cl(m)$ of some modulus $m$. 10 |

11 | 12 |

13 | Select a global number field. 14 |

15 | 16 |

Examples of number fields

17 | 18 | 19 | 20 | {% for h in headers %} 21 | 22 | {% endfor %} 23 | 24 | 25 | 26 | {% for nf, signature, polynomial in contents %} 27 | 28 | 33 | 34 | 35 | 36 | {% endfor %} 37 | 38 |
{{h}}
29 | {% with label,link = nf %} 30 | {{ label }} 31 | {% endwith %} 32 | {{ signature }}{{ polynomial | safe }}
39 | 40 | {% endblock %} 41 | 42 | -------------------------------------------------------------------------------- /lmfdb/characters/templates/character_refine_search.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | 3 | {% block content %} 4 | 5 | {% if info.stats %} 6 |

7 | {{info.stats|safe}} 8 |

9 | {% endif %} 10 | 11 | {% include 'refine_search_form.html' %} 12 | 13 | {% if info.search_type == 'DynStats' %} 14 | 15 | {% endif %} 16 | 17 | {% block show_results %}{% endblock %} 18 | {% include 'debug_info.html' %} 19 | 20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /lmfdb/classical_modular_forms/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | cmf_page = Blueprint("cmf", __name__, template_folder='templates', static_folder="static") 7 | cmf = cmf_page 8 | cmf_logger = make_logger(cmf_page) 9 | 10 | from . import main 11 | assert main # silence pyflakes 12 | 13 | app.register_blueprint(cmf_page, url_prefix="/ModularForm/GL2/Q/holomorphic") 14 | -------------------------------------------------------------------------------- /lmfdb/classical_modular_forms/code-space.yaml: -------------------------------------------------------------------------------- 1 | prompt: 2 | sage: 'sage' 3 | pari: 'gp' 4 | magma: 'magma' 5 | 6 | logo: 7 | sage: 8 | pari: 9 | magma: 10 | 11 | comment: 12 | sage: | 13 | # 14 | pari: | 15 | \\ 16 | magma: | 17 | // 18 | 19 | not-implemented: 20 | sage: | 21 | # (not yet implemented) 22 | pari: | 23 | \\\\ (not yet implemented) 24 | magma: | 25 | // (not yet implemented) 26 | 27 | dimension-full-space: 28 | comment: dimension of the space M_{k}(Gamma_1({N})) 29 | pari: | 30 | mfdim([{N},{k},-1],4) 31 | dimension-eisenstein: 32 | comment: dimension of the Eisenstein subspace 33 | pari: | 34 | mfdim([{N},{k},-1],3) 35 | dimension-cuspidal: 36 | comment: dimension of the cuspidal space S_{k}(Gamma_1({N})) 37 | pari: | 38 | mfdim([{N},{k},-1],1) 39 | dimension-new: 40 | comment: dimension of the newspace S_{k}^new(Gamma_1({N})) 41 | pari: | 42 | mfdim([{N},{k},-1],0) 43 | 44 | decomposition-new: 45 | comment: decomposition of the newspace 46 | pari: | 47 | Snew = mfinit([{N},{k},0],0); 48 | #Snew \\ number of char spaces 49 | \\ each contain [N,k,conray char, new, image] 50 | -------------------------------------------------------------------------------- /lmfdb/classical_modular_forms/templates/cmf_dimension_search_results.html: -------------------------------------------------------------------------------- 1 | {% extends 'cmf_refine_search.html' %} 2 | 3 | {% block show_results %} 4 | 5 |

The dimensions shown below are for the space of cuspidal newforms in each weight and level satisfying the specified conditions.

6 | 7 | {% include 'cmf_dimension_table_display.html' %} 8 | 9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /lmfdb/classical_modular_forms/templates/cmf_refine_search.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | 3 | {% block content %} 4 | 5 | {% include 'refine_search_form.html' %} 6 | 7 | {% if info.search_type == 'DynStats' %} 8 |

See the {{ KNOWL('rcs.cande.cmf', title='completeness knowl') }} for a description of the set of newforms that are included in these statistics.

9 | {% endif %} 10 | 11 | {% block show_results %}{% endblock %} 12 | {% include 'debug_info.html' %} 13 | 14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /lmfdb/classical_modular_forms/templates/cmf_space_trace_search_results.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | 3 | {% block content %} 4 | 5 | {% include 'refine_search_form.html' %} 6 | 7 | {% include 'matches.html' %} 8 | {% if info.number %} 9 | 10 |

The following table gives {{ KNOWL('cmf.space_trace_form', title='traces') }} of \(a_n\) for the search results.

11 | 12 | {% include 'cmf_trace_display.html' %} 13 | 14 | {% include 'forward_back.html' %} 15 | {% if info.download_spaces(info.results) %} 16 | {% include 'download_search_results.html' %} 17 | {% endif %} 18 | {% endif %} 19 | 20 | {% include 'debug_info.html' %} 21 | 22 | {% endblock %} 23 | -------------------------------------------------------------------------------- /lmfdb/classical_modular_forms/templates/cmf_trace_display.html: -------------------------------------------------------------------------------- 1 | {%- from "knowl-defs.html" import KNOWL with context -%} 2 | 3 | 4 | 5 | 6 | 7 | {% for n in info.Tr_n %} 8 | {% if n >= 1 and n <= 1000 %} 9 | 10 | {% endif %} 11 | {% endfor %} 12 | 13 | 14 | 15 | {% for res in info.results %} 16 | 17 | 18 | 19 | {% for n in info.Tr_n %} 20 | {% if n >= 1 and n <= 1000 %} 21 | 22 | {% endif %} 23 | {% endfor %} 24 | 25 | {% endfor %} 26 | 27 |
{{ KNOWL('cmf.label', title='Label') }}{{ KNOWL('cmf.dimension', title='Dim') }} \(a_{ {{n}} }\)
{{ res.label }} {{ res.dim }} {{ info.bigint_knowl(res.tr_an[n]) | safe}}
28 | 29 | -------------------------------------------------------------------------------- /lmfdb/classical_modular_forms/templates/cmf_trace_search_results.html: -------------------------------------------------------------------------------- 1 | {% extends 'cmf_refine_search.html' %} 2 | 3 | {% block show_results %} 4 | 5 | {% include 'matches.html' %} 6 | {% if info.number %} 7 | 8 |

The following table gives {{ KNOWL('cmf.trace_form', title='traces') }} of \(a_n\) for the search results.

9 | 10 | {% include 'cmf_trace_display.html' %} 11 | 12 | {% include 'forward_back.html' %} 13 | {% if info.number <= 1000 %} 14 | {% include 'download_search_results.html' %} 15 | {% endif %} 16 | {% endif %} 17 | 18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /lmfdb/cluster_pictures/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | # cp_logger = make_logger(cp_page) 4 | 5 | from . import cluster_picture 6 | assert cluster_picture 7 | -------------------------------------------------------------------------------- /lmfdb/cluster_pictures/cluster_picture.py: -------------------------------------------------------------------------------- 1 | 2 | from markupsafe import Markup 3 | 4 | from lmfdb.app import app 5 | from lmfdb.cluster_pictures.web_cluster_picture import ( 6 | cp_knowl_guts) 7 | 8 | # assert cp_logger 9 | 10 | CP_credit = 'Alex Best, Raymond van Bommel' 11 | Completename = 'Completeness of the data' 12 | dnc = 'data not computed' 13 | 14 | 15 | def cluster_picture_data(label): 16 | return Markup(cp_knowl_guts(label)) 17 | 18 | 19 | @app.context_processor 20 | def ctx_cluster_pictures(): 21 | return {'cluster_picture_data': cluster_picture_data} 22 | -------------------------------------------------------------------------------- /lmfdb/cluster_pictures/test_clusterpicture.py: -------------------------------------------------------------------------------- 1 | from lmfdb.tests import LmfdbTest 2 | 3 | 4 | class ClusterPictureTest(LmfdbTest): 5 | # All tests should pass 6 | def test_clusters(self): 7 | self.check_args('/Genus2Curve/Q/762001/a/762001/1', r'c4c2_1~2_0') 8 | self.check_args('/knowledge/show/clusterpicture.data?label=c4c2_1~2_0', r'Potential toric rank') 9 | self.check_args('/knowledge/show/clusterpicture.data?label=c4c2_1~2_0', r'6') 10 | -------------------------------------------------------------------------------- /lmfdb/crystals/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | crystals_page = Blueprint("crystals", __name__, template_folder='templates', static_folder="static") 7 | logger = make_logger(crystals_page) 8 | 9 | 10 | @crystals_page.context_processor 11 | def body_class(): 12 | return {'body_class': 'Crystals'} 13 | 14 | from . import main 15 | assert main # silence pyflakes 16 | 17 | app.register_blueprint(crystals_page, url_prefix="/Crystals") 18 | -------------------------------------------------------------------------------- /lmfdb/ecnf/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | ecnf_page = Blueprint("ecnf", __name__, template_folder='templates', static_folder="static") 7 | logger = make_logger(ecnf_page) 8 | 9 | 10 | @ecnf_page.context_processor 11 | def body_class(): 12 | return {'body_class': 'ecnf'} 13 | 14 | from . import main 15 | assert main # to keep pyflakes quiet 16 | 17 | app.register_blueprint(ecnf_page, url_prefix="/EllipticCurve") 18 | 19 | # API2 has been disabled for now 20 | #from lmfdb.api2.searchers import register_singleton, register_search_function 21 | #from . import searchers 22 | #register_search_function( 23 | # "elliptic_curves_nf", 24 | # "Elliptic curves over number fields", 25 | # "Search over elliptic curves defined over number fields", 26 | # auto_search='ec_nfcurves' 27 | #) 28 | #register_singleton('EllipticCurve', 'ec_nfcurves', 29 | # simple_search = searchers.ecnf_simple_label_search) 30 | -------------------------------------------------------------------------------- /lmfdb/ecnf/ecnf_test_pages.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.tests import LmfdbTest 3 | from lmfdb import db 4 | 5 | 6 | class ECNFTest(LmfdbTest): 7 | 8 | def runTest(self): 9 | pass 10 | 11 | def test_d6_pages(self): 12 | # check the page of every elliptic curve over a degree 6 field 13 | errors = [] 14 | n = db.ec_nfcurves.count({'degree':6}) 15 | print("Checking %d elliptic curves over number fields of degree 6" % (n)) 16 | for e in db.ec_nfcurves.search({'degree':6}): 17 | url = "EllipticCurve/%s/%d" % ("/".join(e['class_label'].split("-")),e['number']) 18 | print("Checking " + url) 19 | page = self.tc.get(url, follow_redirects=True) 20 | if e['label'] not in page.get_data(as_text=True) or 'Weierstrass equation' not in page.get_data(as_text=True): 21 | print('Failed on', url) 22 | errors.append(url) 23 | if errors: 24 | print("Errors occurred for the following URLs: ", errors) 25 | assert not errors 26 | -------------------------------------------------------------------------------- /lmfdb/ecnf/searchers.py: -------------------------------------------------------------------------------- 1 | from urllib.parse import unquote 2 | 3 | from lmfdb.utils import nf_string_to_label 4 | 5 | 6 | def ecnf_simple_label_search(search, baseurl, label): 7 | 8 | label_bits = label.split('/') 9 | try: 10 | nf = label_bits[0] 11 | conductor_label = label_bits[1] 12 | class_label = label_bits[2] 13 | number = label_bits[3] 14 | except IndexError: 15 | search['query'] = {'label': 'dummy'} 16 | return 17 | 18 | conductor_label = unquote(conductor_label) 19 | try: 20 | nf_label = nf_string_to_label(nf) 21 | except ValueError: 22 | search['query'] = {'label': 'dummy'} 23 | return 24 | 25 | label = "".join(["-".join(nf_label, conductor_label, class_label), number]) 26 | 27 | search['query'] = {'label': label} 28 | -------------------------------------------------------------------------------- /lmfdb/ecnf/templates/ecnf-by-degree.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 | {% if info.error %} 5 | 6 |

7 | {{ info.error }} 8 |

9 | 10 | {% else %} 11 | 12 |
13 | {{ info.summary|safe }} 14 |
15 | 16 | 17 | {% set stats = info.sig_stats %} 18 | 19 | {% for sigdat in stats %} 20 | {% set sig = sigdat.0 %} 21 | {% set sig_counts = sigdat.1 %} 22 | {% set field_counts = sigdat.2 %} 23 |

Signature ({{sig}}): 25 | {{sig_counts.ncurves}} curves in 26 | {{sig_counts.nclasses}} isogeny classes, conductor norm ≤ 27 | {{sig_counts.max_norm}} 28 |

29 | 30 | 31 | {% for fdat in field_counts %} 32 | {% set f = fdat.0 %} 33 | {% set f_counts = fdat.1 %} 34 | 35 | {% endfor %} 36 |
Field Number of curves Number of isogeny classes Maximum conductor norm
{{f}} {{f_counts.ncurves}} {{f_counts.nclasses}} {{f_counts.max_norm}}
37 | 38 | {% endfor %} 39 | 40 | {% endif %} 41 | 42 | {% endblock %} 43 | 44 | -------------------------------------------------------------------------------- /lmfdb/ecnf/templates/ecnf-by-signature.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 | {% if info.error %} 5 | 6 |

7 | {{ info.error }} 8 |

9 | 10 | {% else %} 11 | 12 |
13 | {{ info.summary|safe }} 14 |
15 | 16 | 17 | {% set stats = info.sig_stats %} 18 | 19 | {% if stats %} 20 |

Number of curves and maximum conductor norm for fields of 21 | signature ({{info.sig}})

22 | 23 | 24 | {% for fdat in stats %} 25 | {% set f = fdat.0 %} 26 | {% set f_counts = fdat.1 %} 27 | 28 | {% endfor %} 29 |
Field Number of curves Number of isogeny classes Maximum conductor norm
{{f}} {{f_counts.ncurves}} {{f_counts.nclasses}} {{f_counts.max_norm}}
30 | 31 | {% else %} 32 | The database does not contain any elliptic curves defined over fields 33 | of signature ({{s}}). 34 | {% endif %} 35 | {% endif %} 36 | 37 | {% endblock %} 38 | 39 | -------------------------------------------------------------------------------- /lmfdb/ecnf/templates/ecnf-index.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 | 5 |
6 | {{ info.stats.short_summary | safe}} 7 |
8 | 9 |

Browse

10 | 11 | 12 | {% for types in info.fields %} 13 | 14 | 15 | 16 | 17 | {% endfor %} 18 | 19 | 20 | 21 |
{{types[0] | safe}}:{% for label,f in types[1] %} {{f[1]}}   {% endfor %} $\cdots$
Some interesting elliptic curves or a random elliptic curve
22 | 23 |

{{ KNOWL('intro.search', 'Search') }}

24 | 25 |

26 | 29 | 30 |

Find

31 | 32 |
33 | {{ info.search_array.jump_box(info) | safe }} 34 |
35 | 36 |

  *The rank, regulator and analytic order of Ш are 37 | not known for all curves in the database; curves for which these are 38 | unknown will not appear in searches specifying one of these 39 | quantities.

40 | 41 | {% if DEBUG %} 42 |
43 |
44 | Raw field data: {{ info.fields }} 45 |
46 | {% endif %} 47 | 48 | 49 | {% endblock %} 50 | -------------------------------------------------------------------------------- /lmfdb/ecnf/templates/ecnf-stats.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 |
5 | {{ ecnf_summary|safe}} 6 |
7 | 8 |

Browse by field degree or signature:

9 | 24 | 25 | {% endblock %} 26 | 27 | -------------------------------------------------------------------------------- /lmfdb/elliptic_curves/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | ec_page = Blueprint("ec", __name__, template_folder='templates', static_folder="static") 7 | ec_logger = make_logger(ec_page) 8 | #ec_logger.info("Initializing elliptic curves blueprint") 9 | 10 | 11 | @ec_page.context_processor 12 | def body_class(): 13 | return {'body_class': 'ec'} 14 | 15 | from . import elliptic_curve 16 | assert elliptic_curve # for pyflakes 17 | 18 | app.register_blueprint(ec_page, url_prefix="/EllipticCurve/Q") 19 | 20 | # API2 has been disabled for now 21 | #from lmfdb.api2.searchers import register_search_function, register_singleton 22 | #from . import searchers 23 | #register_search_function("elliptic_curves_q", "Elliptic curves over rationals", 24 | # "Search over elliptic curves defined over rationals", auto_search = 'ec_curvedata') 25 | #register_singleton('EllipticCurve/Q', 'ec_curvedata', 26 | # simple_search = searchers.ec_simple_label_search) 27 | -------------------------------------------------------------------------------- /lmfdb/elliptic_curves/searchers.py: -------------------------------------------------------------------------------- 1 | from lmfdb.api2.utils import build_description 2 | 3 | 4 | def get_searchers(): 5 | desc = {} 6 | build_description(desc, name='test', h_name='test', type='', desc=None, 7 | db_name='elliptic_curves', coll_name='curvedata', field_name='label') 8 | return desc 9 | 10 | 11 | def ec_simple_label_search(search, baseurl, label): 12 | lmfdb_label = None 13 | 14 | if '.' in label: 15 | lmfdb_label = label 16 | 17 | spliturl = label.split('/') 18 | if len(spliturl) == 3: 19 | lmfdb_label = spliturl[0] + '.' + spliturl[1] + spliturl[2] 20 | 21 | if lmfdb_label: 22 | search['query'] = {'lmfdb_label': lmfdb_label} 23 | else: 24 | search['query'] = {'label': label} 25 | -------------------------------------------------------------------------------- /lmfdb/elliptic_curves/templates/ec-index.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | 3 | {% block content %} 4 | 5 |
6 | {{info.stats.short_summary| safe}} 7 |
8 | 9 |

Browse

10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
By {{ KNOWL('ec.q.conductor',title = "conductor")}}:{% for r,q in info.conductor_list.items() %} {{r}}   {% endfor %}
By {{ KNOWL('ec.rank', title="rank")}}:{% for r in info.rank_list: %} {{r}}  {% endfor %}
By {{ KNOWL('ec.torsion_order', torsion=t,title="torsion order") }}:{% for t in info.torsion_list: %} {{t}}  {% endfor %}
Some interesting elliptic curves or a random elliptic curve
25 | 26 |

{{ KNOWL('intro.search', 'Search') }}

27 | 28 | 31 | 32 |

Find

33 | 34 |
35 | {{ info.search_array.jump_box(info) | safe }} 36 |
37 | 38 | {% endblock %} 39 | -------------------------------------------------------------------------------- /lmfdb/elliptic_curves/templates/ec-padic-data.html: -------------------------------------------------------------------------------- 1 | {% if info.reg=="no data" %} 2 |

3 | No \(p\)-adic data available. 4 | {% else %} 5 |

Some \(p\)-adic info for \(p\) = {{ info.p }}. 6 | 7 |

Regulator = {{ info.reg }}. 8 | {% endif %} 9 | -------------------------------------------------------------------------------- /lmfdb/galois_groups/Database-info: -------------------------------------------------------------------------------- 1 | Fields in the transitive group database. 2 | 3 | label ---> 5T1 (string) 4 | n ---> 5 (int) 5 | t ---> 1 (int) 6 | auts ---> 5 (int) 7 | order ---> 5 (string) 8 | parity ---> 1 (int = 1 or -1) 9 | ab ---> 1 (int = 0 or 1) 10 | prim ---> 1 (int = 0 or 1) 11 | cyc ---> 1 (int = 0 or 1) 12 | solv ---> 1 (int = 0 or 1) 13 | subs ---> [[2, 1]] 14 | repns ---> [[9, 4], [18, 3]] 15 | resolve ---> [[2, [2, 1]], [3, [3, 1]], [6, [3, 2]], [6, [6, 1]]] 16 | name ---> C(5) = 5 (string) 17 | pretty ---> $C_5$ (string or None) 18 | 19 | -------------------------------------------------------------------------------- /lmfdb/galois_groups/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | galois_groups_page = Blueprint("galois_groups", __name__, template_folder='templates', static_folder="static") 7 | logger = make_logger(galois_groups_page) 8 | 9 | @galois_groups_page.context_processor 10 | def body_class(): 11 | return {'body_class': 'galois_groups'} 12 | 13 | from . import main 14 | assert main 15 | 16 | app.register_blueprint(galois_groups_page, url_prefix="/GaloisGroup") 17 | 18 | # API2 has been disabled for now 19 | #from lmfdb.api2.searchers import register_search_function 20 | #register_search_function( 21 | # "transitive_groups", 22 | # "Galois groups", 23 | # "Search over Galois groups", 24 | # auto_search = 'gps_transitive' 25 | #) 26 | -------------------------------------------------------------------------------- /lmfdb/galois_groups/code.yaml: -------------------------------------------------------------------------------- 1 | prompt: 2 | magma: 'magma' 3 | 4 | logo: 5 | magma: 6 | 7 | gg: 8 | magma: G := TransitiveGroup(%s, %s); 9 | 10 | n: 11 | magma: t, n := TransitiveGroupIdentification(G); n; 12 | 13 | t: 14 | magma: t, n := TransitiveGroupIdentification(G); t; 15 | 16 | primitive: 17 | magma: IsPrimitive(G); 18 | 19 | even: 20 | magma: IsEven(G); 21 | 22 | nilpotent: 23 | magma: NilpotencyClass(G); 24 | 25 | auts: 26 | magma: Order(Centralizer(SymmetricGroup(n), G)); 27 | 28 | gens: 29 | magma: Generators(G); 30 | 31 | ccs: 32 | magma: ConjugacyClasses(G); 33 | 34 | order: 35 | magma: Order(G); 36 | 37 | cyclic: 38 | magma: IsCyclic(G); 39 | 40 | abelian: 41 | magma: IsAbelian(G); 42 | 43 | solvable: 44 | magma: IsSolvable(G); 45 | 46 | id: 47 | magma: IdentifyGroup(G); 48 | 49 | char_table: 50 | magma: CharacterTable(G); 51 | 52 | -------------------------------------------------------------------------------- /lmfdb/galois_groups/templates/gg-error.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 | 5 |

Error

6 |

7 | {{info.msg}} 8 |

9 | 10 | {% endblock %} 11 | -------------------------------------------------------------------------------- /lmfdb/genus2_curves/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | g2c_page = Blueprint("g2c", __name__, template_folder='templates') 7 | g2c_logger = make_logger(g2c_page) 8 | 9 | @g2c_page.context_processor 10 | def body_class(): 11 | return {'body_class': 'g2c'} 12 | 13 | from . import main 14 | assert main # silence pyflakes 15 | 16 | app.register_blueprint(g2c_page, url_prefix="/Genus2Curve") 17 | 18 | # API2 has been disabled for now 19 | #from lmfdb.api2.searchers import register_search_function 20 | #register_search_function( 21 | # "genus_2_curves", 22 | # "Genus 2 curves over rationals", 23 | # "Search over genus 2 curves defined over rationals", 24 | # auto_search = 'g2c_curves' 25 | #) 26 | #register_search_function( 27 | # "genus_2_curve_ratpoints", 28 | # "Rational points on genus 2 curves over rationals", 29 | # "Search over genus 2 curve rational points", 30 | # auto_search = 'g2c_ratpts' 31 | #) 32 | -------------------------------------------------------------------------------- /lmfdb/genus2_curves/code.yaml: -------------------------------------------------------------------------------- 1 | prompt: 2 | sage: 'sage' 3 | pari: 'gp' 4 | magma: 'magma' 5 | 6 | logo: 7 | sage: 8 | pari: 9 | magma: 10 | 11 | not-implemented: 12 | sage: | 13 | # (not yet implemented) 14 | pari: | 15 | \\\\ (not yet implemented) 16 | magma: | 17 | // (not yet implemented) 18 | 19 | curve: 20 | magma: | 21 | R := PolynomialRing(Rationals()); 22 | fh := %s; 23 | f := R![a : a in fh[1]]; 24 | h := R![a : a in fh[2]]; 25 | C := HyperellipticCurve(f, h); 26 | 27 | aut: 28 | magma: AutomorphismGroup(C); 29 | 30 | jacobian: 31 | magma: J := Jacobian(SimplifiedModel(C)); 32 | 33 | tors: 34 | magma: TorsionSubgroup(J); 35 | 36 | cond: 37 | magma: Conductor(LSeries(C)); 38 | 39 | disc: 40 | magma: Discriminant(C); 41 | 42 | ntors: 43 | magma: Order(TorsionSubgroup(J)); 44 | 45 | mwgroup: 46 | magma: MordellWeilGroupGenus2(J); -------------------------------------------------------------------------------- /lmfdb/groups/__init__.py: -------------------------------------------------------------------------------- 1 | from lmfdb.app import app 2 | from lmfdb.logger import make_logger 3 | from flask import Blueprint 4 | 5 | groups_page = Blueprint("groups", __name__, template_folder='templates', static_folder="static") 6 | groups = groups_page 7 | groups_logger = make_logger(groups_page) 8 | 9 | app.register_blueprint(groups_page, url_prefix="/Groups") 10 | -------------------------------------------------------------------------------- /lmfdb/groups/abstract/__init__.py: -------------------------------------------------------------------------------- 1 | from lmfdb.app import app 2 | from lmfdb.logger import make_logger 3 | from flask import Blueprint 4 | 5 | 6 | abstract_page = Blueprint("abstract", __name__, template_folder='templates', static_folder="static") 7 | 8 | abstract_logger = make_logger(abstract_page) 9 | 10 | @abstract_page.context_processor 11 | def body_class(): 12 | return {'body_class': 'abstract_groups'} 13 | 14 | from . import main 15 | assert main # silence pyflakes 16 | 17 | app.register_blueprint(abstract_page, url_prefix="/Groups/Abstract") 18 | -------------------------------------------------------------------------------- /lmfdb/groups/abstract/templates/character_table_page.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 | 5 | {% include 'character_table.html' %} 6 | 7 | {% endblock %} 8 | 9 | {# Hack to remove the sidebar and move main content over #} 10 | {% block sidebar %} 11 | 18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /lmfdb/groups/abstract/templates/rational_character_table_page.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 | 5 | {% include 'rational_character_table.html' %} 6 | 7 | {% endblock %} 8 | 9 | {# Hack to remove the sidebar and move main content over #} 10 | {% block sidebar %} 11 | 18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /lmfdb/groups/glnC/__init__.py: -------------------------------------------------------------------------------- 1 | from lmfdb.app import app 2 | from lmfdb.logger import make_logger 3 | from flask import Blueprint 4 | 5 | glnC_page = Blueprint("glnC", __name__, template_folder='templates', static_folder="static") 6 | glnC_logger = make_logger(glnC_page) 7 | 8 | from . import main 9 | assert main # silence pyflakes 10 | 11 | app.register_blueprint(glnC_page, url_prefix="/Groups/GLnC") 12 | -------------------------------------------------------------------------------- /lmfdb/groups/glnC/templates/glnC-index.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 | 5 | 6 |
7 |

8 | Currently the database contains all finite groups of order up to FILL HERE 9 |

10 |
11 | 12 | 13 | 14 |

Browse finite subgroups

15 | 16 |

17 | By {{KNOWL('group.order', 'order')}}: 18 | {% for rnge in info.order_list %} 19 | {{rnge}}  20 | {% endfor %} 21 | 22 |

A random subgroup from the database.

23 | 24 | 25 | 26 | 27 |

Find a specific group by {{ KNOWL('group.label', title='label')}}

28 | 29 |
30 | {{ info.search_array.jump_box(info) | safe }} 31 |
32 | 33 |

Search

34 | 37 | 38 | {% endblock %} 39 | -------------------------------------------------------------------------------- /lmfdb/groups/glnC/templates/glnC-show-group.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 | 5 | 6 |

Group information

7 |

8 | 9 | 10 | 11 | 12 |
{{KNOWL('group.order',title='Order:')}} {{info.order}}
Abstract group {{info.groupknowl | safe}}
Group name {{info.groupname}}
13 |

14 | 15 |

Representation information

16 |

17 | 18 | 19 | 20 |
Dimension {{info.dim}}
Irreducible {{info.irreducible}}
21 |

22 |

Generators

23 |

24 | {% for gen in info.gens %} 25 | ${{ info.dispmat(gen)|safe }}$
26 | {% endfor %} 27 | 28 | {% endblock %} 29 | -------------------------------------------------------------------------------- /lmfdb/groups/glnQ/__init__.py: -------------------------------------------------------------------------------- 1 | from lmfdb.app import app 2 | from lmfdb.logger import make_logger 3 | from flask import Blueprint 4 | 5 | glnQ_page = Blueprint("glnQ", __name__, template_folder='templates', static_folder="static") 6 | glnQ_logger = make_logger(glnQ_page) 7 | 8 | from . import main 9 | assert main # silence pyflakes 10 | 11 | app.register_blueprint(glnQ_page, url_prefix="/Groups/GLnQ") 12 | -------------------------------------------------------------------------------- /lmfdb/groups/glnQ/templates/glnQ-index.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 | 5 | 6 |

7 |

8 | Currently the database contains all finite groups of order up to FILL HERE 9 |

10 |
11 | 12 | 13 | 14 |

Browse finite subgroups

15 | 16 |

17 | By {{KNOWL('group.order', 'order')}}: 18 | {% for rnge in info.order_list %} 19 | {{rnge}}  20 | {% endfor %} 21 | 22 |

A random subgroup from the database.

23 | 24 | 25 | 26 | 27 |

Find a specific group by {{ KNOWL('group.label', title='label')}}

28 | 29 |
30 | {{ info.search_array.jump_box(info) | safe }} 31 |
32 | 33 |

Search

34 | 37 | 38 | {% endblock %} 39 | -------------------------------------------------------------------------------- /lmfdb/groups/glnQ/templates/glnQ-show-group.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 | 5 | 6 |

Group information

7 |

8 | 9 | 10 | 11 | 12 |
{{KNOWL('group.order',title='Order:')}} {{info.order}}
Abstract group {{info.groupknowl | safe}}
Group name {{info.groupname}}
13 |

14 | 15 |

Representation information

16 |

17 | 18 | 19 | 20 | 21 |
Dimension {{info.dim}}
Irreducible {{info.irreducible}}
Subgroup of $\GL({{info.dim}},\C)$ {{info.c_class}}
22 |

23 |

Generators

24 |

25 | {% for gen in info.gens %} 26 | ${{ info.dispmat(gen)|safe }}$
27 | {% endfor %} 28 | 29 | {% endblock %} 30 | -------------------------------------------------------------------------------- /lmfdb/half_integral_weight_forms/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | hiwf_page = Blueprint("hiwf", __name__, template_folder='templates', static_folder="static") 7 | hiwf_logger = make_logger(hiwf_page) 8 | 9 | 10 | @hiwf_page.context_processor 11 | def body_class(): 12 | return {'body_class': 'hiwf'} 13 | 14 | from . import half_integral_form 15 | assert half_integral_form 16 | 17 | app.register_blueprint(hiwf_page, url_prefix="/ModularForm/GL2/Q/holomorphic_half") 18 | -------------------------------------------------------------------------------- /lmfdb/half_integral_weight_forms/templates/half_integral_weight_form_all.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 |

Browse {{ KNOWL('mf.half_integral_weight', title='Half integral weight cusp forms') }} for $\Gamma_0$

5 | 6 | 7 |

Find a specific form by label

8 | 9 |
10 | 11 | 12 |
e.g. 92.3_2.1.1 13 |
14 | 15 |

Search

16 | 17 |
18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 32 | 33 | 35 | 36 | 37 | 39 | 40 |
Level 22 | e.g. 12, 20, 28
Weight   /   2 27 | e.g. 1/2, 3/2
Character 34 | character label, e.g. n.m for $\chi_n(m,\cdot)$
38 |
41 |
42 | 43 | 44 | 45 | {% endblock %} 46 | -------------------------------------------------------------------------------- /lmfdb/half_integral_weight_forms/templates/half_integral_weight_form_search.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 | {% include 'matches.html' %} 5 | {% if info.number %} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | {% for form in info.results: %} 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | {% endfor %} 23 | 24 |
LabelLevelWeightCharacterDimension
{{form.label}} ${{form.level}}$${{form.weight}}/2$${{form.char}}$${{form.dimension}}$
25 |
26 | {% include 'forward_back.html' %} 27 | {% include 'dummy_download_search_results.html' %} 28 | {% endif %} 29 | {% include 'debug_info.html' %} 30 | 31 | {% endblock %} 32 | -------------------------------------------------------------------------------- /lmfdb/hecke_algebras/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | hecke_algebras_page = Blueprint("hecke_algebras", __name__, template_folder='templates', static_folder="static") 7 | hecke_algebras_logger = make_logger(hecke_algebras_page) 8 | 9 | 10 | @hecke_algebras_page.context_processor 11 | def body_class(): 12 | return {'body_class': 'hecke_algebras'} 13 | 14 | from . import main 15 | assert main 16 | 17 | app.register_blueprint(hecke_algebras_page, url_prefix="/ModularForm/GL2/Q/HeckeAlgebra") 18 | -------------------------------------------------------------------------------- /lmfdb/hecke_algebras/hecke_algebras_stats.py: -------------------------------------------------------------------------------- 1 | from lmfdb.app import app 2 | from lmfdb.utils import comma 3 | from lmfdb.logger import make_logger 4 | from lmfdb import db 5 | 6 | logger = make_logger("hecke_algebras") 7 | 8 | 9 | def hecke_algebras_summary(): 10 | hecke_knowl = 'Hecke algebras' 11 | level_knowl = 'level' 12 | weight_knowl = 'weight' 13 | gamma0_knowl = r'$\Gamma_0$' 14 | number = db.hecke_algebras.count() 15 | max_level = db.hecke_algebras.max('level') 16 | max_weight = db.hecke_algebras.max('weight') 17 | return ''.join([r'The database currently contains {} '.format(comma(number)), 18 | hecke_knowl,'. The largest ', level_knowl, ' for ', gamma0_knowl, ' is {}, '.format(comma(max_level)), 19 | 'the largest ', weight_knowl, ' is {}.'.format(comma(max_weight))]) 20 | 21 | 22 | @app.context_processor 23 | def ctx_hecke_algebras_summary(): 24 | return {'hecke_algebras_summary': hecke_algebras_summary} 25 | -------------------------------------------------------------------------------- /lmfdb/hecke_algebras/templates/hecke_algebras-error.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 |
5 | 6 |
7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /lmfdb/higher_genus_w_automorphisms/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | higher_genus_w_automorphisms_page = Blueprint("higher_genus_w_automorphisms", 7 | __name__, template_folder='templates', 8 | static_folder="static") 9 | logger = make_logger(higher_genus_w_automorphisms_page) 10 | 11 | 12 | @higher_genus_w_automorphisms_page.context_processor 13 | def body_class(): 14 | return {'body_class': 'higher_genus_w_automorphisms'} 15 | 16 | from . import main 17 | assert main # silence pyflakes 18 | 19 | app.register_blueprint(higher_genus_w_automorphisms_page, url_prefix="/HigherGenus/C/Aut") 20 | 21 | # API2 has been disabled for now 22 | #from lmfdb.api2.searchers import register_search_function 23 | #register_search_function( 24 | # "group_actions_higher_genus_curves", 25 | # "Group actions on higher genus curves", 26 | # "Search over group actions on higher genus curves", 27 | # auto_search = 'hgcwa_passports' 28 | #) 29 | -------------------------------------------------------------------------------- /lmfdb/higher_genus_w_automorphisms/templates/hgcwa-topological-action.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 | {% if info.braid_num == 1%} 5 |

Generating vectors in the orbit of {{info.representative}} grouped into 6 | the unique braid inequivalent action.

7 | {% else %} 8 |

Generating vectors in the orbit of {{info.representative}} grouped into 9 | {{info.braid_num}} braid inequivalent actions.

10 | {% endif %} 11 | 12 |
13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | {% for braid in info.topological_class %} 26 | 27 | 33 | 34 | 43 | 44 | {% endfor %} 45 | 46 |
{{KNOWL('curve.highergenus.aut.generatingvector',title='Generating 18 | vectors')}}Conjugacy classes
28 | {% for element in braid %} 29 | 30 | {{element[1]}} 31 | {% endfor %} 32 | 35 | 36 | {% for element in braid %} 37 | 38 | {{element[2]}} 39 | 40 |
41 | {% endfor %} 42 |
47 |
48 | 49 | {% endblock %} 50 | -------------------------------------------------------------------------------- /lmfdb/hilbert_modular_forms/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | hmf_page = Blueprint("hmf", __name__, template_folder='templates', static_folder="static") 7 | hmf_logger = make_logger(hmf_page) 8 | 9 | 10 | @hmf_page.context_processor 11 | def body_class(): 12 | return {'body_class': 'hmf'} 13 | 14 | from . import hilbert_modular_form 15 | assert hilbert_modular_form 16 | 17 | app.register_blueprint(hmf_page, url_prefix="/ModularForm/GL2/TotallyReal") 18 | -------------------------------------------------------------------------------- /lmfdb/hilbert_modular_forms/templates/hmf_by_degree.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 | {% if info.error %} 5 | 6 |

7 | {{ info.error | safe }} 8 |

9 | 10 | {% else %} 11 | 12 |
13 | 14 |

15 | {{ info.degree_stats | safe }} 16 |

17 | 18 | 19 | 20 | {% for F in info.stats.fields %} 21 | {% set dat = info.stats.counts[F] %} 22 | 23 | 27 | {% endfor %} 28 |
FieldNumber of newformsMaximum level norm
{{dat['field_knowl'] | safe}} 24 | {{dat['nforms']}} 25 | {{dat['maxnorm']}} 26 |
29 | 30 |
31 | 32 | {% endif %} 33 | 34 | {% endblock %} 35 | 36 | -------------------------------------------------------------------------------- /lmfdb/hilbert_modular_forms/templates/hmf_stats.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 |
5 | {{ KNOWL_INC('rcs.cande.mf.hilbert') }} 6 |
7 | 8 |

Browse by field degree:

9 | 20 | 21 | {% endblock %} 22 | 23 | -------------------------------------------------------------------------------- /lmfdb/homepage/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | import yaml 3 | 4 | from .boxes import load_boxes 5 | from .sidebar import get_sidebar 6 | 7 | # reading and sorting list of contributors once at startup 8 | _curdir = os.path.dirname(os.path.abspath(__file__)) 9 | with open(os.path.join(_curdir, "..", "..", "CONTRIBUTORS.yaml")) as contrib_file: 10 | contribs = yaml.load_all(contrib_file, Loader=yaml.FullLoader) 11 | contribs = sorted(contribs, key=lambda x: x['name'].split()[-1]) 12 | 13 | __all__ = ['load_boxes', 'contribs', 'get_sidebar'] 14 | -------------------------------------------------------------------------------- /lmfdb/homepage/boxes.py: -------------------------------------------------------------------------------- 1 | import os 2 | import yaml 3 | from flask import url_for 4 | from sage.all import cached_function 5 | 6 | 7 | class Box(): 8 | def __init__(self, title): 9 | self.title = title 10 | self.content = None 11 | self.links = [] 12 | self.target = url_for('index') 13 | self.img = None 14 | 15 | def add_link(self, title, href): 16 | self.links.append((title, href)) 17 | 18 | @cached_function 19 | def load_boxes(): 20 | boxes = [] 21 | _curdir = os.path.dirname(os.path.abspath(__file__)) 22 | with open(os.path.join(_curdir, "index_boxes.yaml")) as boxfile: 23 | listboxes = yaml.load_all(boxfile, Loader=yaml.FullLoader) 24 | for b in listboxes: 25 | B = Box(b['title']) 26 | B.content = b['content'] 27 | if 'image' in b: 28 | B.img = url_for('static', filename='images/'+b['image']+'.png') 29 | for title, url in b['links']: 30 | B.add_link(title, url) 31 | boxes.append(B) 32 | return boxes 33 | -------------------------------------------------------------------------------- /lmfdb/hypergm/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | hypergm_page = Blueprint("hypergm", __name__, template_folder='templates', 7 | static_folder="static") 8 | hgm_logger = make_logger(hypergm_page) 9 | 10 | 11 | @hypergm_page.context_processor 12 | def body_class(): 13 | return {'body_class': 'hypergm'} 14 | 15 | 16 | from . import main 17 | assert main # silence pyflakes 18 | 19 | app.register_blueprint(hypergm_page, url_prefix="/Motive/Hypergeometric/Q") 20 | -------------------------------------------------------------------------------- /lmfdb/hypergm/hodge.py: -------------------------------------------------------------------------------- 1 | def mu_nu(hodge, signature): 2 | """ 3 | Computes the mu and nu given hodge numbers and signature 4 | """ 5 | # hodge = [int(a) for a in hodge.split(',')] 6 | motivic_weight = len(hodge) - 1 7 | def hodge_index(p): return hodge[p] 8 | # The hodge number p,q 9 | 10 | def q(p): return motivic_weight - p 11 | 12 | assert len(hodge) == motivic_weight + 1 13 | 14 | tmp = [[(q(p) - p) / 2.] * int(hodge_index(p)) for p in range((motivic_weight + 1) // 2)] 15 | nu = sum(tmp, []) 16 | 17 | if motivic_weight % 2 == 0: 18 | a = (hodge_index(motivic_weight // 2) - abs(signature)) // 2 19 | tmp = [0] * a 20 | nu += tmp 21 | 22 | if signature <= 0: 23 | mu = [1] * abs(signature) 24 | else: 25 | mu = [0] * abs(signature) 26 | 27 | return mu, nu 28 | -------------------------------------------------------------------------------- /lmfdb/knowledge/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | knowledge_page = Blueprint("knowledge", __name__, template_folder='templates') 7 | logger = make_logger(knowledge_page) 8 | 9 | from . import main 10 | assert main 11 | 12 | app.register_blueprint(knowledge_page, url_prefix="/knowledge") 13 | -------------------------------------------------------------------------------- /lmfdb/knowledge/templates/knowl-broken-links.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 | 12 | {% endblock %} 13 | -------------------------------------------------------------------------------- /lmfdb/knowledge/templates/knowl-comment-history.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {% for h in history %} 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | {% endfor %} 28 |
TimestampCommenterCommentKnowlAuthorUpdated
{{ h.comment_timestamp|fmtdatetime }}{{ h.comment_author }}{{ KNOWL(h.comment_id) }}{{ KNOWL(h.knowl_id) }}{{ h.knowl_author }}{{ h.knowl_timestamp|fmtdatetime }}
29 | {% if (history|length) == limit %} 30 | See more comments 31 | {% endif %} 32 |
33 | 34 | {% endblock %} 35 | -------------------------------------------------------------------------------- /lmfdb/knowledge/templates/knowl-history.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | {% for h in history %} 16 | 17 | 18 | 19 | 20 | 21 | {% endfor %} 22 |
TimestampWhoKnowl
{{ h.timestamp|fmtdatetime }}{{ h.last_author }}{{ KNOWL(h.id) }}
23 | {% if (history|length) == limit %} 24 | See more history 25 | {% endif %} 26 |
27 | 28 | {% endblock %} 29 | -------------------------------------------------------------------------------- /lmfdb/knowledge/templates/knowl-knowl-history.html: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | History: 20 | (expand/hide all) 21 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /lmfdb/knowledge/templates/knowl-orphans.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 |

The following knowls are not referenced by any code or other knowl.

5 | {% for cat, kids in (orphans.items()|sort) %} 6 |

{{cat}}

7 | 12 | {% endfor %} 13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /lmfdb/lattice/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | lattice_page = Blueprint("lattice", __name__, template_folder='templates', static_folder="static") 7 | lattice_logger = make_logger(lattice_page) 8 | 9 | 10 | @lattice_page.context_processor 11 | def body_class(): 12 | return {'body_class': 'lattice'} 13 | 14 | from . import main 15 | assert main 16 | 17 | app.register_blueprint(lattice_page, url_prefix="/Lattice") 18 | -------------------------------------------------------------------------------- /lmfdb/lattice/isom.py: -------------------------------------------------------------------------------- 1 | 2 | from sage.all import matrix, ZZ, QuadraticForm 3 | 4 | # function for checking isometries 5 | def isom(A,B): 6 | # First check that A is a symmetric matrix. 7 | if not matrix(A).is_symmetric(): 8 | return False 9 | # Then check A against the viable database candidates. 10 | else: 11 | n = len(A[0]) 12 | m = len(B[0]) 13 | Avec = [] 14 | Bvec = [] 15 | for i in range(n): 16 | for j in range(i,n): 17 | if i == j: 18 | Avec += [A[i][j]] 19 | else: 20 | Avec += [2*A[i][j]] 21 | for i in range(m): 22 | for j in range(i,m): 23 | if i == j: 24 | Bvec += [B[i][j]] 25 | else: 26 | Bvec += [2*B[i][j]] 27 | Aquad = QuadraticForm(ZZ,len(A[0]),Avec) 28 | # check positive definite 29 | if Aquad.is_positive_definite(): 30 | Bquad = QuadraticForm(ZZ,len(B[0]),Bvec) 31 | return Aquad.is_globally_equivalent_to(Bquad) 32 | else: 33 | return False 34 | -------------------------------------------------------------------------------- /lmfdb/lattice/templates/lattice-error.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 |
5 | 6 |
7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /lmfdb/lfunctions/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | l_function_page = Blueprint("l_functions", __name__, template_folder='templates', static_folder="static") 7 | logger = make_logger("LF") 8 | 9 | 10 | @l_function_page.context_processor 11 | def body_class(): 12 | return {'body_class': 'l_functions'} 13 | 14 | from . import main 15 | assert main # silence pyflakes 16 | 17 | app.register_blueprint(l_function_page, url_prefix="/L") 18 | -------------------------------------------------------------------------------- /lmfdb/lfunctions/templates/LfunctionContents.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 |

Browse

5 | 6 | 10 | 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /lmfdb/lfunctions/templates/LfunctionEulerSearchResults.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 | {% include 'refine_search_form.html' %} 5 | 6 | {% include 'matches.html' %} 7 | {% if info.number %} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {% for n in info.Tr_n %} 19 | 20 | {% endfor %} 21 | 22 | 23 | 24 | {% for L in info.results %} 25 | 26 | 27 | 28 | {% for n in info.Tr_n %} 29 | 30 | {% endfor %} 31 | 32 | {% endfor %} 33 | 34 |
$L(s) = \prod_p F_p(p^{-s})^{-1}$
{{ KNOWL('lfunction.label', 'Label') }}{{ KNOWL('lfunction.underlying_object', title='Origin') }} \(F_{ {{n}} }(T)\)
{{L.label}} {% for name, url in L.origins %} {{name}} {% endfor %} ${{ L.euler_factor[n] }}$
35 | 36 | {% include 'forward_back.html' %} 37 | {# {% include 'download_search_results.html' %} #} 38 | {% endif %} 39 | {% include 'debug_info.html' %} 40 | 41 | {% endblock %} 42 | -------------------------------------------------------------------------------- /lmfdb/lfunctions/templates/LfunctionSimple.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | 3 | {% block content %} 4 |
5 | 6 | {{ content|safe }} 7 | You may report this problem here. 8 |
9 |
10 | 11 |
12 | {% endblock %} 13 | 14 | -------------------------------------------------------------------------------- /lmfdb/lfunctions/templates/LfunctionTraceSearchResults.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 | {% include 'refine_search_form.html' %} 5 | 6 | {% include 'matches.html' %} 7 | {% if info.number %} 8 | 9 | 10 | 11 | 12 | 13 | 14 | {% for n in info.Tr_n %} 15 | {% if n >= 1 and n <= 1000 %} 16 | 17 | {% endif %} 18 | {% endfor %} 19 | 20 | 21 | 22 | {% for L in info.results %} 23 | 24 | 25 | 26 | {% for n in info.Tr_n %} 27 | {% if 'dirichlet_coefficients' in L %} 28 | 29 | {% endif %} 30 | {% endfor %} 31 | 32 | {% endfor %} 33 | 34 |
{{ KNOWL('lfunction.label', 'Label') }}{{ KNOWL('lfunction.underlying_object', title='Origin') }} \(a_{ {{n}} }\)
{{L.label}} {% for name, url in L.origins %} {{name}} {% endfor %} {{ info.bigint_knowl(L.dirichlet_coefficients[n-1]) | safe}}
35 | 36 | {% include 'forward_back.html' %} 37 | {# {% include 'download_search_results.html' %} #} 38 | {% endif %} 39 | {% include 'debug_info.html' %} 40 | 41 | {% endblock %} 42 | -------------------------------------------------------------------------------- /lmfdb/lfunctions/templates/MaassformGLn.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 | {{contents|safe}} 5 | 6 | {% endblock %} 7 | -------------------------------------------------------------------------------- /lmfdb/lfunctions/templates/ellipticcurve.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 | {% if representation=='' %} 5 |

6 | The L-function $L(s,E)= \sum a_n n^{-s}$ of an elliptic curve of 7 | {{ KNOWL('ec.q.conductor', title='conductor')}} $N$ has an 8 | {{ KNOWL('lfunction.euler_product', title='Euler product')}} 9 | of the form 10 | \[ 11 | L(s,E)=\prod_{p\mid N} \left(1 - a_p p^{-s} \right)^{-1}\prod_{p\nmid N} \left(1 - a_p p^{-s} + p^{-2s} \right)^{-1} 12 | \] 13 | and satisfies the {{ KNOWL('lfunction.functional_equation', title='functional equation')}} 14 | \[ 15 | \Lambda(s,E)= N^{s/2}\Gamma_{\mathbb C}(s+1/2)\cdot L(s,E)= \varepsilon\Lambda(1-s,E), 16 | \] 17 | where the sign \(\varepsilon\) is equal to either \(+1\) or \(-1\). 18 | 19 |

20 | {% else %} 21 |

22 | Given an L-function of an elliptic curve of conductor $N$, the 23 | {{ KNOWL('lfunction.symm', title='symmetric $n$-th power L-function')}} 24 | is defined by the {{ KNOWL('lfunction.euler_product', title='Euler product')}} 25 | \[ 26 | L(s,E,\text{sym}^n)=\prod_{p\nmid N} \prod_{j=0}^n \left(1 - \frac{\alpha_p^{j} \beta^{n-j}_p}{p^s} \right)^{-1} \times \prod_{p|N} L_p(s) 27 | \] 28 |

29 | 30 | {% endif %} 31 | 32 | {{contents[0]|safe}} 33 | 34 | {% endblock %} 35 | -------------------------------------------------------------------------------- /lmfdb/lfunctions/templates/genus2curve.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 |

5 | The L-function $L(s,A)= \sum a_n n^{-s}$ of an abelian surface of 6 | {{ KNOWL('g2c.invariants', 'conductor')}} $N$ has an 7 | {{ KNOWL('lfunction.euler_product', title='Euler product')}} 8 | of the form 9 | \[ 10 | L(s,E)=\prod_p\prod_{j=1}^4\left(1-\alpha_{j,p} p^{-s}\right)^{-1} 11 | \] 12 | and satisfies the {{ KNOWL('lfunction.functional_equation', title='functional equation')}} 13 | \[ 14 | \Lambda(s,A)= N^{s/2}\Gamma_{\mathbb C}(s+1/2)^2\cdot L(s,A)= \varepsilon\Lambda(1-s,A), 15 | \] 16 | where the sign \(\varepsilon\) is equal to either \(+1\) or \(-1\). 17 | 18 |

19 | 20 | {{contents[0]|safe}} 21 | 22 | {% endblock %} 23 | -------------------------------------------------------------------------------- /lmfdb/local_fields/__init__.py: -------------------------------------------------------------------------------- 1 | from lmfdb.app import app 2 | from lmfdb.logger import make_logger 3 | from flask import Blueprint, request, redirect 4 | 5 | local_fields_page = Blueprint("local_fields", __name__, template_folder='templates', static_folder="static") 6 | logger = make_logger(local_fields_page) 7 | 8 | 9 | @local_fields_page.context_processor 10 | def body_class(): 11 | return {'body_class': 'local_fields'} 12 | 13 | from . import main 14 | assert main 15 | 16 | from urllib.parse import urlparse, urlunparse 17 | 18 | 19 | @app.before_request 20 | def redirect_local(): 21 | urlparts = urlparse(request.url) 22 | if 'LocalNumberField' in urlparts.path: 23 | urlparts = urlparts._replace(path=urlparts.path.replace('LocalNumberField', 'padicField')) 24 | return redirect(urlunparse(urlparts), 301) 25 | return 26 | 27 | 28 | app.register_blueprint(local_fields_page, url_prefix="/padicField") 29 | 30 | # API2 has been disabled for now 31 | #from lmfdb.api2.searchers import register_search_function 32 | #register_search_function( 33 | # "$p$-adic_fields", 34 | # "$p$-adic fields", 35 | # "Search over $p$-adic fields", 36 | # auto_search = 'lf_fields' 37 | #) 38 | -------------------------------------------------------------------------------- /lmfdb/logger/__init__.py: -------------------------------------------------------------------------------- 1 | # Python logging module 2 | from logging import info, warning, debug, critical 3 | 4 | from .start import start_logging, logger_file_handler 5 | from .utils import make_logger 6 | 7 | start_logging() 8 | 9 | __all__ = ['info', 'warning', 'debug', 'critical', 'make_logger', 'logger_file_handler'] 10 | -------------------------------------------------------------------------------- /lmfdb/maass_forms/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | 7 | maass_forms_page = Blueprint("maass_forms", __name__, template_folder='templates') 8 | logger = make_logger(maass_forms_page) 9 | 10 | 11 | @maass_forms_page.context_processor 12 | def body_class(): 13 | return {'body_class': 'maass_forms'} 14 | 15 | 16 | from . import main 17 | assert main 18 | 19 | 20 | app.register_blueprint(maass_forms_page, url_prefix="/ModularForm/GL2/Q/Maass") 21 | -------------------------------------------------------------------------------- /lmfdb/maass_forms/templates/maass_browse_graph.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 | 5 |

Maass forms of levels {{min_level}} to {{max_level}} with ${{min_R}} \leq R\leq {{max_R}}$

6 |

7 | The horizontal axis is the {{KNOWL('mf.maass.mwf.spectralparameter', title='spectral parameter')}} $R$ with the {{KNOWL('mf.maass.mwf.eigenvalue', title='Laplace eigenvalue')}} satisfying $\lambda=1/4+R^2$. The vertical axis is the {{KNOWL('mf.maass.mwf.level', title='level')}} $N$. Each point corresponds to a Maass form of {{KNOWL('mf.maass.mwf.weight', title='weight')}} 0 and trivial character on $\Gamma_0(N)$ with the color showing whether the {{KNOWL('mf.maass.mwf.symmetry', title='symmetry')}} is even or odd. 8 |

9 | 10 |

In the plot below each dot is linked to the homepage of the corresponding {{KNOWL('mf.maass.mwf',title='Maass forms')}}.

11 | 12 | {{contents[0]|safe}} 13 | 14 | {% endblock content %} 15 | -------------------------------------------------------------------------------- /lmfdb/modl_galois_representations/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | modlgal_page = Blueprint("modlgal", __name__, template_folder='templates', static_folder="static") 7 | modlgal_logger = make_logger(modlgal_page) 8 | 9 | from . import main 10 | assert main #silence pyflakes 11 | 12 | app.register_blueprint(modlgal_page, url_prefix="/ModLGaloisRepresentation") 13 | -------------------------------------------------------------------------------- /lmfdb/modl_galois_representations/templates/modlgal_browse.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 |
5 | {{ info.stats.short_summary | safe }} 6 |
7 | 8 |

Browse

9 | 10 |

11 | By {{KNOWL('modlgal.codomain', 'codomain')}}: 12 | {% for rnge in info.codomain_list %} 13 | {{rnge[0]}}  14 | {% endfor %} 15 |

16 |

17 | By {{KNOWL('modlgal.conductor', 'conductor')}}: 18 | {% for rnge in info.conductor_list %} 19 | {{rnge}}  20 | {% endfor %} 21 |

22 | 23 |

24 | Some interesting mod-$\ell$ Galois representations or a random representation 25 |

26 | 27 |

{{ KNOWL('intro.search', 'Search') }}

28 | 29 | 32 | 33 |

Find

34 | 35 |
36 | {{ info.search_array.jump_box(info) | safe }} 37 |
38 | 39 | {% endblock %} 40 | 41 | -------------------------------------------------------------------------------- /lmfdb/modlmf/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | modlmf_page = Blueprint("modlmf", __name__, template_folder='templates', static_folder="static") 7 | modlmf_logger = make_logger(modlmf_page) 8 | 9 | 10 | @modlmf_page.context_processor 11 | def body_class(): 12 | return {'body_class': 'modlmf'} 13 | 14 | from . import main 15 | assert main 16 | 17 | app.register_blueprint(modlmf_page, url_prefix="/ModularForm/GL2/ModL") 18 | -------------------------------------------------------------------------------- /lmfdb/modlmf/templates/modlmf-error.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 |
5 | 6 |
7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /lmfdb/modular_curves/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | modcurve_page = Blueprint("modcurve", __name__, template_folder='templates') 7 | modcurve_logger = make_logger(modcurve_page) 8 | 9 | from . import main 10 | assert main # silence pyflakes 11 | 12 | app.register_blueprint(modcurve_page, url_prefix="/ModularCurve") 13 | -------------------------------------------------------------------------------- /lmfdb/motives/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | motive_page = Blueprint("motive", __name__, template_folder='templates', static_folder="static") 7 | motive_logger = make_logger(motive_page) 8 | 9 | 10 | @motive_page.context_processor 11 | def body_class(): 12 | return {'body_class': 'motive'} 13 | 14 | from . import main 15 | assert main # silence pyflakes 16 | 17 | app.register_blueprint(motive_page, url_prefix="/Motive") 18 | -------------------------------------------------------------------------------- /lmfdb/motives/main.py: -------------------------------------------------------------------------------- 1 | # This Blueprint is about Hypergeometric motives 2 | # Author: John Jones 3 | 4 | from flask import render_template, url_for, redirect, request 5 | 6 | from lmfdb.motives import motive_page 7 | 8 | HGM_credit = 'D. Roberts and J. Jones' 9 | 10 | 11 | def get_bread(breads=[]): 12 | bc = [("Motives", url_for(".index"))] 13 | bc.extend(b for b in breads) 14 | return bc 15 | 16 | @motive_page.route("/") 17 | def index(): 18 | bread = get_bread([]) 19 | #if len(request.args) != 0: 20 | # return hgm_search(**request.args) 21 | info = {} 22 | friends = [('Hypergeometric', url_for(".index2"))] 23 | return render_template("motive-index.html", title="Motives", bread=bread, credit=HGM_credit, info=info, friends=friends) 24 | 25 | @motive_page.route("/Hypergeometric") 26 | @motive_page.route("/Hypergeometric/") 27 | def index2(): 28 | return redirect(url_for("hypergm.index", **request.args)) 29 | 30 | # For later when we have other hypergeometric motives 31 | #bread = get_bread([('Hypergeometric', url_for('.index2'))]) 32 | #info = {} 33 | #friends=[('Hypergeometric over $\Q$', url_for("hypergm.index"))] 34 | #return render_template("hypergeometric-index.html", title="Hypergeometric motives", bread=bread, credit=HGM_credit, info=info, friends=friends) 35 | -------------------------------------------------------------------------------- /lmfdb/motives/templates/hypergeometric-index.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 | 5 |

{{ KNOWL('hgm.defining_parameters', title='Defining Parameters') }}

6 | 7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /lmfdb/motives/templates/motive-error.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 | 5 |

Error

6 |

7 | {{info.msg}} 8 |

9 | 10 | {% endblock %} 11 | -------------------------------------------------------------------------------- /lmfdb/nfutils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/nfutils/__init__.py -------------------------------------------------------------------------------- /lmfdb/number_fields/Database-info: -------------------------------------------------------------------------------- 1 | Fields in the number field database with sample values and type 2 | 3 | degree ---> 7 (int) 4 | disc_abs ---> 58451728309129 5 | label ---> 7.7.58451728309129.1 (string) 6 | disc_sign ---> 1 (int) 7 | signature ---> 7,0 (string) 8 | coeffs ---> [1163,-1433,-3988,1348,217,-84,-1,1] (list of ints) 9 | ramps ---> [197] (list of ints) 10 | galt ---> 1 (int) 11 | subs ---> [['1,0,1', 2], ['6,-2,1,0,1', 1]] 12 | 13 | Subs gives subfield information as a list of [field, multiplicity] where the 14 | field is given by the coefficients of a defining polynomial of 15 | the subfield having been run through polredabs. The polynomials 16 | in the example above are x^2+1 and x^4+x^2-2*x+6 where there 17 | are two subfields isomorphic to x^2+1. If subs is not present, 18 | then there are no subs. 19 | 20 | Optional fields: 21 | --------------- 22 | class_number ---> 1 (int) 23 | class_group ---> 3 (string, can be blank of class_number=1) 24 | units ---> (string) 25 | reg ---> 3.2345 (float) 26 | used_grh ---> True (boolean) 27 | reduced ---> 0 or 1 (0 if the polynomial is not polredabs'ed) 28 | 29 | Deprecated fields: 30 | ----------------- 31 | subfields ---> [[[1, 0, 1], 2], [[6, -2, 1, 0, 1], 1]] 32 | -------------------------------------------------------------------------------- /lmfdb/number_fields/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | nf_page = Blueprint("number_fields", __name__, template_folder='templates', static_folder="static") 7 | nf_logger = make_logger(nf_page) 8 | 9 | @nf_page.context_processor 10 | def body_class(): 11 | return {'body_class': 'nf'} 12 | 13 | from . import number_field 14 | assert number_field 15 | 16 | app.register_blueprint(nf_page, url_prefix="/NumberField") 17 | 18 | # API2 has been disabled for now 19 | #from lmfdb.api2.searchers import register_search_function 20 | #register_search_function( 21 | # "number_fields", 22 | # "Number fields", 23 | # "Search over number fields", 24 | # auto_search = 'nf_fields' 25 | #) 26 | -------------------------------------------------------------------------------- /lmfdb/number_fields/templates/galois_groups.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 |

4 | Each 5 | {{KNOWL('gg.galois_group', title="Galois group")}} 6 | is identified by a code "nTt" where \(n\) is 7 | its {{KNOWL('gg.degree',title='degree')}} and 8 | \(t\) and its {{KNOWL('gg.tnumber',title='T-number')}}. 9 | One may specify a group by this symbol. 10 |

11 |

12 | For familiar groups one can use short names from the table below. 13 | An abstract group may have more than one 14 | representation as a Galois group. Correspondingly, the familiar 15 | symbol for a group may represent several 16 | Galois groups. These combinations for degree $\leq 11$ are shown 17 | below. 18 |

19 | 20 |

21 | {{ al | safe }} 22 | 23 |

24 | 25 | {% endblock %} 26 | -------------------------------------------------------------------------------- /lmfdb/number_fields/templates/number_field_space.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | 3 | {% block title %}Number field navigation page{% endblock %} 4 | 5 | {% block content %} 6 | {{ info.blah }} 7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /lmfdb/permutations/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | permutations_page = Blueprint("permutations", __name__, template_folder='templates', static_folder="static") 7 | logger = make_logger(permutations_page) 8 | 9 | 10 | @permutations_page.context_processor 11 | def body_class(): 12 | return {'body_class': 'Permutations'} 13 | 14 | from . import main 15 | assert main 16 | 17 | app.register_blueprint(permutations_page, url_prefix="/Permutations") 18 | -------------------------------------------------------------------------------- /lmfdb/permutations/templates/permutations-index.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 | 5 |

6 | A permutation is a bijection from $[1,n]$ to $[1,n]$. 7 |

8 | 9 |

Browse {{KNOWL('permutations.permutation', title="Permutations")}}

10 |

11 | 12 |

13 | 14 | 15 | 16 | 17 | 18 | 19 |
Data: comma or period separated integers, e.g. 3,2,1 or 4.3.5.2.1
20 |
21 | 22 | {% endblock %} 23 | -------------------------------------------------------------------------------- /lmfdb/permutations/templates/permutations.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 | 5 |

Permutation

6 |

${{ permutation }}$

7 | 8 |

Size

9 | {{ permutation.size() }} 10 | 11 |

Matrix

12 | 13 |

Show matrix

14 | 15 | 16 | 17 | 23 | 24 |

Number of inversions

25 |

${{ permutation.number_of_inversions() }}$

26 | 27 |

Product of cycles

28 |

${{ permutation.to_cycles() }}$

29 | 30 | {% endblock %} 31 | -------------------------------------------------------------------------------- /lmfdb/riemann/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | 4 | from . import main 5 | from . import stieltjes 6 | app.register_blueprint(main.mod, url_prefix="/riemann") 7 | app.register_blueprint(stieltjes.StieltjesConstants, url_prefix="/riemann/stieltjes") 8 | -------------------------------------------------------------------------------- /lmfdb/riemann/main.py: -------------------------------------------------------------------------------- 1 | import flask 2 | 3 | mod = flask.Blueprint('riemann', __name__, template_folder="templates") 4 | title = "Riemann zeta function" 5 | -------------------------------------------------------------------------------- /lmfdb/riemann/stieltjes/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from .stieltjes import StieltjesConstants 3 | assert StieltjesConstants 4 | -------------------------------------------------------------------------------- /lmfdb/riemann/stieltjes/templates/getone.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 |
5 | Display up to digits. 6 | 7 |
8 |
9 |
10 | {{KNOWL('riemann.stieltjes.contents', title="Contents of these tables.")}} 11 |
12 |
13 |
14 | {% if n > 0 %} 15 | Previous 16 | {% endif %} 17 | {% if n < 100000 %} 18 | Next 19 | {% endif %} 20 |
21 |
22 |
23 |
24 | $\gamma_{ {{n}} } =\ ${{gamma | safe}} 25 |
26 | 27 | {% endblock %} 28 | -------------------------------------------------------------------------------- /lmfdb/sato_tate_groups/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from flask import Blueprint 4 | 5 | st_page = Blueprint("st", __name__, template_folder='templates', static_folder="static") 6 | 7 | @st_page.context_processor 8 | def body_class(): 9 | return {'body_class': 'st'} 10 | 11 | from . import main 12 | 13 | assert main # silence pyflakes 14 | 15 | app.register_blueprint(st_page, url_prefix="/SatoTateGroup") 16 | 17 | # API2 has been disabled for now 18 | #from lmfdb.api2.searchers import register_search_function 19 | #register_search_function("satotate", "Sato Tate Group", 20 | # "Search over Sato Tate Groups", auto_search='gps_st', inv=['gps','gps_st']) 21 | -------------------------------------------------------------------------------- /lmfdb/sato_tate_groups/templates/st_browse.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | {% block content %} 3 | 4 |
5 | {{ info.stats.short_summary | safe }} 6 |
7 | 8 |

Browse

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
By {{ KNOWL('st_group.weight', title='weight') }}:{% for r in info.weight_list %} {{r}}  {% endfor %}
By {{ KNOWL('st_group.degree', title='degree') }}:{% for r in info.degree_list %} {{r}}  {% endfor %}
Some interesting Sato-Tate groups or a random Sato-Tate group
21 | 22 |

{{ KNOWL('intro.search', 'Search') }}

23 | 24 | 27 | 28 |

Find

29 | 30 |
31 | {{ info.search_array.jump_box(info) | safe }} 32 |
33 | 34 | {% endblock %} 35 | -------------------------------------------------------------------------------- /lmfdb/siegel_modular_forms/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | smf_page = Blueprint('smf', __name__, 7 | template_folder='templates', static_folder='static') 8 | smf_logger = make_logger(smf_page) 9 | 10 | 11 | @smf_page.context_processor 12 | def body_class(): 13 | return {'body_class': 'smf'} 14 | 15 | from . import siegel_modular_form 16 | assert siegel_modular_form #silence pyflakes 17 | 18 | app.register_blueprint(smf_page, url_prefix='/ModularForm/GSp/Q') 19 | -------------------------------------------------------------------------------- /lmfdb/siegel_modular_forms/smf_test_pages.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.tests import LmfdbTest 3 | from lmfdb import db 4 | 5 | 6 | class SMFPageTest(LmfdbTest): 7 | 8 | def runTest(self): 9 | pass 10 | 11 | def test_all_pages(self): 12 | errors = [] 13 | data = db.smf_samples.search({'collection':{'$exists':True},'name':{'$exists':True}},['collection','name']) 14 | n = 0 15 | print("") 16 | for s in data: 17 | full_label = s['collection'][0] + "." + s['name'] 18 | url = "/ModularForm/GSp/Q/"+full_label+"/" 19 | print("Checking home page for SMF sample " + full_label) 20 | try: 21 | n = n+1 22 | pagedata = self.tc.get(url, follow_redirects=True).get_data(as_text=True) 23 | #print "Got %d bytes" % len(pagedata) 24 | assert full_label in pagedata and "Hecke eigenform" in pagedata 25 | except Exception: 26 | print("Error on page " + url) 27 | errors.append(url) 28 | if not errors: 29 | print("Tested %s pages with no errors" % n) 30 | else: 31 | print("Tested %d pages with %d errors occurring on the following pages:" % (n,len(errors))) 32 | for url in errors: 33 | print(url) 34 | -------------------------------------------------------------------------------- /lmfdb/siegel_modular_forms/templates/ModularForm_GSp4_Q_dimensions.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 | {% if info.table %} 5 |

Dimension table of spaces of {{KNOWL('mf.siegel.degree',title='degree '+info.family.degree|string)}} {{KNOWL('mf.siegel',title='Siegel modular forms')}}

6 | {% include 'includes/dimension_table.html' %} 7 | {% endif %} 8 | 9 | {% include 'includes/form_for_dimension_table_search.html' %} 10 | 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /lmfdb/siegel_modular_forms/templates/ModularForm_GSp4_Q_full_level_space.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 |

This is a space of {{KNOWL('mf.siegel.vector_valued',title='vector valued Siegel modular forms')}} 5 | with real representation $\mathrm{Det}^{ {{info.args.k}}}\otimes\mathrm{Sym}^{ {{info.args.j}} }$. 6 | The following table gives the dimensions of various {{KNOWL('mf.siegel.subspaces.sp4z',title='subspaces')}} of {{title}}.

7 | 8 | {% for key in info.headers%} 9 | 10 | {% endfor %} 11 |
{{key}}{{info.subspace[key]}}
12 | 13 | {% if info.samples %} 14 |

The following samples live in this space.

15 | {% for form in info.samples %} 16 | {{form['name']}}   17 | {% endfor %} 18 | {% endif %} 19 | 20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /lmfdb/siegel_modular_forms/templates/ModularForm_GSp4_Q_search_results.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 | {% if not info.error %} 5 |

Search results {% if info.results and info.results|count > 0%} ({{info.results|count}}) {% endif %}

6 | {% if not info.results or info.results|count == 0 %} 7 |

no samples found

8 | {% else %} 9 | {% for sam in info.results %} 10 | {{ sam.collection()[0] + '.' + sam.name() }}   11 | {% endfor %} 12 | {% endif %} 13 | {% endif %} 14 | 15 |

New search

16 | 17 |

Enter search criteria for examples

18 |
19 | Degree       20 | $k$      21 | Field degree      22 | 23 | 24 | 25 | {% endblock %} 26 | -------------------------------------------------------------------------------- /lmfdb/siegel_modular_forms/templates/includes/dimension_table.html: -------------------------------------------------------------------------------- 1 | {% if not info.error %} 2 |

3 | The table below lists, for each bold value of $k$ in the header, the dimensions of the following subspaces of ${{ info.family.latex_name }}${% if 'j' in info.kwargs %} for $j={{ info.kwargs.j }}$: {% else %}:{% endif %} 4 | {{ info.family.dimension_glossary()|safe }} 5 | 6 | 7 | 8 | 9 | {% for k in info.table|sort() %} 10 | 11 | {% endfor %} 12 | 13 | 14 | {% for header in info.headers %} 15 | 16 | 17 | {% for k in info.table|sort() %} 18 | 19 | {% endfor %} 20 | 21 | {% endfor %} 22 |
${{ k }}$
{{ header }}{{ info.table[k][header] }}
23 |

24 | 25 | {% else %} 26 | 27 |     Please modify weight range below 28 | 29 | {% endif %} 30 | -------------------------------------------------------------------------------- /lmfdb/siegel_modular_forms/templates/includes/form_for_dimension_table_search.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 15 | 16 | 17 | 18 | 19 |
Space 5 | 14 | $k$ $j$
20 |
21 | -------------------------------------------------------------------------------- /lmfdb/static/default_robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: SemrushBot 2 | Disallow: / 3 | 4 | User-agent: SemrushBot-SA 5 | Disallow: / 6 | 7 | User-agent: SemrushBot-SI 8 | Disallow: / 9 | 10 | 11 | 12 | User-agent: * 13 | Disallow: / 14 | -------------------------------------------------------------------------------- /lmfdb/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/favicon.ico -------------------------------------------------------------------------------- /lmfdb/static/images/1dot.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lmfdb/static/images/2dot.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lmfdb/static/images/389a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/389a.png -------------------------------------------------------------------------------- /lmfdb/static/images/3dot.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /lmfdb/static/images/4dot.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /lmfdb/static/images/MaassExample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/MaassExample.png -------------------------------------------------------------------------------- /lmfdb/static/images/Riemann.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/Riemann.jpg -------------------------------------------------------------------------------- /lmfdb/static/images/Riemann.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/Riemann.png -------------------------------------------------------------------------------- /lmfdb/static/images/announcements.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/announcements.png -------------------------------------------------------------------------------- /lmfdb/static/images/back_disabled.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/back_disabled.jpg -------------------------------------------------------------------------------- /lmfdb/static/images/back_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/back_disabled.png -------------------------------------------------------------------------------- /lmfdb/static/images/back_enabled.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/back_enabled.jpg -------------------------------------------------------------------------------- /lmfdb/static/images/back_enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/back_enabled.png -------------------------------------------------------------------------------- /lmfdb/static/images/back_enabled_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/back_enabled_hover.png -------------------------------------------------------------------------------- /lmfdb/static/images/bg-container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/bg-container.png -------------------------------------------------------------------------------- /lmfdb/static/images/bg-editor-bbcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/bg-editor-bbcode.png -------------------------------------------------------------------------------- /lmfdb/static/images/bg-editor-dotclear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/bg-editor-dotclear.png -------------------------------------------------------------------------------- /lmfdb/static/images/bg-editor-html.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/bg-editor-html.png -------------------------------------------------------------------------------- /lmfdb/static/images/bg-editor-json.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/bg-editor-json.png -------------------------------------------------------------------------------- /lmfdb/static/images/bg-editor-markdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/bg-editor-markdown.png -------------------------------------------------------------------------------- /lmfdb/static/images/bg-editor-textile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/bg-editor-textile.png -------------------------------------------------------------------------------- /lmfdb/static/images/bg-editor-wiki.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/bg-editor-wiki.png -------------------------------------------------------------------------------- /lmfdb/static/images/bg-editor-xml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/bg-editor-xml.png -------------------------------------------------------------------------------- /lmfdb/static/images/bg-editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/bg-editor.png -------------------------------------------------------------------------------- /lmfdb/static/images/black-asc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/black-asc.gif -------------------------------------------------------------------------------- /lmfdb/static/images/black-desc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/black-desc.gif -------------------------------------------------------------------------------- /lmfdb/static/images/black-unsorted.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/black-unsorted.gif -------------------------------------------------------------------------------- /lmfdb/static/images/bold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/bold.png -------------------------------------------------------------------------------- /lmfdb/static/images/citations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/citations.png -------------------------------------------------------------------------------- /lmfdb/static/images/cite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/cite.png -------------------------------------------------------------------------------- /lmfdb/static/images/code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/code.png -------------------------------------------------------------------------------- /lmfdb/static/images/compute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/compute.png -------------------------------------------------------------------------------- /lmfdb/static/images/copy.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lmfdb/static/images/disk-load.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/disk-load.png -------------------------------------------------------------------------------- /lmfdb/static/images/disk-save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/disk-save.png -------------------------------------------------------------------------------- /lmfdb/static/images/fame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/fame.png -------------------------------------------------------------------------------- /lmfdb/static/images/families.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/families.png -------------------------------------------------------------------------------- /lmfdb/static/images/forward_disabled.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/forward_disabled.jpg -------------------------------------------------------------------------------- /lmfdb/static/images/forward_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/forward_disabled.png -------------------------------------------------------------------------------- /lmfdb/static/images/forward_enabled.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/forward_enabled.jpg -------------------------------------------------------------------------------- /lmfdb/static/images/forward_enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/forward_enabled.png -------------------------------------------------------------------------------- /lmfdb/static/images/forward_enabled_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/forward_enabled_hover.png -------------------------------------------------------------------------------- /lmfdb/static/images/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/github.png -------------------------------------------------------------------------------- /lmfdb/static/images/gl3eigs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/gl3eigs.png -------------------------------------------------------------------------------- /lmfdb/static/images/h1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/h1.png -------------------------------------------------------------------------------- /lmfdb/static/images/h2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/h2.png -------------------------------------------------------------------------------- /lmfdb/static/images/h3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/h3.png -------------------------------------------------------------------------------- /lmfdb/static/images/h4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/h4.png -------------------------------------------------------------------------------- /lmfdb/static/images/h5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/h5.png -------------------------------------------------------------------------------- /lmfdb/static/images/h6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/h6.png -------------------------------------------------------------------------------- /lmfdb/static/images/handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/handle.png -------------------------------------------------------------------------------- /lmfdb/static/images/italic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/italic.png -------------------------------------------------------------------------------- /lmfdb/static/images/key_degree2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/key_degree2.png -------------------------------------------------------------------------------- /lmfdb/static/images/knowledge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/knowledge.png -------------------------------------------------------------------------------- /lmfdb/static/images/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/link.png -------------------------------------------------------------------------------- /lmfdb/static/images/list-bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/list-bullet.png -------------------------------------------------------------------------------- /lmfdb/static/images/list-numeric.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/list-numeric.png -------------------------------------------------------------------------------- /lmfdb/static/images/lmfdb-logo-alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/lmfdb-logo-alpha.png -------------------------------------------------------------------------------- /lmfdb/static/images/lmfdb-logo-beta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/lmfdb-logo-beta.png -------------------------------------------------------------------------------- /lmfdb/static/images/lmfdb-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/lmfdb-logo.png -------------------------------------------------------------------------------- /lmfdb/static/images/map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/map.png -------------------------------------------------------------------------------- /lmfdb/static/images/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/menu.png -------------------------------------------------------------------------------- /lmfdb/static/images/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/next.png -------------------------------------------------------------------------------- /lmfdb/static/images/pencil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/pencil.png -------------------------------------------------------------------------------- /lmfdb/static/images/picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/picture.png -------------------------------------------------------------------------------- /lmfdb/static/images/plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/plot.png -------------------------------------------------------------------------------- /lmfdb/static/images/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/preview.png -------------------------------------------------------------------------------- /lmfdb/static/images/previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/previous.png -------------------------------------------------------------------------------- /lmfdb/static/images/progress-green.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/progress-green.gif -------------------------------------------------------------------------------- /lmfdb/static/images/quotes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/quotes.png -------------------------------------------------------------------------------- /lmfdb/static/images/raw_to_tset.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lmfdb/static/images/related.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/related.png -------------------------------------------------------------------------------- /lmfdb/static/images/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/search.png -------------------------------------------------------------------------------- /lmfdb/static/images/search2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/search2.png -------------------------------------------------------------------------------- /lmfdb/static/images/smalluniverse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/smalluniverse.png -------------------------------------------------------------------------------- /lmfdb/static/images/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/sort_asc.png -------------------------------------------------------------------------------- /lmfdb/static/images/sort_asc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/sort_asc_disabled.png -------------------------------------------------------------------------------- /lmfdb/static/images/sort_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/sort_both.png -------------------------------------------------------------------------------- /lmfdb/static/images/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/sort_desc.png -------------------------------------------------------------------------------- /lmfdb/static/images/sort_desc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/sort_desc_disabled.png -------------------------------------------------------------------------------- /lmfdb/static/images/sp_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/sp_image.png -------------------------------------------------------------------------------- /lmfdb/static/images/submenu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/submenu.png -------------------------------------------------------------------------------- /lmfdb/static/images/tset_to_raw.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lmfdb/static/images/ui-bg_diagonals-thick_18_b81900_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/ui-bg_diagonals-thick_18_b81900_40x40.png -------------------------------------------------------------------------------- /lmfdb/static/images/ui-bg_diagonals-thick_20_666666_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/ui-bg_diagonals-thick_20_666666_40x40.png -------------------------------------------------------------------------------- /lmfdb/static/images/ui-bg_glass_100_f6f6f6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/ui-bg_glass_100_f6f6f6_1x400.png -------------------------------------------------------------------------------- /lmfdb/static/images/ui-bg_glass_100_fdf5ce_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/ui-bg_glass_100_fdf5ce_1x400.png -------------------------------------------------------------------------------- /lmfdb/static/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /lmfdb/static/images/ui-bg_gloss-wave_35_f6a828_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/ui-bg_gloss-wave_35_f6a828_500x100.png -------------------------------------------------------------------------------- /lmfdb/static/images/ui-bg_highlight-soft_100_eeeeee_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/ui-bg_highlight-soft_100_eeeeee_1x100.png -------------------------------------------------------------------------------- /lmfdb/static/images/ui-bg_highlight-soft_75_ffe45c_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/ui-bg_highlight-soft_75_ffe45c_1x100.png -------------------------------------------------------------------------------- /lmfdb/static/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /lmfdb/static/images/ui-icons_228ef1_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/ui-icons_228ef1_256x240.png -------------------------------------------------------------------------------- /lmfdb/static/images/ui-icons_ef8c08_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/ui-icons_ef8c08_256x240.png -------------------------------------------------------------------------------- /lmfdb/static/images/ui-icons_ffd27a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/ui-icons_ffd27a_256x240.png -------------------------------------------------------------------------------- /lmfdb/static/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /lmfdb/static/images/url-ext.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/url-ext.gif -------------------------------------------------------------------------------- /lmfdb/static/images/url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/static/images/url.png -------------------------------------------------------------------------------- /lmfdb/static/jquery.column.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Column cell selector v0.13 3 | * 4 | * Licensed under the new BSD License. 5 | * Copyright 2009, Bram Stein 6 | * All rights reserved. 7 | */ 8 | (function(f){var e=/([\+\-]?\d*)[nN]([\+\-]?\d*)/,b,c;function g(j){var i=[],h={multiplier:0,offset:0};if(j==="even"){j="2n"}else{if(j==="odd"){j="2n+1"}else{if(/^\d*$/.test(j)){j="0n+"+j}}}i=e.exec(j);if(i!==null){h.multiplier=i[1]-0;h.offset=i[2]-0}return h}function d(j,k){var i,n,h=[],m=0,l=[];f.each(j,function(p,o){var r=0,q=0,s=o.rowSpan||1,t=o.colSpan||1;if(o.parentNode!==i){i=o.parentNode;if(i.parentNode!==n){n=i.parentNode;h=[]}m=0;if(h[i.rowIndex]===undefined){h[i.rowIndex]=[]}}for(r=0;r=0)}}f.extend(jQuery.fn,{nthCol:function(h){c=g(h);b=d(this);return f(this).filter(function(j){return a(this,undefined,j)})}});f.extend(jQuery.expr.match,{COLUMN:/:nth-col\((even|odd|[\dnN\+\-]*)\)/});f.extend(jQuery.expr.preFilter,{COLUMN:function(i,h){c=g(i[1]);b=d(h);return i}});f.extend(jQuery.expr.filter,{COLUMN:a})})(jQuery); -------------------------------------------------------------------------------- /lmfdb/static/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Crawl-delay: 30 3 | Disallow: /static/ 4 | Disallow: /api/ 5 | 6 | User-agent: linabot 7 | User-agent: Honolulu-bot 8 | Disallow: / 9 | -------------------------------------------------------------------------------- /lmfdb/symL/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/symL/__init__.py -------------------------------------------------------------------------------- /lmfdb/templates/404.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 |
5 |
Unable to locate the page you requested.
6 | {% if messages %} 7 |
    8 | {% for msg in messages %} 9 |
  • {{msg}}
  • 10 | {% endfor %} 11 |
12 | {% elif message %} 13 |
14 | {{ message }} 15 | {% elif request.referrer %} 16 |
17 |
18 | If you think accessing "{{ request.referrer }}" is an error, please help us improve and report that URL here. 19 |
20 | {% else %} 21 |
22 | If you believe this page should be here, please help us improve and report this problem here here. 23 |
24 | {% endif %} 25 | 26 | {% if request.referrer %} 27 |
28 |
29 | Click here to return to the referring URL. 30 |
31 | {% endif %} 32 | 33 |
34 | 35 | {% endblock %} 36 | -------------------------------------------------------------------------------- /lmfdb/templates/500.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 |
5 |
6 | The page you are looking for has produced a server error. 7 |
8 | 9 | 10 | 11 |
12 | To help us improve the website, please 13 | report this page's URL 14 | {% if request.referrer %} 15 | "{{ request.url }}" as well as the URL of the page you 16 | are coming from "{{ request.referrer }}". 17 | {% else %} 18 | "{{ request.url }}". 19 | {% endif %} 20 |
21 | 22 | 23 | {#
Please keep your faith in mathematics!
#} 24 | 25 | {% if request.referrer %} 26 | 27 | {% endif %} 28 | 29 |
30 |
31 | 32 | {% endblock %} 33 | -------------------------------------------------------------------------------- /lmfdb/templates/503.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 |

The LMFDB is currently unavailable.

5 |

6 | You can visit our 7 | {% if 'beta' in request.url_root %} 8 | main site at 9 | www.lmfdb.org. 10 | {% else %} 11 | beta site at 12 | beta.lmfdb.org. 13 | {% endif %} 14 |

15 |

16 | You can contact us here. 17 |

18 | 19 | {% endblock %} 20 | -------------------------------------------------------------------------------- /lmfdb/templates/about.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | 3 | {% block content %} 4 | 5 |

6 | {{meta_description}} 7 |

8 | 9 |

{{shortthanks|safe}}

10 | 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /lmfdb/templates/checklist-fs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Checklist for high-level testing of LMFDB 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /lmfdb/templates/citation.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 |

5 | We encourage authors of books, papers and other articles which mention the LMFDB to cite it. 6 | For a list of publications citing the LMFDB see our Google Scholar profile. 7 |

8 | 9 | {{ KNOWL_INC('content.how_to_cite') }} 10 | 11 | 29 | 30 | {% endblock %} 31 | -------------------------------------------------------------------------------- /lmfdb/templates/count_results.html: -------------------------------------------------------------------------------- 1 | {% set has_na = [] %} 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | {% for col in info.col_heads %} 13 | 14 | {% endfor %} 15 | 16 | 17 | 18 | {% for row in info.row_heads %} 19 | 20 | 21 | {% for col in info.col_heads %} 22 | 32 | {% endfor %} 33 | 34 | {% endfor %} 35 | 36 |
{{info.row_label}} 7 | {{info.col_label}} 8 |
{{col}}
{{row}} 23 | {% set size = info.results[row, col] %} 24 | {% if size is none %} 25 | {% do has_na.append(1) %} 26 | n/a 27 | {% else %} 28 | {% set url = info.url_func(row, col) %} 29 | {{size}} 30 | {% endif %} 31 |
37 | {% if has_na %} 38 | 39 | {{info.na_msg}} 40 | 41 | {% endif %} 42 | -------------------------------------------------------------------------------- /lmfdb/templates/debug_info.html: -------------------------------------------------------------------------------- 1 | {% if DEBUG %} 2 |
3 |
4 | Query was: {{info.query}} 5 |
6 | Start = {{info.start}}, Count = {{info.count}} 7 | {% endif %} 8 | 9 | -------------------------------------------------------------------------------- /lmfdb/templates/display_stats.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 |

5 | {{ info.summary | safe }} 6 |

7 | {% if info.extent_knowl %} 8 |

9 | {{ KNOWL_INC(info.extent_knowl) }} 10 |

11 | {% endif %} 12 | 13 | {% block custom_stats %} 14 | {% endblock %} 15 | 16 | {% for d in info.distributions %} 17 | 18 | {% if d.attribute.top_title %} 19 |

Distribution of {{ d.attribute.top_title | safe }}

20 | {% endif %} 21 | {% for paragraph in d.attribute.intro %} 22 |

{{paragraph | safe}}

23 | {% endfor %} 24 | 25 | {% if (d.attribute.cols | length) == 1 %} 26 | {% include 'stat_1d.html' %} 27 | {% else %} 28 | {% include 'stat_2d.html' %} 29 | {% endif %} 30 | 31 | {% endfor %} {# info.distributions #} 32 | 33 | 34 |

35 |

36 | 37 | {% endblock %} 38 | -------------------------------------------------------------------------------- /lmfdb/templates/double.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | {% block content %} 3 | 4 | {{ KNOWL_INC(kid) }} 5 | 6 | {% if kid2 is defined %} 7 | {{ KNOWL_INC(kid2) }} 8 | {% endif %} 9 | 10 | {% endblock %} 11 | 12 | -------------------------------------------------------------------------------- /lmfdb/templates/dummy_download_search_results.html: -------------------------------------------------------------------------------- 1 | {# Included so that the javascript functions that deal with updating counts (static/lmfdb.js:get_count_of_results and static/lmfdb.js:get_count_callback) have targets #} 2 |
3 | 5 | 7 |
8 | -------------------------------------------------------------------------------- /lmfdb/templates/dynamic_stats.html: -------------------------------------------------------------------------------- 1 | {% extends info.stats.dynamic_parent_page %} 2 | {% block show_results %} 3 | 4 | {% set d = info.d %} 5 | {% if d.extent_knowl %} 6 |

7 | {{ KNOWL_INC(d.extent_knowl) }} 8 |

9 | {% endif %} 10 | {% if (d.attribute.cols | length) == 1 %} 11 | {% include 'stat_1d.html' %} 12 | {% elif (d.attribute.cols | length) == 2 %} 13 | {% include 'stat_2d.html' %} 14 | {% endif %} 15 | 16 | 17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /lmfdb/templates/form.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | 3 | {% block title %}Get EC{% endblock %} 4 | 5 | {% block body %} 6 | 7 | 10 | 11 |
12 |

Form to get an EC

13 | 14 |
15 | Conductor: 16 |
20 | 21 | {% endblock %} 22 | -------------------------------------------------------------------------------- /lmfdb/templates/forward_back.html: -------------------------------------------------------------------------------- 1 | {% if info.start > 0 %} 2 | Previous 3 | {% endif %} 4 | {% if not info.exact_count or info.start + info.count < info.number %} 5 | Next 6 | {% endif %} 7 | -------------------------------------------------------------------------------- /lmfdb/templates/hidden_search_inputs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lmfdb/templates/index-boxes.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | {% block content %} 3 | 4 |
5 | {{ KNOWL_INC('users.' + userid|lower + '.note') }} 6 |
7 | 8 | 9 | 10 | {% for box in boxes %} 11 | 22 | {% if loop.index is even -%}{%- endif %} 23 | {% endfor %} 24 | 25 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
{{ box.title }}
{{ box.content|safe }}
21 |
26 | 27 | {% endblock %} 28 | -------------------------------------------------------------------------------- /lmfdb/templates/interesting.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | 3 | {% block content %} 4 | 5 | 6 | 7 | 8 | 9 | 10 | {% for knowl in knowls %} 11 | 12 | 13 | 14 | 15 | {% endfor %} 16 |
LabelDescription
{{ knowl.label }}{{ KNOWL(knowl.id) }}
17 | 18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /lmfdb/templates/lucant.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 | {{KNOWL_INC('lucant')}} 5 | 6 | {% endblock %} 7 | -------------------------------------------------------------------------------- /lmfdb/templates/motives.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | {% block content %} 3 | 4 |
5 | 6 | Motives: pieces of cohomology or universal objects one can take the cohomology of? 7 | {% endblock %} 8 | 9 | -------------------------------------------------------------------------------- /lmfdb/templates/multi.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | {% block content %} 3 | 4 | {% for kid in kids%} 5 | {{ KNOWL_INC(kid) }} 6 | {% endfor %} 7 | 8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /lmfdb/templates/not_yet_implemented.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | 3 | {% block content %} 4 | 5 | Sorry. This feature is not yet implemented. jump back. 6 | 7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /lmfdb/templates/problem.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | 3 | {% block content %} 4 |
5 | {{ explain | safe }} 6 | You may report this problem here. 7 |
8 |
9 | 10 |
11 | {% endblock %} 12 | 13 | -------------------------------------------------------------------------------- /lmfdb/templates/quadratic_twists/iso_class.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | 3 | {% block content %} 4 |

Automorphism

5 | {{info.auto}} 6 | 7 |

qfs

8 | {{info.qfs}} 9 | 10 |

vec

11 | 12 | {{info.vec}} 13 | 14 |

related to

15 | {%for r in info.related_to %} 16 | {{r.label}} 17 | {% endfor %} 18 | 19 |

Download Stuff

20 |

21 | download first 100 coefficients Rubinstein data {% if info.type=='i'%} 22 | imaginary {% else %} real {%endif%} 23 |

24 |

25 | 26 |

27 |

The following can and will take a long time, if you just want more than 100 coefficients then go to the appropriate page above and change 'limit' 28 |

29 |

30 | download all coefficients Rubinstein data {% if info.type=='i'%} 31 | imaginary {% else %} real {%endif%} 32 | 33 |

34 |

35 | 36 |

37 | 38 | {% endblock %} 39 | 40 | -------------------------------------------------------------------------------- /lmfdb/templates/quadratic_twists/quadratic_twists.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 |

Browse by Isogeny

5 |
6 | 7 | {% for row in info.isogeny_list|batch(7, '') %} 8 | 9 | {% for element in row %} 10 | 13 | {% endfor %} 14 | 15 | {% endfor %} 16 |
11 | {% if element %} {{element}} {% endif %} 12 |
17 |
18 | 19 | {% endblock %} 20 | -------------------------------------------------------------------------------- /lmfdb/templates/raw/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | 3 | {% block content %} 4 | 5 | {#

Number theory database

#} 6 | 7 | {% for db, colls in all_db %} 8 |

{{db}}

9 |

10 | {% for coll in colls %} 11 |

{{coll}} 12 | {% endfor %} 13 |

14 | {% endfor %} 15 | 16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /lmfdb/templates/raw/query.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | 3 | {% block content %} 4 | 5 | {#

{{db}}.{{coll}}

#} 6 | 7 |
 8 | {{info.metadata}}
 9 | 
10 | 11 |

Search

12 | 13 |

14 |

15 | {% for key in indices %} 16 |

{{key}} 17 | {% endfor %} 18 |

columns 19 | limit 20 | 21 |

22 | 23 | {% if res %} 24 |

Results

25 | 26 | Download as: 27 | {% for format, url in info.formats %} 28 | {{format}} 29 | {% endfor %} 30 | 31 |

32 | 33 | 34 | {% for fld in info.default_fields %} 35 | 36 | {% endfor %} 37 | 38 | {% for datum in res %} 39 | 40 | {% for fld in info.default_fields %} 41 | 42 | {% endfor %} 43 | 44 | {% endfor %} 45 |
{{fld}}
{{datum[fld]}}
46 | 47 | {% endif %} 48 | 49 | {% endblock %} 50 | -------------------------------------------------------------------------------- /lmfdb/templates/search_results.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 | {% include 'refine_search_form.html' %} 5 | 6 | {{ info.columns.above_results | safe }} 7 | {% if info.columns.languages %} 8 | {% set languages = info.columns.languages %} 9 | {% endif %} 10 | 11 | {% include 'matches.html' %} 12 | {% if info.number %} 13 | 14 | {# This core is used in some classical modular forms pages to include lists of newforms #} 15 | {% include 'search_results_table.html' %} 16 | 17 | {% include 'forward_back.html' %} 18 | {% if info.columns.dummy_download %} 19 | {% include 'dummy_download_search_results.html' %} 20 | {% else %} 21 | {% include 'download_search_results.html' %} 22 | {% endif %} 23 | {{ info.columns.below_download | safe }} 24 | {% endif %} 25 | {% include 'debug_info.html' %} 26 | 27 | {% endblock %} 28 | -------------------------------------------------------------------------------- /lmfdb/templates/search_results_table.html: -------------------------------------------------------------------------------- 1 | {% set C = info.columns %} 2 | {{ C.above_table | safe }} 3 | 4 | 5 | 6 | {% for rank in range(C.maxheight) %} 7 | 8 | {% for col in C.columns_shown(info, rank) %} 9 | 10 | {% endfor %} 11 | 12 | {% endfor %} 13 | 14 | {% for rec in info.results %} 15 | 16 | {% for col in C.columns_shown(info) %} 17 | 18 | {% endfor %} 19 | 20 | {% endfor %} 21 |
{{ col.display_knowl() | safe }}
{{ col.display(rec) | safe }}
22 | -------------------------------------------------------------------------------- /lmfdb/templates/single.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | {% block content %} 3 | 4 | {{ KNOWL_INC(kid) }} 5 | 6 | {% endblock %} 7 | 8 | -------------------------------------------------------------------------------- /lmfdb/templates/stat_1d.html: -------------------------------------------------------------------------------- 1 | {% for rows, div_classes, span_class in d.divs %} 2 |
3 | 4 | {% for r in rows %} 5 | 6 | 7 | {% for c in r %} 8 | 9 | {% endfor %} 10 | 11 | 12 | 13 | {% for c in r %} 14 | 15 | {% endfor %} 16 | 17 | 18 | {# Omit if first (and thus all) blank #} 19 | {% if r[0].proportion %} 20 | 21 | {% for c in r %} 22 | 23 | {% endfor %} 24 | {% endif %} 25 | 26 | 27 | {% endfor %} {# r in rows #} 28 |
{{d.attribute.row_title | safe}}{{c.value|safe}}
count{{c.count}}
proportion{{c.proportion}}
29 | {% if span_class == 'short' %} 30 |
Display 31 | more 32 |
33 | {% elif span_class == 'long' %} 34 |
Display 35 | less 36 |
37 | {% endif %} 38 |
39 | {% endfor %} {# d.divs #} 40 | -------------------------------------------------------------------------------- /lmfdb/templates/stat_2d.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {% for chead in d.col_headers %} 7 | 8 | {% endfor %} 9 | 10 | {% for rhead, row in d.grid %} 11 | 12 | {% if loop.index == 1 %} 13 | 18 | {% endif %} 19 | 20 | {% for c in row %} 21 | {% if c.count %} 22 | {% if c.query %} 23 | 24 | {% else %} 25 | 26 | {% endif %} 27 | {% else %} 28 | 29 | {% endif %} 30 | {% endfor %} 31 | 32 | 33 | {% for c in row %} 34 | 35 | {% endfor %} 36 | 37 | {% endfor %} {# d.grid #} 38 |
{{info.stats._short_display[d.attribute.cols[1]]}}
{{ chead | safe}}
14 |
15 | {{info.stats._short_display[d.attribute.cols[0]] | safe}} 16 |
17 |
{{ rhead | safe}}{{c.count}}{{c.count}}
{{c.proportion}}
39 | -------------------------------------------------------------------------------- /lmfdb/tensor_products/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | from lmfdb.logger import make_logger 4 | from flask import Blueprint 5 | 6 | tensor_products_page = Blueprint( 7 | "tensor_products", __name__, template_folder='templates', static_folder="static") 8 | tensor_products_logger = make_logger("tensor_products", hl=True) 9 | 10 | @tensor_products_page.context_processor 11 | def body_class(): 12 | return {'body_class': 'tensor_products'} 13 | 14 | from . import main 15 | assert main #silence pyflakes 16 | 17 | app.register_blueprint(tensor_products_page, url_prefix="/TensorProducts") 18 | -------------------------------------------------------------------------------- /lmfdb/tensor_products/templates/tensor_products_index.html: -------------------------------------------------------------------------------- 1 | {% extends "homepage.html" %} 2 | {% block content %} 3 |

Please select two types of objects to form their tensor product:

4 |
5 | 11 | 12 | 18 | 19 | 20 | {% endblock content %} 21 | -------------------------------------------------------------------------------- /lmfdb/tests/test_acknowlegments.py: -------------------------------------------------------------------------------- 1 | from lmfdb.tests import LmfdbTest 2 | 3 | 4 | class HomePageTest(LmfdbTest): 5 | # All tests should pass 6 | # 7 | # The acknowledgments page 8 | def test_acknowledgments(self): 9 | homepage = self.tc.get("/acknowledgment").get_data(as_text=True) 10 | assert 'American Institute of Mathematics' in homepage 11 | 12 | # 13 | # Link to workshops page 14 | def test_workshops(self): 15 | homepage = self.tc.get("/acknowledgment/activities").get_data(as_text=True) 16 | assert "Computational Aspects of the Langlands Program" in homepage 17 | -------------------------------------------------------------------------------- /lmfdb/tests/test_external.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.tests import LmfdbTest 3 | 4 | class HomePageTest(LmfdbTest): 5 | # Box 6 6 | # external links 7 | def test_box6(self): 8 | r""" 9 | Check that the links in Box 6 work. 10 | """ 11 | homepage = self.tc.get("/").get_data(as_text=True) 12 | self.check_external(homepage, "https://github.com/LMFDB/lmfdb", 'Modular Forms Database') 13 | # I could not get this one to work - AVS 14 | #self.check_external(homepage, "http://www.sagemath.org/", 'mathematics software system') 15 | self.check_external(homepage, "http://pari.math.u-bordeaux.fr/", 'PARI/GP is a widely used computer algebra system' ) 16 | # I could not get this one to work -- JEC 17 | #self.check_external(homepage, "http://magma.maths.usyd.edu.au/magma/", 'Magma is a large, well-supported software package') 18 | self.check_external(homepage, "https://www.python.org/", 'Python Logo') 19 | -------------------------------------------------------------------------------- /lmfdb/tests/test_template_namespace.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.tests import LmfdbTest 3 | import os 4 | import itertools 5 | import collections 6 | 7 | 8 | class TemplateNamespaceCollisionTest(LmfdbTest): 9 | 10 | def test_template_collisions(self): 11 | """check lmfdb code directories for duplicate template names""" 12 | templates = list(itertools.chain.from_iterable([(x, cur) for x in files] for cur, dir, files in os.walk('.') if cur.split('/')[-1] == 'templates')) 13 | counts = collections.Counter([r[0] for r in templates]) 14 | dups = [x for x in counts if counts[x] > 1] 15 | collisions = [r for r in templates if r[0] in dups] 16 | if collisions: 17 | print("") 18 | for x in dups: 19 | print("Template file %s appears in: %s" % (x, [r[1] for r in collisions if r[0] == x])) 20 | assert not collisions, "Template namespace collisions: %s" % collisions 21 | -------------------------------------------------------------------------------- /lmfdb/typed_data/Lfunction_types.py: -------------------------------------------------------------------------------- 1 | # Not used yet 2 | 3 | def schema_extract(x, **types_dict): 4 | # each kwarg is a a key, value pair 5 | # the key is the name of the attribute and the field in the database 6 | # dtype is the datatype to be used internally in the database 7 | return {key: dtype(x[key]) for key, dtype in types_dict} 8 | 9 | # We are dealing with many sources of Lfunctions, so we need to cast everything to make sure we control the type 10 | database_format = { 11 | "mu_fe": int, 12 | "nu_fe": int, 13 | "sign": int, 14 | "selfdual": bool, 15 | "primitive": bool, 16 | "motivic_weight": bool, 17 | "algebraic": bool, 18 | "Ltype": str, 19 | "original_mathematical_object": str 20 | } 21 | 22 | def query_Lfunction(): 23 | pass 24 | -------------------------------------------------------------------------------- /lmfdb/typed_data/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.logger import make_logger 3 | typed_data_logger = make_logger("typed_data_logger", hl=True) 4 | 5 | from . import type_generation 6 | assert type_generation 7 | from . import standard_types 8 | assert standard_types 9 | import artin_types 10 | assert artin_types 11 | -------------------------------------------------------------------------------- /lmfdb/users/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | from .main import ( 4 | login_page, 5 | login_manager, 6 | admin_required, 7 | knowl_reviewer_required, 8 | housekeeping, 9 | ) 10 | 11 | assert admin_required # silence pyflakes 12 | assert knowl_reviewer_required # silence pyflakes 13 | assert housekeeping # silence pyflakes 14 | 15 | from lmfdb.app import app 16 | from lmfdb.logger import make_logger 17 | 18 | 19 | login_manager.init_app(app) 20 | 21 | app.register_blueprint(login_page, url_prefix="/users") 22 | 23 | users_logger = make_logger("users", hl=True) 24 | -------------------------------------------------------------------------------- /lmfdb/users/recaptcha.py: -------------------------------------------------------------------------------- 1 | """ 2 | POST: 3 | 4 | privatekey (required) Your private key 5 | remoteip (required) The IP address of the user who solved the CAPTCHA. 6 | challenge (required) The value of "recaptcha_challenge_field" sent via the form 7 | response (required) The value of "recaptcha_response_field" sent via the form 8 | """ 9 | from urllib.request import urlopen, Request 10 | from urllib.parse import urlencode 11 | 12 | 13 | # Public Key: 14 | # Use this in the JavaScript code that is served to your users 15 | pubkey = "" 16 | 17 | # Private Key: 18 | # Use this when communicating between your server and our server. Be sure to keep it a secret. 19 | privkey = "" 20 | 21 | 22 | def verify(ip, challenge, response): 23 | payload = {} 24 | payload['privatekey'] = privkey.encode('utf-8') 25 | payload['remoteip'] = ip.encode('utf-8') 26 | payload['challenge'] = challenge.encode('utf-8') 27 | payload['response'] = response.encode('utf-8') 28 | payload = urlencode(payload) 29 | result_req = Request(url="http://www.google.com/recaptcha/api/verify", 30 | data=payload, 31 | headers={'Content-Type': 'application/x-www-form-urlencoded'}) 32 | result = urlopen(result_req).read() 33 | 34 | if result.status_code == 200: 35 | return result.content.startswith("true") 36 | # if not 20OK or not starting with true we have a problem 37 | return False 38 | -------------------------------------------------------------------------------- /lmfdb/users/templates/user-detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 |
5 |
    6 |
  • ID: {{ user.get_id()}}
  • 7 | {% if user.url is not none %} 8 |
  • URL: {% with url = user.url %}{{url}}{% endwith %}
  • 9 | {% endif %} 10 | {% if user_is_authenticated %} 11 |
  • Admin: {{ user.is_admin() }}
  • 12 | {% endif %} 13 | {% if user.about is not none %} 14 |
  • About: {{ user.about }}
  • 15 | {% endif %} 16 |
17 |
18 | 19 | {% if userknowls %} 20 | 21 |

Knowls

22 |
{{ user.name }} has contributed to these Knowls: 23 | {% for k in userknowls %} 24 | 25 | {{ k['title'] }}{% if not loop.last -%},{%- endif %} 26 | {% endfor %} 27 |
28 | 29 | {% endif %} 30 | 31 | {% endblock %} 32 | -------------------------------------------------------------------------------- /lmfdb/users/templates/user-list.html: -------------------------------------------------------------------------------- 1 | {% extends 'homepage.html' %} 2 | {% block content %} 3 | 4 | 5 | {% for user_row in user_rows %} 6 | 7 | {% for user in user_row %} 8 | 13 | {% endfor %} 14 | 15 | {% endfor %} 16 |
9 | {% if user %} 10 | {{ user[1] }} 11 | {% endif %} 12 |
17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /lmfdb/users/test_users.py: -------------------------------------------------------------------------------- 1 | # testing users blueprint 2 | 3 | from lmfdb.tests import LmfdbTest 4 | from .main import login_page 5 | from lmfdb.users.main import userdb 6 | 7 | class UsersTestCase(LmfdbTest): 8 | ### helpers 9 | def get_me(self, uid='$test_user'): 10 | return userdb.lookup(uid) 11 | 12 | ### test methods 13 | def test_login_page(self): 14 | self.assertTrue(login_page.name == "users") 15 | 16 | def test_user_db(self): 17 | me = self.get_me('cremona') # any valid user id will do! 18 | assert me is not None 19 | 20 | def test_user(self, id='cremona'): 21 | p = self.tc.get("/users/profile/%s" % id) 22 | assert id in p.get_data(as_text=True) 23 | -------------------------------------------------------------------------------- /lmfdb/utils/cocalcwrap.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | class CocalcWrap(): 4 | """Wrap the application in this middleware 5 | if you are running Flask in Cocalc 6 | 7 | - app -- the WSGI application 8 | """ 9 | 10 | def __init__(self, app): 11 | self.app = app 12 | from .config import Configuration 13 | flask_options = Configuration().get_flask() 14 | self.app_root = '/' + os.environ['COCALC_PROJECT_ID'] + "/server/" + str(flask_options['port']) 15 | 16 | def __call__(self, environ, start_response): 17 | environ["SCRIPT_NAME"] = self.app_root 18 | return self.app(environ, start_response) 19 | -------------------------------------------------------------------------------- /lmfdb/utils/common_regex.py: -------------------------------------------------------------------------------- 1 | 2 | """ 3 | Common regular expressions used in various places 4 | """ 5 | 6 | import re 7 | 8 | TERM_RE = r"(\+|-)?(\d*[A-Za-z]|\d+\*[A-Za-z]|\d+)(\^\d+)?" 9 | STERM_RE = r"(\+|-)(\d*[A-Za-z]|\d+\*[A-Za-z]|\d+)(\^\d+)?" 10 | POLY_RE = re.compile(TERM_RE + "(" + STERM_RE + ")*") 11 | POLYLIST_RE = re.compile(r"(\[|)" + POLY_RE.pattern + r"," + POLY_RE.pattern + r"(\]|)") 12 | ZLIST_RE = re.compile(r"\[(|((|(\+|-))\d+)*(,(|(\+|-))\d+)*)\]") 13 | ZLLIST_RE = re.compile(r"(\[|)" + ZLIST_RE.pattern + r"," + ZLIST_RE.pattern + r"(\]|)") 14 | G1_LOOKUP_RE = re.compile(r"(" + "|".join(elt.pattern for elt in [POLY_RE, POLYLIST_RE]) + r")") 15 | G2_LOOKUP_RE = re.compile(r"(" + "|".join(elt.pattern for elt in [POLY_RE, POLYLIST_RE, ZLIST_RE, ZLLIST_RE]) + r")") 16 | -------------------------------------------------------------------------------- /lmfdb/utils/random_wrap.py: -------------------------------------------------------------------------------- 1 | from functools import wraps 2 | from flask import make_response, redirect 3 | def redirect_no_cache(f): 4 | @wraps(f) 5 | def wrapper(*args, **kwds): 6 | response = make_response(redirect(f(*args, **kwds), 307)) 7 | response.headers['Cache-Control'] = 'no-cache, no-store' 8 | return response 9 | return wrapper 10 | -------------------------------------------------------------------------------- /lmfdb/verify/__init__.py: -------------------------------------------------------------------------------- 1 | # Nothing in this folder should be imported from the rest of the LMFDB, 2 | # since we don't make guarantees about safety from SQL injection. 3 | # It is intended for use from an interactive sage prompt or from a Python script 4 | 5 | import os 6 | import importlib 7 | 8 | import lmfdb.lmfdb_database as database 9 | from lmfdb.app import is_running 10 | if is_running(): 11 | raise RuntimeError("Cannot verify while running website (SQL injection vulnerabilities)") 12 | ##### Need to check that the website isn't running ##### 13 | 14 | _curdir = os.path.dirname(os.path.abspath(__file__)) 15 | _prefix = 'lmfdb.verify.' 16 | 17 | for dirpath, dirs, filenames in os.walk(_curdir): 18 | filenames = [f for f in filenames if f[0] != '_'] 19 | filenames = [f for f in filenames if os.path.splitext(f)[-1] == '.py'] # this filters out any table names that end up in log files 20 | dirs[:] = [d for d in dirs if d[0] != '_'] 21 | for f in filenames: 22 | tablename = os.path.splitext(f)[0] 23 | if tablename in database.db.tablenames: 24 | other_thing = os.path.basename(os.path.normpath(dirpath)) + '.' 25 | verifier = getattr(importlib.import_module(_prefix + other_thing + tablename), tablename) 26 | database.db[tablename]._verifier = verifier() 27 | database.db.is_verifying = True 28 | db = database.db 29 | __all__ = ['db'] 30 | -------------------------------------------------------------------------------- /lmfdb/verify/mf/mf_gamma1_portraits.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb import db 3 | from .mf import MfChecker 4 | 5 | class mf_gamma1_portraits(MfChecker): 6 | table = db.mf_gamma1_portraits 7 | label = ['level', 'weight'] 8 | uniqueness_constraints = [[table._label_col],label] 9 | 10 | # attached to mf_gamma1: 11 | # check that there is a portrait present for every record in mf_gamma1 with `dim > 0` and `level <= 4000` 12 | -------------------------------------------------------------------------------- /lmfdb/verify/mf/mf_hecke_traces.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb import db 3 | from .mf import TracesChecker 4 | 5 | class mf_hecke_traces(TracesChecker): 6 | table = db.mf_hecke_traces 7 | base_table = db.mf_newforms 8 | base_constraint = {} 9 | -------------------------------------------------------------------------------- /lmfdb/verify/mf/mf_newform_portraits.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb import db 3 | from .mf import MfChecker 4 | 5 | class mf_newform_portraits(MfChecker): 6 | table = db.mf_newform_portraits 7 | label = ['level', 'weight', 'char_orbit_index', 'hecke_orbit'] 8 | label_conversion = {'char_orbit_index':-1, 'hecke_orbit':-1} 9 | uniqueness_constraints = [['label'], label] 10 | 11 | # attached to mf_newforms 12 | # check that there is exactly one record in mf_newform_portraits for each record in mf_newforms, uniquely identified by label 13 | -------------------------------------------------------------------------------- /lmfdb/verify/mf/mf_newspace_portraits.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb import db 3 | 4 | from .mf import MfChecker 5 | 6 | class mf_newspace_portraits(MfChecker): 7 | table = db.mf_newspace_portraits 8 | label = ['level', 'weight', 'char_orbit_index'] 9 | uniqueness_constraints = [[table._label_col], label] 10 | label_conversion = {'char_orbit_index': -1} 11 | 12 | # attached to mf_newspaces: 13 | # check that there is a portrait present for every nonempty newspace in box where straces is set 14 | -------------------------------------------------------------------------------- /lmfdb/zeros/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from lmfdb.app import app 3 | 4 | from . import main 5 | from .zeta import zetazeros 6 | app.register_blueprint(main.mod, url_prefix="/zeros") 7 | app.register_blueprint(zetazeros.ZetaZeros, url_prefix="/zeros/zeta") 8 | -------------------------------------------------------------------------------- /lmfdb/zeros/main.py: -------------------------------------------------------------------------------- 1 | from flask import redirect, url_for, Blueprint 2 | 3 | mod = Blueprint('zeros', __name__, template_folder="templates") 4 | title = "zeros" 5 | 6 | 7 | @mod.context_processor 8 | def body_class(): 9 | return {'body_class': 'LfunctionDB'} 10 | 11 | 12 | @mod.route("/") 13 | def default_route(): 14 | return redirect(url_for("zeta zeros.zetazeros")) 15 | 16 | 17 | @mod.route("/zeta") 18 | def query(**kwargs): 19 | return redirect(url_for("zeta zeros.zetazeros")) 20 | -------------------------------------------------------------------------------- /lmfdb/zeros/zeta/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/lmfdb/zeros/zeta/__init__.py -------------------------------------------------------------------------------- /perfmon/ECQpages.txt: -------------------------------------------------------------------------------- 1 | http://www.lmfdb.org/EllipticCurve/Q/11/a/ 2 | http://www.lmfdb.org/EllipticCurve/Q/11/a/1 3 | http://www.lmfdb.org/EllipticCurve/Q/389/a/ 4 | http://www.lmfdb.org/EllipticCurve/Q/389/a/1 5 | http://www.lmfdb.org/EllipticCurve/Q/266910/ck/ 6 | http://www.lmfdb.org/EllipticCurve/Q/266910/ck/5 7 | http://www.lmfdb.org/EllipticCurve/Q/210/e/6 8 | http://www.lmfdb.org/EllipticCurve/Q/82110/bs/5 9 | http://www.lmfdb.org/EllipticCurve/Q/110670/cm/5 10 | http://www.lmfdb.org/EllipticCurve/Q/?conductor=1-99 11 | http://www.lmfdb.org/EllipticCurve/Q/?conductor=100000-379998 12 | http://www.lmfdb.org/EllipticCurve/Q/?rank=0 13 | http://www.lmfdb.org/EllipticCurve/Q/?rank=4 14 | http://www.lmfdb.org/EllipticCurve/Q/?torsion=1 15 | http://www.lmfdb.org/EllipticCurve/Q/?torsion=16 16 | http://www.lmfdb.org/EllipticCurve/Q/random 17 | http://www.lmfdb.org/EllipticCurve/Q/random 18 | http://www.lmfdb.org/EllipticCurve/Q/random 19 | http://www.lmfdb.org/EllipticCurve/Q/?jinv=1728 20 | http://www.lmfdb.org/EllipticCurve/Q/?jinv=-4096/11 21 | http://www.lmfdb.org/EllipticCurve/Q/?include_cm=only 22 | http://www.lmfdb.org/EllipticCurve/Q/?torsion=3-6 23 | http://www.lmfdb.org/EllipticCurve/Q/?sha=4 24 | http://www.lmfdb.org/EllipticCurve/Q/?surj_primes=2,3,5,7,11,13,17 25 | http://www.lmfdb.org/EllipticCurve/Q/?surj_quantifier=include&nonsurj_primes=3,7&include_cm=exclude 26 | http://www.lmfdb.org/EllipticCurve/Q/?include_cm=exclude&optimal=on 27 | -------------------------------------------------------------------------------- /perfmon/HMFpages.txt: -------------------------------------------------------------------------------- 1 | www.lmfdb.org/ModularForm/GL2/TotallyReal/?field_label=2.2.197.1 2 | www.lmfdb.org/ModularForm/GL2/TotallyReal/?field_label=2.2.213.1 3 | www.lmfdb.org/ModularForm/GL2/TotallyReal/?field_label=5.5.173513.1 4 | www.lmfdb.org/ModularForm/GL2/TotallyReal/?field_label=2.2.53.1 5 | www.lmfdb.org/ModularForm/GL2/TotallyReal/?field_label=2.2.24.1 6 | www.lmfdb.org/ModularForm/GL2/TotallyReal/?field_label=2.2.13.1 7 | www.lmfdb.org/ModularForm/GL2/TotallyReal/?field_label=2.2.33.1 8 | www.lmfdb.org/ModularForm/GL2/TotallyReal/?field_label=2.2.40.1 9 | www.lmfdb.org/ModularForm/GL2/TotallyReal/?field_label=2.2.37.1 10 | www.lmfdb.org/ModularForm/GL2/TotallyReal/?field_label=2.2.29.1 11 | www.lmfdb.org/ModularForm/GL2/TotallyReal/?field_label=2.2.21.1 12 | www.lmfdb.org/ModularForm/GL2/TotallyReal/?field_label=2.2.41.1 13 | www.lmfdb.org/ModularForm/GL2/TotallyReal/?field_label=2.2.44.1 14 | www.lmfdb.org/ModularForm/GL2/TotallyReal/?field_label=4.4.2048.1 15 | www.lmfdb.org/ModularForm/GL2/TotallyReal/?field_label=2.2.17.1 16 | www.lmfdb.org/ModularForm/GL2/TotallyReal/?field_label=2.2.28.1 -------------------------------------------------------------------------------- /perfmon/NFpages.txt: -------------------------------------------------------------------------------- 1 | http://www.lmfdb.org/NumberField/ 2 | http://www.lmfdb.org/NumberField/QuadraticImaginaryClassGroups 3 | http://www.lmfdb.org/NumberField/?degree=2 4 | http://www.lmfdb.org/NumberField/?degree=23 5 | http://www.lmfdb.org/NumberField/?discriminant=0..99 6 | http://www.lmfdb.org/NumberField/?discriminant=-10000..-1001 7 | http://www.lmfdb.org/NumberField/?discriminant=1000..9999 8 | http://www.lmfdb.org/NumberField/?signature=%5B2%2C0%5D 9 | http://www.lmfdb.org/NumberField/?signature=%5B5%2C0%5D 10 | http://www.lmfdb.org/NumberField/?class_number=1 11 | http://www.lmfdb.org/NumberField/?class_number=6..10 12 | http://www.lmfdb.org/NumberField/?class_number=5 13 | http://www.lmfdb.org/NumberField/?class_group=%5B2%2C4%5Dhttp://www.lmfdb.org/NumberField/2.2.5.1 14 | http://www.lmfdb.org/NumberField/5.5.6234839521.1 15 | http://www.lmfdb.org/NumberField/8.0.705911761.1 16 | http://www.lmfdb.org/NumberField/23.23.6111571184724799803076702357055363809.1 17 | http://www.lmfdb.org/NumberField/random 18 | http://www.lmfdb.org/NumberField/random 19 | http://www.lmfdb.org/NumberField/random 20 | http://www.lmfdb.org/NumberField/?galois_group=C5 21 | http://www.lmfdb.org/NumberField/?galois_group=8T12 22 | http://www.lmfdb.org/NumberField/?ur_primes=2,3 23 | http://www.lmfdb.org/NumberField/?ram_quantifier=some&ram_primes=2,3 24 | http://www.lmfdb.org/NumberField/?ram_quantifier=all&ram_primes=2,3 25 | -------------------------------------------------------------------------------- /perfmon/README.md: -------------------------------------------------------------------------------- 1 | tcurl.sh is a simple bash script for measuring the time it takes for the LMFDB web server to return a page for a particular URL. It uses curl, which you can install on linux systems via "sudo apt-get install curl". 2 | 3 | tcurl.sh reads from stdin and expects one URL per line. It takes an optional numerical argument which specifies the number of times to repeat each request (default is 1). 4 | 5 | Example usage: $ ./tcursl.sh 81 or newform['weight'] == 1: 12 | return 13 | if 'trace_hash' not in newform: 14 | assert newform['dim'] > 20 15 | newform['trace_hash'] = None 16 | base_url = "ModularForm/GL2/Q/holomorphic/" + newform['label'].replace(".","/") 17 | trace_hash = newform['trace_hash'] 18 | Lhash = db.lfunc_instances.lucky({'url': base_url}, projection='Lhash') 19 | assert Lhash is not None 20 | db.lfunc_lfunctions.upsert({'Lhash': Lhash}, {'trace_hash' : trace_hash}) 21 | 22 | import sys 23 | if len(sys.argv) == 3: 24 | bound = db.mf_newforms.max_id() 25 | k = int(sys.argv[1]) 26 | start = int(sys.argv[2]) 27 | assert k > start 28 | ids = list(range(start, bound + 1, k)) 29 | for i in ids: 30 | upsert_trace_hash(i) 31 | else: 32 | print(r"""Usage: 33 | You should run this on legendre as: (this will use 40 cores): 34 | # parallel -u -j 40 --halt 2 --progress sage -python %s 40 ::: {0..39}""" % sys.argv[0]) 35 | -------------------------------------------------------------------------------- /scripts/ecnf/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/scripts/ecnf/__init__.py -------------------------------------------------------------------------------- /scripts/elliptic_curves/import_padic_ecdata.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from lmfdb import db 3 | 4 | # 2018: updated for postgres, but not used (ever?) 5 | 6 | padic_db = db.ec_padic 7 | 8 | def lookup_or_create(label, p): 9 | item = padic_db.lucky({'label': label, 'p': p}) 10 | if item is None: 11 | return {'label': label, 'p': p} 12 | else: 13 | return item 14 | 15 | # for path in sys.argv[1:]: 16 | # print path 17 | # D = SQLDatabase(filename=path) 18 | # query_dict = {'table_name': 'regulators', 'display_cols': ['p', 'val', 'zz', 'label'], 'expression': ['p','>','0']} 19 | # Q = D.query(query_dict) 20 | # for p, val, zz, label in Q.run_query(): 21 | # p = int(p) 22 | # info =lookup_or_create(label,p) 23 | # info['val'] = val 24 | # info['prec'] = 20 25 | # info['unit'] = zz 26 | # padic_db.save(info) 27 | -------------------------------------------------------------------------------- /scripts/groups/Make-images/Readme: -------------------------------------------------------------------------------- 1 | Process for making png images of group names for subgroup diagrams: 2 | 3 | - run dump-group-names.py It produces eqguts.tex which has the latex and 4 | prettyindex to be uploaded to the db 5 | 6 | - move eqguts.tex to the images directory 7 | 8 | - in the images directory run latex eq.tex 9 | 10 | - in the images directory run dvipng -bg Transparent eq.dvi 11 | 12 | - run load-img.py from this directory 13 | 14 | -------------------------------------------------------------------------------- /scripts/groups/Make-images/dump-group-names.py: -------------------------------------------------------------------------------- 1 | import sys, os 2 | from collections import defaultdict 3 | HOME=os.path.expanduser("~") 4 | sys.path.append(os.path.join(HOME, 'lmfdb')) 5 | from lmfdb import db 6 | 7 | myhash = defaultdict(list) 8 | 9 | for g in db.gps_groups.search({}, ['tex_name', 'label']): 10 | myhash[g['tex_name']].append(g['label']) 11 | 12 | for g in db.gps_subgroups.search({}, ['quotient_tex', 'subgroup_tex', 'label']): 13 | if g['quotient_tex']: 14 | myhash[g['quotient_tex']].append(g['label']) 15 | if g['subgroup_tex']: 16 | myhash[g['subgroup_tex']].append(g['label']) 17 | 18 | count = 1 19 | with open("eqguts.tex", "w") as eqguts: 20 | with open("prettyindex", "w") as prettyindex: 21 | prettyindex.write('[1,"?"]\n') 22 | eqguts.write(r'$?$'+'\n') 23 | for p in myhash.keys(): 24 | pp = p.replace('\\', '\\\\') 25 | eqguts.write('$'+str(p)+'$\n') 26 | count += 1 27 | prettyindex.write('[%d, "%s"]\n'%(count, pp)) 28 | 29 | print ("Max count is %d" % count) 30 | -------------------------------------------------------------------------------- /scripts/groups/Make-images/load-imgs.py: -------------------------------------------------------------------------------- 1 | import sys, os, json 2 | HOME=os.path.expanduser("~") 3 | sys.path.append(os.path.join(HOME, 'lmfdb')) 4 | from lmfdb import db 5 | 6 | import base64 7 | 8 | imdict = {} 9 | 10 | # load the old images 11 | for ent in db.gps_images.search(): 12 | imdict[ent['label']] = ent['image'] 13 | 14 | print("Loaded old") 15 | 16 | # load the new ones, overwriting the old where applicable 17 | with open("prettyindex", "r") as fn: 18 | for line in fn.readlines(): 19 | l= json.loads(line) 20 | fn2 = 'images/eq%d.png'% l[0] 21 | imdict[l[1]] = 'data:image/png;base64,'+base64.b64encode(open(fn2, "rb").read()).decode("utf-8") 22 | 23 | print("Loaded new") 24 | # Have all the image loaded 25 | 26 | afile = open("imagereloader", "w") 27 | afile.write('label|image\n') 28 | afile.write('text|text\n\n') 29 | 30 | 31 | for key,value in imdict.items(): 32 | afile.write(key.replace('\\','\\\\')+'|'+value.replace('\\','\\\\')) 33 | afile.write('\n') 34 | #inps.append({'label': key, 'image': value}) 35 | afile.close() 36 | db.gps_images.reload('imagereloader') 37 | 38 | inps=[] 39 | #for key,value in imdict.items(): 40 | # inps.append({'label': key, 'image': value}) 41 | 42 | #db.gps_images.delete({}) 43 | #db.gps_images.insert_many(inps) 44 | -------------------------------------------------------------------------------- /scripts/groups/Make-images/load-modcurve-imgs.py: -------------------------------------------------------------------------------- 1 | import sys, os, json 2 | HOME=os.path.expanduser("~") 3 | sys.path.append(os.path.join(HOME, 'sage', 'lmfdb')) 4 | from lmfdb import db 5 | 6 | import base64 7 | 8 | imdict = {} 9 | 10 | # load the old images 11 | for ent in db.modcurve_teximages.search(): 12 | imdict[ent['label']] = ent['image'] 13 | 14 | # load the new ones, overwriting the old where applicable 15 | with open("prettyindex", "r") as fn: 16 | for line in fn.readlines(): 17 | l= json.loads(line) 18 | fn2 = 'images/eq%d.png'% l[0] 19 | imdict[l[1]] = 'data:image/png;base64,'+base64.b64encode(open(fn2, "rb").read()).decode("utf-8") 20 | 21 | # Have all the image loaded 22 | 23 | inps=[] 24 | for key,value in imdict.items(): 25 | inps.append({'label': key, 'image': value}) 26 | 27 | db.modcurve_teximages.delete({}) 28 | db.modcurve_teximages.insert_many(inps) 29 | -------------------------------------------------------------------------------- /scripts/groups/Make-images/mytar: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | find . -name '*.png' -print0 | tar -cf alleqns.tar --null -T - 4 | -------------------------------------------------------------------------------- /scripts/hecke_algebras/hecke_algebras_db_stats.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Function to update the hecke_algebras.stats collection, to be run after adding data 4 | # 5 | ################################################################################ 6 | 7 | 8 | from lmfdb.base import getDBConnection 9 | from data_mgt.utilities.rewrite import update_attribute_stats 10 | 11 | 12 | def update_stats(verbose=True): 13 | h = getDBConnection().hecke_algebras 14 | update_attribute_stats(h,'hecke_algebras','level', nocounts=True) 15 | update_attribute_stats(h,'hecke_algebras','weight', nocounts=True) 16 | 17 | -------------------------------------------------------------------------------- /scripts/hmf/.gitignore: -------------------------------------------------------------------------------- 1 | hmf-count-aps.sage.py 2 | hmf-numap-Np-missing.txt 3 | numap2-done-fields.txt 4 | -------------------------------------------------------------------------------- /scripts/hmf/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /scripts/lattices/lattice_db_stats.py: -------------------------------------------------------------------------------- 1 | from lmfdb.base import getDBConnection 2 | from data_mgt.utilities.rewrite import update_attribute_stats 3 | 4 | def update_stats(verbose=True): 5 | L = getDBConnection().Lattices 6 | update_attribute_stats(L,'lat','class_number', nocounts=True) 7 | update_attribute_stats(L,'lat','dim', nocounts=True) 8 | update_attribute_stats(L,'lat','det', nocounts=True) 9 | 10 | -------------------------------------------------------------------------------- /scripts/lfunctions/build_Lfunction_db_2.py: -------------------------------------------------------------------------------- 1 | # This builds a database of L-functions that occur (maybe on the fly) on the website 2 | 3 | from lmfdb import base 4 | from sage.all import DirichletGroup 5 | from lmfdb.lfunctions import RiemannZeta, Lfunction_Dirichlet, Lfunction_EC_Q 6 | 7 | C = base.getDBConnection() 8 | 9 | # Iterators over L-functions. It would be nice to have all of the types of forms that appear on the site 10 | 11 | 12 | def Dirichlet_Lfunctions_iterator(qMax): 13 | for q in [3..qMax]: 14 | for n in range(len(DirichletGroup(q))): 15 | yield Lfunction_Dirichlet(charactermodulus=q, characternumber=n) 16 | 17 | 18 | def EC_iterator(): 19 | data = set(_["label"] for _ in C.elliptic_curves.curves.find({}, ["label"])) 20 | for c in data: 21 | yield Lfunction_EC_Q(c["label"]) 22 | 23 | 24 | def Lfunction_iterator(dirichlet_max=100): 25 | yield RiemannZeta() 26 | for L in Dirichlet_Lfunctions_iterator(dirichlet_max): 27 | yield L 28 | for L_of_curve in EC_iterator(): 29 | yield L_of_curve 30 | 31 | 32 | def inject_Lfunctions(it): 33 | for L in it: 34 | L.inject_database(["original_mathematical_object()"]) 35 | 36 | 37 | # def build_indices(): 38 | # C.Lfunctions.Lfunctions.create_index("level", "self_dual") 39 | 40 | if __name__ == "__main__": 41 | # build_indices() 42 | # remove_all() 43 | inject_Lfunctions(Dirichlet_Lfunctions_iterator(10)) 44 | -------------------------------------------------------------------------------- /scripts/lfunctions/insert_zeros.py: -------------------------------------------------------------------------------- 1 | 2 | import sys 3 | 4 | from sage.all import DirichletGroup 5 | 6 | import sage.libs.lcalc.lcalc_Lfunction as lc 7 | 8 | from lmfdb import base 9 | C = base.getDBConnection() 10 | db = C.Lfunctions 11 | 12 | first_zeros = db.first_zeros_testing 13 | 14 | first_zeros.drop() 15 | 16 | for q in range(3, 1500): 17 | print(q) 18 | sys.stdout.flush() 19 | G = DirichletGroup(q) 20 | for n in range(len(G)): 21 | if G[n].is_primitive(): 22 | L = lc.Lfunction_from_character(G[n]) 23 | z = L.find_zeros_via_N(1)[0] 24 | first_zeros.insert({'zero': float(z), 'modulus': int(q), 'character': int(n)}) 25 | -------------------------------------------------------------------------------- /scripts/lfunctions/populate_origin_ECQ.py: -------------------------------------------------------------------------------- 1 | 2 | import sys, os 3 | sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)),"../..")) 4 | from lmfdb.db_backend import db 5 | 6 | 7 | def upsert_origin(id_row): 8 | Lhash = db.lfunc_lfunctions.lucky({'id':id_row}, projection = 'Lhash') 9 | url = list(db.lfunc_instances.search({'Lhash': Lhash, 'type' : 'ECQ'}, projection = 'url')) 10 | assert len(url) == 1 11 | url = url[0] 12 | assert 'EllipticCurve/Q/' in url, "%s" % url 13 | print(url, Lhash) 14 | db.lfunc_lfunctions.upsert({'id': id_row}, {'origin': url}) 15 | 16 | import sys 17 | if len(sys.argv) == 3: 18 | mod = int(sys.argv[1]) 19 | c = int(sys.argv[2]) 20 | for i in db.lfunc_lfunctions.search({'load_key':'Cremona', 'origin':None}, projection='id'): 21 | if (i % mod) == c: 22 | upsert_origin(i) 23 | else: 24 | print(r"""Usage: 25 | You should run this on legendre as: (this will use 40 cores): 26 | # parallel -u -j 40 --halt 2 --progress sage -python %s 40 ::: {0..39}""" % sys.argv[0]) 27 | 28 | -------------------------------------------------------------------------------- /scripts/lfunctions/populate_trace_hash_ECQG2Q.py: -------------------------------------------------------------------------------- 1 | 2 | import sys, os 3 | sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)),"../..")) 4 | from lmfdb.db_backend import db 5 | 6 | def upsert_hash(id_number, skip = False): 7 | row = db.lfunc_lfunctions.lucky({'id':id_number}, projection = ['id', 'Lhash','trace_hash','origin']) 8 | if skip and 'trace_hash' in row: 9 | return 10 | trace_hash = int(row['Lhash']) 11 | assert trace_hash < 2**61 12 | if 'origin' not in row: 13 | print(row) 14 | sys.exit(1) 15 | assert "Genus2Curve/Q/" in row['origin'] or "EllipticCurve/Q/" in row['origin'], "%s" % row 16 | print(row['origin'], trace_hash) 17 | db.lfunc_lfunctions.upsert({'id': row['id']}, {'trace_hash':trace_hash}) 18 | 19 | import sys 20 | if len(sys.argv) == 3: 21 | mod = int(sys.argv[1]) 22 | c = int(sys.argv[2]) 23 | for key in ['G2Q','Cremona']: 24 | for i in db.lfunc_lfunctions.search({'load_key':key}, projection='id'): 25 | if (i % mod) == c: 26 | upsert_hash(i) 27 | else: 28 | print(r"""Usage: 29 | You should run this on legendre as: (this will use 40 cores): 30 | # parallel -u -j 40 --halt 2 --progress sage -python %s 40 ::: {0..39}""" % sys.argv[0]) 31 | 32 | 33 | -------------------------------------------------------------------------------- /scripts/number_fields/dump-label-data.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/sage -python 2 | # -*- coding: utf-8 -*- 3 | r""" 4 | Dump existing label information 5 | If a degree is given, just do that degree 6 | """ 7 | 8 | import sys, os 9 | 10 | HOME=os.path.expanduser("~") 11 | sys.path.append(os.path.join(HOME, 'lmfdb')) 12 | 13 | from lmfdb import db 14 | 15 | fields = db.nf_fields 16 | 17 | saving = True 18 | 19 | count = 0 20 | #t = time.time() 21 | first = 0 22 | deg=0 23 | 24 | dlist = range(1,48) 25 | if(len(sys.argv)>1): 26 | dlist = [int(i) for i in sys.argv[1:]] 27 | 28 | for deg in dlist: 29 | fn = "label-data-%d"%(deg) 30 | info = {} 31 | cur = fields.search({'degree': deg}, info=info) 32 | if info['number']>0: 33 | outf=open(fn, 'w') 34 | for f in cur: 35 | pol = f['coeffs'] 36 | pol = str(pol) 37 | pol = pol.replace("L","") 38 | disc = f['disc_abs'] 39 | n = int(f['degree']) 40 | sig = n-2*f['r2'] 41 | outf.write("[%s,%s,%d,%d]\n"%(pol,n,disc,sig)) 42 | outf.close() 43 | 44 | -------------------------------------------------------------------------------- /scripts/number_fields/import_nf_data.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/sage -python 2 | # -*- coding: utf-8 -*- 3 | r""" Import number field data. 4 | 5 | Imports from a json file directly to the database. 6 | 7 | Data is imported to the collection 'nf_fields'. 8 | """ 9 | 10 | import sys 11 | import re 12 | import json 13 | 14 | sys.path.append('/scratch/home/jj/lmfdb') 15 | 16 | from lmfdb import db 17 | 18 | fields = db.nf_fields 19 | 20 | outrecs = [] 21 | tot = 0 22 | for path in sys.argv[1:]: 23 | print (path) 24 | fn = open(path) 25 | for line in fn.readlines(): 26 | line.strip() 27 | if re.match(r'\S',line): 28 | l = json.loads(line) 29 | outrecs.append(l) 30 | tot += 1 31 | 32 | if len(outrecs)>0: 33 | fields.insert_many(outrecs) 34 | 35 | print ("Added %d records"% tot) 36 | 37 | 38 | -------------------------------------------------------------------------------- /scripts/reports/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LMFDB/lmfdb/496917191b0a015f48d114a69736fcf7e88f7795/scripts/reports/__init__.py -------------------------------------------------------------------------------- /scripts/reports/inventory_patchup.py: -------------------------------------------------------------------------------- 1 | #A collection of functions usesd to patch up uploads which had bugs 2 | 3 | import lmfdb.inventory_app.lmfdb_inventory as inv 4 | import lmfdb.inventory_app.inventory_db_core as idc 5 | 6 | 7 | def amend_collection_info(inv_db): 8 | """ Fixes missing or empty string collection Notes and Info for every db 9 | """ 10 | 11 | a=list(inv_db.collection_ids.find()) 12 | dummy_info = {} #Dummy per collection info, containing basic fields we want included 13 | for field in inv.info_editable_fields: 14 | dummy_info[field] = None 15 | 16 | for collection in a: 17 | if collection['INFO'] == '' or collection['NOTES'] == '': 18 | print('Fixing ', collection['name']) 19 | idc.set_coll(inv_db, collection['db_id'], collection['name'], collection['name'], {'description':''}, dummy_info) 20 | 21 | def get_sample_of_table(inv_db, table_name, size=10, condition=None): 22 | 23 | if condition and type(condition) is not dict: 24 | raise TypeError('Condition must be dict') 25 | if condition: 26 | curs = inv_db[table_name].aggregate([ {'$match':condition}, {'$sample':{'size':int(size)} } ] ) 27 | else: 28 | curs = inv_db[table_name].aggregate([{'$sample':{'size':int(size)}}]) 29 | return list(curs) 30 | -------------------------------------------------------------------------------- /scripts/reports/upload_helpers.py: -------------------------------------------------------------------------------- 1 | 2 | class inventory_data: 3 | def init(self, database, collection, data, orphans): 4 | self.database = database 5 | self.collection = collection 6 | self.data = data 7 | self.orphans = orphans 8 | 9 | def rename_key(self, previous, new): 10 | try: 11 | key_data = self.orphans[previous] 12 | self.data[new] = key_data 13 | except Exception: 14 | pass 15 | 16 | def get_outdated_keys(self): 17 | return self.orphans.__keys__ 18 | -------------------------------------------------------------------------------- /start-lmfdb.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # supposed to start via $ sage -python ... 4 | from lmfdb.website import main 5 | main() 6 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = tests, lint 3 | skipsdist = True 4 | 5 | [testenv:tests] 6 | 7 | allowlist_externals = 8 | sage 9 | parallel 10 | 11 | passenv = 12 | SAGE_ROOT 13 | SAGE_LOCAL 14 | HOME 15 | 16 | commands = 17 | parallel sage -python -m pytest -vv --durations=0 ::: {posargs} 18 | 19 | [testenv:lint] 20 | allowlist_externals = 21 | pyflakes 22 | pylint 23 | ruff 24 | 25 | commands = 26 | pyflakes start-lmfdb.py user-manager.py lmfdb/ 27 | pylint --score=no -d C,R,E,W -e W0129,W0108 start-lmfdb.py user-manager.py lmfdb/ 28 | # see https://pycodequ.al/docs/pylint-messages/Warnings.html 29 | # E111 indentation is not a multiple of four 30 | # E115 Expected an indented block (comment) 31 | # E211 whitespace before '(' 32 | # E222 Multiple spaces after operator 33 | # E225 Missing whitespace around operator 34 | # E702 multiple statements on one line (semicolon) 35 | # E711 Comparison to None should be 'cond is None:' 36 | # E722 do not use bare except, specify exception instead 37 | ruff check --preview --select=E111,E115,E211,E222,E225,E702,E711,E722 lmfdb/ 38 | -------------------------------------------------------------------------------- /user-manager.py: -------------------------------------------------------------------------------- 1 | 2 | import sys 3 | 4 | 5 | def usage(): 6 | print(''' Usage: to change a password, type 'sage user-manager.py 7 | changepassword username newpassword'. You must have a file 8 | passwords.yaml in the current directory which holds the 9 | authentication passwords. ''') 10 | 11 | 12 | def changepassword(username, newpassword): 13 | #import yaml 14 | #pw_dict = yaml.load(open("passwords.yaml")) 15 | #C['userdb'].authenticate(pw_dict['data']['username'], 16 | # pw_dict['data']['password']) 17 | 18 | from .users.pwdmanager import userdb 19 | userdb.change_password(username, newpassword) 20 | 21 | 22 | if len(sys.argv) != 4: 23 | usage() 24 | sys.exit(0) 25 | 26 | if sys.argv[1] == 'changepassword': 27 | changepassword(sys.argv[2], sys.argv[3]) 28 | else: 29 | usage() 30 | --------------------------------------------------------------------------------