Saravanan666/pypi-org huggingface dataset:
Package: mappyfile-colors
Amappyfileplugin to standardise and convert colors used in a Mapfile.
Features include:conversion between RGB and HEX colorsharmonise all colors in a Mapfile to either RGB or hex valuesaddhuman readable colornames as commentsadd color names to RGB color ranges as comments (not currently possible for HEX color ranges)Python2 and 3 compatibleSeeexample.mapandrainbow_classes.txtfor the Mapfile to generate the above image.Installationpip install mappyfile-colorsNote installing themappyfile-colorsplugin will automatically install the following
dependencies:mappyfilewebcolorsOnline DemoGo to the online mappyfile demo athttp://mappyfile.geographika.net/Select the “Rainbow colors” mapOpen “Settings”, themappyfile-colors Plugin Settingssection allows conversion to RGB and HEX, and to include
color names as comments in the Mapfile outputClick the Format buttonUsageTo use the colors plugin, import, and then pass in a customColorsTransformer.
Two additional parameters can also be passed to themappyfile.loadsfunction:include_color_names- set to True to add color names as comments (default is False)conversion_type- a parameter to convert colors within a Mapfile, either importConversionTypeor use an integer value
to set the conversion:NO_CONVERSION=0TO_RGB=1TO_HEX=2A sample script to convert RGB to HEX colors, and include the color names is shown below.importmappyfilefrommappyfile.pluginsimportmappyfile_colorsfrommappyfile_colorsimportColorsTransformer,ConversionTypes="""
CLASS
    STYLE
        COLOR 184 134 11
        OUTLINECOLOR 0 0 255
        WIDTH 3
    END
END
"""d=mappyfile.loads(s,include_color_names=True,transformerClass=ColorsTransformer,conversion_type=ConversionType.TO_HEX)print(mappyfile.dumps(d))This will output the following:CLASS
    STYLECOLOR"#b8860b"# darkgoldenrod
        OUTLINECOLOR"#0000ff"# blue
        WIDTH 3
    END
ENDSee thetest_plugin.pyfor further examples.Color FactoryThe plugin also includes aColorFactoryclass to return unique colors from color palettes. This can be useful for
generating MapServer classes based on unique values. Basic usage is shown below:color_factory=mappyfile_colors.ColorFactory()print(color_factory.palette_names)clrs=color_factory.get_colors(palette_name="maximum_contrast")# returns an iteratorprint(next(clrs))AuthorSeth Girvin@geographika
Package: mappyfile-geojson
Amappyfileplugin to convert GeoJSON to
inlineMapfile features. Useful for adding
dynamically created features (from web services, user created features, and other external
data sources) to a map, or to quickly visualise a geometry.Note - to display entire GeoJSON files MapServer
can be configured to read GeoJSON as an inputOGR sourceusing theGeoJSON driver.importgeojsonimportmappyfile# import directlyimportmappyfile_geojson# can also be imported as plugin usingfrommappyfile.pluginsimportmappyfile_geojsongj=geojson.load(fn)l=mappyfile_geojson.convert(gj)print(mappyfile.dumps(l))Converts the following JSON:{"type":"Feature","geometry":{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]},"properties":{"prop0":"value0","prop1":0.0}}to the following MapfileLAYER:LAYER
    EXTENT 102 0 105 1
    STATUS ON
    TYPE LINE
    PROCESSING "ITEMS=prop0,prop1"
    FEATURE
        ITEMS "value0;0.0"
        POINTS
            102.0 0.0
            103.0 1.0
            104.0 0.0
            105.0 1.0
        END
    END
