Saravanan666/pypi-org huggingface dataset:
Package: pygeohash
[![Coverage Status](https://coveralls.io/repos/wdm0006/pygeohash/badge.svg?branch=master&service=github)](https://coveralls.io/github/wdm0006/pygeohash?branch=master)  ![travis status](https://travis-ci.org/wdm0006/pygeohash.svg?branch=master)Pygeohash is a Python module that provides functions for decoding and encoding geohashes to and from latitude and
longitude coordinates, and doing basic calculations and approximations with them.It is based off of Leonard Norrgård’s [geohash](https://github.com/vinsci/geohash) module, but aims to add more
functionality while supporting python 3 as well.UsageTo use pygeohash:import pygeohash as pghpgh.encode(42.6, -5.6)
# >>> ‘ezs42e44yx96’pgh.encode(42.6, -5.6, precision=5)
# >>> ‘ezs42’pgh.decode(‘ezs42’)
# >>> (‘42.6’, ‘-5.6’)pgh.geohash_approximate_distance(‘bcd3u’, ‘bc83n’)
# >>> 625441InstallationPygeohash has no requirements outside of the python stdlib, and aims to keep it that way if at all possible. To install:pip install pygeohashLiscenseA portion of this codebase (geohash.py), is from Leonard Norrgard’s module, which carries the following license:Copyright (C) 2015 [Leonard Norrgard](leonard.norrgard@gmail.com)Geohash is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.Geohash is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public
License for more details.You should have received a copy of the GNU Affero General Public
License along with Geohash.  If not, see
[gnu.org](http://www.gnu.org/licenses/).This derivative work likewise carries the same license:Copyright (C) 2015 [Will McGinnis](will@pedalwrencher.com)
Package: pygeohash-fast
Pygeohash-FastA Fast geohasher for python.Created by wrapping the rustgeohash cratewith pyo3.Huge shout out to the georust community :)Currently very WIP, only supports encoding geohashes.Speed ComparisonsCompared against the great python librarypygeohashThis isn't a perfect benchmark, but should illstrate what's possible.
Tested on 1 million randomly generated lat/long pairs.Results for PygeohashIn [14]: %%timeit
    ...: [encode(lats[i], lngs[i], 8) for i in range(len(lats))]

10.8 s ± 77.4 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)Results for Pygeohash-fast encode:In [16]: %%timeit
    ...: [fast_encode(lngs[i], lats[i], 8) for i in range(len(lats))]
3.44 s ± 11.4 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)However, in order to improve things in further when encoding many points we have methods for encoding many points at once.In [22]: %%timeit
    ...: encode_many(lngs, lats, 8)
155 ms ± 3.58 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)So for simple geohash encoding this library is ~69x times faster, nice.
Package: pygeoid
Local gravity field modelling with Python.The main purpose of the package is to realise common algorithms and
methods in physical geodesy for the local gravity field modelling.The project is in the early planning and development stage.InstallTo installpygeoidsimply usepipas usual:pipinstallpygeoidAlternatively, you can usepipto install the latest version of the source code from GitHub:pipinstall--upgradegit+https://github.com/ioshchepkov/pygeoidDocumentationFull documentation is available athttps://pygeoid.readthedocs.ioCode of ConductPlease note thatPyGeoidis released with a Code of Conduct
(seeCODE_OF_CONDUCT.md).
By participating in this project you agree that you will follow all its terms.LicenseThis project is licensed under the MIT License - see the LICENSE.txt file for details
Package: pygeoip
This library is based onMaxmind’s GeoIP C API.Tested with Python version 2.6, 2.7, 3.2, 3.3 and 3.4.InstallationYou can easily install pygeoip from PyPi.pipinstallpygeoipIssues and ContributionBug reports are done bycreating an issue on
Github. If you want to
contribute you can alwayscreate a pull
requestfor discussion
and code submission.DocumentationFor more information,check out the documentationover at Read the Docs.
Package: pygeojson
pygeojson 🗺GeoJSON library for Python withtypes.The world doesn't need anotherGeoJSON library for python, but it needs
a better one. The goal of this library is to provide a simple and typed data
model for GeoJSON such that y'all can get static code check and editor support
withmypy. And of course, data should be data, so the
data model is not polluted with inheritance, custom methods, utilities,
extension or other "conveniences". Lastly, your data will be immutable!pygeojsonis built on top ofdataclassesto provide
types, immutability and default value support. Models does not inherit from one
but instead we useUniontypeswhere applicable.In addition,pygeojsoncomes with serialization and deserialization support
via thedump,dumps,loadandloadsfunctions.Installationpygeojsonrequires Python 3.7 and up. Install it viapipenv:pipenvinstallpygeojsonorpip:pipinstallpygeojsonUsageTBDData modelTBA
Package: pygeolocate
pygeolocatepip install pygeolocateGet a country by its full name# pygeolocate/examples/get_country_by_full_name.pyimportpygeolocateunited_kingdom=pygeolocate.locate_by_name("united kingdom")[0]print(country)print(country.name)print(country.coordinates)print(country.coordinates[0])print(country.coordinates['long'])Get a country by part of its name# pygeolocate/examples/get_country_by_partial_name.pyimportpygeolocateforcountryinpygeolocate.locate_by_name("united"):print(country)print(country.name)print(country.coordinates)print(country.coordinates[0])print(country.coordinates['long'])
Package: pygeom
pygeomGeometry Definition and Calculation Package for PythonContains:2D and 3D vectors for vector dot products using "*" and vector cross products using "**".2D and 3D cubic splines for calculating the various directions, curvatures, etc. at every point.2D and 3D coordinate systems for transforming vectors and points.Vector Example Code:frompygeomimportVector# Vector object creationvec1=Vector(2,3.,1)print('vec1 ={:}'.format(vec1))# Multiply vector by a scalarvec2=2*vec1print('vec2 ={:}'.format(vec2))# Vector attributes are x, y, and zvec3=Vector(vec2.y,vec2.z,vec2.z)print('vec3 ={:}'.format(vec3))# Vector cross productvec4=vec1**vec2print('vec4 ={:}'.format(vec4))# Vector cross productvec5=vec1**vec3print('vec5 ={:}'.format(vec5))# Vector dot productscal=vec1*vec2print('scal ={:}'.format(scal))# Get vector magnitudemag=vec5.return_magnitude()print('mag ={:}'.format(mag))# Get the unit vectoruvec=vec5.to_unit()print('uvec ={:}'.format(uvec))Vector Example Output:vec1 = <2, 3.0, 1>
vec2 = <4, 6.0, 2>
vec3 = <6.0, 2, 2>
vec4 = <0.0, 0, 0.0>
vec5 = <4.0, 2.0, -14.0>
scal = 28.0
mag = 14.696938456699069
uvec = <0.2721655269759087, 0.13608276348795434, -0.9525793444156804>
Package: pyGeom2D
pyGeom2DPython package to create 2D geometries.Getting StartedInstallationpipinstallpyGeom2DUsage ExamplesCartesian coordinate axes + pointsfrompygeomimportAxes,Point# Create the cartesian axisaxes=Axes(xlim=(-1,8),ylim=(-1,18),figsize=(9,7))# Create two pointsp1=Point(2,5,color='#ffa500')p2=Point(7,17,color='#0000ff')axes.addMany([p1,p2])axes.draw()Line DemofrompygeomimportAxes,Point,Line# Create the cartesian axisaxes=Axes(xlim=(-1,7),ylim=(-1,7),figsize=(7,6))# Pointsp1=Point(1,1,color='red')p2=Point(5,4,color='green')l=Line(p1=p1,p2=p2)axes.addMany([p1,p2,l])axes.draw("line_demo.png")Triangle DemofrompygeomimportAxes,Point,Triangle# Create the cartesian axisaxes=Axes(xlim=(-1,10),ylim=(-1,10),figsize=(12,10))# Pointsp1=Point(1,1,color='grey')p2=Point(5,5,color='grey')p3=Point(8,5,color='grey')tr=Triangle(p1,p2,p3,alpha=0.5)axes.addMany([p1,p2,p3])axes.add(tr)axes.draw()Rectangle DemofrompygeomimportAxes,Point,Rectangle# Create the cartesian axisaxes=Axes(xlim=(-1,7),ylim=(-1,7),figsize=(12,10))# PointsbottomLeft=Point(1,1,color='red')topRight=Point(5,4,color='green')shape=Rectangle(bottomLeft,topRight,alpha=0.5)axes.addMany([bottomLeft,topRight])axes.add(shape)axes.draw()Polygon DemofrompygeomimportAxes,Point,Polygon# Create the cartesian axisaxes=Axes(xlim=(-1,10),ylim=(-1,10),figsize=(12,10))# Pointsp1=Point(1,1,color='red')p2=Point(1,2,color='green')p3=Point(4,7,color='red')p4=Point(9,1,color='green')shape=Polygon([p1,p2,p3,p4],alpha=0.5)axes.addMany([p1,p2,p3,p4])axes.add(shape)axes.draw()
Package: pyGeoMagApex
# pyGeoMagnetic## What is pyGeoMagnetic?It is a Python program about geomagnetic field based on IGRF12 and Apex model. We can calculate magnetic field intensity and transform coordinate between GeoGraphical and GeoMagnetic.The source code of IGRF12 and Apex model come from Fortran file. In this package, we reform them to Python file. Although Python can translate Fortran by pyf module, it needs Fortran compiler. This package can run without Fortran compiler.****## How to use it?main.py includes some functions which can be used directly.*We will give some example when this package is completed.*****## What we did?This model is called [Magnetic-Apex and Quasi-Dipole coordinate][apex]. It includes too many functions and complex math and physics. So in this package, we change the structure but keep the mathematic method.The model has two algorithm. One is simple, basic but slow, the other one is complex but fast. We would make the simple one firstly and make another one later.### The Apex model includes 4 steps- **Get Magnetic Intensity**- **Map Magnetic Line to Apex Position**- **Calculate Magnetic Coordinate**- **Smooth Base Vectors***more information needs to be added after complete this part.*[apex]: https://doi.org/10.1029/2010JA015326
Package: pygeomod
Python wrapper for GeomodellerNo guarantee for any working order :-) However, if you have any questions, feel free to email me!InstallationSimplest way (if you have pip installed): download from Python Package Index and install:pip install pygeomodFor more information on pip, seehttp://www.pip-installer.org/en/latest/quickstart.htmlNOTE: to be on the safe side, it is a good idea to install experiemntal Python packages into a virtual environment first:https://python-packaging-user-guide.readthedocs.org/en/latest/tutorial.htmlAlternatively, you can download the distribution (either from PyPI or from github) and simply runpython setup.py installLicensepygeomodeller is free software and published under an MIT License (basically, you can do anything you want with the code, as long as you provide attribution back to me and don’t hold me liable).If you use this work in any form in a publication, please cite our article as reference:Florian Wellmann, Stefan Finsterle, Adrian Croucher, Integrating Structural Geological Data into the Inverse Modelling Framework of iTOUGH2, Computers & Geosciences, Available online 31 October 2013, ISSN 0098-3004,http://dx.doi.org/10.1016/j.cageo.2013.10.014.The manuscript is available online at:http://www.sciencedirect.com/science/article/pii/S0098300413002781Disclaimer: the code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.Have fun!
Package: py-geo-nearby
py-geo-nearby PackageThis uses geopy package to identify the distance between two geo co-ordinates and arrange it based on the nearest distances.e.g) Consider the below case,A is the starting pointDistance between A and B = 3 KmsDistance between A and C = 2 KmsDistance between B and C = 3 kmsDistance between B and D = 4 kmsDistance between C and D = 2 kmsAll the places ie) B, C and D has to be visited from A. However, the nearest place from A has to be visited first followed by the nearest place from the first visited place and so on..In the above example,From A, C is the nearest location.From C, D is the nearest location.From D, B is the nearest location.Therefore the sequence based on nearest distance is A -> C -> D -> BTotal Distance = 2 + 2 + 4 = 8 kmsInstallationpip install geopy
pip install py-geo-nearbyDeclareimport py_geo_nearby.py_geo_nearby as pygnParametersParameterMeaningSample Valueslistpython variable containing the list of locationsany variable nameNOTE: Each list entry should have exactly 3 values namely latitude, longitude and location Name. The 1st entry of the list will be considered as the starting location.Usage ExampleCodeimport py_geo_nearby.py_geo_nearby as pygn

