Saravanan666/pypi-org huggingface dataset:
Package: mapped-enum
mapped-enumEnums that can easily map to and from arbitrary values of another type.SummaryThere are many cases in Python where you want to asscociate anEnumclass with more meaningful values than
the default integers fromauto(). Python allows assignment of anything as a value of an enum member, but there is still no indication of what that value represents.
When accessing tuple values, one can only refer to each tuple member by its index, creating further ambiguity.mapped-enumseeks to solve that problem by dynamically populating the enum keys with custom value names. For example,
you can have aDaysOfWeekenum with fieldsindex,short_name, andfull_name. When that enum is mapped using this module,
accessing those values becomes as simple as:>>> DaysOfWeek.MONDAY.to_short_name()
'mon'
>>> DaysOfWeek.TUESDAY.to_index()
1
>>> DaysOfWeek.FRIDAY.to_full_name()
'Friday'Mapping in the other direction is just as easy:>>> DaysOfWeek.from_short_name('mon')
<DaysOfWeek.MONDAY: (0, 'mon', 'Monday')>UsageThis module provides theenum_mapfunction, which is to be used as an annotation on a class inherting fromEnum. The annotation takes one required argumentkeys, an array of strings representing the names of the fields to
generate.  The value of each enum member should be a tuple, with the data arranged such that each tuple member corresponds
to a string name from the annotation argument.For each key specified in thekeysparameter, a method calledto_<key>and a class method calledfrom_<key>will be added to the enum. These convert to and from the enum values at the index of the keyword.Generated methodsto_<key>is called on an enum member and takes no arguments. It returns the indexed member of the enum value tuple
corresponding to the index of thekeyword.from_<key>is called directly on the enum class. It takes a single argument, the value to search for enum members
with the value index corresponding to the index of thekeyword. If there is no enum member that satisfies the
requested value, it will returnNone.Optional argumentsThe annotation can take a number of optional arguments to modify its behavior.Parameter nameTypePurposeto_prefixstrAn alternative prefix for the conversion methods instead ofto_.from_prefixstrAn alternative prefix for the lookup methods instead offrom_.allow_overrideboolIf True, if the enum defines methods with the same name as a possibleenum_mapmethod, theenum_mapmethod will be silently overridden. Otherwise, an error will be thrown.multiple_fromboolIf True, calls to afrom_method with multiple members matching the search term will return all of those members; consequently, such a call with no matching members will return an empty list. If False, then calls to afrom_method will return the first matching term, or None if no match is found.
Package: mapper
See the project home pagehttp://danifold.net/mapperfor a detailed description and documentation.This package features both a GUI and a Python package for custom scripts. The
Python package itself works with Python 2 and 3. The GUI, however, depends on
wxPython, which is available for Python 2 only. Therefore, the setup script will
install the GUI only if it is executed by Python 2.See alsohttps://pypi.python.org/pypi/cmappertoolsfor the companion package with fast C++ algorithms.The authors of Python mapper areDaniel MüllnerandAravindakshan Babu. (PyPI apparently suppresses everything but the first name in the “author” field, hence only one author is displayed below.)
Package: mapper-parser
DescriptionMybatis mapper xml file parser in pure python, get result contains:namespaceresultMaps: contains start_line, end_line, contentsqls: contains start_line, end_line, contentstatements: select/update/insert/delete statement, contains:start_line, end_line, content, statement_tag, result_map, include_sqlInstallationpip install mapper-parserInstructionsfrom mapper_parser import mapper_parser