ENDDemoAn example of using the plugin withmappyfilecan be found inexample.pyalong with anexample.map.A further example, creating images for each of the test cases usingmapscriptis available atcreate_images.py.The sample output images are in theimagesfolder.RequirementsPython 3.8+mappyfile (the plugin can be used on its own but will create a dictionary object
structured to use within mappyfile). Installing mappyfile should be done separately.InstallationNote installing themappyfile-geojsonplugin will automatically install the required dependencygeojson.pip install mappyfile
pip install mappyfile-geojsonNotesCan calculate extent of input features, with an optional buffer (by passing anextent_bufferto theconvertfunction)Multipart features are supportedCoordinate sequences with Z values are supported, but Z values are ignored as they are not supported in
Mapserver inline features.As a MapServerLAYERonly supports a single geometry type, all features in the GeoJSON file should also
be of the same type (however a mix of multipart and non-multipart features is supported e.g. LineString and MultiLineString)Nested JSON properties are not supported:"properties":{"prop0":"value0","prop1":{"this":"that"}}Will become:ITEMS "value0;{u'this': u'that'}"Releases1.0 (02/10/2023)Drop support for Python 2.7Update of GeoJSON and mappyfile dependenciesCode reformatted usingblack0.4 (09/02/2020)Automated Windows testingAutomated release processSetgeojsondependency versionFix failing tests due to precision issue differences between py2 and py3Use integers for layerEXTENTwhere possible e.g. 5 instead of 5.00.3 (29/08/2018)Add support for MultiPoint, MultiLineString, and MultiPolygonAllow coordinates with Z values (previously these would crash the script)Updated README0.2 (15/02/2018)Unicode support0.1 (06/02/2018)Initial releaseAuthorSeth Girvin@geographika
Package: mappymatch
mappymatchMappymatch is a pure-python package developed and open sourced by the National Renewable Energy Laboratory. It contains a collection of "Matchers" that enable matching a GPS trace (series of GPS coordinates) to a map.The current and planned Matchers are:LCSSMatcher: A matcher that implements the LCSS algorithm described in thispaper. Works best with high resolution GPS traces.OsrmMatcher: A light matcher that pings an OSRM server to request map matching results. See theofficial documentationfor more info.ValhallaMatcher: A matcher to ping aValhallaserver for map matching results.Currently supported map formats are:Open Street MapsInstallationpip install mappymatchIf you have trouble with that, check outthe docsfor more detailed install instructions.Example UsageThe current primary workflow is to useosmnxto download a road network and match it using theLCSSMatcher.TheLCSSMatcherimplements the map matching algorithm described in this paper:Zhu, Lei, Jacob R. Holden, and Jeffrey D. Gonder.
"Trajectory Segmentation Map-Matching Approach for Large-Scale, High-Resolution GPS Data."
Transportation Research Record: Journal of the Transportation Research Board 2645 (2017): 67-75.usage:frommappymatchimportpackage_rootfrommappymatch.constructs.geofenceimportGeofencefrommappymatch.constructs.traceimportTracefrommappymatch.maps.nx.nx_mapimportNxMapfrommappymatch.matchers.lcss.lcssimportLCSSMatchertrace=Trace.from_csv(package_root()/"resources/traces/sample_trace_1.csv")# generate a geofence polygon that surrounds the trace; units are in meters;# this is used to query OSM for a small map that we can match togeofence=Geofence.from_trace(trace,padding=1e3)# uses osmnx to pull a networkx map from the OSM databasenx_map=NxMap.from_geofence(geofence)matcher=LCSSMatcher(nx_map)matches=matcher.match_trace(trace)# convert the matches to a dataframedf=matches.matches_to_dataframe()Example NotebooksExample JupyterLab notebooks making use of mappymatch can be found in themappymatch examples repository.
Package: mapq
Interacting with the Mapquest Geocoding API should be easy.>>> import mapq>>> mapq.key('my_api_key')>>> mapq.address('155 9th St San Francisco, CA')
[{'lots': {'of': 'results'}}, ...]>>> mapq.batch('94103', '1 Infinity Loop Cupertino', 'Yerba Buena Park')
[{'multiple': 'locations'}, ...]>>> mapq.geocode('155 9th St San Francisco, CA')
{'single': {'geocode': 'result'}}>>> mapq.reverse(37.775002, -122.418297)
{'looks': {'like': '155 9th St'}}>>> mapq.latlng('155 9th St San Francisco, CA')
{'lat': 37.775002, 'lng': -122.418297}
Package: ma-praline
Motif-Aware PRALINE (MA-PRALINE)A motif-aware multiple sequence alignment tool. An article accompanying this software has been published in PLOS Computational Biologyhere.Installing MA-PRALINERequirementsPython 2.7 / Python 3.6 (earlier 3.x versions may also work, but have not been tested)An installation of PRALINE (https://github.com/ibivu/PRALINE)InstructionsYou can install MA-PRALINE by cloning this repository and running (in a shell):python setup.py installMA-PRALINE is also available on PyPI. You can install it with the following command:pip install ma-pralineExtrasThere is an additional repository athttps://github.com/ibivu/MA-PRALINE-extrascontaining
auxiliary code that was used to perform various analyses while developing MA-PRALINE.
Although no support is provided for this code, some people may find it useful to, e.g.
reparameterise MA-PRALINE or to calculate motif statistics.
Package: mapreduce-py
A Multi-processing based single-host MapReduce FrameworkThis is a simple mapreduce framework.Sample programfrommapreduceimport*frommathimportceil,sqrtdefmapper_2(item):return(item+5)*23-1defreducer_2(accumulated,item):returnaccumulated+itemdefis_prime(n):foriinrange(2,ceil(sqrt(n))):ifn%i==0:returnFalsereturnTrueif__name__=="__main__":N=150000print('* map & reduce ')mr=MapReducer().prefilter(is_prime).mapper(mapper_2).reducer(reducer_2,0)result=mr(range(N))print('  MR Result  :',result)n=sum([(n+5)*23-1forninrange(N)ifis_prime(n)])print('  Validation:',n)History0.5.1update examplesoptimize export & imports0.5.0process speed optimized0.1.0First release
Package: maprouletteupload
# maprouletteuploadSimply upload a GeoJSON file of tasks to [Maproulette](http://maproulette.org/).## Installation```pip install git+git://github.com/ebrelsford/maprouletteupload.git```## UsageUse via the command line:```Usage: maprouletteupload [OPTIONS]Upload a GeoJSON file of tasks to Maproulette.Options:--api-key TEXT          Your API key, via Maproulette.--challenge-id INTEGER  The challenge ID these tasks should be added to.--geojson-file TEXT     A GeoJSON file of tasks to upload. Alternatively,you can provide this file via stdin.--identifier TEXT       The name of the property to use as the identifier.Default: "identifier".--instruction TEXT      The name of the property to use as the instruction.Default: "instruction".--name TEXT             The name of the property to use as the name.Default: "name".--version               Show the version and exit.--help                  Show this message and exit.```A task is made for each GeoJSON feature and the tasks are bulk uploaded to Maproulette.## LicenseMIT.
Package: maprule
Maprulevalue validating libraryInstallationpython-mpipinstall-UmapruleUpdatev0.2.0: added error trackingUsagefrommapruleimportfieldsfields.Boolean().compare(True)fields.Integer().compare(0)fields.Integer(maximum=0).compare(1)fields.String(min_length=3).compare("he")fields.Dictionary(dict(name=fields.String(min_length=3),age=fields.Integer(minimum=0))).compare(dict(name="rubbie",age=19))fields.Array(fields.String(min_length=3)).compare(["rubbie","kelvin"])
Package: mapsadam
ADAM is a graphical audio and video capture tool for recording the MAPS
sponsored MDMA-assisted psychotherapy sessions in their Phase 3 clinical trials.
Its goal is to steamline the process of recording and transfer of recorded
clinical therapy sessions.InstallationThis package should be installed on a ADAM Raspian image usingpip.sudo pip3 install mapsadamContact ‘me <john@mapsbcorp.com>’_  for the image file.
Package: mapscaler
MapScalerScale areas of a geopandas map by any property (such as population) - without the shapes overlapping - to create more intuitive and beautiful choropleth visualizations.Official DocumentationQuick Start:Suppose you have a GeoPandas Dataframedf, including a columnscalebythat is a float column indicating how much each sample should grow or shrink to reflect each location's respective population. The goal is for the area of each location to visually portray it's contribution to the entire map for your chosen variable (population, in this example).importmapscalerasmsss=ms.ShapeScaler()scaled_df=ss.scale_map(df,'scaleby')The above code returns a new GeoPandas dataframe with an updated geometry column, with each shape's area having been scaled (up or down) to reflect its respective scalar.Similarly, all shapes can be converted to circles before scaling by using the BubbleScaler:importmapscalerasmsbs=ms.BubbleScaler()scaled_df=bs.scale_map(df,'scaleby')More realistically, you may need to tweak a few arguments to get an ideal map, depending on the distribution of your initial areas and the distribution of your scalars. Seethe documentationfor full examples.
Package: mapsci
MAPSCIMAPSCI: Multipole Approach of Predicting and Scaling Cross InteractionsWARNING!This package is not ready for distribution.What is this?MAPSCI is an importable package that can be used to estimate cross-interaction parameters for the Mie potential using multipole moments. This is useful for the SAFT-𝛾-Mie equation of state, as well as Molecular Dynamics and Monte Carlo simulation methods.How do I use it?Once installed, you can:Import the package and use it in a python script. Note that the parameters are temperature dependent.This package can be used as a plug-in for our equation of state package,DESPASITO. You won't need to worry about temperature dependence in this case, it'll be taken care of internally.
Check out ourdocumentationfor more information.InstallationInstall using pip withpip install mapsciAlternatively, download the master branch from our github page as a zip file, or clone it with git viagit clone https://github.com/jaclark5/mapsciin your working directory. Install MAPSCI locally from the working directory withpython setup.py install --user.CopyrightCopyright (c) 2020, Jennifer A ClarkAcknowledgementsProject based on theComputational Molecular Science Python Cookiecutterversion 1.3.
Package: maps-cli
Maps CLIA simple command line tool to access services of various map services providers.UsageInstallationUsing conda:$condainstall-cconda-forgemaps-cliUsing pip:$pipinstallmaps-cliTest Suite$poetryinstall
$pytest-v--durations=10--cov=mapstestsCommands$maps-h
$mapsshow
$mapsosm-h
$mapshere-h
$mapsmapbox-h
$mapstomtom-hMaps Service ProvidersCurrently, this library is supporting following providers.OSMHEREMapBoxTomTomORS
Package: mapscookiegettercli
A tool to retreive the cookies from a google authentication process towards the google maps service to be used with locationsharinglib.Documentation:https://mapscookiegettercli.readthedocs.org/en/latestDevelopment WorkflowThe workflow supports the following stepslinttestbuilddocumentuploadgraphThese actions are supported out of the box by the corresponding scripts under _CI/scripts directory with sane defaults based on best practices.
Sourcing setup_aliases.ps1 for windows powershell or setup_aliases.sh in bash on Mac or Linux will provide with handy aliases for the shell of all those commands prepended with an underscore.The bootstrap script creates a .venv directory inside the project directory hosting the virtual environment. It uses pipenv for that.
It is called by all other scripts before they do anything. So one could simple start by calling _lint and that would set up everything before it tried to actually lint the projectOnce the code is ready to be delivered the _tag script should be called accepting one of three arguments, patch, minor, major following the semantic versioning scheme.
So for the initial delivery one would call$ _tag –minorwhich would bump the version of the project to 0.1.0 tag it in git and do a push and also ask for the change and automagically update HISTORY.rst with the version and the change provided.So the full workflow after git is initialized is:repeat as necessary (of course it could be test - code - lint :) )
* code
* lint
* testcommit and pushdevelop more through the code-lint-test cycletag (with the appropriate argument)buildupload (if you want to host your package in pypi)document (of course this could be run at any point)Important InformationThis template is based on pipenv. In order to be compatible with requirements.txt so the actual created package can be used by any part of the existing python ecosystem some hacks were needed.
So when building a package out of thisdo notsimple call$ python setup.py sdist bdist_eggas this will produce an unusable artifact with files missing.Instead use the provided build and upload scripts that create all the necessary files in the artifact.Project FeaturesSuccessfully detects and uses Firefox and Chrome in Mac (latest version tested), Linux (Ubuntu 18.04 with budgie desktop tested) and Windows 7Todo:Test Internet explorer and Edge on Windows and test windows 8 and 10.Extend error handling for all environments.History0.0.1 (04-03-2019)First code creation0.1.0 (25-03-2019)Initial implementation working for firefox and chrome tested lightly on Mac, Ubuntu 18.04 and Windows 70.1.1 (28-03-2019)Removed fstring instance so python3.7 is not a hard requirement0.2.0 (16-06-2019)Initial release, enforced en locale for worldwide compatibility contributed by “https://github.com/Protonex”
Package: mapshader
Simple Python GIS Web ServicesCreatemapshader.MapSourceobjects and render them as geojson, tiles, or imagesThis project should still be considered experimentalpipinstallmapshaderSetup Mapshader Conda Environmentcondacreate-nmapshaderpython=3.8
condaactivatemapshader
gitclonegit@github.com:makepath/mapshader.gitcdmapshader
pipinstall-e.Run Testscondaactivatemapshader
pytestmapshader/tests-svRun Flask Servercondaactivatemapshader
mapshaderserve