rows = [
 ['12.92509', '80.10087', 'Tambaram,Chennai'],
 ['12.95601', '80.14353', 'Saravana Stores,Chromepet, Chennai'],
 ['12.92264', '80.131151', 'Selaiyur,Chennai'],
 ['12.90885', '80.09903', 'Perungalathur,Chennai'],
 ['12.93675', '80.16917', 'Hasthinapuram, Chennai'],
 ['12.86956', '80.16775', 'Sholinganallur, Chennai'],
 ['12.96829', '80.0962', 'Thirumudivakkam, Chennai']
]
places,totalDistance = pygn.nearby(rows)
print(places,totalDistance)Output(['Tambaram,Chennai',
  'Perungalathur,Chennai',
  'Selaiyur,Chennai',
  'Saravana Stores,Chromepet, Chennai',
  'Hasthinapuram, Chennai',
  'Sholinganallur, Chennai',
  'Thirumudivakkam, Chennai'],
 33.881469236248286)
Package: pygeonhole-cli
pygeonhole-clipygeonhole-cli is a convenient python package that can
list, sort, and customize the contents of the current
directory and export the display to a new directory
directly from the command line.UsageTo get help with command-line argumentspygeonhole-cli --helpInitialize pygeonhole-cli databasespygeonhole-cli initExample outputpygeonhole-cli show -d/Users/betterthan-yesterday/pygeonhole-cli:

#  | Name                     | Mode       | Last Modified       | Size | Ext.  |
---------------------------------------------------------------------------------
1 | tests/                   | drwxr-xr-x | 2024-01-05 18:19:26 | --   | --    |
2 | pygeonhole/              | drwxr-xr-x | 2024-01-05 18:15:43 | --   | --    |
3 | requirements.txt         | -rw-r--r-- | 2024-01-05 18:11:00 | 61   | .txt  |
4 | pyproject.toml           | -rw-r--r-- | 2024-01-07 22:07:33 | 788  | .toml |
5 | README.md                | -rw-r--r-- | 2024-01-05 18:14:04 | 54   | .md   |
6 | setup.py                 | -rw-r--r-- | 2024-01-07 22:56:50 | 1046 | .py   |
7 | LICENSE.txt              | -rw-r--r-- | 2024-01-07 22:08:00 | 1076 | .txt  |
---------------------------------------------------------------------------------pygeonhole-cli sort Name/Users/betterthan-yesterday/pygeonhole-cli:

#  | Name                     | Mode       | Last Modified       | Size | Ext.  |
---------------------------------------------------------------------------------
1 | pygeonhole/              | drwxr-xr-x | 2024-01-05 18:15:43 | --   | --    |
2 | tests/                   | drwxr-xr-x | 2024-01-05 18:19:26 | --   | --    |
3 | LICENSE.txt              | -rw-r--r-- | 2024-01-07 22:08:00 | 1076 | .txt  |
4 | README.md                | -rw-r--r-- | 2024-01-05 18:14:04 | 54   | .md   |
5 | pyproject.toml           | -rw-r--r-- | 2024-01-07 22:07:33 | 788  | .toml |
6 | requirements.txt         | -rw-r--r-- | 2024-01-05 18:11:00 | 61   | .txt  |
7 | setup.py                 | -rw-r--r-- | 2024-01-07 22:56:50 | 1046 | .py   |
---------------------------------------------------------------------------------DisclaimerIt is recommended that you install the package in a local
virtual env.First, create an env.python3-mvenvenv_for_pyhcliactivate that envsourceenv_for_pyhcli/bin/activateand then pip install.InstallationThe current stable version of pygeonhole-cli is available on PyPI and
can be installed by runningpip install pygeonhole-cli.Other sources:PyPI:GitHub:Note: Compatibility with Windows not yet tested.MetaWilliam Pol -polwilliam0@gmail.comDistributed under the MIT license. See LICENSE for more information.https://github.com/bettertha-yesterday/
Package: pygeonlp-webapi
pygeonlp-webapi, A json-rpc webapi server for pygeonlppygeonlp-webapiis a WSGI module to use pygeonlp features as a JSON-RPC web service.How To UseThe server for development using Flask can be run with the following command.$python-mpygeonlp_webapi.app

