Saravanan666/pypi-org huggingface dataset:
Package: py-grimm
Graph Familypy-grimmis the Graph Family package. It is based onpy-graph-imputationHow to develop on the project locally:Make sure the following pre-requites are installed.gitpython >= 3.8build tools egmakeClone the repository locallygitclonegit@github.com:nmdp-bioinformatics/py-grimm.gitcdpy-grimmMake a virtual environment and activate it, runmake venv>makevenvpython3-mvenvvenv--prompturban-potato-venv=====================================================================Toactivatethenewvirtualenvironment,executethefollowingfromyourshellsourcevenv/bin/activateSource the virtual environmentsourcevenv/bin/activateDevelopment workflow is driven throughMakefile. Usemaketo list show all targets.> make
 clean                remove all build, test, coverage and Python artifacts
 clean-build          remove build artifacts
 clean-pyc            remove Python file artifacts
 clean-test           remove test and coverage artifacts
 lint                 check style with flake8
 behave               run the behave tests, generate and serve report
 pytest               run tests quickly with the default Python
 test                 run all(BDD and unit) tests
 coverage             check code coverage quickly with the default Python
 dist                 builds source and wheel package
 docker-build         build a docker image for the service
 docker               build a docker image for the service
 install              install the package to the active Python's site-packages
 venv                 creates a Python3 virtualenv environment in venv
 activate             activate a virtual environment. Run `make venv` before activating.Install all the development dependencies. Will install packages from allrequirements-*.txtfiles.makeinstallThe Gherkin Feature files, step files and pytest files go intestsdirectory:tests
|-- features
|   |-- algorithm
|   |   `-- SLUG\ Match.feature
|   `-- definition
|       `-- Class\ I\ HLA\ Alleles.feature
|-- steps
|   |-- HLA_alleles.py
|   `-- SLUG_match.py
`-- unit
    `-- test_gram.pyPackage Module files go in thegramdirectory.gram
