Skip to content

Commit

Permalink
Merge pull request #6134 from LMFDB/main
Browse files Browse the repository at this point in the history
main -> dev
  • Loading branch information
edgarcosta authored Aug 12, 2024
2 parents b36a815 + edee510 commit 52bba69
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 46 deletions.
26 changes: 0 additions & 26 deletions lmfdb/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,32 +308,6 @@ def netloc_redirect():
return redirect(urlunparse(replaced), code=302)


@cached_function
def bad_bots_list():
return [
elt.lower()
for elt in [
"The Knowledge AI",
"Wolfram",
"petalbot",
"Bytespider",
"Sogou",
"MJ12bot",
"Amazonbot",
"meta",
"facebook",
]
]


@app.before_request
def badbot():
ua = request.user_agent.string.lower()
for elt in bad_bots_list():
if elt in ua:
return render_template("404.html", title='Too many requests'), 429


def timestamp():
return '[%s UTC]' % time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime())

Expand Down
2 changes: 1 addition & 1 deletion lmfdb/elliptic_curves/code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ curve:
sage: E = EllipticCurve({ainvs})
pari: E = ellinit({ainvs})
magma: E := EllipticCurve({ainvs});
oscar: E = EllipticCurve({ainvs})
oscar: E = elliptic_curve({ainvs})

simple_curve:
sage: E.short_weierstrass_model()
Expand Down
30 changes: 15 additions & 15 deletions lmfdb/groups/abstract/templates/abstract-show-subgroup.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ <h2> Subgroup ($H$) information</h2>
{% else %}
<tr><td>{{KNOWL('group.name', title='Description:')}}</td><td>not computed</td></tr>
{% endif %}
<tr><td>{{KNOWL('group.order',title='Order:')}}</td><td> {{info.pos_int_and_factor(seq.subgroup_order)}} </td></tr>
<tr><td>{{KNOWL('group.subgroup.index',title='Index:')}}</td><td> {{info.pos_int_and_factor(seq.quotient_order)}} </td></tr>
<tr><td>{{KNOWL('group.order',title='Order:')}}</td><td> {{info.pos_int_and_factor(seq.subgroup_order) | safe}} </td></tr>
<tr><td>{{KNOWL('group.subgroup.index',title='Index:')}}</td><td> {{info.pos_int_and_factor(seq.quotient_order) | safe}} </td></tr>
<tr><td>{{KNOWL('group.exponent',title='Exponent:')}}</td><td>
{% if seq.sub.exponent %}
{{info.pos_int_and_factor(seq.sub.exponent)}}
{{info.pos_int_and_factor(seq.sub.exponent) | safe}}
{% else %}
not computed
{% endif %}
Expand All @@ -31,7 +31,7 @@ <h2> Subgroup ($H$) information</h2>
class:')}}</td>
<td>
{% if seq.sub.G %}
${{seq.sub.nilpotency_class}}$
${{seq.sub.nilpotency_class}}$
{% else %}
not computed
{% endif %}
Expand All @@ -45,7 +45,7 @@ <h2> Subgroup ($H$) information</h2>
not computed
{% endif %}
</td></tr>

</table>
</p>

