Saravanan666/pypi-org huggingface dataset:
Package: parsernaam
Parsernaam: Predict First and Last NameMost common name parsers use crude pattern matching and the sequence of strings, e.g., the last word is the last name, to parse names. This approach is limited and fragile, especially for Indian names. We take a machine-learning approach to the problem. Using the large voter registration data in India and US, we build machine-learning-based name parsers that predict whether the string is a first or last name.For Indian electoral rolls, we assume the last name is the word in the name that is shared by multiple family members. (We table the expansion to include compound last names—extremely rare in India—till the next iteration.)Gradio App.parsernaam on HFInstallationpipinstallparsernaamGeneral APIThe general API is as follows:# Import the library
from parsernaam.parsernaam import ParseNames

positional arguments:
  df                 dataframe with Names to parse (with column name 'name')

# example
df = pd.DataFrame({'name': ['Jan', 'Nicholas Turner', 'Petersen', 'Nichols Richard', 'Piet',
                                     'John Smith', 'Janssen', 'Kim Yeon']})
df = ParseNames.parse(df)
print(df.to_markdown())|    | name            | parsed_name                                                                   |
|---:|:----------------|:------------------------------------------------------------------------------|
|  0 | Jan             | {'name': 'Jan', 'type': 'first', 'prob': 0.6769440174102783}                  |
|  1 | Nicholas Turner | {'name': 'Nicholas Turner', 'type': 'first_last', 'prob': 0.9990382194519043} |
|  2 | Petersen        | {'name': 'Petersen', 'type': 'last', 'prob': 0.5342262387275696}              |
|  3 | Nichols Richard | {'name': 'Nichols Richard', 'type': 'last_first', 'prob': 0.9998832941055298} |
|  4 | Piet            | {'name': 'Piet', 'type': 'first', 'prob': 0.5381495952606201}                 |
|  5 | John Smith      | {'name': 'John Smith', 'type': 'first_last', 'prob': 0.9975730776786804}      |
|  6 | Janssen         | {'name': 'Janssen', 'type': 'first', 'prob': 0.5929554104804993}              |
|  7 | Kim Yeon        | {'name': 'Kim Yeon', 'type': 'last_first', 'prob': 0.9987115859985352}        |DataThe model is trained on names from the Florida Voter Registration Data from early 2022.
The data are available on theHarvard DataverseAuthorsRajashekar Chintalapati and Gaurav SoodContributingContributions are welcome. Please open an issue if you find a bug or have a feature request.LicenseThe package is released under theMIT License.
Package: parser-retro-doc
Parser en PythonDescriptionCe repo contient le code d'un module python permettant de parser du code source pour en extraire des indicateurs.InstallationDepuis Git bash :Cloner le projet (master)cd parserpip install -r requirements.txtpy.testContributionCloner le projetCréer une nouvelle brancheCheck out la brancheCommit et push du codeCréer un PR et alerter l'équipeConventionLe code et les commentaires seront de préférence en FrançaisOn utilisera Python 3.7Le linter sera PyLintDocumentationSchema des classes
Package: parser_shenghui
TRI Coding Challenge Parser==========================Parser Instructions----------------------To run parser, `python3 run_parser.py`.Enter the path of your file `Enter the absolute path of input file:`Enter the x-largest `Enter value for X-largest:`Algorithmic Complexity----------------------- The parser reads in the document file line by line.- O(n) * [file I/O]- Note: scan_document(file_path) is modular to be replaced with more optimal scanning performane.- An example of faster scanning solution: read file in chunks(1024) or chunks depending on size of file.- The parser keeps the parsed data in a max-Heap.- Returning the x-largest values from the max-Heap (delete-max) is O(log n).- The space complexity of a heap is O(n).Unit Test Suite----------------------To run unit tests `python3 setup.py test`Hours Spent----------------------- I took 1-2 hours to write the parser, 2-4 hours on trying different unit test tools and structure.
Package: parser-stdf
parser_stdfInstallpip install parser_stdfHow to usefromparser_stdf.coreimportContent,Stdfdefread_file(f='./testdata'):withopen(f,'rb')asf:d=f.read()returndfile_content=read_file()file_name='testdata'stdf=Stdf(file_content=file_content,file_name=file_name)c=Content(stdf=stdf)#c.wxy # for missing w,x,y extracted from eFuse readings
Package: parserz
parserzEasy parser for parse template $variableFeaturesSupport do dots for filedsInstall$ pip install parserzUseSimple Usefromparserzimportparserdata=['$a.1.c','$b']context={'a':[1,{'c':'hello'}],'b':123456}result=parser.parse(data,context)print(result)output:['hello', 123456]
Package: parse-shebang
# Parse ShebangParse shebangs so script-like files can be executed directly on WindowsOn Windows, scripts are supposed to be registered with with theirinterpreters and placed into PATHEXT, but that information might notbe available and the script still needs to be run. In that case, thismodule is useful, because it looks up the required information to run thescript as best as possible.## Status| Travis CI (Ubuntu) | AppVeyor (Windows) | Coverage | PyPI | Licence ||--------------------|--------------------|----------|------|---------||[![Travis](https://img.shields.io/travis/polysquare/python-parse-shebang.svg)](http://travis-ci.org/polysquare/python-parse-shebang)|[![AppVeyor](https://img.shields.io/appveyor/ci/smspillaz/python-parse-shebang.svg)](https://ci.appveyor.com/project/smspillaz/python-parse-shebang)|[![Coveralls](https://img.shields.io/coveralls/polysquare/python-parse-shebang.svg)](http://coveralls.io/polysquare/python-parse-shebang)|[![PyPIVersion](https://img.shields.io/pypi/v/parse-shebang.svg)](https://pypi.python.org/pypi/parse-shebang)[![PyPIPythons](https://img.shields.io/pypi/pyversions/parse-shebang.svg)](https://pypi.python.org/pypi/parse-shebang)|[![License](https://img.shields.io/github/license/polysquare/python-parse-shebang.svg)](http://github.com/polysquare/python-parse-shebang)|## API Usageshebang = parseshebang.parse(file_to_parse)subprocess.check_call(shebang + ["/my_script.py"])`file_to_parse` may be either an open file object, which supports seeking,or a file name. A list containing the shebang components is returned.
Package: parse-stuff
parse_stuffPython Boilerplate contains all the boilerplate you need to create a Python package.Free software: MIT licenseDocumentation:https://parse-stuff.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-06-10)First release on PyPI.
Package: parsetabtolatex
parsetabtolatexparses an output file ofplyand extracts the grammar into a .tex file using the grammar environment provided by thesyntaxLaTeX package.AuthorLicenseHomepageMaria Climent-PommeretMIT Licencehttps://gitlab.climent-pommeret.red/Chopopope/parsetabtolatexInstallationPlease run the following command in a virtual environment using Python3.5pip install parsetabtolatexUsage exampleIn[1]: from parsetabtolatex import parsetabtolatex as pl

