Saravanan666/pypi-org huggingface dataset:
Package: oslo.utils
Team and repository tagsoslo.utilsThe oslo.utils library provides support for common utility type functions,
such as encoding, exception handling, string manipulation, and time handling.Free software: Apache licenseDocumentation:https://docs.openstack.org/oslo.utils/latest/Source:https://opendev.org/openstack/oslo.utilsBugs:https://bugs.launchpad.net/oslo.utilsRelease notes:https://docs.openstack.org/releasenotes/oslo.utils/
Package: oslo.versionedobjects
Team and repository tagsoslo.versionedobjectsThe oslo.versionedobjects library provides a generic versioned object model
that is RPC-friendly, with inbuilt serialization, field typing, and remotable
method calls. It can be used to define a data model within a project
independent of external APIs or database schema for the purposes of providing
upgrade compatibility across distributed services.Free software: Apache licenseDocumentation:https://docs.openstack.org/oslo.versionedobjects/latestSource:http://opendev.org/openstack/oslo.versionedobjectsBugs:http://bugs.launchpad.net/oslo.versionedobjectsRelease notes:https://docs.openstack.org/releasenotes/oslo.versionedobjects/
Package: oslo.vmware
Team and repository tagsoslo.vmware — VMware support code for OpenStackThe Oslo VMware library provides support for common VMware operations
and APIs.License: Apache License, Version 2.0Documentation:https://docs.openstack.org/oslo.vmware/latest/Source:https://opendev.org/openstack/oslo.vmwareBugs:https://bugs.launchpad.net/oslo.vmwareRelease notes:https://docs.openstack.org/releasenotes/oslo.vmware/
Package: oslo.windows
Oslo Windows library for OpenStack projects.Library contains Windows / Hyper-V code commonly used in the OpenStack
projects: nova, cinder, networking-hyperv. The library can be used in any
other OpenStack projects where it is needed.Free software: Apache licenseDocumentation:http://docs.openstack.org/developer/oslo.windowsSource:http://git.openstack.org/cgit/openstack/oslo.windowsBugs:http://bugs.launchpad.net/oslo.windows
Package: osm
#                             Optimal Stellar Models (OSM)OSM is a python program that implements the Levenberg-Marquardt method for the calculation of optimal stellar models with the CESTAM code. The minimization takes into account fundamental constraints as well as seismic constraints. Cross-correlations between the seismic constraints are also take into account in the minimization criterion.Requirements:CESTAM (version 3.2 or newer) : a free code for the calculation of  the structures and evolutions of stars ;python-cestam, a Python library associated with CESTAM (developed by J. Marques), this module is included in the CESTAM package ;ADIPLS : a code for computing adiabatic stellar modes (http://astro.phys.au.dk/~jcd/adipack.n/) ;Python (2.7 or newer) , Numpy and Scipy.InstallationYou must first install CETSTAM and ADIPLS, please refer to their associated documentations. To install OSM in your home directory for you own use, type:
python setup.py install –home=${HOME}The components of the OSM library will be installed, depending on your architecture, in $HOME/lib/python or $HOME/lib64/python, while the osm.py executable will be installed in $HOME/bin/.You can also install OSM as root for all the users, in that case type:
sudo python setup.py installTutorial:Please refer to the PDF document (osm.pdf)Changes history:
* 1.4 (17/11/2018) : various minor improvements / can start the calculation from previous results
* 1.3 (10/07/2018) : changes made to make OSM compatible with python 3
* 1.2 (22/12/2017) : various minor improvements (e.g. print code version)
* 1.1 (25/11/2014) : inclusion of the surface effects,  calculation of the condition number of the co-variance matrix, if needed the co-variance matrix is truncated using the SVD, calculation of the reduced Chi2, calculation of the seismic Chi2, compute the condition number of Hessian matrix, and some of minor improvements and bug correction.
* 1.0 (20/12/2013) : initial working versionCopyright (c) 2012 R. Samadi (LESIA - Observatoire de Paris)This is a free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This software 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 General Public License for more details.You should have received a copy of the GNU General Public License
along with this code.  If not, see <http://www.gnu.org/licenses/>.
Package: osm2geojson
osm2geojsonParse OSM and Overpass JSON with python.This library is under development!UsageInstall this package with pip:$pipinstallosm2geojsonIf you want to convert OSM xml or Overpass json/xml to Geojson you can import this lib and use one of 4 methods:json2shapes(dict json_from_overpass)- to convert Overpass json to *Shape-objectsxml2shapes(str xml_from_osm)- to convert OSM xml or Overpass xml to *Shape-objectsjson2geojson(dict json_from_overpass)- to convert Overpass json to Geojsonxml2geojson(str xml_from_osm)- to convert OSM xml or Overpass xml to GeojsonAdditional parameters for all functions:filter_used_refs- (default:True) defines geometry filtration strategy (will return all geometry if set asFalse)log_level- (default:'ERROR') controls logging level (will print all logs if set as'INFO'). More detailsherearea_keys- (default:None) defines which keys and values of an area should be saved from the list of OSM tags, seeareaKeys.jsonfor the defaultspolygon_features- (default:None) defines a whitelist/blacklist of features to be included in resulting polygons, seepolygon-features.jsonfor the defaultsraise_on_failure- (default:False) controls whether to throw an exception when geometry generation failsOther handy methods:overpass_call(str query)- runs query to overpass-api.de server (retries 5 times in case of error).shape_to_feature(Shape shape, dict properties)- Converts Shape-object to GeoJSON with passed properties.*Shape-object - for convenience created simple dict to save Shapely object (geometry) and OSM-properties. Structure of this object:shape_obj={'shape':Point|LineString|Polygon...,'properties':{'type':'relation'|'node'...,'tags':{...},...}}After installing viapip, the module may also be used as aargparse-based command-line script.
Either use the script name directly or call Python with the-moption and the package name:osm2geojson--helppython3-mosm2geojson--helpExamplesConvert OSM-xml to Geojson:importcodecsimportosm2geojsonwithcodecs.open('file.osm','r',encoding='utf-8')asdata:xml=data.read()geojson=osm2geojson.xml2geojson(xml,filter_used_refs=False,log_level='INFO')# >> { "type": "FeatureCollection", "features": [ ... ] }Convert OSM-json to Shape-objects:importcodecsimportosm2geojsonwithcodecs.open('file.json','r',encoding='utf-8')asdata:json=data.read()shapes_with_props=osm2geojson.json2shapes(json)# >> [ { "shape": <Shapely-object>, "properties": {...} }, ... ]DevelopmentClone project with submodules$gitclone--recurse-submoduleshttps://github.com/aspectumapp/osm2geojson.gitSetup package$pythonsetup.pydevelopRun tests$python-munittesttestsRun single test$pythontests/main.pyTestOsm2GeoJsonMethods.test_barrier_wallUpdate osm-polygon-features to last version (if you want last version)$./update-osm-polygon-features.shToDoAdd tests and examples for cli toolAdd actions related to cli tool (more infohttps://github.com/aspectumapp/osm2geojson/pull/32#issuecomment-1073386381)
Package: osm2paths
osm2paths generates car tracks of any small OSM road network, intended to be used in simple traffic simulations.
It converts an exported OSM file (eg. map.osm) to a JSON dictionary defining the road network (crossroads and connections),
and car tracks (directed traces on commonplace two-way streets).The tracks’ graph is perfecly smooth - there are no sharp turns and any turn is defined as an infinitely zoomable quadratic
BÃ©zier curve - it generates ‘vector’ paths.=========== USAGE =============1, place an .osm file inside data folder
2, call generate_rails() to create a .json files, argumentsosm_path (string, required): path to source OSM file (eg. “data/map.osm”)
half_gauge (float, default = 2): distance between road’s central line and tracks in meters
min_radius (float, default = 4.5): minimum radius of osculating circle of curves in meters
drive_right (bool, default = True): regional road specification - True for Germany, False for the UK
display (bool, default = True): if set to True, displays generated traces in system windowCODE EXAMPLE:generate_roads(“data/kjoto.osm”, 1.5, drive_right=False)
Package: osm2pgsql-tuner
osm2pgsql-tunerThe osm2pgsql-tuner project recommends an osm2pgsql command based on
available system resources and the size of the input PBF file.
The recommendations made by this program are targeted for:osm2pgsql v1.5.0 and newerFlex outputNo stage 2 processingStage 2 processing has less predictable RAM consumptionper this discussion on GitHub.Using the APIThis project is hosted as a free API athttps://osm2pgsql-tuner.comby RustProof Labs.
The following is an example of using this API from Python.importrequestssystem_ram_gb=64osm_pbf_gb=10.4pbf_filename='north-america-latest'append=Falseapi_endpoint='https://osm2pgsql-tuner.com/api/v1'api_endpoint+=f'?system_ram_gb={system_ram_gb}&osm_pbf_gb={osm_pbf_gb}&append={append}&pbf_filename={pbf_filename}'Query the endpoint, check the status.result=requests.get(api_endpoint)print(f'Status code:{result.status_code}')Get recommendation data.rec=result.json()['osm2pgsql']Command is the most interesting part.print(f"\nCommand:\n{rec['cmd']}")Other details returned used in decision making to determine the commandcmd.print(rec.keys())Using osm2pgsql via PythonTo use the osm2pgsql recommendation without using the API/website, theosm2pgsql_tunerpackage can be used.Installosm2pgsql-tunerwithin an virtual environment.pipinstallosm2pgsql-tunerImportosm2pgsql_tunerand create an instance of therecommendationclass.importosm2pgsql_tunerrec=osm2pgsql_tuner.recommendation(system_ram_gb=8,osm_pbf_gb=0.5,pgosm_layer_set='run')pbf_path='~/pgosm-data/example_file.osm.pbf'osm2pgsql_command=rec.get_osm2pgsql_command(out_format='api',pbf_path=pbf_path)print(osm2pgsql_command)Returns.osm2pgsql-d$PGOSM_CONN--output=flex--style=./run.lua~/pgosm-data/example_file.osm.pbfDeployment InstructionsNote:  Need to update the sub-version of Python over time.  Can use simplypython3but that can lead to using older unsupported versions based on distribution defaults.cd~/venv
python3.8-mvenvosm2pgsql-tunersource~/venv/osm2pgsql-tuner/bin/activateInstall requirementssource~/venv/osm2pgsql-tuner/bin/activatecd~/git/osm2pgsql-tuner
pipinstall-rrequirements.txtRun web server w/ uWSGI.source~/venv/osm2pgsql-tuner/bin/activatecd~/git/osm2pgsql-tuner
pythonrun_server.pyUnit testsRun unit tests.python-munittesttests/*.pyOr run unit tests with coverage.coveragerun-munittesttests/*.pyGenerate report.coveragereport-mosm2pgsql_tuner/*.pyRun pylint.pylint--rcfile=./.pylintrc-fparseable\./osm2pgsql_tuner/*.pyUsed byThis project is used byPgOSM Flexto automate commands in thePgOSM Flex Docker image.Development installpip install -e .
Package: osmanthus
OsmanthusOsmanthus is a sophisticated chess engine that employs advanced algorithms to provide a challenging
and enjoyable playing experience. It offers a range of features, including self play, puzzle
solving, and an intuitive command-line interface.InstallationOsmanthus can be easily installed using pip:pipinstallosmanthusUsageTo start the CLI interface, enter the following command:osmanthus-cliMoves can be input in Standard Algebraic Notation (SAN) or Universal Chess Interface notation. We
recommend using SAN. If you are new to this notation, we have provided a short guide on ourwiki
page.If you are new to playing chess, we suggest checking outthis
videoto learn the fundamentals.ContributingContributions to Osmanthus are highly appreciated! For suggestions, we recommend looking at any open
issues, particularly those tagged as "Good First Issue" if you are a first-time contributor. We are
also opening new issues related to planned features and bugs that need to be fixed.When contributing, we ask that you follow the coding style laid out inGoogle's Python Style
Guide.Thank you for your interest in Osmanthus, and we look forward to your contributions!
Package: osmapi
osmapiPython wrapper for the OSM API (requires Python >= 3.8)InstallationInstallosmapifrom PyPiby using pip:pip install osmapiDocumentationThe documentation is generated usingpdocand can beviewed online.The build the documentation locally, you can usemake docsThis project uses GitHub Pages to publish its documentation.
To update the online documentation, you need to re-generate the documentation with the above command and update themasterbranch of this repository.ExamplesTo test this library, please create an account on thedevelopment server of OpenStreetMap (https://api06.dev.openstreetmap.org).Read from OpenStreetMap>>>importosmapi>>>api=osmapi.OsmApi()>>>print(api.NodeGet(123)){u'changeset':532907,u'uid':14298,u'timestamp':u'2007-09-29T09:19:17Z',u'lon':10.790009299999999,u'visible':True,u'version':1,u'user':u'Mede',u'lat':59.9503044,u'tag':{},u'id':123}Constructorimportosmapiapi=osmapi.OsmApi(api="https://api06.dev.openstreetmap.org",username="you",password="***")api=osmapi.OsmApi(username="you",passwordfile="/etc/mypasswords")api=osmapi.OsmApi(passwordfile="/etc/mypasswords")# if only the passwordfile is specified, the credentials on the first line of the file will be usedNote: Each line in the password file should have the formatuser:passwordWrite to OpenStreetMap>>>importosmapi>>>api=osmapi.OsmApi(api="https://api06.dev.openstreetmap.org",username=u"metaodi",password=u"*******")>>>api.ChangesetCreate({u"comment":u"My first test"})>>>print(api.NodeCreate({u"lon":1,u"lat":1,u"tag":{}})){u'changeset':532907,u'lon':1,u'version':1,u'lat':1,u'tag':{},u'id':164684}>>>api.ChangesetClose()NoteScripted imports and automated edits should only be carried out by those with experience and understanding of the way the OpenStreetMap community creates maps, and only with carefulplanningandconsultationwith the local community.See theImport/GuidelinesandAutomated Edits/Code of Conductfor more information.DevelopmentIf you want to help with the development ofosmapi, you should clone this repository and install the requirements:pip install -r requirements.txt
pip install -r test-requirements.txtAfter that, it is recommended to install the pre-commit-hooks (flake8, black):pre-commit installYou can lint the source code using this command:make lintAnd if you want to reformat the files (using the black code style) simply run:make formatTestsTo run the tests use the following command:make testReleaseTo create a new release, follow these steps (please respectSemantic Versioning):Adapt the version number inosmapi/__init__.pyUpdate the CHANGELOG with the versionRe-build the documentation (make docs)Create a pull request to merge develop into master (make sure the tests pass!)Create anew release/tag on GitHub(on the master branch)Thepublication on PyPIhappens viaGitHub Actionson every tagged commitAttributionThis project was orginally developed by Etienne Chové.
This repository is a copy of the original code from SVN (http://svn.openstreetmap.org/applications/utils/python_lib/OsmApi/OsmApi.py), with the goal to enable easy contribution via GitHub and release of this package viaPyPI.See also the OSM wiki:http://wiki.openstreetmap.org/wiki/Osmapi
Package: osmapi-wrapper
osm_api PackageA small package to get data fromOpenStreetMapAPI directlyDescriptionThis package get Node, Way, and Relation geometry data directly from OSM API(instead ofNominatim API) by provided OSM object ID, and parse it intoShapelyobjects. due to heavy dependencies ofGeoPandas, GeoDataFrame export excluded. but you can easily convert Shapely to GeoPandas, here is an example:defget_relation_as_gdf(osm_id:str)->geopandas.GeoDataFrame:polygon=osm_api.get_relation(osm_id)data={'geometry':[polygon]}gdf=geopandas.GeoDataFrame(data)returngdfExamplesimportosm_apipolygon=osm_api.get_relation(osm_id='537701')line_string=osm_api.get_way(osm_id='440582504')lat_lng=osm_api.get_node(osm_id='25960293')
Package: osmchange-generator-cli
OsmChange-generator-cliMe on OpenStreetMapOsmChange file generator useful for importing and updating data in OpenStreetMap.In its current phase of development, the generator does not support relations. Data files must be in.geojsonformat.Installationpip install osmchange-generator-cliUsageosmchange-generator \<input-file-names> \<osm-data-file-name> <out-file-name> <tag> (--log) (--create) (--delete) (--changeset-id)Help command with all argumentsosmchange-generator --helpExampleosmchange-generator input_file.geojson osm_data.geojson out.osc ref --create --delete(Seeexamplefor generated file)
Package: osm-clipper
OpenStreetMap clipperSmall python tool to clip pre-defined areas from large osm.pbf files, usingosmconvertorosmosis.The tool is at the moment specifically written to split OpenStreetMapProtocolbuffer Binary Format(PBF) files into a set of countries and/or regions, based on theGADM36classification. Future versions will allow for user-defined regional classifications as well.Please note:This package is still in development phase. In case of any problems, or if you have any suggestions for improvements, please raise anissue.InstallationOpen the python environment in your command prompt or bash in which you want to install this package.Typepip install osm-clipperand it should install itself into your python environment.Now you can import the package like any other package!OR:Clone the repository or download the package on your computer and extract the folder.Go to the osm_clipper folder in your command prompt or bash.Typepython setup.py installand it should install itself into your python environment.Now you can import the package like any other package!Dependency on osmcovert or osmosisIn essence,osm_clipperis just a wrapper aroundosmconvertandosmosis. To make it work, make sure you add either osmconvert or osmosis to your environmental variables.How to set environmental variables on Windows:Search forEdit the System Environmental Variablesand click on it.Click on theEnvironmental Variablesbutton.Search in your System variables forPath.Click on theNewbutton and add the location ofosmconvertand/orosmosis.NOTE: the default isosmconvert. If you want to use osmosis, specifyosmconvert==Falsein thesingle_countriesorall_countriesfunctions.LicenseCopyright (C) 2020 Elco Koks. All versions released under theMIT license.
Package: osm_conflate
This is a script for merging points from some third-party source with
OpenStreetMap data. Please make sure the license allows that. After
merging and uploading, the data can be updated.Seethe OSM wiki pagefor detailed description and instructions.InstallationRunpip install osm_conflate.ProfilesEach source should have a profile. It is a python script with variables
configuring names, tags and processing. See heavily commented examples
in theprofilesdirectory.UsageFor a simplest case, run:conflate <profile.py> -o result.osmYou might want to add other arguments,
to pass a dataset file or prepare a preview GeoJSON. Runconflate-hto see a list of arguments.Uploading to OpenStreetMapIt is recommended to open the resulting file in the JOSM editor and
manually check the changes. Alternatively, you can usebulk_upload.pyto upload a change file from the command line.Please mind theImport Guidelines, or your work may be reverted.LicenseWritten by Ilya Zverev for MAPS.ME. Published under the Apache 2.0
license.
Package: osmconflator
OSM ConflatorOSM Conflator is a Python package that allows you to conflate GeoJSON features with OpenStreetMap (OSM) data. It helps you identify and modify features in a GeoJSON dataset that intersect with OSM data, providing a convenient way to update properties or perform other actions based on the conflation results.InstallationYou can install OSM Conflator using pip:pipinstallosmconflatorUsageHere's an example of how to use OSM Conflator in your Python code:fromosmconflatorimportconflate_geojsongeojson_str='{"type": "FeatureCollection", "features": ... }'conflated_geojson=conflate_geojson(geojson_str)print(conflated_geojson)This output will have input features with conflated properties of duplicate and intersect (boolean) .In the above example, conflate_geojson is the main function provided by OSM Conflator. It takes a GeoJSON string as input, performs conflation with OSM data, and returns an  GeoJSON string with problems of duplicate and overlapping.Options :Passremove_conflated=Trueargument to conflate_geojson function to get clean geojson without duplicate or overlap problem.my_cleaned_geojson = conflate_geojson(geojson_str,remove_conflated=True)Features Supported :Currently conflation for following osm features are supported :BuildingsExample :fromosmconflatorimportconflate_geojsonmy_geojson={"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"coordinates":[[[83.98097353206458,28.203326601546905],[83.98097353206458,28.203239142020323],[83.98110284724493,28.203239142020323],[83.98110284724493,28.203326601546905],[83.98097353206458,28.203326601546905],]],"type":"Polygon",},},{"type":"Feature","properties":{},"geometry":{"coordinates":[[[83.97980503615179,28.20407835951059],[83.97980503615179,28.204017832398932],[83.97987683972957,28.204017832398932],[83.97987683972957,28.20407835951059],[83.97980503615179,28.20407835951059],]],"type":"Polygon",},},],}conflated_geojson=conflate_geojson(my_geojson)print(conflated_geojson)Output :{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"duplicate":false,"intersect":false},"geometry":{"coordinates":[[[83.98097353206458,28.203326601546905],[83.98097353206458,28.203239142020323],[83.98110284724493,28.203239142020323],[83.98110284724493,28.203326601546905],[83.98097353206458,28.203326601546905]]],"type":"Polygon"}},{"type":"Feature","properties":{"duplicate":false,"intersect":true},"geometry":{"coordinates":[[[83.97980503615179,28.20407835951059],[83.97980503615179,28.204017832398932],[83.97987683972957,28.204017832398932],[83.97987683972957,28.20407835951059],[83.97980503615179,28.20407835951059]]],"type":"Polygon"}}]}ContributingContributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request. When contributing to this project, please follow the Contributing Guidelines.LicenseThis project is licensed under the MIT License. See the LICENSE file for more information.Work in Place :::: Development is Going on