Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • sccs/docs.it4i.cz
  • soj0018/docs.it4i.cz
  • lszustak/docs.it4i.cz
  • jarosjir/docs.it4i.cz
  • strakpe/docs.it4i.cz
  • beranekj/docs.it4i.cz
  • tab0039/docs.it4i.cz
  • davidciz/docs.it4i.cz
  • gui0013/docs.it4i.cz
  • mrazek/docs.it4i.cz
  • lriha/docs.it4i.cz
  • it4i-vhapla/docs.it4i.cz
  • hol0598/docs.it4i.cz
  • sccs/docs-it-4-i-cz-fumadocs
  • siw019/docs-it-4-i-cz-fumadocs
15 results
Select Git revision
Show changes
#!/usr/bin/python3
"""
Script to check external links in MDX files.
"""
import re
from pathlib import Path
import requests
def check_links_in_mdx(directory):
"""
Scans MDX files in the given directory for external links and checks their availability.
:param directory: Path to the directory containing MDX files.
"""
mdx_files = Path(directory).rglob("*.mdx")
url_pattern = re.compile(r'\[.*?\]\((http[s]?://.*?)\)')
for mdx_file in mdx_files:
with open(mdx_file, "r", encoding="utf-8") as file:
content = file.read()
links = url_pattern.findall(content)
for link in links:
try:
response = requests.head(link, allow_redirects=True, timeout=5)
if response.status_code >= 400:
print(
f"❌ Broken link in {mdx_file}: {link} "
f"(Status: {response.status_code})"
)
except requests.RequestException:
print(f"⚠️ Error checking {link} in {mdx_file}")
if __name__ == "__main__":
check_links_in_mdx("content/docs")
$$
MAX\_FAIRSHARE * ( 1 - \frac{usage_{Project}}{usage_{Total}} )
$$
$$
10^8*queue\_priority + 10^7*fairshare\_priority + 10^5*job\_age
$$
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
config: ["MMLorHTML.js"],
jax: ["input/TeX", "output/HTML-CSS", "output/NativeMML"],
extensions: ["tex2jax.js", "MathMenu.js", "MathZoom.js"],
tex2jax: {
inlineMath: [ ["\\(","\\)"] ],
displayMath: [ ["\\[","\\]"] ]
},
TeX: {
TagSide: "right",
TagIndent: ".8em",
MultLineWidth: "85%",
equationNumbers: {
autoNumber: "AMS",
}
},
displayAlign: 'left',
showProcessingMessages: false,
messageStyle: 'none'
});
</script>
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.slim.min.js" integrity="sha256-/SIrNqv8h6QGKDuNoLGA4iret+kyesCkHGzVUUV0shc=" crossorigin="anonymous"></script>
<script>
// override to case insensitive search
$.expr[":"].contains = $.expr.createPseudo(function(arg) {
return function( elem ) {
return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0;
};
});
$("#searchInput").keyup(function () {
//split the current value of searchInput
var data = this.value.split(" ");
//create a jquery object of the rows
var jo = $("tbody").find("tr");
if (this.value == "") {
jo.show();
return;
}
//hide all the rows
jo.hide();
//Recusively filter the jquery object to get results.
jo.filter(function (i, v) {
var $t = $(this);
for (var d = 0; d < data.length; ++d) {
if ($t.is(":contains('" + data[d] + "')")) {
return true;
}
}
return false;
})
//show the rows that match.
.show();
}).focus(function () {
this.value = "";
$(this).css({
"color": "black"
});
}).css({
"color": "#C0C0C0"
});
</script>