Expand All @@ -68,8 +68,8 @@ <h2> {{KNOWL('group.ambient', 'Ambient group ($G$) information')}} </h2>
<table>
<tr><td>{{KNOWL('group.name', title='Description:')}}</td>
<td><a href="{{url_for('.by_label', label=seq.ambient)}}">${{seq.ambient_tex}}$</a></td></tr>
<tr><td>{{KNOWL('group.order',title='Order:')}}</td><td> {{info.pos_int_and_factor(seq.ambient_order)}} </td></tr>
<tr><td>{{KNOWL('group.exponent',title='Exponent:')}}</td><td> {{info.pos_int_and_factor(seq.amb.exponent)}} </td></tr>
<tr><td>{{KNOWL('group.order',title='Order:')}}</td><td> {{info.pos_int_and_factor(seq.ambient_order) | safe}} </td></tr>
<tr><td>{{KNOWL('group.exponent',title='Exponent:')}}</td><td> {{info.pos_int_and_factor(seq.amb.exponent) | safe}} </td></tr>
{# Bug in generator Magma code, so hiding for now
<tr>
<td>{% if seq.amb.solvable %}{{KNOWL('group.presentation', 'Presentation:')}}{% else %}{{KNOWL('group.permutation_gens', 'Generators:')}}{% endif %}</td>
Expand All @@ -95,10 +95,10 @@ <h2> Quotient group ($Q$) structure </h2>
<table>
{% if seq.quotient is not none %} <tr><td>{{KNOWL('group.name', title='Description:')}}</td>
<td><a href="{{url_for('.by_label', label=seq.quotient)}}">${{seq.quotient_tex}}$</a></td></tr> {% endif %}
<tr><td>{{KNOWL('group.order',title='Order:')}}</td><td> {{info.pos_int_and_factor(seq.quotient_order)}} </td></tr>
<tr><td>{{KNOWL('group.exponent',title='Exponent:')}}</td><td>
<tr><td>{{KNOWL('group.order',title='Order:')}}</td><td> {{info.pos_int_and_factor(seq.quotient_order) | safe}} </td></tr>
<tr><td>{{KNOWL('group.exponent',title='Exponent:')}}</td><td>
{% if seq.quo|attr('exponent') %}
{{info.pos_int_and_factor(seq.quo.exponent)}}
{{info.pos_int_and_factor(seq.quo.exponent) | safe}}
{% else %}
not computed
{% endif %}
Expand Down Expand Up @@ -169,17 +169,17 @@ <h2> Automorphism information </h2>
{% endif %}
</td></tr>
{% if seq.aut_weyl_group is not none %}
<tr><td>$\operatorname{res}({{S}})$</td><td><a href="{{url_for('.by_label', label=seq.aut_weyl_group)}}">${{seq.aut_weyl.tex_name}}$</a>, of order {{info.pos_int_and_factor(seq.aut_weyl.order)}}</td></tr>
<tr><td>$\operatorname{res}({{S}})$</td><td><a href="{{url_for('.by_label', label=seq.aut_weyl_group)}}">${{seq.aut_weyl.tex_name}}$</a>, of order {{info.pos_int_and_factor(seq.aut_weyl.order) | safe}}</td></tr>
{% elif seq.aut_weyl_index is not none %}
<tr><td>$\card{\operatorname{res}({{S}})}$</td><td>{{info.pos_int_and_factor(seq.amb.aut_order/seq.aut_weyl_index)}}</td></tr>
<tr><td>$\card{\operatorname{res}({{S}})}$</td><td>{{info.pos_int_and_factor(seq.amb.aut_order/seq.aut_weyl_index) | safe}}</td></tr>
{% endif %}
{% if seq.aut_centralizer_order is not none %}
<tr><td>$\card{\operatorname{ker}(\operatorname{res})}$</td><td>{{info.pos_int_and_factor(seq.aut_centralizer_order)}}</td></tr>
<tr><td>$\card{\operatorname{ker}(\operatorname{res})}$</td><td>{{info.pos_int_and_factor(seq.aut_centralizer_order) | safe}}</td></tr>
{% endif %}
{% if seq.weyl_group is not none %}
<tr><td>$W$</td><td><a href="{{url_for('.by_label', label=seq.weyl_group)}}">${{seq.weyl.tex_name}}$</a>, of order {{info.pos_int_and_factor(seq.weyl.order)}}</td></tr>
<tr><td>$W$</td><td><a href="{{url_for('.by_label', label=seq.weyl_group)}}">${{seq.weyl.tex_name}}$</a>, of order {{info.pos_int_and_factor(seq.weyl.order) | safe}}</td></tr>
{% elif seq.normalizer is not none and seq.centralizer is not none %}
<tr><td>$\card{W}$</td><td>{{info.pos_int_and_factor(seq.normalizer_.subgroup_order / seq.centralizer_.subgroup_order)}}</td></tr>
<tr><td>$\card{W}$</td><td>{{info.pos_int_and_factor(seq.normalizer_.subgroup_order / seq.centralizer_.subgroup_order) | safe}}</td></tr>
{% else %}
<tr><td>$\card{W}$</td><td> not computed</td></tr>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/number_fields/code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ field:
sage: x = polygen(QQ); K.<a> = NumberField(%s)
pari: K = bnfinit(%s, 1)
magma: R<x> := PolynomialRing(Rationals()); K<a> := NumberField(%s);
oscar: Qx, x = PolynomialRing(QQ); K, a = NumberField(%s)
oscar: Qx, x = polynomial_ring(QQ); K, a = number_field(%s)

poly:
sage: K.defining_polynomial()
Expand Down
4 changes: 2 additions & 2 deletions lmfdb/number_fields/number_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,15 +777,15 @@ def interesting():
'gp' : '',
'magma' : 'R<x> := PolynomialRing(Rationals());',
'mathematica' : '',
'oscar' : 'Rx, x = PolynomialRing(QQ)',
'oscar' : 'Rx, x = polynomial_ring(QQ)',
'sage' : 'x = polygen(QQ)',
}

download_makedata = {
'gp' : '', # don't try to make fields in gp, even with nfinit it may take a very long time
'magma' : 'function make_data() return [NumberField(r[2]) : r in data]; end function;',
'mathematica' : '',
'oscar' : 'function make_data() return [NumberField(r[2]) for r in data] end',
'oscar' : 'function make_data() return [number_field(r[2]) for r in data] end',
'sage' : 'def make_data(): return [NumberField(r[1],"a") for r in data]',
}
download_makedata_comment = {
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/static/robots.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
User-agent: *
Crawl-delay: 15
Crawl-delay: 30
Disallow: /static/
Disallow: /api/

Expand Down
2 changes: 2 additions & 0 deletions lmfdb/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css"
integrity="sha384-Nlo8b0yiGl7Dn+BgLn4mxhIIBU6We7aeeiulNCjHdUv/eKHx59s3anfSUjExbDxn"
crossorigin="anonymous">
<!--reCAPTCHA-->
<script src="https://www.google.com/recaptcha/enterprise.js?render=6LchHWwpAAAAACFe52hZNEkUP5Bn5_0FfLiEuF3i&waf=session" async defer></script>



Expand Down
5 changes: 5 additions & 0 deletions lmfdb/templates/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2630,3 +2630,8 @@ span.raw-tset-container:hover > span.raw-tset-copy-btn {
div.upload_section {
margin-bottom: 60px;
}

/* hidge google badge */
.grecaptcha-badge {
visibility: hidden;
}

0 comments on commit 52bba69

Please sign in to comment.