|-- __init__.py
|-- algorithm
|   `-- match.py
|-- model
|   |-- allele.py
|   `-- slug.py
`-- gram.pyRun all tests withmake testor different tests withmake behaveormake pytest.make behavewill generate report files and open the browser to the report.Usepython app.pyto run the Flask service app in debug mode. Service will be available athttp://localhost:8080/Usemake docker-buildto build a docker image using the currentDockerfile.make dockerwill build and run the docker image with the service.  Service will be available athttp://localhost:8080/=======
History0.0.1 (2021-08-25)First release on PyPI.
Package: pygrin
by Scott PrahlA basic collection of routines to ray trace through graded index (GRIN) lenses with a
parabolic radial profile.ExampleProperties of a 0.25 pitch GRIN lens from an ancient Melles Griot Catalog:import pygrin
n = 1.608
gradient = 0.339
length = 5.37
diameter = 1.8

pitch = pygrin.period(gradient, length)
ffl = pygrin.FFL(n,pitch,length)
efl = pygrin.EFL(n,pitch,length)
na = pygrin.NA(n,pitch,length,diameter)

angle = pygrin.max_angle(n,pitch,length,diameter)
print('expected pitch = 0.29,            calculated %.2f' % pitch)
print('expected FFL = 0.46 mm,           calculated %.2f' % ffl)
print('expected NA = 0.46,               calculated %.2f' % na)
print('expected full accept angle = 55°, calculated %.0f°' % (2*angle*180/np.pi))
print('working distance = %.2f mm'%(efl-ffl))Produces:expected pitch = 0.29,            calculated 0.29
expected FFL = 0.46,              calculated 0.47
expected NA = 0.46,               calculated 0.46
expected full accept angle = 55°, calculated 55°
working distance = 1.43 mmBut the real utility of this module is creating plots that show the path of rays through
a GRIN lens.   For examples, see <https://pygrin.readthedocs.io>InstallationUsepip:pip install pygrinorconda:conda install -c conda-forge pygrinor use immediately by clicking the Google Colaboratory button belowLicensepygrinis licensed under the terms of the MIT license.
Package: pygrinder
Welcome to PyGrindera Python toolkit for grinding data beans into the incompletePyGrinder is a part ofPyPOTS(a Python toolbox for data mining on
Partially-Observed Time Series), was called PyCorruptor and separated from PyPOTS for decoupling missingness-creating functionalities from
learning algorithms.In data analysis and modeling, sometimes we may need to corrupt the original data to achieve our goal, for instance,
evaluating models' ability to reconstruct corrupted data or assessing the model's performance on only partially-observed
data. PyGrinder is such a tool to help you corrupt your data, which provides several patterns to create missing values
in the given data.❖ Usage ExamplesPyGrinder now is available on❗️Install it withconda install pygrinder, you may need to specify the channel with option-c conda-forgeor install from PyPI:pip install pygrinderor install from source code:pip installhttps://github.com/WenjieDu/PyGrinder/archive/main.zipimportnumpyasnpfrompygrinderimportmcar,mar_logistic,mnar_x,mnar_t# given a time-series dataset with 128 samples, each sample with 10 time steps and 36 data featurests_dataset=np.random.randn(128,10,36)# grind the dataset with MCAR pattern, 10% missing probability, and using 0 to fill missing valuesX_with_mcar_data=mcar(ts_dataset,p=0.1)# grind the dataset with MAR patternX_with_mar_data=mar_logistic(ts_dataset[:,0,:],obs_rate=0.1,missing_rate=0.1)# grind the dataset with MNAR patternX_with_mnar_x_data=mnar_x(ts_dataset,offset=0.1)X_with_mnar_t_data=mnar_t(ts_dataset,cycle=20,pos=10,scale=3)❖ Citing PyGrinder/PyPOTSThe paper introducing PyPOTS project is available on arXiv atthis URL,
and we are pursuing to publish it in prestigious academic venues, e.g. JMLR (track forMachine Learning Open Source Software). If you use PyGrinder in your work,
please cite PyPOTS project as below and 🌟star this repository to make others notice this library. 🤗 Thank you!@article{du2023PyPOTS,title={{PyPOTS: a Python toolbox for data mining on Partially-Observed Time Series}},author={Wenjie Du},year={2023},eprint={2305.18811},archivePrefix={arXiv},primaryClass={cs.LG},url={https://arxiv.org/abs/2305.18811},doi={10.48550/arXiv.2305.18811},}Wenjie Du. (2023).
PyPOTS: a Python toolbox for data mining on Partially-Observed Time Series.
arXiv, abs/2305.18811.https://arxiv.org/abs/2305.18811or@inproceedings{du2023PyPOTS,title={{PyPOTS: a Python toolbox for data mining on Partially-Observed Time Series}},booktitle={9th SIGKDD workshop on Mining and Learning from Time Series (MiLeTS'23)},author={Wenjie Du},year={2023},url={https://arxiv.org/abs/2305.18811},}Wenjie Du. (2023).
PyPOTS: a Python toolbox for data mining on Partially-Observed Time Series.
In9th SIGKDD workshop on Mining and Learning from Time Series (MiLeTS'23).https://arxiv.org/abs/2305.18811🏠 Visits
Package: pygris
pygrispygrisis a Python package to help users access US Census Bureau TIGER/Line and cartographic boundary shapefiles and load them into Python as GeoDataFrames.  The goal of the package is to make it simple to access US Census geographic data; data can be acquired with a single function for a given geography (e.g.tracts()for Census tracts) along with a few options.The package is a general port of theRtigrispackagewith a few modifications.  The framework of and philosophy behind thetigrispackage is covered inChapter 5 of my book,Analyzing US Census Data: Methods, Maps and Models in R.Installpygrisfrom PyPI with the following command:pipinstallpygris# For optional dependencies to support interactive examples in the documentation:# pip install pygris[explore]Alternatively, install the development version from GitHub:pipinstallgit+https://github.com/walkerke/pygris.gitSupport for installation withcondais forthcoming.Read the following articles for more information on how to use the package:Basic usage of pygrisWorking with geometries in pygrisData utilities in pygrisGeocoding and custom filters in pygris
Package: py-grit
gritContext manager for shrugging off exceptions less badly.Subtitle: exception handling for lazy people.Description and RationaleDoes your code suffer from an overuse of bare exceptions?What if you could still shrug off exceptions when needed but not be so cringe about it?try:foobar()exceptException:passfromgritimportGrit# Full exception stacktrace is automatically loggedwithGrit():foobar()Quick startpip install py-grit>>>fromgritimportGrit>>>withGrit():...raiseRunTimeError("something bad")>>>print("Uh, everything is under control. Situation normal")Uh,everythingisundercontrol.SituationnormalPropagate the errors you care about, while ignoring the ones you don't.>>>fromgritimportGrit>>>withGrit(dnr_list=[ZeroDivisionError]):...42/0Traceback(mostrecentcalllast):...ZeroDivisionError:divisionbyzeroAnd handle those that require special attention>>>fromgritimportGrit>>>withGrit(handlers={ValueError:print}):...raiseValueError("what have you done?!")whathaveyoudone?!Logging and resultsGrit()accepts afallback_handlercallable which will be called on the exception if no specific
'handler' (handlers) is found.By default thefallback_handlerwill log a full exception traceback at the debug level usingself.logger.To change this behavior, provide your ownfallback_handler.>>>fromgritimportGrit>>>withGrit(fallback_handler=print):...raiseTypeError("what have I done?!")whathaveIdone?!Usage ExamplesTODO ...
Package: pygritia
PygritiaPygritia is a symbolic expression library.It cancreate symbolic expressions with one or more symbolsresolve symbolic expressions by substituting values to symbolspartially resolve symbolic expressionExample:frompygritiaimportsymbol,evaluate,updatethis=symbol('this')that=symbol('that')arr=[1,2,3]print(5/this+2*6)# 5 / this + 12print(evaluate(5/this+2*6,this=2))# 14.5print(evaluate(this[that],this=arr))# [1, 2, 3][that]update(this[that],42,this=arr,that=1)print(arr)# [1, 42, 3]Documentation of all public functions can be found inpygritia
Package: pygrobid
Simple python client for GROBID REST servicesThis Python client is used to process a single PDF document by theGROBIDservice. Results are returned in an XML format.Build and runYou need first to install and start thegrobidservice, latest stable version, see thedocumentation.  The default server host islocalhostand port is8080.  TheGrobidClientcan be configure via host and port.RequirementsThis client has been developed and tested with Python 3.7.Installpip install pygrobidUsage and optionsYou can take a quick test viapython tests.py pdf_file -h host -p portIn your code:from grobid.client import GrobidClient

client = GrobidClient(host, port)
rsp = client.serve(service_name, pdf_file)
rsp = client.serve(service_name, pdf_file, consolidate_header=1)upgrade history0.1.6: support coordinatesAcknoledgementThis project is based ongrobid-python-clientby Patrice Lopez (patrice.lopez@science-miner.com)
Package: pygrocy
pygrocyDocumentationInstallationpip install pygrocyUsageImport the package:frompygrocyimportGrocyObtain a grocy instance:grocy=Grocy("https://example.com","GROCY_API_KEY")orgrocy=Grocy("https://example.com","GROCY_API_KEY",port=9192,verify_ssl=True)Get current stock:forentryingrocy.stock():print("{}in stock for product id{}".format(entry.available_amount,entry.id))SupportIf you need help using pygrocy check thediscussionssection. Feel free to create an issue for feature requests, bugs and errors in the library.Development testingYou need tox and Python 3.8/9/10 to run the tests. Navigate to the root dir ofpygrocyand executetoxto run the tests.
Package: pygrocydm
pygrocydmInstallationpip install pygrocydmDocumentationCheckGrocy APIhttps://blueblueblob.github.io/pygrocydm/UsageImport the package:frompygrocydmimportGrocyAPIObtain a grocy data manager instance:gapi=GrocyAPI("https://example.com","GROCY_API_KEY")orgapi=GrocyAPI("https://example.com","GROCY_API_KEY",port=9192,verify_ssl=True)Product list (Generic entities API)products=gapi.generic_entities().products()products_list=products.listforproductinproducts_list:print(vars(product))ifproduct.name=="Cookies":product.delete()ifproduct.name=="Chocolate":data={}data['name']="Choco"product.edit(data)else:new_product={}new_product['name']='Cookies'new_product['location_id']=1new_product['qu_id_purchase']=1new_product['qu_id_stock']=1new_product['qu_factor_purchase_to_stock']=1new_product_id=products.add(new_product)Recipes API :recipes_api=gapi.recipes()forrecipeinrecipes_api.fullfilment_list:ifrecipe.recipe_id==5:recipe.add_not_fulfilled_products_to_shoppinglist()else:recipe.consume()recipes_api.refresh()Tasks API :tasks_api=gapi.tasks()fortaskintasks_api.tasks_list:iftask.id==5:task.complete()task.undo()tasks_api.refresh()System API :system_api=gapi.system()last_db_change=system_api.db_changed_time()License
Package: pygrocy-ext
pygrocyDocumentationInstallationpip install pygrocyUsageImport the package:frompygrocyimportGrocyObtain a grocy instance:grocy=Grocy("https://example.com","GROCY_API_KEY")orgrocy=Grocy("https://example.com","GROCY_API_KEY",port=9192,verify_ssl=True)Get current stock:forentryingrocy.stock():print("{}in stock for product id{}".format(entry.available_amount,entry.id))SupportIf you need help using pygrocy check thediscussionssection. Feel free to create an issue for feature requests, bugs and errors in the library.Development testingYou need tox and Python 3.6/8/9 to run the tests. Navigate to the root dir ofpygrocyand executetoxto run the tests.
Package: pygroebner
pygroebnerThis is a package for Groebner basis over prime 2.Thepygroebnermodule can be used tocreate an algebra/DGA over F2 by generators and relations;calculate the generators of an ideal of annihilators;calculate the subalgebra generated by some elements;export the algebra/DGA to latex;save the algebra/DGA in a sqlite3 database;load the algebra/DGA from a sqlite3 database.In the release version of the package, the module will be able tocompute the homology of a DGA;export the algebra to an HTML file so that you can visualize and interact with it.The sqlite3 database is intended to be used as a compact form to be shared among people.
It also serve as the interface to my C++ groebner basis project, which runs much faster
but is not suitable for a casual use when the computation is not super heavy.Usage>>>frompygroebnerimportnew_alg,load_alg>>>A=new_alg(key_mo="Lex")>>>x=A.add_gen("x",(1,1))>>>y=A.add_gen("y",(1,1))>>>A.add_rel(x*x+y*y)>>>A.add_rel(y**3)>>>x**2y^2>>>print(A.latex_alg())\section{Gens}$x$(1,1)$y$(1,1)\section{Relations}$x^2=y^2$$y^3=0$>>>A.save_alg("tmp.db","A")>>>B=load_alg("tmp.db","A")>>>B.gen['x']*B.gen['y']xy>>>B.gens==A.gensTrue
Package: pygrok
A Python library to parse strings and extract information from
structured/unstructured dataWhat can I use Grok for?parsing and matching patterns in a string(log, message etc.)relieving from complex regular expressions.extracting information from structured/unstructured dataInstallation$pipinstallpygrokor download, uncompress and install pygrok fromhere:$tarzxvfpygrok-xx.tar.gz$cdpygrok_dir$sudopythonsetup.pyinstallGetting StartedfrompygrokimportGroktext='gary is male, 25 years old and weighs 68.5 kilograms'pattern='%{WORD:name} is %{WORD:gender}, %{NUMBER:age} years old and weighs %{NUMBER:weight} kilograms'grok=Grok(pattern)printgrok.match(text)# {'gender': 'male', 'age': '25', 'name': 'gary', 'weight': '68.5'}Pretty Cool !Numbers can be converted from string tointorfloatif you use%{pattern:name:type}syntax, such as%{NUMBER:age:int}frompygrokimportGroktext='gary is male, 25 years old and weighs 68.5 kilograms'pattern='%{WORD:name} is %{WORD:gender}, %{NUMBER:age:int} years old and weighs %{NUMBER:weight:float} kilograms'grok=Grok(pattern)printgrok.match(text,pattern)# {'gender': 'male', 'age': 25, 'name': 'gary', 'weight': 68.5}Nowageis of typeintandweightis of typefloat.Awesome !Some of the pattern you can use are listed here:`WORD` means \b\w+\b in regular expression.
`NUMBER` means (?:%{BASE10NUM})
`BASE10NUM` means (?<![0-9.+-])(?>[+-]?(?:(?:[0-9]+(?:\.[0-9]+)?)|(?:\.[0-9]+)))

other patterns such as `IP`, `HOSTNAME`, `URIPATH`, `DATE`, `TIMESTAMP_ISO8601`, `COMMONAPACHELOG`..See All patternshereYou can also have custom pattern, seethese
codes.More detailsBeause python re module does not support regular expression syntax
atomic grouping(?>),so pygrok requiresregexto be
installed.pygrok is inspired byGrokdeveloped by Jordan Sissel. This is not a wrapper of Jordan Sissel’s
Grok and totally implemented by me.Grok is a simple software that allows you to easily parse strings, logs
and other files. With grok, you can turn unstructured log and event data
into structured data.Pygrok does the same thing.I recommend you to have a look atlogstash filter
grok,
it explains how Grok-like thing work.pattern files come fromlogstash filter grok’s pattern
filesContributeYou are encouraged tofork, improve the
code, then make a pull request.Issue trackerGet Helpmail:garygaowork@gmail.com
twitter:@garyelephantContributorsThanks toall
contributors
Package: pygroker
Contentspygrok Build StatusWhat can I use Grok for?InstallationGetting StartedMore detailsContributeGet HelpContributorspygrokA Python library to parse strings and extract information from
structured/unstructured dataWhat can I use Grok for?parsing and matching patterns in a string(log, message etc.)relieving from complex regular expressions.extracting information from structured/unstructured dataInstallation$pipinstallpygrokor download, uncompress and install pygrok fromhere:$tarzxvfpygrok-xx.tar.gz$cdpygrok_dir$sudopythonsetup.pyinstallGetting Started>>>importpygrok>>>text='gary is male, 25 years old and weighs 68.5 kilograms'>>>pattern='%{WORD:name} is %{WORD:gender}, %{NUMBER:age} years old and weighs %{NUMBER:weight} kilograms'>>>printpygrok.grok_match(text,pattern){'gender':'male','age':'25','name':'gary','weight':'68.5'}Pretty Cool ! Some of the pattern you can use are listed here:`WORD` means \b\w+\b in regular expression.
`NUMBER` means (?:%{BASE10NUM})
`BASE10NUM` means (?<![0-9.+-])(?>[+-]?(?:(?:[0-9]+(?:\.[0-9]+)?)|(?:\.[0-9]+)))

other patterns such as `IP`, `HOSTNAME`, `URIPATH`, `DATE`, `TIMESTAMP_ISO8601`, `COMMONAPACHELOG`..See All patternshereMore detailsBeause python re module does not support regular expression syntax
atomic grouping(?>),so pygrok requiresregexto be
installed.pygrok is inspired byGrokdeveloped by Jordan Sissel. This is not a wrapper of Jordan Sissel’s
Grok and totally implemented by me.Grok is a simple software that allows you to easily parse strings, logs
and other files. With grok, you can turn unstructured log and event data
into structured data.Pygrok does the same thing.I recommend you to have a look atlogstash filter
grok,
it explains how Grok-like thing work.pattern files come fromlogstash filter grok’s pattern
filesContributeYou are encouraged tofork, improve the
code, then make a pull request.Issue trackerGet Helpmail:garygaowork@gmail.com
twitter:@garyelephantContributorsThanks toall
contributors
Package: pygros
a python library for finding genomic range overlaps based oncgranges.Installationpygrosis available onPyPi, to install it:pipinstallpygrosUsage>>>importpygros>>>ranges=pygros.Ranges()>>>ranges.add('chr1',10,20)>>>ranges.add('chr1',30,50)>>>ranges.add('chr1',25,40)>>>ranges.index()>>>ranges.overlap('chr1',30,40)[(25,40,-1),(30,50,-1)]API referencepygros.Ranges(intervals=[])create a Ranges object to store genomic ranges@param intervals: a list or tuple containing multiple ranges@return Ranges objectadd(chrom, start, end, label=-1)add genomic range into Ranges object@param chrom: chromosome name or sequence name@param start: start of range@param end: end of range@param label: an integerindex()After add new genomic ranges, use this method to build indexoverlap(chrom, start, end)get genomic ranges that overlapped with your given range (start, end)@param chrom: chromosome or sequence name@param start: start of range@param end: end of range@return: a list of rangeswithin(chrom, start, end)get genomic ranges within given range (start, end)@param chrom: chromosome or sequence name@param start: start of range@param end: end of range@return: a list of rangescontain(chrom, start, end)get genomic ranges that contained in given range (start, end)@param chrom: chromosome or sequence name@param start: start of range@param end: end of range@return: a list of ranges
Package: pygroundsegmentation
PyGroundSegmentationThis libary includes someground segmentation algorithmsrewritten in python. There are no external C or C++ dependencies only pure python (numpy).InstallationpipinstallpygroundsegmentationIncluded AlgorithmsGPF(Ground Plane Fitting)Patchwork-plusplusPatchworkCascadedSegExample UsagefrompygroundsegmentationimportGroundPlaneFittingground_estimator=GroundPlaneFitting()#Instantiate one of the Estimatorsxyz_pointcloud=np.random.rand(1000,3)#Example Pointcloudground_idxs=ground_estimator.estimate_ground(xyz_pointcloud)ground_pcl=xyz_pointcloud[ground_idxs]
Package: pygrouper
descriptiongoalthe project aims to provide simple to use events cross-referencing enginecases of usagesuppose you have users in database and you want to collect information on their visits to some pages; you use a third-party organisation for this end; you construct an API to accept visit events from your partner; this third-party partner knows nothing (and he should not) about your users database ID; in case of someone visiting page this partner marks him with cookie and sends event to your API containing cookie as an identificator;here comes the problem ofmatching third-party identificators with your internal ones;assumptionsusers table in your database has columns with third party identificatorsfor this to hold you should have some internal events (like registration) which can enrich user profiles with third-party identificatorbasic caseyou have a set of events from third party along with events for grouping (which has database ID) from your databaselet's look at basic case where user registered at your service and visited some pages; registration event provided the same cookie which third party used for this used identification; we have the following events incoming to the algorithmdb_idcookieevent_id123"nice_page_visitor"----"nice_page_visitor"1--"nice_page_visitor"2this incoming configuration will produce the following result (pseudocode){db_id:{123:{cookie:{"nice_page_visitor":[event1,event2,]}}}}we successfully matched events from third-party with our internal identificator therefore enriched our users profile;python version>=3.6loggingthis package has default logging that uses configuration you provided in your application; for more info see thisextractfrom official logging doccontributionfeel free to PR or create issues
Package: pygroupme
PYGROUPME VER 0.0.3Simple python wrapper for the GroupMe API that allows users to interface with Microsoft's GroupMe messaging platform via the requests module. I created this after realizing that there is no existing wrapper for the API in python, and typing the code necessary to interface with GroupMe repeatedly in code is exhausting. In order to interact with GroupMe, users first need to have a GroupMe account and a designated GroupMe group, then register a bot athttps://dev.groupme.com/session/newand provide the program with its bot id to send messages and/or the token code to receive messages.Example usage:import pygroupme as pgm

pgm.gm_msg(bid=BOT_ID_HERE, text="Hello, world!") # sends "Hello, world!" to the GroupMe chat in which the user has set up his GroupME api interface
message = pgm.gm_rec(token=USER_TOKEN_HERE, gid=USER_GID_HERE, limt=n) # receive the last n messages from a GroupMe chat, default is 1