mapper_parser.parse(xml_filepath)
Package: mapperr
mapperr - mapping across dictionary and class object, recursivelyIf you are using python for implementing protocols, cache management, nosql or sql database manupilation with  the object oriented concepts in your code, mapperr can handle your object in your way, easily.Installationvia pippip3installmapperrvia direct setuppip3installsetuptools
python3setup.pysdistbdist_wheel
pip3installdist/mapperr-0.0.1-py3-none-any.whlUsageYour classes' attributes are needed to be annotated with their types likeint,str,Book,List[Book]. Parameterized constructors are not suitable, you can use it with plain objects which has most trash work. You can also fill your required options with paramop_requiredas string list.to_obj( dict_data: dict, destination_class: Type ) -> objectto_dict( obj: object ) -> dictfromtypingimportListfrompprintimportpprintfrommapperrimportto_dict,to_objclassBook:_id:inttitle:strop_required:list=['_id','title']classBookShelf:code:strbooks:List[Book]classLibrary:name:strbook_shelfs:List[BookShelf]defretrieve_library_from_the_source()->dict:return{"name":"Hogwarts Library","book_shelfs":[{"code":"A1","books":[{"_id":0,"title":"Defence Against the Dark Arts"},{"_id":1,"title":"Potions"},]},{"code":"A2","books":[{"_id":3,"title":"Charms"},{"_id":4,"title":"Herbology"},]}]}defsend_library_to_the_source(data:dict):pprint(data)lib:Library=to_obj(retrieve_library_from_the_source(),Library)new_book=Book()new_book._id=5new_book.title="Alchemy"lib.book_shelfs[0].books.append(new_book)send_library_to_the_source(to_dict(lib))You can add yourrecursivetype definitions into your class by using string variables and you can also usesuperclasses.classPerson:name:stridentity:intage:intmother:'Person'father:'Person'friends:List['Person']classEmployee(Person):company_name:str
Package: mappet
mappetMappethas been created to enable an easy an intuitive way to work with XML
structures in Python code.A well knownlxmlmodule has been used under the hood, mainly due to XML parsing performance.Mappet accepts a string with valid XML, anlxml.etree._Elementobject or a dict
representing the XML tree.>>> import mappet
>>> f = open('example.xml', 'r')
>>> m = mappet.Mappet(f.read())As an example, an XML document of the following structure has been used:<?xml version='1.0' encoding='iso-8859-2'?><a-message><head><idseq="20"tstamp="2015-07-13T10:55:25+02:00"/><initiator>MrSender</initiator><date>2015-07-13T10:56:05.597420+02:00</date><type>reply-type</type></head><auth><userfirst-name="Name"last-name="LastName">id</user></auth><status><result>OK</result></status><reply><cars><Car><id>12345</id><Manufacturer>BMW</Manufacturer><Model_Name>X6</Model_Name><Body>SUV</Body><Fuel>Diesel</Fuel><Doors>5</Doors><ccm>3000</ccm><HP>256</HP><TransType>Automatic</TransType><seats>5</seats><weight>3690</weight></Car><Car><id>54321</id><Manufacturer>BMW</Manufacturer><Model_Name>X1</Model_Name><Body>SUV</Body><Fuel>Diesel</Fuel><Doors>5</Doors><ccm>3000</ccm><HP>198</HP><TransType>Automatic</TransType><seats>5</seats><weight>2890</weight></Car></cars></reply></a-message>ConventionsEvery XML node can be accessed in two ways: by attribute and item access.Dictionary access:Dictionary access is possible thanks to XML document being represented as a
Python dictionary. Conversion of values is done explicitly.By default, values are returned asstr.>>> m['reply']['cars']['Car'][0]['Manufacturer']
'BMW'Nodes’ names are case-sensitive.Attribute access:Due to restrictions in Python variable names, tag names are normalized for attribute access.
Tag names are normalized to lowercase and hyphens to underlines.Same example using attribute access (__repr__ is responsible for representing the tag):>>> m.reply.cars.car[0].manufacturer
BMWTo get a string representation useget().>>> m.reply.cars.car[0].manufacturer.get()
'BMW'get()has two parameters,defaultandcallback. The first one is returned when then node’s value is empty, the
second is a function to be called upon the returned value.>>> m.reply.cars.car[0].ccm.get(callback=int)
3000Alternatively, one can use built-in helper functions, defined in helpers.py>>> m.reply.cars.car[0].ccm.to_int()
3000Helper functionsto_boolto_intto_strto_stringto_floatto_timeto_datetimeto_date
Package: mappi
mappiInstallation$pipinstallmappi
$mappi# run server with example configurationUsage# generate minimal config file$mappiconfig>mappi.yml# adjust routes as needed or create your own config$vimmappi.yml# dump configuration with all the options available to a file$mappiconfig--full>mappi.yml# start your webserver$mappi# start server with configuration stored in different filename$mappi--configmy-config-file.ymlContributingSeeDEVELOP.mdfor the development setup and contributing guide.
Package: mappie
mappie(gotmax23/mappie)(gotmax23/mappie-dev)Collections, frozen mappings, and moreLinksmappie project hubmappie git.sr.ht repomappie trackermappie mailing list(~gotmax/mappie@lists.sr.ht)ContributingSeeCONTRIBUTING.md.LicenseThis repository is licensed underSPDX-License-Identifer: MIT
Package: mapping
mappingprovides functionality for mapping to and from generic exposures and
tradeable instruments for financial assets.An example of this might be on 2016-12-01 we would haveCL1 -> CLZ16, i.e.
the first generic for Crude oil on the above date corresponds to trading the
December 2016 contract.The main features ofmappinginclude:creating continuous return series for Futures instrumentscreating time series of percentage allocations to tradeable contractscreating instrument trade lists
Package: mappings-utility
An SDMX mapping utility to generate partial key maps for referential metadata.
Although not designed to do that, data mappings are also possible.
The package is structured in such a way that it can be used as a package without the FASTAPI overhead.Three methods are available:map_withFileGET method (receiving the mapping source and mapping rules both as file references)map_withURNGET method (receiving the mapping source  as file and the mapping rules as SDMX registry endpoint + mapping ID)map_json_withURNPOST method (receiving the mapping source as the body of the request in json - pandas dataframe dictionary style - and mapping rules as SDMX registry endpoint + mapping ID) (added in version 0.1.1)A typical usage example in package mode:frommappings_utility.sdmx_mapping_utilityimportSDMXMappingUtilitymf=Path('to-mapping-artefacts.xml')sf=Path('to-file-to-be-mapped.csv')mu=SDMXMappingUtility.initialise_with_file(mf,sf,sid_based=False)df=mu.generate_mappings_partial_keys(includeSourceColumns=False,includeAttributesMeasures=False,nulledFixedTargets=True,writeTargetStructInfo=False,dropInvalid=False,sid_based=False)df.to_csv(Path('mapped-file.csv'),index=False)The parameters fine-tune the output file:includeSourceColumns: True/False; when set to True the resulting file would include the fields of the source csv fileincludeAttributesMeasures: True/False; when True it will include the attribute columns and obs_value, otherwise it will suppress those from the output (this is needed for referential metadata partial key mappings)nulledFixedTargets: True/False, when True fixed values in the target mapping will be set to Null, also a partial-key mapping motivated featurewriteTargetStructInfo: True/False, when True it adds or maps columns necessary for the output to be SDMX-CSV compliantdropInvalid: True/False, when set to True the output only contains valid mappings (although validity checks are lazy), invalid rows are ommitted; with False the returned dataframe will contain cells with a special string highlighting the positions where the target value could not be determinedsid_based: True/False, when set to True the resulting file will contain a Series ID (SID) field with the dimensions of the target data model dot-concatenatedChangelog:Version 0.2.3
Introduced validation for implicit maps (target codes are checked whether they are in the referenced codelist - constraints are not yet taken into account)Version 0.2.4
Bug-fix for regex substitution (previously substitutions with more than one substitution failed)Version 0.2.5Attributes scaffolding for future features (validates coded attributes)Bug-fix for optional attributes missing when all values are null
Package: mapping-to-namedtuple
Convertor of Python Mappings to namedtuplesThis project contains a function that converts a Python Mapping or dict to a namedtuple.
The conversion works recursively and the input can contain other mappings or lists.Usagefrommapping_to_namedtupleimportmapping_to_named_tuplemapping={"a":"b","c":"d","e":[1,2]}namedtuple=mapping_to_named_tuple(mapping,"test_tuple")
Package: mapply
mapplymapplyprovides a sensible multi-core apply function for Pandas.mapply vs. pandarallel vs. swifterWherepandarallelrelies on in-house multiprocessing and progressbars, and hard-codes 1 chunk per worker (which will cause idle CPUs when one chunk happens to be more expensive than the others),swifterrelies on the heavydaskframework for multiprocessing (converting to Dask DataFrames and back). In an attempt to find the golden mean,mapplyis highly customizable and remains lightweight, usingtqdmfor progressbars and leveraging the powerfulpathosframework, which shadows Python's built-in multiprocessing module usingdillfor universal pickling.InstallationThis pure-Python, OS independent package is available onPyPI:$pipinstallmapplyUsageFor documentation, seemapply.readthedocs.io.importpandasaspdimportmapplymapply.init(n_workers=-1,chunk_size=100,max_chunks_per_worker=8,progressbar=False)df=pd.DataFrame({"A":list(range(100))})# avoid unnecessary multiprocessing:# due to chunk_size=100, this will act as regular apply.# set chunk_size=1 to skip this check and let max_chunks_per_worker decide.df["squared"]=df.A.mapply(lambdax:x**2)DevelopmentRunmake helpfor options like installing for development, linting, testing, and building docs.BSD 3-Clause LicenseCopyright (c) 2024, ddelange,ddelange@delange.devAll rights reserved.Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.SPDX-License-Identifier: BSD-3-Clause
Package: map-poster-creator
Map Poster CreatorMap Poster Creator- script for creating beautiful road maps of any cities, zones, sections according to OSM data.
You can add green areas, roads, rivers, ponds, lakes to the map.
There are several ready-made color schemes, but you can easily add your own colors.The project is provided as-is.Valriable ColorswhiteblackcoralInstall:pip install map-poster-creatorDepsLinuxapt-get install libgeos-devWindowsthanksLamroy95for Windows instructionManually download and install two python packages (GDAL and Fiona):DownloadGDAL .whl filefor your version of python (Python 3.8 - ...cp38....whl)DownloadFiona .whl fileInstall GDAL:pip install path\to\gdal.whlInstall Fiona:pip install path\to\fiona.whlFinally, install map-poster-creator:pip install map-poster-creatorOr just use Docker =)MacOSbrew install geosUsage:Create geojson file with one poly.https://geojson.io/Download shp archive for regionhttps://download.geofabrik.de/eq:central-fed-district-latest-free.shp.zipUnpack*.free.shp.ziparchive to some folderPATH_TO_SHP_DIR$mapocpostercreate--shp_pathPATH_TO_SHP_DIR--geojsonPATH_TO_GEOJSON--colorswhiteblackcoral$mapocpostercreate-husage:MapPosterCreatorpostercreate[-h]--shp_pathSHP_PATH--geojsonGEOJSON[--colorsCOLORS[COLORS...]][--output_prefixOUTPUT_PREFIX]MakePoster

