From cf96e34b3ce44a4c07d7d4cb38911fe33fd11633 Mon Sep 17 00:00:00 2001 From: Alex McLarty Date: Mon, 8 Jan 2024 19:46:55 +0000 Subject: [PATCH 1/2] Change link from t2 instances to generic burstable page. Save a redirect! --- in/index.html.mako | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/in/index.html.mako b/in/index.html.mako index 9917f0e..276a21b 100644 --- a/in/index.html.mako +++ b/in/index.html.mako @@ -298,7 +298,7 @@ % if inst['base_performance']: - Base performance: + Base performance: ${"%g" % (inst['base_performance'] * 100,)}% @@ -314,7 +314,7 @@ ${inst['vCPU']} vCPUs % if inst['burst_minutes']: - + for a ${"%gh %gm" % divmod(inst['burst_minutes'], 60)} burst From 7a5ae575f5c47b1629bea5132f3144e2c087bdea Mon Sep 17 00:00:00 2001 From: Everett Berry Date: Tue, 9 Jan 2024 21:30:18 -0500 Subject: [PATCH 2/2] linter --- ec2.py | 7 +++++-- render.py | 2 +- scrape.py | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ec2.py b/ec2.py index 67b5dec..dc58574 100644 --- a/ec2.py +++ b/ec2.py @@ -47,7 +47,6 @@ def translate_platform_name(operating_system, preinstalled_software): return platform - # Translate between the API and what is used locally def translate_reserved_terms(term_attributes): lease_contract_length = term_attributes.get("LeaseContractLength") @@ -308,7 +307,11 @@ def add_spot_pricing(imap): } except botocore.exceptions.ClientError: - print('WARNING: Spot region "{}" not enabled. Falling back to spot advisor.'.format(region)) + print( + 'WARNING: Spot region "{}" not enabled. Falling back to spot advisor.'.format( + region + ) + ) pass diff --git a/render.py b/render.py index 10a68a2..4c3ffce 100644 --- a/render.py +++ b/render.py @@ -289,7 +289,7 @@ def render(data_file, template_file, destination_file, detail_pages=True): if __name__ == "__main__": sitemap = [] - sitemap.extend(render("www/instances.json", "in/index.html.mako", "www/index.html", False)) + sitemap.extend(render("www/instances.json", "in/index.html.mako", "www/index.html")) sitemap.extend( render("www/rds/instances.json", "in/rds.html.mako", "www/rds/index.html") ) diff --git a/scrape.py b/scrape.py index 7d2c0c4..04af80b 100755 --- a/scrape.py +++ b/scrape.py @@ -805,14 +805,14 @@ def add_gpu_info(instances): }, "g5.xlarge": { "gpu_model": "NVIDIA A10G", - "compute_capability": 8.6, + "compute_capability": 8.6, "gpu_count": 1, "cuda_cores": 9616, "gpu_memory": 24, }, "g5.2xlarge": { "gpu_model": "NVIDIA A10G", - "compute_capability": 8.6, + "compute_capability": 8.6, "gpu_count": 1, "cuda_cores": 9616, "gpu_memory": 24,