MCPcopy
hub / github.com/jwngr/sdow / get_percent_of_pages

Function get_percent_of_pages

scripts/generate_updated_wikipedia_facts.py:18–20  ·  view source on GitHub ↗

Returns the percentage of all pages the provided value represents.

(val, decimal_places_count=2)

Source from the content-addressed store, hash-verified

16
17
18def get_percent_of_pages(val, decimal_places_count=2):
19 """Returns the percentage of all pages the provided value represents."""
20 return round(float(val) / float(query_results["non_redirect_pages_count"]) * 100, decimal_places_count)
21
22
23sdow_database = './dump/sdow.sqlite'

Calls

no outgoing calls

Tested by

no test coverage detected