optionalarguments:-h,--helpshowthishelpmessageandexit--shp_pathSHP_PATHPathtoshpfolder.type"mapoc misc shp"todownload--geojsonGEOJSONPathtogeojsonfilewithboundarypolygon.type"mapoc misc geojson"tocreateanddownload--colorsCOLORS[COLORS...]Providecolors.eq"--colors white black coral".Default:"white".Availablecolors:black,white,red,coral--output_prefixOUTPUT_PREFIXOutputfileprefix.eq."{OUTPUT_PREFIX}_{COLOR}.png".Default:"map"$mapocmisc-husage:MapPosterCreatormisc[-h]{shp,geojson}...

Miscservices

optionalarguments:-h,--helpshowthishelpmessageandexitmiscmanagementcommands:misc{shp,geojson}AdditionalhelpforavailablecommandsColorsAdd new color schemeAdd a new color scheme or rewrite available color scheme.usage:mapoccoloradd[-h]--nameNAME--facecolorFACECOLOR--waterWATER--greensGREENS--roadsROADS

Listavailablecolors

optionalarguments:-h,--helpshowthishelpmessageandexit--nameNAMENameofcolorscheme.eq."blue"--facecolorFACECOLORMatPlotfacehexcolor.eq."#ffffff"--waterWATERMatPlotwaterhexcolor.eq."#ffffff"--greensGREENSMatPlotgreenshexcolor.eq."#ffffff"--roadsROADSMatPlotroadshexcolor.eq."#ffffff"Example:$mapoccoloradd--name"coffee"--facecolor"#433633"--water"#5c5552"--greens"#8f857d"--roads"#decbb7"List available color schemes$mapoccolorlistTODOAdd configurable settings for poster size and quality.Add Docker image
Package: mapproxy-hips
mapproxy-hips is a plugin for MapProxy (http://mapproxy.github.io/mapproxy/) providing extensions
for interoperability between OGC services (WMS, WMTS, …) and the HiPS protocol
(https://www.ivoa.net/documents/HiPS/) from IVOA.The plugin requires MapProxy >= 1.15 which incorporates the plugin architecture
(http://mapproxy.github.io/mapproxy/plugins.html) used by mapproxy-hips.Quickstartpython3-mvenvmyvenvsourcemyvenv/bin/activatepipinstallmapproxy_hipsgitclonehttps://github.com/rouault/mapproxy_hipsmapproxy-utilserve-developmapproxy_hips/hips_examples/ogc_as_hips/mapproxy.yaml&curlhttp://localhost:8080/hips/mars_tiled_geodetic/propertiesAdding a HIPS serviceExposing a HIPS service (that is HIPS as output of MapProxy) requires to declare
ahipsitem underservicesin the MapProxy configuration file.services:hips:#resampling_method: nearest_neighbourresampling_method:bilinear#resampling_method: bicubic# populate_cache: falseAnd you generally need to customize HIPS metadata for each exposed layer:layers:-name:my_layer_nametitle:my titlesources:[my_source]md:hips:# enabled: falsecreator_did:ivo://unknown.authority/some_idobs_title:Some title# foo: bar# hips_tile_width: 512# hips_order: 5Seehttps://github.com/rouault/mapproxy_hips/blob/master/hips_examples/ogc_as_hips/mapproxy.yamlfor a full example.UtilitiesThehips-allskycommand of themapproxy-utilscript can be used to
generate the allsky file needed by some HIPS consumers.Usage:mapproxy-utilhips-allsky[options]-fmapproxy_conf-llayerOptions:-h,--helpshowthishelpmessageandexit-fMAPPROXY_CONF,--mapproxy-conf=MAPPROXY_CONFMapProxyconfiguration.-lLAYER,--layer=LAYERLayer-oNORDER,--norder=NORDEROrder-cCONCURRENCY,--concurrency=CONCURRENCYnumberofparallelprocessesThehips-seedcommand of themapproxy-utilscript can be used to
generate to pre-generate HIPS tiles.Usage:mapproxy-utilhips-seed[options]-fmapproxy_conf-llayerOptions:-h,--helpshowthishelpmessageandexit-fMAPPROXY_CONF,--mapproxy-conf=MAPPROXY_CONFMapProxyconfiguration.-lLAYER,--layer=LAYERLayer-oNORDER,--norder=NORDEROrder-cCONCURRENCY,--concurrency=CONCURRENCYnumberofparallelprocessesAdding a HIPS sourceAdding a HIPS source (that is HIPS as input of MapProxy) requires to
specifytype: hipsin a source declaration, and specifying the URL and image format
of the HIPS service.sources:mars_hips_source:type:hipsimage:format:image/jpegresampling_method:bilinearurl:http://alasky.u-strasbg.fr/Planets/Mars_MOLA# cache_hips_tiles: falseSeehttps://github.com/rouault/mapproxy_hips/blob/master/hips_examples/hips_source/mapproxy.yamlfor a full example.CreditsFunded by Centre National d’Etudes Spatiales (CNES,https://cnes.fr) within the
framework of the “Pôle de Données et Services Surfaces Planétaires” (PDSSP) project.
Package: mappyfile
A pure Python parser for working withMapServerMapFiles, built usingLark.
mappyfile is an officialOSGeo Community Project.mappyfile is used for formatting and validation inhttps://app.mapserverstudio.net/, and can be tested for free on any
of your Mapfiles. If you find mappyfile useful please consider signing up for a professional account athttps://mapserverstudio.net/. This will help to fund maintenance and further development of both mappyfile and MapServer.RequirementsPython 3.8 or higherInstallationmappyfile is available onPyPI(the Python Package Index), and can be installed using pip:pip install mappyfileThis will also install its required dependencies -Lark, andjsonschema.To install the optionallark-cythonlibrary
for better performance on CPython you can run the following command:pip install mappyfile[lark_cython]mappyfile is also available onconda. Install as
follows:conda install -c conda-forge mappyfileDocumentationFull documentation is available athttp://mappyfile.readthedocs.io/en/latest/UsageFrom within Python scripts:importmappyfilemapfile=mappyfile.open("./docs/examples/raster.map")# update the map namemapfile["name"]="MyNewMap"new_layer_string="""
LAYER
    NAME 'land'
    TYPE POLYGON
    DATA '../data/vector/naturalearth/ne_110m_land'
    CLASS
        STYLE
            COLOR 107 208 107
            OUTLINECOLOR 2 2 2
            WIDTH 1
        END
    END
END
"""layers=mapfile["layers"]new_layer=mappyfile.loads(new_layer_string)layers.insert(0,new_layer)# insert the new layer at any index in the Mapfileforlinlayers:print("{}{}".format(l["name"],l["type"]))print(mappyfile.dumps(mapfile,indent=1,spacer="\t"))Three command line tools are available -format,validate, andschema:mappyfile format raster.map formatted_raster.map
mappyfile validate D:\ms-ogc-workshop\ms4w\apps\ms-ogc-workshop\**\*.map
mappyfile schema mapfile-schema-8-0.json --version=8.0AuthorsSeth Girvin@geographikaErez Shinan@erezshContributorsJulien Enselme@jenselmeLoïc Gasser@loicgasserIan Turton@ianturton@thorag76@DonQueso89TC Haddad@tchaddad(Conda support)