In[2]: pl.ParseTabToLatatex("/tmp/partetab.py", "/tmp/grammar.tex").generate_latex()
Package: parsetron
A natural language semantic parserInstallationpip install parsetronParsetron is tested under Python 2.7 and Pypy. It doesn’t support Python 3 yet.Quick StartThe following is a grammar that parses natural language instruction on lights:fromparsetronimportSet,Regex,Optional,OneOrMore,Grammar,RobustParserclassLightGrammar(Grammar):action=Set(['change','flash','set','blink'])light=Set(['top','middle','bottom'])color=Regex(r'(red|yellow|blue|orange|purple|...)')times=Set(['once','twice','three times'])|Regex(r'\d+ times')one_parse=action+light+Optional(times)+colorGOAL=OneOrMore(one_parse)@staticmethoddeftest():parser=RobustParser((LightGrammar()))sents=["set my top light to red","set my top light to red and change middle light to yellow","set my top light to red and change middle light to yellow and ""flash bottom light twice in blue"]forsentinsents:tree,result=parser.parse(sent)assertresult.one_parse[0].color=='red'print'"%s"'%sentprint"parse tree:"printtreeprint"parse result:"printresultprintDependenciesNone. Parsetron is a singleparsetron.pyfile.Parsetron is inspired bypyparsing.Grammar ModulesParsetron supports modularized grammars: each grammar focuses on an individual
small domain and can be imported via, for instance:fromparsetron.grammars.colorsimportColorsGrammarclassYourCustomizedGrammar(Grammar):color=ColorsGrammar.GOALYou are welcome to contribute your own grammar here (underparsetron.grammars). Send us a pull request!Developmentfork this repositoryinstall dev-specific packages:pip install -r requirements.txtthen make your changes and follow theMakefile.TODO[ ] Python 3 compatible[ ] Unicode supportDocumentationThe full documentation is athttp://parsetron.rtfd.org.History0.1.1 (2015-08-24)ParseResult now supports lex_span() method.0.1.0 (2015-06-19)First release on PyPI.
Package: parsetypes
parsetypesThis Python package provides tools for parsing serialised data to recover their original underlying types.OverviewTheTypeParserclass provides configurable type inference and parsing. This can beinitialised with different settingsto, for example:allowNone(null values) or nottreatinfas either a float or a normal stringgive exact Decimal values instead of floatsdetect inline listsInstallpip install parsetypesBasic examplesImport parser:fromparsetypesimportTypeParserParse a single value:parser=TypeParser()parser.parse("1.2")# 1.2parser.parse("true")# Trueparser.parse("")# NoneParse a series so that it has a consistent type:parser=TypeParser()parser.parse_series(["0","1","2"])# [0, 1, 2]parser.parse_series(["0","1.2",""])# [0.0, 1.2, None]parser.parse_series(["false","true",""])# [False, True, None]parser.parse_series(["false","true","2"])# [0, 1, 2]parser.parse_series(["1","2.3","abc"])# ["1", "2.3", "abc"]Parse a table so that each column is of a consistent type:parser=TypeParser()table=parser.parse_table([["0","3","false","false","7"],["1","4.5","true","true","8.9"],["2","","","6","abc"],]):asserttable==[[0,3.0,False,0,"7"],[1,4.5,True,1,"8.9"],[2,None,None,6,"abc"],]The main contribution of this module lies in theinfer_series()andinfer_table()functions, which are also called byparse_series()andparse_table().IssuesFound a bug? Pleasereport an issue, or, better yet,contribute a bugfix.ChangelogThis project followsPEP 440andSemantic Versioning (SemVer). In addition to the guarantees specified by SemVer, for versions before 1.0, this project guarantees backwards compatibility of the API for patch version updates (0.y.z).The recommended version specifier isparsetypes ~=x.yfor version 1.0 and later, andparsetypes ~=0.y.zfor versions prior to 1.0.0.3.2Improved documentation0.3.1Added the argumentsallow_negativeandallow_sign(bothTrueby default) toparser.parse_int(), for parity withparser.is_int()which already had these arguments0.3Made the previously public but undocumented instance variables of TypeParser that corresponded to the constructor arguments private insteadAdded public properties to TypeParser for accessing or modifying the same settings in a controlled manner0.2.6AddedNullableto automatic imports viafrom parsetypes import *(previously onlyTypeParserandreduce_typeswere imported)0.2.5Fixed documentation0.2.4Addedparser.convert()0.2.1, 0.2.2, 0.2.3Fixed documentation0.2Added support for Python version 3.9; previously only 3.10 and 3.11 were supported0.1.1Updated documentation0.1Initial version
Package: parseUALF
Data Parser for Universal ascii lightning format âš¡Python class that allows for a python requests response received in the universal ascii lightning format to be parsed to a pandas dataframe object.Publicly available lightning data though MET Norway and Swedish SMHI are returned in the universal ascii lightning format.The purpose of this Python project is to easily parse that data into a pandas dataframe (and numpy array).PyPI link:https://pypi.org/project/UALF-dataframe-parser/0.0.1/A visualisation of the format can be found on MET Norway's Frost API resource pages:
Package: parse-utils
Parse Utilities (ParseUtils)This package helps you extracting python dict from html/xml contentsInstallationpip install parse-utilsUsagefromparse_utils.page_parserimportPageParser,ItemExtractorhtml_data="""<html><head><title>This is title</title></head><body><p id="header">This is header id</p><p id="header">This is header2</p><p class="content">This is content</p></body></html>"""html_rows_data="""<html><head><title>This is title</title></head><body><ul id="contents"><li><a href="/first"> First Item</a><p>Description of Item 1</p></li><li><a href="/Second"> Second Item</a><p>Description of Item 2</p></li><li><a href="/Second"> Second Item</a><p>Description of Item 3</p></li><li><a href="/Second"> First Item</a><p>Description of Item 4</p></li></ul><p class="content">This is content</p></body></html>"""json_data={"name":"Yogendra","address":{"country":"Nepal","city":"Pokhara",}}deftest_html_parser():""""""config={"header":['//p[@id="header"]/text()'],"content":['//p[@class="content"]'],"description":["//body"],}pparser=PageParser(html_data)item=pparser.extract_dict(config)item2=pparser.extract_dict(config,is_list=True)print(item2["body"])item3=pparser.extract_dict(config,linebreaks=True)print(item3["body"])print(item)deftest_json_parser():""""""config={"header":["name"],"city":["address","city"],}jparser=PageParser(json_data,selector=True)item=jparser.extract_dict_from_json(config)print(item)deftest_items_parser():""""""config={"results":"//ul/li","fields":{"title":["./a/text()"],"description":["./p"],"link":["./a/@href"],},}foriteminItemExtractor.extract_items(config["results"],config["fields"],html_rows_data):print(item)deftest_items_parser_with_seed():""""""seed_dict={'default_key':'default_value'}config={"results":"//ul/li","fields":{"title":["./a/text()"],"description":["./p"],"link":["./a/@href"],},}foriteminItemExtractor.extract_items(config["results"],config["fields"],html_rows_data,item=seed_dict):print(item)deftest_items_parser_with_results():""""""seed_dict={'default':'default_list'}config={"results":["//apple/ball","//ul/li"],"fields":{"title":["./a/text()"],"description":["./p"],"link":["./a/@href"],},}foriteminItemExtractor.extract_items(config["results"],config["fields"],html_rows_data,item=seed_dict):print(item)if__name__=="__main__":test_html_parser()test_json_parser()test_items_parser()test_items_parser_with_seed()test_items_parser_with_results()Output will be:['This is header id\n        This is header2\n        This is content']ThisisheaderidThisisheader2Thisiscontent{'header':'This is header id','content':'This is content','body':'This is header id\n        This is header2\n        This is content'}{'header':'Yogendra','city':'Pokhara'}{'title':'First Item','description':'Description of Item 1','link':'/first'}{'title':'Second Item','description':'Description of Item 2','link':'/Second'}{'title':'Second Item','description':'Description of Item 3','link':'/Second'}{'title':'First Item','description':'Description of Item 4','link':'/Second'}
Package: parse_with_dot_access
parse with dot accessA daily rebase ofparsebut, with dot notation access 😉.A bit ofhistoryis that the author don't like this idea. so, I forked.Get Startedpipinstallparse_with_dot_accessfromparseimportparseresult=parse("{lat},{long}","12.21254, 105.15564")print(result)# <Result () {'lat': '12.21254', 'long': '105.15564'}>print(result["lat"])# 12.21254print(result.long)# 105.15564For comprehensive documentation please refer tothe readme of upstream repo.
Package: parse-wkb
Pure Python WKB (Well Known Binary) Converterwkb_to_geojson()converts WKB geometry into GeoJSONwkb_to_wkt()converts WKB geometry into WKTgeojson_to_wkb()converts GeoJSON into WKBwkb_to_abstract()converts WKB into an abstract representation which closely resembles the binary format (for debugging purposes)fromparse_wkbimport(wkb_to_abstract,wkb_to_geojson,wkb_to_wkt,geojson_to_wkb)importjsonWKB=b"\x01\x04\x00\x00\x00\x04\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00$@\x00\x00\x00\x00\x00\x00D@\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00D@\x00\x00\x00\x00\x00\x00>@\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x004@\x00\x00\x00\x00\x00\x004@\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00>@\x00\x00\x00\x00\x00\x00$@"parsed_to_geojson=wkb_to_geojson(WKB)assertjson.dumps(parsed_to_geojson)=='{"type": "MultiPoint", "coordinates": [[10.0, 40.0], [40.0, 30.0], [20.0, 20.0], [30.0, 10.0]]}'parsed_to_wkt=wkb_to_wkt(WKB)assertparsed_to_wkt=='MULTIPOINT (10.0 40.0, 40.0 30.0, 20.0 20.0, 30.0 10.0)'parsed_to_abstract=wkb_to_abstract(WKB)assertparsed_to_abstract==('LEnd',('MultiPoint','XY'),4,('LEnd',('Point','XY'),10.0,40.0),('LEnd',('Point','XY'),40.0,30.0),('LEnd',('Point','XY'),20.0,20.0),('LEnd',('Point','XY'),30.0,10.0))# the reverse operation is only implemented from GeoJSON at the moment:encoded_to_wkb_from_geojson=geojson_to_wkb(parsed_to_geojson)assertencoded_to_wkb_from_geojson==WKBSupported Geometry TypesSupportsPOINT,LINESTRING,POLYGON,MULTIPOINT,MULTILINESTRING,MULTIPOLYGON, andGEOMETRYCOLLECTIONSupports geometry withXY,XYZ,XYM, andXYZMdimensionsSpecificationThis module is based on v1.2.1 of theOpenGIS Implementation Standard for Geographic information - Simple feature access - Part 1: Common architecture(which can be found herehttps://www.ogc.org/standards/sfa).Alternate ApproachesThis library is somewhat redundant because:MySQL, POSTGIS and SQLite (SpatiaLite extension) provide the following conversion functions:ST_AsGeoJSON()ST_GeometryFromGeoJSON()ST_AsWKT()ST_GeometryFromText()if you are usinggeopandas+shapelythese libraries provide conversion to and from WKB (implemented with fast C/C++ libraries)However this library has a limited use-case; when python is working on your system, but you can't get the confounded binaries forgeopandasorshapelyto compile, or if you don't care for the size of numpy and everything else that comes with a few innocentpip/conda installcommands.From making this script I learned that WKB is actually not a great spec...WKB stores a lot of redundant information by repeating the byte order and geometry type for every point.Only 8 byte double precision floats are permitted... seems overkill for some applications. Would be better it we could specify precision, or even use integer types.Planned Features?WKT => WKB
Package: parsewkt
The WKT Parser was gernerated using grako https://pypi.python.org/pypi/grakoThe ebnf file is the translation of http://svn.osgeo.org/postgis/trunk/doc/bnf-wkt.txtThe bnf to ebnf conversion was guided by http://stackoverflow.com/questions/14922242/how-to-convert-bnf-to-ebnfThe generation of parse.py is as easy as: /path/to/grako Wkt.ebnf -o parse.pyparsewkt is continually tested with *Travis CI*.. image:: https://api.travis-ci.org/cleder/parsewkt.png:target: https://travis-ci.org/cleder/parsewkt.. image:: https://coveralls.io/repos/cleder/parsewkt/badge.png?branch=master:target: https://coveralls.io/r/cleder/parsewkt?branch=masterImplementation Status=====================Currently implemented is parsing from WKT to a __geo_interface__ compliantdictionary for the following types:- POINT- LINESTRING- POLYGON- MULTIPOINT- MULTILINESTRING- MULTIPOLYGON- GEOMETRYCOLLECTIONThe parser can parse the following types but they are currently nottranslated into python objects:- COMPOUNDCURVE- CIRCULARSTRING- CURVEPOLYGON- MULTICURVE- POLYHEDRALSURFACE- TIN- TRIANGLEUsage======>>> from parsewkt import from_wkt>>> gc = """GEOMETRYCOLLECTION(...           POINT(99 98),...           LINESTRING(1 1, 3 3),...           POLYGON((0 0, 0 1, 1 1, 0 0)),...           POLYGON((0 0, 0 9, 9 9, 9 0, 0 0), (5 5, 5 6, 6 6, 5 5)),...           MULTIPOLYGON(((0 0, 0 9, 9 9, 9 0, 0 0), (5 5, 5 6, 6 6, 5 5)))...         )""">>> from_wkt(gc){'type': 'GeometryCollection', 'geometries': ({'type': 'Point', 'coordinates': (99.0, 98.0)}, {'type': 'LineString', 'coordinates': ((1.0, 1.0), (3.0, 3.0))}, {'type': 'Polygon', 'coordinates': (((0.0, 0.0), (0.0, 1.0), (1.0, 1.0), (0.0, 0.0)),)}, {'type': 'Polygon', 'coordinates': (((0.0, 0.0), (0.0, 9.0), (9.0, 9.0), (9.0, 0.0), (0.0, 0.0)), ((5.0, 5.0), (5.0, 6.0), (6.0, 6.0), (5.0, 5.0)))}, {'type': 'MultiPolygon', 'coordinates': ((((0.0, 0.0), (0.0, 9.0), (9.0, 9.0), (9.0, 0.0), (0.0, 0.0)), ((5.0, 5.0), (5.0, 6.0), (6.0, 6.0), (5.0, 5.0))),)})}>>> tri = """TRIANGLE((0 0 0,0 1 0,1 1 0,0 0 0))""">>> from_wkt(tri)Traceback (most recent call last):File "<console>", line 1, in <module>File "/home/.../parsewkt/parsewkt/wkt.py", line 307, in from_wktraise NotImplementedErrorNotImplementedErrorDownload********
Package: pars-green
# [Pars Green Soap Client][docs]Easy to work with Pars Green SOAP clientFull documentation for the project is available at [Pars Green Soap Client PDF][pdf].—# Overview# RequirementsPython (2.7, 3.2, 3.3, 3.4, 3.5, 3.6)suds (0.4.0)# InstallationInstall usingpip…pip install pars-green# ExampleLet’s take a look at a quick example of using this package to send SMS:from pars_green import ParsGreenSmsServiceClient
client = ParsGreenSmsServiceClient(“YOUR_SIGNATURE”)
print(client.send(‘SENDER_NUMBER’, ‘TO_NUMBER’, ‘TEXT’))# Documentation & SupportFor more information about this package, see [python website][pypi]For questions and support, contact to [Author’s mail][mail].You may also want to [follow the author on Twitter][twitter].[pypi]:https://pypi.python.org/pypi/pars-green[twitter]:https://twitter.com/mhipo1364[mail]:mailto:mhipo1364@gmail.com[pdf]:https://github.com/mhipo1364/pars-green/blob/master/docs/pdf/parsgreen.pdf[docs]:https://github.com/mhipo1364/pars-green/blob/master/README.md
Package: parshift
ParShiftParShift is a python package based onGibson's frameworkfor the analysis of
conversational sequences.The framework is established on the concept of participation shift, which refers
to the shifting of individuals between the positions of speaker, target
(addressee), and non-addressee (everyone else), in a group conversation.InstallationFrom PyPIpipinstallparshiftFrom sourceDirectly using pip:pipinstallgit+https://github.com/bdfsaraiva/parshift.git#egg=parshiftOr each step at a time:gitclonehttps://github.com/bdfsaraiva/parshiftcdparshift
pipinstall.Getting StartedFor an in-depth overview of the features of ParShift please check thedocumentationor follow along the provided example:NameLinkParticipation Shifts with ParShiftFeatures/ImprovementsWe're open to any idea or suggestion to further improve this package.
If you have an idea or a feature request, just open anissue. 🤗For developersAfter you cloned the repo head into theparshiftbase directory,cdinto it,
create a virtual environment and then install ParShift in development mode:pipinstall-e.[dev]Make sure that all tests pass and that there aren't any issues:pytestNow you are ready to start developing the project! Don't forget to add tests for
every new change or feature!ReferenceIf you use this software, please cite the following reference:Ferreira-Saraiva, B.D., Matos-Carvalho, J.P., Fachada, N. & Pita, M. (2023).
ParShift: a Python package to study order and differentiation in group
conversations.SoftwareX, 24. 101554.https://doi.org/10.1016/j.softx.2023.101554LicenseMIT License