{"id":30873578,"url":"https://github.com/duboviy/dist","last_synced_at":"2025-09-07T23:11:47.518Z","repository":{"id":57418564,"uuid":"77393709","full_name":"duboviy/dist","owner":"duboviy","description":":world_map: Python/C API extension module that computes distance between two coordinates on the world map","archived":false,"fork":false,"pushed_at":"2020-04-26T20:03:07.000Z","size":30,"stargazers_count":13,"open_issues_count":1,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T21:32:56.561Z","etag":null,"topics":["coordinates","cpython","distance","distance-measures","extension","world-map"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/duboviy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null}},"created_at":"2016-12-26T16:00:02.000Z","updated_at":"2021-09-04T03:10:42.000Z","dependencies_parsed_at":"2022-09-13T08:00:50.275Z","dependency_job_id":null,"html_url":"https://github.com/duboviy/dist","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/duboviy/dist","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duboviy%2Fdist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duboviy%2Fdist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duboviy%2Fdist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duboviy%2Fdist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duboviy","download_url":"https://codeload.github.com/duboviy/dist/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duboviy%2Fdist/sbom","scorecard":{"id":358983,"data":{"date":"2025-08-11","repo":{"name":"github.com/duboviy/dist","commit":"8eacd0c38a5279bedbcb3a7371aaf04a5c240d0c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Code-Review","score":1,"reason":"Found 4/28 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T10:18:38.355Z","repository_id":57418564,"created_at":"2025-08-18T10:18:38.355Z","updated_at":"2025-08-18T10:18:38.355Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274107977,"owners_count":25223473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coordinates","cpython","distance","distance-measures","extension","world-map"],"created_at":"2025-09-07T23:11:41.781Z","updated_at":"2025-09-07T23:11:47.510Z","avatar_url":"https://github.com/duboviy.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e\u003cimg src=\"https://raw.githubusercontent.com/duboviy/dist/master/logo.png\" height=85 alt=\"logo\" title=\"logo\"\u003e dist\u003c/h1\u003e\n\nby [Eugene Duboviy](https://duboviy.github.io/)\n\n[![Build Status](https://travis-ci.org/duboviy/dist.svg?branch=master)](https://travis-ci.org/duboviy/dist) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/c2828cf960c8404e86b487c0b79656ab)](https://www.codacy.com/app/dubovoy/dist?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=duboviy/dist\u0026utm_campaign=badger) [![Code Health](https://landscape.io/github/duboviy/dist/master/landscape.svg?style=flat)](https://landscape.io/github/duboviy/dist/master) [![PyPI](https://img.shields.io/pypi/v/dist.svg)](https://pypi.python.org/pypi/dist) [![Open Source Love](https://badges.frapsoft.com/os/mit/mit.svg?v=102)](https://github.com/duboviy/dist/) [![PRs \u0026 Issues Welcome](https://img.shields.io/badge/PRs%20\u0026%20Issues-welcome-brightgreen.svg)](https://github.com/duboviy/dist/pulls) [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/duboviy/dist/) \n\nPython/C API extension module that computes distance between two coordinates on the world map.\n\n\nWhy?\n----\n\nAs more and more apps are using maps, the more demand for geolocation capabilities increase.  Geolocation is about the reporting of your location to other users, as well as associating real-world locations (such as landmarks) to your location. This repo helps to accurately calculate the distance between two locations and presents a time efficient practical solution, that is almost 3 times faster than similar fast pure python implementation.\n\n\nInstallation\n------------\n\n    python setup.py install\n    \nOr using alternative command:\n\n    pip install https://github.com/duboviy/dist/archive/master.zip\n\nInput and output data\n----------\nThe dist function accepts four float parameters:\n\n- lat1, lon1: The Latitude and Longitude of point 1 (in decimal degrees)\n- lat2, lon2: The Latitude and Longitude of point 2 (in decimal degrees)\n\nThe unit of measurement in which result is calculated is kilometers. [float]\n\n\nUsage\n-----\n\n    \u003e\u003e\u003e import dist\n    \u003e\u003e\u003e dist.compute(10.1, 12.1, 10.1, 10.1)\n    218.933532715\n\n\nPerformance / speed comparison\n------------------------------\n\nThis Python/C API Extension module is **in ~ 3 times faster than similar fast pure python implementation**. You can use performance test to compare speed with fast pure python implementation, just run nose test runner:\n\n```\n\u003e\u003e\u003e nosetests\next_time: 2.46785402298 pure_py_time: 7.49713611603\n```\n\n\nPython Versions\n---------------\nChecked under following Python versions:\n* 2.6\n* 2.7\n* 3.3\n* 3.4\n* 3.5\n* 3.6\n\n\nWhat does it use inside? What kind of formula implementation is used? \n---------------------------------------------------------------------\n\nModule accounts the curvature of the Earth when calculating large distances on the world map. If the Earth were flat, calculating the distance between two points would be very simple as for a straight line. The Haversine formula is used in current implementation, it includes a constant that represents the radius of the Earth.\nThe Haversine formula is not 100% accurate because the Earth is not a perfect sphere. However, the Haversine gives a good enough approximation for most applications that use geolocation.\n\n\nLicense\n---------------------------------------------------------------------\n\n**MIT** licensed library. See [LICENSE.txt](LICENSE.txt) for details.\n\n\nContributing\n---------------------------------------------------------------------\n\nIf you have suggestions for improving the dist, please [open an issue or\npull request on GitHub](https://github.com/duboviy/dist/).\n\n\nBadges\n---------------------------------------------------------------------\n\n[![forthebadge](http://forthebadge.com/images/badges/fuck-it-ship-it.svg)](https://github.com/duboviy/dist/)\n[![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](https://github.com/duboviy/dist/) [![forthebadge](http://forthebadge.com/images/badges/built-by-hipsters.svg)](https://github.com/duboviy/dist/) [![forthebadge](http://forthebadge.com/images/badges/built-with-swag.svg)](https://github.com/duboviy/dist/)\n\n[![forthebadge](http://forthebadge.com/images/badges/powered-by-electricity.svg)](https://github.com/duboviy/dist/) [![forthebadge](http://forthebadge.com/images/badges/powered-by-oxygen.svg)](https://github.com/duboviy/dist/) [![forthebadge](http://forthebadge.com/images/badges/powered-by-water.svg)](https://github.com/duboviy/dist/) [![forthebadge](http://forthebadge.com/images/badges/powered-by-responsibility.svg)](https://github.com/duboviy/dist/)\n\n[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=102)](https://github.com/duboviy/dist/)\n\n[![forthebadge](http://forthebadge.com/images/badges/makes-people-smile.svg)](https://github.com/duboviy/dist/)\n\n_______________________________________\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduboviy%2Fdist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduboviy%2Fdist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduboviy%2Fdist/lists"}