>>>*ServingFlaskapp"flask_app"(lazyloading)>>>*Environment:production
>>>WARNING:Thisisadevelopmentserver.Donotuseitinaproductiondeployment.
>>>UseaproductionWSGIserverinstead.
>>>*Debugmode:on
>>>*Runningonhttp://0.0.0.0:5000/(PressCTRL+Ctoquit)>>>*RestartingwithstatMapshader Config (YAML)While mapshader comes with default services to help with testing, users can create their own services
via YAML.my_services.yaml---

metadata:version:1sources:-name:GlobalElevationExamplekey:elevation-exampletext:Elevationdescription:Globalelevationexamplegeometry_type:rastershade_how:linearcmap:-white-blackspan:-58-248raster_padding:0raster_interpolate:linearxfield:geometryyfield:geometryfilepath:mapshader/tests/fixtures/elevation.tiftransforms:-name:squeezeargs:dim:band-name:castargs:dtype:float64-name:orient_array-name:flip_coordsargs:dim:y-name:reproject_rasterargs:epsg:3857service_types:-tileThis configuration file can then be passed to the flask server upon startup:condaactivatemapshader
mapshaderservemy_services.yaml

>>>*ServingFlaskapp"flask_app"(lazyloading)>>>*Environment:production
>>>WARNING:Thisisadevelopmentserver.Donotuseitinaproductiondeployment.
>>>UseaproductionWSGIserverinstead.
>>>*Debugmode:on
>>>*Runningonhttp://0.0.0.0:5000/(PressCTRL+Ctoquit)>>>*Restartingwithstat
Package: mapsipy
MVVM UI Framework for Python and BrythonInstallusing pip(stable)pip3installmapsipyusing git(dev)pip3installhttps://github.com/eseunghwan/pyvuejs.gitUsagecreate project with climapsipy-cliinit[dest]run with servermapsipy-cliservebuild project file to standalone .html and .jsmapsipy-clibuild[dest]TODO[ ] classified virtual dom[ ] classified viewmodelHistory2021.04.20init releasemvvm skeleton completed2021.04.21bug fix on init projectdo not remove directory anymorebug fix on package installtemplate files now include2021.04.22conditions(if, elif, else) includeloop(for) includepost1change mapsi(brython) package from single file to module directorydelete mapsi directory when buildpost2change render order of views/components/Appnow components inside App render welladdcontenttag to componentchildNodes of component will be placedpost3bug fixesexclude style tags from component value formatting
Package: mapsmx
mapsmxCreate maps of Mexico easily with python.How to installpip install mapsmxHow to useState geometries.state=MapsMX().get_geo('state')State geometries with centroids.state_w_centroids=MapsMX().get_geo('state',add_centroids=True)Municipality geometries.muns=MapsMX().get_geo('municipality')Municipality geometries with centroids.muns_w_centroids=MapsMX().get_geo('municipality',add_centroids=True)Datashp files downloaded fromhttps://www.inegi.org.mx/temas/mg/default.html#Descargas.
Package: mapstery
# MapsteryDigital terrain map manipulation library.High level scripts to convert, transform, manipulate small and large imageryusing GDAL in python to cover part of the needs of the NASA/ESA FrontierDevelopment Lab with respect to Space Resources challenges.## Quick install```pip install mapstery```For developers, you might like to install the last version from git. So if you'vecloned _Mapstery_ in a folder called `mapstery_repo` then you could do the following:`pip install mapstery_repo/`NB: Make sure the gdal python package version correspond to the system gdal library.If you have GDAL python installation problems you may have to match versions betweengdal system libraries and gdal python package, one way or another.## Quick start```import mapsteryimport numpy as npM = mapstery.Map(500, 500)M.add_band(np.ones((35,50))*128.0, "BAND_NAME_01")M.add_band(np.ones((80,150))*89.0, "BAND_NAME_02")M.save("/tmp/mastery_test0.gtif")```## Another example, combining layers```import mapsteryimport numpy as npM = mapstery.Map(500, 500)M.dataset='layers.json'M.save("/tmp/testjson.gtif")```## Json file example: layers.json```{"BNAME":"LRO1.png","BNAME2":"LRO2.png"}# BNAME - BAND NAME# LRO1.png - file path```## Dev infosYou can write your own scripts in `tests/` starting with the *dev_* prefix so that they are ignored by git.
Package: mapstp
ContentsDescriptionProblem #1Problem #2SolutionInstallationDocumentationContributingDescriptionProblem #1You are an MCNP model developer. You have created simplified 3D CAD model using SpaceClaim, saved it to STP file, then converted
it using SuperMC to an MCNP model. At this moment the MCNP model doesn’t have any information on relation of the MCNP
came from cells to the CAD components, there’s no materials and densities in the cell specifications.
The SuperMC (for the time of writing this) doesn’t transfer this information on exporting to MCNP model.Problem #2You have to provide results of neutron analysis in correspondence with 3D CAD model
components. For example, you have to create a table describing activation of every component.
To do this, you need some tools to associate CAD component with corresponding MCNP cells.
Using this table the results of computation for MCNP cells can be aggregated to values for
corresponding CAD component.SolutionUsing SpaceClaim you can add additional properties to components directly in STP file.
The properties include: used material, density correction factor, classification tag.
The properties are specified as a special label, which you can add to the components names.
The properties are propagated over the CAD tree hierarchy from top to down and can be overridden
on lower levels with more specific values. Using SpaceClaim for this is rather intuitive.The usingmapstpyou can transfer this information from STP to MCNP:
Themapstp:sets material numbers and densities in all the cells, where it was specifiedadds $-comment after each cell denoting its path in STP, with tag “stp:”,this lines can be easily removed later, if not neededadds materials specifications, if they are available formapstpcreates separate accompanying excel file with list of cells, applied materials, densities and correction factors, classification tag, and paths in STPInstallationDocumentationContributing