Saravanan666/pypi-org huggingface dataset:
Package: osmosis-on-premise-driver
osmosis-on-premise-driver💧 Osmosis On-Premise Driver Implementationoceanprotocol.comTable of ContentsSetupCode StyleTestingNew VersionLicenseSetupYou don't have to set any Brizo configuration settings or other configuration settings to use on-premise storage with Brizo. You just need to make sure that Brizo can resolve the file URLs. For more details, seethe tutorial about setting up on-premise storage.Code StyleInformation about our Python code style is documented in this thepython-developer-guideand thepython-style-guide.TestingAutomatic tests are setup via Travis, executingtox.
Our tests use the pytest framework.New VersionThebumpversion.shscript helps to bump the project version. You can execute the script using as first argument {major|minor|patch} to bump accordingly the version.LicenseCopyright 2018 Ocean Protocol Foundation Ltd.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: osmosis-on-premise-driver-plus
osmosis-on-premise-driver💧 Osmosis On-Premise Driver Implementationoceanprotocol.comTable of ContentsSetupCode StyleTestingNew VersionLicenseSetupYou don't have to set any Brizo configuration settings or other configuration settings to use on-premise storage with Brizo. You just need to make sure that Brizo can resolve the file URLs. For more details, seethe tutorial about setting up on-premise storage.Code StyleInformation about our Python code style is documented in this thepython-developer-guideand thepython-style-guide.TestingAutomatic tests are setup via Travis, executingtox.
Our tests use the pytest framework.New VersionThebumpversion.shscript helps to bump the project version. You can execute the script using as first argument {major|minor|patch} to bump accordingly the version.LicenseCopyright 2018 Ocean Protocol Foundation Ltd.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: osmosis-protobuf
Osmosis ProtobufThis repository contains the whole osmosis protobuf files compiled for python and ready to use with grpc. Please use the according .proto file as documentation for each python file.InstallationYou can install this package directly from the repository by using:python -m pip install osmosis-protobufUsageThe following code snippet will query the balances for the addressosmo15hzhcvgs2ljfng6unghvr5l32prwqdyq4aguxn. The according query.proto file in the bank subdirectory contains the Request and the Response for this request. The details for the response are defined inQueryAllBalancesResponse. It contains the balances and pagination attribute which can be accessed as shown in the example below.importgrpcimportosmosis_protobuf.cosmos.bank.v1beta1.query_pb2_grpcasquery_pb2_grpcimportosmosis_protobuf.cosmos.bank.v1beta1.query_pb2asquery_pb2host="osmosis.strange.love"port="9090"c=grpc.insecure_channel(f'{host}:{port}')stub=query_pb2_grpc.QueryStub(c)r=stub.AllBalances(query_pb2.QueryAllBalancesRequest(address="osmo15hzhcvgs2ljfng6unghvr5l32prwqdyq4aguxn"))print(r.balances)Build yourselfThere are two scripts helping you to fork this repository to work with any cosmos based coin.Create a config inconfigsand take a existing one as exampleRun theaggregate.pyfile with your filename without.json(Examplepython aggregate.py cosmos)Run thecompile.pyto compile all your files to protobufBuild your package. You're done!Protobuf compilationThe files are compiled using thegrpc_tools.protoccommand from thegrpcio-toolslibrary.
To compile a .proto file manually use following command:python -m grpc_tools.protoc -I <absolute path to project root> --python_out=. --grpc_python_out=. <absolute path to .proto file>After compiling all the files with protoc you need to fix the imports by usingprotoletariatNote:The --grpc_python_out=. is only needed when compiling a query.proto file as these define the actual grpc queryTo compile the whole project it is favorable to match all proto files by using*.protoinstead of each individual file. You can also match the whole folders to compile multiple folders at the same time. Not that the folders might contain sub-folders.Other Cosmos based coinsCurrently following coins are maintained by me:Cosmos (branch:main)Osmosis (this branch)
Package: osmo-trade
osmo_trade: Making the trading experience seamless.osmo_tradeis an open source python SDK made from the perspective of Algorithmic Traders. It is built to trade on Osmosis DEX powered byCosmos SDKandTendermintas the consensus engine.This code is free and publicly available under the Apache 2.0 open source license!Features of osmo_trade as apackage:Very easy to set up any alpha based strategy on osmosis DEX.Modular in nature. We can add any new feature coming on osmosis DEX like Concentrated liquidity without altering the exisiting code.With a bit of customizations in regards to performance, it also can be used CEX-DEX arb which generates majority of the volume on the DEX.Components in osmo_trade:DataFeed: DataFeed is the class to get the data from the blocks mined already. We haven't configured osmo_trade to have the mempool transactions as of now.TransactionBuilder: This class is used to build your transactions however you want. It'll return thetxn_hash, logs, codeto tell the user whether the transaction is successful.Strategy: We've setup an example code to really explain what each component is doing. And that is how user just need to make a script like this which will contain the strategy logic.Detailed documentation can be found in the examples directory where we try to explain each component of the SDK in much detail.Installationpipinstallosmo_tradeNote:If you want to run by customizing the SDK itself. Then git clone the repo, make your changes and do:pip install .in the cloned directory.Mandatory StepFirst of all, User have to define the env file in their current working directory with the following fields:MNEMONICRPC_URLgRPC_host and gRPC_portREST_URLA very good example of env file can be foundhereFAQ:What to do when user is getting the following error after installing the package for the first time:when you're getting an error that says mpz object has no to_bytes() attributespip uninstall gmpy2
Package: osmpy
Powerfull wrapper around OSM Overpass Turbo to query regions of any size and shapepipinstallosmpyList precooked queriesosmpy.list_queries()namedocstring0AmenitiesLocationofamenitieswithinaboundary1AmentiesCountNumberofamenitiespertypewithinaboundary2RoadLengthLengthofroadbyroadtypewithinaboundaryGet all amenities in a boundaryimportosmpyfromshapelyimportwktboundary=wkt.loads('POLYGON((-46.63 -23.54,-46.6 -23.54,-46.62 -23.55,-46.63 -23.55,-46.63 -23.54))')osmpy.get('Amenities',boundary)typeidlatlontags0node661212030-23.544739-46.626160{'amenity':'fuel','name':'Posto NGM'}1node661212089-23.547450-46.626073{'amenity':'fuel','name':'Posto Maserati',...2node745733280-23.541411-46.613930{'addr:city':'São Paulo','addr:housenumber':...3node745733292-23.542070-46.614916{'addr:city':'São Paulo','addr:housenumber':...4node889763809-23.542558-46.620360{'addr:housenumber':'110/C9','addr:street':....................84node5663737625-23.540027-46.605425{'access':'yes','addr:city':'São Paulo','a...85node5990269247-23.540650-46.607532{'addr:city':'São Paulo','addr:housenumber':...86node6621564995-23.543880-46.626414{'access':'yes','addr:city':'São Paulo','a...87node6625433725-23.546727-46.623956{'access':'yes','addr:city':'São Paulo','a...88node6625433753-23.547111-46.624790{'access':'yes','addr:city':'São Paulo','a...Total road length by road typeosmpy.get('RoadLength',boundary)countlengthhighwaybus_stop182.624corridor2482.195cycleway1134.197footway1165473.419living_street3422.378path4735.539pedestrian390.327platform3239.206primary282067.562primary_link121123.544You can use your own query## Use `{boundary}` as a placeholder.query="""[out:json];node["amenity"](poly:"{boundary}");out body geom;"""osmpy.get(query,boundary)Create a precooked queryclassYourPrecookedQuery(osmpy.queries.QueryType):query="""<OSM Overpass Turbo Query>"""docstring="""<Query description>"""defpostprocess(self,df):"""Post process API result"""returndf['tags'].apply(pd.Series).groupby('amenity').sum()osmpy.get(YourPrecookedQuery,boundary):point_right: Leave an issue or PR if you want to add a new query to the packageCreditsFree software: MIT licenseFunctionkatanafrom @snorfalorpagus_.
Package: osmqa-parser
An [imposm parser](https://github.com/omniscale/imposm) for
[OSM QA tiles](https://osmlab.github.io/osm-qa-tiles/).osmqa-parserwas
written for use with [tile-reduce-py](https://github.com/jwass/tile-reduce-py)
and [osmgraph](https://github.com/mapkin/osmgraph).UsageThe parser should be used with animposmimporter such as the one found inosmgraph.Data Model CaveatsOSM QA tiles are delivered as
[Mapbox Vector Tiles](https://www.mapbox.com/developers/vector-tiles/). It is
impossible to exactly reconstruct the original OSM data from a vector tile.Because ways in a QA tile contain a coordinate sequence instead of a node
sequence, we can’t distinguish different nodes that have the same tile
coordinate.osmqa-parserassigns unique node IDs based on tile coordinate.
As a result, it’s possible we introduce false intersections which arise when
two ways have different nodes that have the same coordinates. Also, different
nodes that fall on the same tile coordinate will have identical node IDs,
which usually means their tags are merged together as one.Goes Great With[osmgraph](https://github.com/mapkin/osmgraph)[imposm](https://github.com/omniscale/imposm)[tile-reduce-py](https://github.com/jwass/tile-reduce-py)See Also[Mapbox Vector Tiles](https://www.mapbox.com/developers/vector-tiles/)[imposm-parser](https://github.com/omniscale/imposm-parser)
Package: osm-rawdata
OSM RawDataA python module for accessing OSM data in a postgres database.📖Documentation:https://hotosm.github.io/osm-rawdata/🖥️Source Code:https://github.com/hotosm/osm-rawdataThese is a module to work withOpenStreetMapdata using postgres and
a custom database schema. This code is derived from theHOT Export
Tool,osm-fieldwork, andUnderpass, and theRaw Data
API, which is the new FastAPI
backend for the HOT Export Tool.Since multiple projects need to do data extracts from OpenStreetMap in
a flexible way, this was designed to have a single body of code to
maintain.InstallationTo install osm-rawdata, you can use pip. Here are two options:Directly from the main branch:pip install git+https://github.com/hotosm/osm-rawdata.gitLatest on PyPi:pip install osm-rawdataUsing the Container Imageosm-rawdata scripts can be used via the pre-built container images.These images come with all dependencies bundled, so are simple to run.Run a specific command:dockerrun--rm-v$PWD:/dataghcr.io/hotosm/osm-rawdata:latestgeofabrik<flags>Run interactively (to use multiple commands):dockerrun--rm-it-v$PWD:/dataghcr.io/hotosm/osm-rawdata:latestNote: the output directory should always be /data/... to persist data.The Database SchemaThis project is heavily dependant on postgres and postgis. This schema
was optimized for data anaylsis more than display purposes. The
traditional schema use for OSM shows how it has evolved over the
years. Some tags are columns (usually empty), and others get put into
anhstoretagcolumn where they have to be accessed
directly. One big change in this datbase schema is all the tags are in
a single column, reducing the data size considerably, while also being
easier to query in a consistent manner. In the past a developer had to
keep track of what was a column, and what was in thetagscolumn,
which was inefficient.This schema has 4 tables, similar to the traditional ones. OSM data is
imported usingosm2pgsqlbut uses aluascript to create the custom
schema. This module's usage is all read-only, as Underpass can keep
the raw data updated every minute, and we just want to access that
data.Things get more interesting as this module supports both a local
database and a remote one. They use different query languages. To
simplify this, a configuration file is used, which then generates the
proper query syntax.The Config FileThis reads in two different formats that describe the eventualy SQL
query. The YAML format was originally used by Export Tool, but later
abandoned for a JSON format. The YAML format was adopted by the
osm-fieldwork project before this transistion happened, so uses an
enhanced version to define the queries.The JSON format is also supported, both parsing the config file and
also generating that query from a YAML config file.The Filesgeofabrik.pyThis is a simple utility to download a file from GeoGFabrik.config.pyThis class parses either then JSON or YAML config file formatted
files, and creates a data structure used later to generater the
database query.postgres.pyThis class handles working with the postgres database. It sets up the
connections, and handles processing the results from the queries.
Package: osmRoad
SummaryProcess OSM data with python 3. This project is mainly motivated byopenstreetmap.Dependenciesscipy,numpynetworkxInstallYou can installosmRoadviapip.pipinstallosmRoadUsagefrom osm import parser
from osm import roadparserload_parse_osm: returnbounds,nodes,waysload_parse_osmxy: different from above, returnnodeswith coodinatesroadextract_connectivity: return the adjecent matrixlil_matrix(without weights)extract_adj: return the adjecent list (without weights)extract_edges: return the edges (without weights)build_graph: return agraphinnetworkx(with weights)Exampleparsed_osm = parser.load_parse_osmxy(r"osm/Beijing.osm")
r = road.build_graph(parsed_osm)
print(nx.dijkstra_path(r, 296314321, 296314277))parsed_osm = parser.load_parse_osm(r"osm/Beijing.osm")
m = road.extract_adj(parsed_osm)
Package: osm-road-length
OSM Road LengthA tool to get the highway length from Open Street Maps of a region using Python.It supports any region size and shape.Installingpipinstallosm-road-lengthUsingImport Itimportosm_road_lengthGet length from geometryfromshapelyimportwktgeometry=wkt.loads('POLYGON((-43.2958811591311 -22.853167273541693,-43.30961406928735 -23.035275736044728,-43.115980036084224 -23.02010939749927,-43.157178766552974 -22.832917893834313,-43.2958811591311 -22.853167273541693))')length=osm_road_length.get(geometry)CreditsFree software: MIT licenseThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.5 (2020-04-22)Add simplify method0.1.0 (2020-04-21)First release on PyPI.
Package: osmRoad-nadfity
SummaryProcess OSM data with python 3. This project is mainly motivated byopenstreetmap.Dependenciesscipy,numpynetworkxInstallYou can installosmRoadviapip.pipinstallosmRoadUsagefrom osm import parser
from osm import roadparserload_parse_osm: returnbounds,nodes,waysload_parse_osmxy: different from above, returnnodeswith coodinatesroadextract_connectivity: return the adjecent matrixlil_matrix(without weights)extract_adj: return the adjecent list (without weights)extract_edges: return the edges (without weights)build_graph: return agraphinnetworkx(with weights)Exampleparsed_osm = parser.load_parse_osmxy(r"osm/Beijing.osm")
r = road.build_graph(parsed_osm)
print(nx.dijkstra_path(r, 296314321, 296314277))parsed_osm = parser.load_parse_osm(r"osm/Beijing.osm")
m = road.extract_adj(parsed_osm)
Package: osm-roads
OpenStreetMap RoadsThe package takes an openstreetmap pbf file and converts it to a geohash prefix based hdf5 file.
It provides an api to then do a fast map matching for any latitude, longitude that comes under the bounding box of the pbf file.Installationpip install osm-roadsImporting and loading the pbf filefrom osm_roads.osm_roads import OsmRoadsway_finder = OsmRoads()
way_finder.load_osm_pbf("bengaluru.pbf")Search for map matching with latitude and longitudeway_finder.get_road_type(12.934005898750094, 77.61075025215672)Saving the current PBF to a trieway_finder.export_trie('bangalore_updated.trie')Loading the trie from fileway_finder.load_trie('bangalore_updated.trie')How to get PBF files and slice themVisit theOpenStreetMap Wiki. The file used in the example is downloaded fromGeoFabrik, one of the mirrors of OSM and sliced using Osmium ToolInstall the Osmium Tool (works well in linux). sudo apt-get install -y osmium-toolRun "osmium extract -b 77.343833,13.159493,77.905509,12.830316 southern-zone-latest.osm.pbf -o bengaluru.pbf" (replace the bounding box lat,lons as per your need)
Package: osmsc
updated 21 Sep 2023The main contributions of OSMsc are reflected in the following aspects:
* Construct semantic city objects based on the public dataset (OpenStreetMap), apply geometric operations to build the incomplete objects, and store them in their respective data layers.
* Fuse 3D and tag information from multiple data sources through the spatial analysis between OSMsc layers and other non-OSM data layers.
* Supplement the spatial semantics and geometric properties to city objects through object layer analysis.
* Utilize each data layer as a unit to output the final CityJSON semantic objects### InstallationInstall from [PyPi](https://pypi.org/project/osmsc/)pip install osmscInstall from [Github](https://github.com/ruirzma/osmsc)git clone https://github.com/ruirzma/osmsc.gitcd osmsc/pip install .orpython setup.py install### Examples
[OSMsc demonstration notebooks](https://github.com/ruirzma/osmsc-examples)### ReferenceGeoff Boeing, OSMnx,https://github.com/gboeing/osmnxNick Bristow, OSMuf,https://github.com/AtelierLibre/osmufJoris Van den Bossche, GeoPandas,https://github.com/geopandas/geopandas
Package: osmsg
OpenStreetMap Stats GeneratorOn the Fly Commandline Stats Generator for OpenStreetMap User ContributionsI tweet stats Every day/week/month for Global/Region and #hotosm hashtag athttps://twitter.com/stats_osmand store themOSMSG Stats DirMonitored stats are available understats, Currently Bot monitors OSM as whole , hotosm hashtag , Nepal Country : weekly,monthly and yearly stats are stored in github and twitter.Usage:For installation & Local Setup followInstallationosmsg [-h] [--start_date START_DATE] [--end_date END_DATE] [--username USERNAME]
             [--password PASSWORD] [--timezone {Nepal,UTC}] [--name NAME]
             [--country COUNTRY [COUNTRY ...]] [--tags TAGS [TAGS ...]]
             [--hashtags HASHTAGS [HASHTAGS ...]] [--length LENGTH [LENGTH ...]] [--force]
             [--field_mappers] [--meta] [--tm_stats] [--rows ROWS] [--users USERS [USERS ...]]
             [--workers WORKERS] [--url URL [URL ...]] [--last_week] [--last_day] [--last_month]
             [--last_year] [--last_hour] [--days DAYS] [--charts] [--summary] [--exact_lookup]
             [--changeset] [--all_tags] [--temp]
             [--format {csv,json,excel,image,text} [{csv,json,excel,image,text} ...]]
             [--read_from_metadata READ_FROM_METADATA] [--boundary BOUNDARY] [--update]Options:Hit following command for listing out the option with their documentationosmsg --helpFeaturesIt is a python package that processes osm files live and produces stats on the flyIt can Generate Stats on Country Level for countries based on geofabrik urls . Countries are available inhereIt can also take any other server replication changefile to extract stats (Tested with Geofabrik and Planet Replication)Can Generate hashtag statisticsSupports multiple output formats , Visualize Automatic Stats Being GenaratedhereIt can create summary charts automatically along with stats , Visualize themhereCan generate stats for any custom timestamp provided{"name":"username","uid":uid,"changesets":1,"nodes.create":1071,"nodes.modify":2100,"nodes.delete":0,"ways.create":146,"ways.modify":69,"ways.delete":0,"relations.create":0,"relations.modify":1,"relations.delete":0,"building.create":138,"building.modify":11,"building.delete":0,"highway.create":5,"highway.modify":49,"highway.delete":0,"waterway.create":0,"waterway.modify":4,"waterway.delete":0,"amenity.create":0,"amenity.modify":3,"amenity.delete":0,"landuse.create":3,"landuse.modify":1,"landuse.delete":0,"natural.create":0,"natural.modify":3,"natural.delete":0,"total_map_changes":3387}Get Started :Extract Stat of last hour and visualize stats/chartsBy default replication is minute url.osmsg --last_hourWith Hashtags informationosmsg --last_hour --changesetLast week data with summary & all tags info and using day replicationosmsg --last_week --url day --summary --all_tagsFor More , FollowManualContributingContributions are always welcome! FollowContributing Guidelines& Go throughCode of ConductVersion ControlFollowVersion Control DocsRequest Stats Tracking on GithubFollowstats_request_docsVisualize stats with streamlitpipinstallstreamlit
streamlitrunstreamlit_app.py
Package: osmtags2rive
openstreetmap-tags-to-rivescriptConvert of openstreetmap/id-tagging-schema to RiveScript, the Artificial Intelligence Scripting Language (alternative to AIML)QuickstartExplains how to generate the RiveScriptsInstallNo pip release yet, install from GitHubpipinstallhttps://github.com/fititnt/openstreetmap-tags-to-rivescript/archive/main.zipFetch cache# Prepare the cache directorygitclonehttps://github.com/openstreetmap/id-tagging-schema.git./id-tagging-schemaGenerate RiveScriptosmtags2rive--language=pt>example/brain/osm-tagging_pt.rive
osmtags2rive--language=pt--reverse-index>example/brain/osm-tagging-reverse_pt.riveExtrasQuick example on how to use the generated RiveScriptsCheckRivescript website page for interpretersfor other programming languages.
They all have a similar interface:
allow you to deposit all files in a directory which is loaded by your interpreter.Python exampleUsing Rive Python interpreter fromhttps://github.com/aichaos/rivescript-python# install the scriptpipinstallrivescript

pythonshell.py# file shell.pyfromrivescriptimportRiveScript# bot = RiveScript(utf8=True)bot=RiveScript()bot.load_directory("./example/brain")bot.sort_replies()whileTrue:msg=input('You> ')ifmsg=='/quit':quit()reply=bot.reply("localuser",msg)print('Bot>',reply)DisclaimersOpenStreetMap™ is a trademark of the OpenStreetMap Foundation, and is used with their permission.
This project is not endorsed by or affiliated with the OpenStreetMap Foundation. (viaOSMF Trademark_Policy)LicensePublic domain