or

$FLASK_APP="pygeonlp_webapi.app"flaskrun--port=5000If you prefer gunicorn, you can run the following command.$gunicornpygeonlp_webapi.app:app--bind=127.0.0.1:5000Then, post a JSON-RPC message to the server.$curl-XPOST-H"Content-Type: application/json"-d'{"jsonrpc": "2.0", "method": "geonlp.parse", "params":{"sentence":"NIIは千代田区にあります。"}, "id":"1"}'http://localhost:5000/apiMore detailed Japanese documentation of the software including API is
available under/docdirectory.
You can also find the latest online documentation atWeb Service section in GeoNLP Documentation.Pre-requirementspygeonlp-webapirequirespygeonlpandflask-jsonrpc.InstallThe pygeonlp-webapi package can be installed with thepipcommand.
It is recommended that you upgrade pip and setuptools to
the latest versions before running it.$pipinstall--upgradepipsetuptools
$pipinstallpygeonlp-webapiThe database needs to be prepared the first time.Prepare the databaseExecute the command to register the basic place name word analysis dictionaries
(*.json,*.csv) in this package into the database under the default diretory.>>> import pygeonlp.api as api
>>> api.setup_basic_database()Run tests (Optional)Run the unit tests withpytestcommand.UninstallUsepipcommand to uninstall.$pipuninstallpygeonlp-webapiLicenseThe 2-Clause BSD LicenseAcknowledgementsThis software is supported by DIAS (Data Integration and Analysis System) and
ROIS-DS CODH (Center for Open Data in the Humanities).It was also supported by JST (Japan Science and Technology Agency) PRESTO program.
Package: pygeon-notifications
IntroductionPygeon lets you monitor programs by enabling in-code alerts in the form of push notifications on your phone. Alerts can have a custom title, body and an optional context string that gets displayed as the subtitle of the notification on your phone. Sound and vibration for alerts are on by default but could be overriden by your phone's notification settings.Install Pygeonpip install pygeon-notificationsUsage from the Command LineInstall and open the Pygeon app on your mobile (iOS only) and sign-in. After signing in you will recieve a private key. Use the private key to initialize pygeon in your terminal with the following command:$pygeon-initYOUR_PRIVATE_KEYTo send alert from the command line:$pygeon-t"Title"If you want to include a body in the alert (body is optional):$pygeon-t"Title"-b"Body"Note that maximum length of the body is 200 characters.The most common use case of pygeon from the command line is when you want to alert yourself after a command is done executing. Here are a few examples of this scenario:Example 1: Send alert when a command is done executing:$make&&pygeon-t"Build Done"Example 2: Send alert when a command is done executing and include output of the command in the alert body$pygeon-t"Python script finished!"-b$(pythonmain.py)In this case the output of main.py will be included in the bodyUsage with Python (>= 3.6)Install and open the Pygeon app on your mobile (iOS only) and sign-in. After signing in you will recieve a private key. Use the private key to instantiate a Pygeon object that you can use to send alerts anywhere in your scriptsexamplefrompygeonimportPygeonmy_pygeon=Pygeon("YOUR_PRIVATE_KEY")my_pygeon.send("Cool Title","Even cooler description")Usage with POST requestsThe Pygeon python package under the hood is a simple program that sends a POST request to Pygeon servers. Hence you can send alerts using a simple POST request tohttps://pygeon.io/api/alertwith your private key, title and description in the body of the request.curl examplecurl-XPOST"https://pygeon.io/api/alert"-H'Content-Type: application/json'-d'{"ppk":"YOUR_PRIVATE_KEY","title":"Cool Title", "desc": "Cool Body"}'node exampleconstaxios=require('axios')axios.post('https://pygeon.io/api/alert',{ppk:'YOUR_PRIVATE_KEY',title:'Cool Title',desc:'Even cooler description'}).then(res=>{console.log(`statusCode:${res.status}`)console.log(res)}).catch(error=>{console.error(error)})Example use casesPygeon is built for software developers and some use cases include but are not limited to:example use case 1: You want to step away from your machine until a task finishesfrompygeonimportPygeonmy_pygeon=Pygeon("YOUR_PRIVATE_KEY")long_task.execute()# you step away for a beer 🍺my_pygeon.send("Task finished!")example use case 2: You want alerts in your trading bot about the stock marketfrompygeonimportPygeonmy_pygeon=Pygeon("YOUR_PRIVATE_KEY")#custom trading logicifeth_price>=eth_strike:my_pygeon.send("Price Alert!",f"Eth above{eth_strike}")Note  that Pygeon alerts are also recieved on the apple watch if you have one connected to your phone.
Package: pygeons
pygeonsGeographical queries made simple.Free software: MIT licenseDocumentation:https://pygeons.readthedocs.io.Some examples:>>> from pygeons.api import Country, find_cities
>>> Country('ivory coast')
Country('Ivory Coast')
>>> Country('côte d’ivoire')
Country('Ivory Coast')
>>> Country('civ')
Country('Ivory Coast')
>>> _.iso
'CI'
>>> Country('ivory coast').capital.name
'Yamoussoukro'
>>> Country('ivory coast').neighbors
[Country('Liberia'), Country('Ghana'), Country('Guinea'), Country('Burkina Faso'), Country('Mali')]
>>>
>>> Country('us').cities['moscow']
City.gid(5601538, 'Moscow', 'US')
>>> Country('us').cities['moscow'].admin2
State.gid(5598264, 'ADM2', 'Latah County', 'US')
>>> Country('us').cities['moscow'].admin1
State.gid(5596512, 'ADM1', 'Idaho', 'US')
>>> Country('us').cities['moscow'].distance_to(Country('ru').cities['moscow'])
8375.215117486288
>>>
>>> find_cities("oslo")[:2]
[City.gid(3143244, 'Oslo', 'NO'), City.gid(5040425, 'Oslo', 'US')]FeaturesDetermine if a (city, state and country) combination corresponds to an existing place nameScrub (city, state, country) combinationsNormalize city, state and country names to their canonical representationsFrame queries in English as well as languages native to each particular countryCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.9.1 (2020-09-17)Added top-levelG`collection topygeons.apiImplemented handling for alternative place names0.9.0 (2020-09-11)Added new APISwitched database backend from MongoDB to sqlite3Implemented import scripts in Python0.1.1 (2017-12-03)First working release.  Includes import scripts and source code.0.1.0 (2017-11-26)First release on PyPI.
Package: pygeoops
PyGeoOpsPyGeoOps provides some less common or extended spatial algorithms and utility functions.UsageCalculate acenterlinefor a polygon:import pygeoops
import shapely

polygon = shapely.from_wkt("POLYGON ((0 0, 0 8, -2 10, 4 10, 2 8, 2 2, 10 2, 10 0, 0 0))")
centerline = pygeoops.centerline(polygon)InstallationPyGeoOps is available on PyPi, so can be installed using pip:pip install pygeoopsAnother option is to use conda or mamba, as it is also available on conda-forge:conda install pygeoops --channel conda-forge