Saravanan666/pypi-org huggingface dataset:
Package: pyrplib
RPLIBThis repo contains the RPLib data, package, and web server.Browse data (recommended)Visit the RPLIB browser athttps://birg.dev/rplib/.View RPLIB Card (recommended)You may view individual cards using theRPLIB browseror for a more customizable experience, use our sample Jupyter notebook that has been tested with Google's Colab:Click to launch on Colab.Contribute a dataset (recommended)We encourage the community to extend this repository with additional data. The recommended procedure for doing so begins with filling out this form:Click to launch add dataset form.Generate artificial data (recommended)We have also developed a sample notebook for those researchers interested in generating their own artificial data in a compatable format for RPLIB.Click to launch on Colab.Installing pyrplib packagePrerequisitesThe graphviz headers must be installed. To do this on Debian/Ubuntu:apt-getinstall-ylibgraphviz-devRecommended package installationpipinstallpyrplibDocumentationFor documentation on pyrplib:https://birg.dev/pyrplib.Post package installation: Gurobi LicenseThe webserver does not require Gurobi to launch, but to use the full functionality of RPLIB, the Gurobi optimizer must be installed with a valid license. Gurobi provides free academic licenses and more information on obtaining and installing your license can be found here:https://support.gurobi.com/hc/en-us/articles/360040541251.Verify installationimportpyrplibDevelopment notesLaunch a version of RPLIB browser locallyProductioncdRPLIBUSER=$(id-u)docker-composeup-d--buildproductionVisithttp://localhost:7001/rplibto test your site.StagingcdRPLIB
gitcheckoutstagingUSER=$(id-u)docker-composeup-d--buildstagingVisithttp://localhost:7002/rplib_stagingto test your site.Development environmentscdRPLIB
gitcheckout<branch>USER=$(id-u)docker-composeup--builddevVisithttp://localhost:7003/rplib_devto test your site.AuthorsPaul Anderson, Ph.D.Brandon TatCharlie WardDepartment of Computer Science and Software EngineeringCalifornia Polytechnic State UniversityKathryn Pedings-BehlingAmy Langville, Ph.D.Department of MathematicsCollege of CharlestonAcknowledgementsWe would like to thank the entire IGARDS team for their invaluable insight and encouragement.
Package: pyrplidar
PyRPlidarIntroductionPyRPlidaris a python library for Slamtec RPLIDAR series.Supports all series (A1, A2 and A3)Implement all features of the deviceSimple code & Easy to useUse generator pattern (for performance)Installation$pipinstallpyrplidarExample CodefrompyrplidarimportPyRPlidarlidar=PyRPlidar()lidar.connect(port="/dev/ttyUSB0",baudrate=256000,timeout=3)# Linux   : "/dev/ttyUSB0"# MacOS   : "/dev/cu.SLAB_USBtoUART"# Windows : "COM5"info=lidar.get_info()print("info :",info)health=lidar.get_health()print("health :",health)samplerate=lidar.get_samplerate()print("samplerate :",samplerate)scan_modes=lidar.get_scan_modes()print("scan modes :")forscan_modeinscan_modes:print(scan_mode)lidar.disconnect()DocumentationThis library implement full specifications on theprotocol documentationof Slamtec.
Package: pyrpmdb
A python package that extracts rpm package information from rpm database.Why this and not "rpm" I needed a package that could run on environment without rpm shared libraries installable. This leverage go's portability to enable this.Example usagefrompyrpmdbimportget_rpm_db_infoimportjsondeftest_get_info(file):res=get_rpm_db_info(file)print(json.dumps(res,indent=4))test_get_info("foo/bar")test_get_info("/usr/bin/du")test_get_info("test-data/centos5-plain-Packages")The result returned is always a dict object for errors  the dictionary returned contains a key;
"error" like;{"error":"path error:foo/bar"}or{"error":"/usr/bin/du: could not read Go build info from /usr/bin/du: unrecognized file format"}on success a python list of rpm package info struct is returned of this go structure serialized{NamestringVersionstringReleasestringArchstringSourceRpmstringSizeintLicensestringVendorstringModularitylabelstringSummarystringPGPstringSigMD5stringInstallTimeintBaseNames[]stringDirIndexes[]int32DirNames[]stringFileSizes[]int32FileDigests[]stringFileModes[]uint16FileFlags[]int32UserNames[]stringGroupNames[]stringProvides[]stringRequires[]string}[{"Name":"package_name","Version":"version","Release":"blah"}]This spackage relies on a shared go library that leverageshttps://pkg.go.dev/github.com/knqyf263/go-rpmdb/pkgSo relies on this for database support.
Package: pyrpo
pyrpoGitHub|PyPI|Documentation|Travis-CIpyrpo: a shell command wrapper for hg, git, bzr, svnFeaturesWrap and parse shell commands (largely as a reference)Walk for repository directoriesGenerate reports for one or more repositoriesCallhg status,git status, etc.Generate mercurial.hgsubsGenerate git.gitsubmoduleGenerate piprequirements.txtGenerate shell script (to rebuild environment)TODO: replicate branches/tags/revisionsFunctionalnamedtuples,iteratorsyield-inggeneratorsoptparseargument parsing (-h,--help)cookiecutter-pypackageproject templatingInstallingInstall fromPyPi:pip install pyrpoInstall fromGitHubas editable (add apyrpo.pthinsite-packages):pip install -e git+https://github.com/westurner/pyrpo#egg=pyrpoUsagePrint help:pyrpo --helpScan for files:# Scan and print a shell report
pyrpo -s . -r sh
pyrpoGenerate a TortoiseHGthg-reporegistry.xmlfile:pyrpo -s . --thgGenerate a pip report:pyrpo -r pipGenerate a status report:pyrpo -r statusGenerate an.hgsubsfile:pyrpo -r hgsubGenerate a.gitmodulesfile:pyrpo -r gitmoduleGenerate an origin report:pyrpo -r originGenerate a string report:pyrpo -r strLicenseBSD Software License.Historyrelease/0.2.3 (2020-10-02 21:36:25 -0400)git log --reverse --pretty=format:'* %s [%h]' v0.2.2..release/0.2.3BLD: setup.py: add sarge to install_requires [2e38b51]RLS: __init__,setup.py: v0.2.3, add 3.8 trove classifier [e35e91f]0.2.2 (2019-04-15)Python 3.7 SupportMinimal tests for each report typegit log --format='* %s [%h]' master..develop
# [ ... ]0.2.1 (2015-05-24)BUG: pyrpo.py: sh_full report:cat > %r << EOF[91d5fb7]BUG,CLN: pyrpo.py: logname=’pyrpo’ [e029abe]BLD: Makefile: pull, push, BROWSERCMD lookups [59cbc66]BLD: Makefile: twine [d636e15]0.2.0 (2015-04-25)Development:https://github.com/westurner/pyrpo/commits/developMaster:https://github.com/westurner/pyrpo/commits/master0.1.0 (2014-05-12)First release on PyPI.Re-packaged fromhttps://github.com/westurner/dotfiles/blob/2813e4ad/scripts/repos.pyCreditsWes Turner –https://github.com/westurner
Package: pyrprimos
Ejemplo sencillo de paquete Python. Este paquete contiene una funciÃ³n para calcular los nÃºmeros primos entre 1 y un nÃºmero dado n.
This program is free software: You can redistribute it and/or modify it under the terms of license by the Free Software Foundation, either version 3 of the License(at your option) any other version.
Package: pyrpush
pyrpushPush client Python library for Roboger event pager (https://www.roboger.com/,https://github.com/alttch/roboger)License: Apache License 2.0Usage example:frompyrpushimportClientasRPushClientr=RPushClient()r.sender='bot1'r.location='lab'r.push(msg='test message')r.push(msg='test2',media_file='1.jpg',level='warning')Constructor can acceptini_file=FILENAMEparam as the alternative config
location.(c) 2018-2019 Altertech Group,https://www.altertech.com/
Package: pyrrencies
Pyrrencies Python LibraryOverviewThepyrrencieslibrary provides a convenient way to handle currency conversion and arithmetic operations in Python. It supports a wide range of currencies and allows for easy conversion between them.InstallationpipinstallpyrrenciesUsageInitializationfrompyrrenciesimportCurrencyAmountamount_usd=CurrencyAmount(1000,'USD')# USD 10.0amount_uah=CurrencyAmount(10000,'UAH')# UAH 100.0Displayprint(amount_usd)# USD 10.0Accessing Propertiesprint(amount_usd.cents)# 1000print(amount_usd.currency)# USDCurrency Conversionprint(amount_usd.to('UAH'))# UAH 367.44print(amount_usd.to('EUR'))# EUR 9.55Exchange RatesfrompyrrenciesimportCurrencyRatesprint(CurrencyRates.get_rate('USD','UAH'))# 36.744452print(CurrencyRates.get_rate('PLN','EUR'))# 0.21633Arithmetic Operationsprint(amount_usd+50)# USD 10.5print(amount_usd+amount_uah)# ValueError: Currencies must be the sameprint(amount_usd+amount_uah.to('USD'))# USD 12.72print(amount_usd-amount_uah.to('USD'))# USD 7.28print(amount_usd*7.34)# USD 73.4print(amount_usd/2)# USD 5.0Comparisonprint(amount_usd==amount_uah)# Falseprint(amount_usd!=amount_uah)# Trueprint(amount_usd>amount_uah)# ValueError: Currencies must be the sameprint(amount_usd>=amount_uah)# ValueError: Currencies must be the sameprint(amount_usd<amount_uah)# ValueError: Currencies must be the sameprint(amount_usd<=amount_uah)# ValueError: Currencies must be the sameSupported CurrenciesAED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, FOK, GBP, GEL, GGP, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, IMP, INR, IQD, IRR, ISK, JEP, JMD, JOD, JPY, KES, KGS, KHR, KID, KMF, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLE, SLL, SOS, SRD, SSP, STN, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TVD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XCD, XDR, XOF, XPF, YER, ZAR, ZMW, ZWL
Package: pyrrha
pyrrha is a tool for helping in the developement and testing of
Computational Mechanics methods.This project is based in the Octave & C++ program called "Prometheus
", developed by Carlos Gentile, that allows to generate templates for
programming Octave implementations of classical Computional Mechanics
methods. Inspired in these ideas, this project offers the ability to
generate python templates for the Finite Elements method, and tools for
evaluating the intermediate steps of its implementation.The name pyrrha comes from Pyrrha, the wife of Deucalion (the son of Prometheus
), who had a child out of wedlock with Zeus. She is basically the daughter
-in-law and niece of Prometheus (a link that is in some way preserved between
the original Prometheus application and this package).CommandsGenerate template from a base classpyrrha generate FiniteElement2D --output <file_name>A<file_name>file will be created with the FiniteElement2D template.Test implementationsTest classpyrrha validate <file_name>will validate the class defined in<file_name>against the correct
implementation.Test class methodpyrrha validate <file_name> --method <method_name>will test only the<method_name>method of the class defined in<file_name>, comparing it with the correct method implementation.Icons made byDarius Danfromwww.flaticon.com
Package: pyrrhic-restic
Restic implementation in PythonInstallationFrom pippipxinstallpyrrhic-resticScreenshotAlpha RelaseAll commands are compatible withresticimplementation:pyrrhic--reporestic_test_repositories/restic_test_repositorycatmasterkey{'encrypt': 'Te0IPiu0wvEtr2+J59McgTrjCp/ynVxC/mmM9mX/t+E=',
 'mac': {'k': 'aSbwRFL8rIOOxL4W+mAW1w==', 'r': 'hQYBDSD/JwpU8XMDIJmAAg=='}}pyrrhic-rrestic_test_repositories/restic_test_repository-p<(echopassword)lslatest/usr
/usr/share
/usr/share/cracklib
/usr/share/cracklib/cracklib-small
/usr/share/cracklib/cracklib.magic
/usr/share/cracklib/pw_dict.hwm
/usr/share/cracklib/pw_dict.pwd
/usr/share/cracklib/pw_dict.pwiAdditional features missing in golang restic implementationpretty-print all objectspyrrhic cat pack SNAPSHOT_ID --headerprints parsed headerResumable restoreProgress barWhy is it called pyrrhicNeeded a name starting withpycontainingrand ending withic:grep^py.*r.*ic$/usr/share/dict/cracklib-smallLimitationsSupports repository format version 2 only (current restic version).
Package: pyrrot-wallpaper
PyrrotThis is a collection of scripts I use to manage my wallpapers.
This is made for my usage in mind, and hasn't been tested much by others, but it might interest you.
If you've got any suggestion or issue, please let me know.I personnally use Archlinux, and more importantly i3wm.
These scripts may not work on other window managers.What does it do ?Thewallpaper.pyscript sets you wallpaper from a json file listing all your wallpapers with a few attributes.
Wallpapers may be any file supported by feh (jpeg and non-animated png and gif).
Animated gif or vidéo support for live-wallpapers will be supported later using xwinwrap.
(I should also make a script to aut-generate such a json file if you just want to use a list of images without selection by tags or colors for instance.)mpd-wallpaperwill allow you to set your wallpaper with the cover of the current music you're listening to with your mpd server.
It requireswallpaper.py.UsageEdit wallpaper.conf according to your needs.Setup a cron job to run wallpaper.py to change the wallpaper regularly. Mine is*/5 * * * * DISPLAY=:0 /home/user/scripts/wallpaper/wallpaper.pySetup a systemd task for the mpd part (optional). See thempd-wallpaper.service.example.
Of course if you prefer not to run the scripts with cron or systemd, you're free to use them as you want.PrerequisitesPython 3.7 for the mpd script, Python 3.5 for the wallpaper.py, pywal and feh.
Linux (it might work on some BSD or macOS but it may need some tweaks, and it hasn't been tested at all)DevelopmentThis software usespytestto run automated test, checking that it functions well.
Below is a list of commands useful for checking everything is allright.pipinstall-e.
coveragerun-mpytest--junitxml=report.xml
coveragereport
pylintsrc/
Package: pyrs
Project homepage:https://github.com/palankai/pyrsDocumentation:http://pyrs.readthedocs.org/Issues:https://github.com/palankai/pyrs/issuesWhat is this package forThis package basically an umbrella for other packages. Ensure basic helpers
for them like configuration, context, decorators, etc.The ecosystemSchema validation, serializationWith this module you can define schemas then you can validate and serialize
your data.Project homepage:https://github.com/palankai/pyrs-schemaDocumentation:http://pyrs-schema.readthedocs.org/Restful web frameworkThis module ensure a routing and dispatching through defined resources.
Baased on schema you can define interface which would be validate.
It’s an independent solution could work with Flask, Django or even Odoo.Project homepage:https://github.com/palankai/pyrs-resourceDocumentation:http://pyrs-resource.readthedocs.org/Swagger builderIf you knowSwaggerthen you know in python world there
is not that easy to use that. You have to make your documentation by hand.
This package aim to make it much more easier.Project homepage:https://github.com/palankai/pyrs-swaggerDocumentation:http://pyrs-swagger.readthedocs.org/Installation$ pip install pyrsNoteYou have to install the other packages independently.Extending the exist functionalityThepyrs.extand thepyrsitself are namespace packages.
If you would like to extend an exist functionality of a package check that
given package documentation for further information.If you would like to implement a new funcionality, just create a new package
insidepyrspackage. Make sure thepyrspackage still remain namespace
package.DependenciesSee requirements.txt. But The goal is less dependency as possible. Aim to work
with python 2.7, 3.3, 3.4+ (tested agains them).Important caveatsThis code is in beta version. I working hard on write stable as possible API in
the first place but while this code in 0.x version you should expect some major
modification on the API.ContributionI really welcome any comments!
I would be happy if you fork my code or create pull requests.
I’ve already really strong opinions what I want to achieve and how, though any
help would be welcomed.Feel free drop a message to me!
Package: py-rs
This framework defines a set of Python APIs for the development of Web
services built according to the Representational State Transfer (REST)
architectural style.http://py-rs.googlecode.comConceptSee Concept.html in /docs directory for description of py-rs 1.0 API.InstallingTo install py-rs, make sure you have Python 2.6 or Python 2.7 installed. Then
run this command from the command prompt:python setup.py installUnit TestsTo run py-rs test suite, switch to /tests directory and run this command in
the command prompt:python suite.pySamplesExamples of how to use py-rs APIs are located in /samples directory.Support & FeedbackFor support information, please visit py-rs project home:http://py-rs.googlecode.comor py-rs Google Group:http://groups.google.com/group/py-rs/topicsCopyrightSee the included LICENSE file for specific legal details.2011, Sergey K.
Package: pyrser
# PYRSER #Pyrser is a Python 3 module that help you for all parsing job.## Where ? ##Pyrser is available on [PYPI](https://pypi.python.org/pypi/pyrser/)## What ? ##Pyrser documentation is [here](http://pythonhosted.org/pyrser/index.html)[Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)
Package: pyrsess
Python Bindings for RSESSPython bindings for the ESS and OESS algorithms implemented in Rust.
The bindings are created usingPyO3.[Documentation](link to docs)SourceInstallationThere may currently be some issues installing PyRSESS on Windows as RSESS uses GMP which can not easily be built on Windows.Using PIPTypepip install pyrsessinto your favorite command line.From SourceMake sure that Rust and its package managercargoare installedClone this repository withgit clone https://github.com/kit-cel/rsess.gitCreate a virtual python environment in a folder of your choice (e.g.python -m venv $VENV_NAME)Activate the virtual environment (e.g.cd $VENV_NAME; source bin/activateif you are using Bash)Install thepyrsesspackage withpip:pip install $YOUR_PATH_TO/rsess/pyrsessIf this fails, yourpipmay be to old. Trypip install --upgrade pipDevelopmentBuilding can be done according to:https://pyo3.rs/v0.17.3/getting_started.htmlTLDR:pip install maturin; maturin developProject contentsrc/lib.rs: PyO3 Rust to python bindingspyess.pyi: Python function type hints
Package: pyrsi
A community made Python API for interactive with the Roberts Space Industries site for Star Citizen.WarningThis API is in it’s very early stages and will change often.Documentation:https://pyrsi.readthedocs.io.FeaturesTODOExamplesGetting system status:fromrsi.statusimportStatuss=Status()current_status=s.system()recent_incidents=s.timeline()specific_incident=s.incident('28f92e5a')Getting Roadmap information:fromdatetimeimportdatetimefromrsi.roadmapimportRoadmapr=Roadmap()cur_roadmap=r.fetch_roadmap(start_date=datetime(year=2021,month=1,day=1),end_date=datetime(year=2021,month=12,day=31))Accessing ship information:fromrsi.shipmatriximportShipMatrixAPIship_matrix=ShipMatrixAPI()ship=ship_matrix.ships[170]# ships is a dictionary, keys are ship IDsship=ship_matrix.search_by_name('kraken')Accessing citizen information:fromrsi.citizenimportfetch_citizenfetch_citizen('ventorvar')Accessing org information:fromrsi.orgimportOrgAPIorg=OrgAPI('EXTERRA')member=org.members[0]Accessing admin org information for an organization that you have the Officer or Founder role for.
This let’s you see the member information for hidden members.fromrsi.orgimportOrgAPIorg=OrgAPI('EXTERRA',admin_mode=True,username=username,password=password)member=org.members[0]members=org.search('fuzzy_handle_matching')# list of members using fuzzy matchingmember=org.search_one('fuzzy_handle_matching')# returns only the top matchAccessing your hangar:Hangar access is only for the currently authenticated account.importrsisession=rsi.session.RSISession()session.authenticate('username','password')hangar=rsi.hangar.Hangar(session=session)print(hangar.ships)This project is not endorsed by or affiliated with the Cloud Imperium or Roberts Space Industries group of companies.
All game content and materials are copyright Cloud Imperium Rights LLC and Cloud Imperium Rights Ltd..  Star CitizenÂ®,
Squadron 42Â®, Roberts Space IndustriesÂ®, and Cloud ImperiumÂ® are registered trademarks of Cloud Imperium Rights LLC.
All rights reserved.History0.1.18 (2021-01-11)Added Hangar support0.1.16 (2020-12-30)Moved to GitLab0.1.15 (2020-12-23)Added new Roadmap API0.1.11 (2020-05-02)Added RSI status page API0.1.2 (2018-12-27)Added Authentication and session management required for accessing privileged Organization members
list0.1.0 (2018-12-10)Initial commit
Package: pyrsig
pyrsigPython interface to RSIG Web APIInstallFrom pypi.org (most stable):pipinstallpyrsigFrom github (latest):pipinstallgit+https://github.com/barronh/pyrsig.gitUser GuideExamples and more information are available athttps://barronh.github.io/pyrsigExampleGet DataFrame for AQS ozoneimportpyrsigrsigapi=pyrsig.RsigApi(bdate='2022-03-01')print([kforkinrsigapi.keys()if'ozone'ink])# ['airnow.ozone', 'airnow2.ozone', 'aqs.ozone', 'aqs.ozone_8hour_average', 'aqs.ozone_daily_8hour_maximum', 'pandora.ozone']df=rsigapi.to_dataframe('aqs.ozone')print(df.shape,*df.columns)# (26760, 6) Timestamp(UTC) LONGITUDE(deg) LATITUDE(deg) STATION(-) ozone(ppb) SITE_NAMEGet DataFrame for PurpleAir PM25importpyrsigrsigapi=pyrsig.RsigApi(bdate='2022-03-01')rsigapi.purpleair_kw['api_key']='<put your api key here>'df=rsigapi.to_dataframe('purpleair.pm25_corrected')Get DataFrame for TropOMI NO2importpyrsigrsigapi=pyrsig.RsigApi(bdate='2022-03-01')df=rsigapi.to_dataframe('tropomi.offl.no2.nitrogendioxide_tropospheric_column')print(df.shape,*df.columns)# (303444, 4) Timestamp(UTC) LONGITUDE(deg) LATITUDE(deg) nitrogendioxide_tropospheric_column(molecules/cm2)Get IOAPI formatted NetCDF TropOMI NO2importpyrsigrsigapi=pyrsig.RsigApi(bdate='2022-03-01')ds=rsigapi.to_ioapi('tropomi.offl.no2.nitrogendioxide_tropospheric_column')print(ds.data_vars)# Data variables:#     TFLAG      (TSTEP, VAR, DATE-TIME) int32 ...#     LONGITUDE  (TSTEP, LAY, ROW, COL) float32 ...#     LATITUDE   (TSTEP, LAY, ROW, COL) float32 ...#     COUNT      (TSTEP, LAY, ROW, COL) int32 ...#     NO2        (TSTEP, LAY, ROW, COL) float32 ...Get List of Possibleimportpyrsigrsigapi=pyrsig.RsigApi()keys=rsigapi.keys()print(len(keys),keys)# 80 ('airnow.pm25', ... 'aqs.ozone', ... 'cmaq.equates.conus.aconc.O3', ... 'hms.smoke',#     'metar.wind', ... 'pandora.ozone', 'purpleair.pm25_corrected', ...#     'tropomi.offl.no2.nitrogendioxide_tropospheric_column', ...#     'viirsnoaa.jrraod.AOD550', ...)keys=rsigapi.keys(offline=False)# slow and likely to many optionsprint(len(keys))# 3875Change LogNot all changes are listed, but notable changes are itemized for ease of review.v0.7.0: Added offline descriptions for review of space/time coverage.v0.7.0: Added TEMPO options for screeningv0.6.0: Added latitude longitude grid pass thru support.v0.5.1: Added convenience function for opening many IOAPI files at once.v0.5.1: Updated TEMPO proxy naming.v0.4.6: Added support for legacy TLS servers (e.g, ofmpub and maple)v0.4.5: Updated TEMPO proxy namingv0.4.4: Adding pandora explicit supportv0.4.3: updated to work with CMAQ EQUATES data (must exclude grid=False)v0.4.3: updated to support GDTYP=7 (equatorial mercator)v0.4.2: updated to support GDTYP=2 (equatorial mercator)
Package: pyrsistent-extras
Extra data structures forpyrsistentBelow are examples of common usage patterns for some of the structures and
features. More information and full documentation for all data structures is
available in thedocumentation.PSequencePersistent sequences implemented with finger trees,
with\(O(\log{n})\)merge/split/lookup
and\(O(1)\)access at both ends.>>>frompyrsistent_extrasimportpsequence>>>seq1=psequence([1,2,3])>>>seq1psequence([1,2,3])>>>seq2=seq1.append(4)>>>seq2psequence([1,2,3,4])>>>seq3=seq1+seq2>>>seq3psequence([1,2,3,1,2,3,4])>>>seq1psequence([1,2,3])>>>seq3[3]1>>>seq3[2:5]psequence([3,1,2])>>>seq1.set(1,99)psequence([1,99,3])PHeapPersistent heaps implemented with binomial heaps,
with\(O(1)\)findMin/insert and\(O(\log{n})\)merge/deleteMin.
Comes in two flavors:PMinHeapandPMaxHeap.>>>frompyrsistent_extrasimportpminheap>>>heap1=pminheap([(1,'a'),(2,'b')])>>>heap1pminheap([(1,'a'),(2,'b')])>>>heap2=heap1.push(3,'c')>>>heap2pminheap([(1,'a'),(2,'b'),(3,'c')])>>>heap3=heap1+heap2>>>heap3pminheap([(1,'a'),(1,'a'),(2,'b'),(2,'b'),(3,'c')])>>>key,value,heap4=heap3.pop()>>>(key,value)(1,'a')>>>heap4pminheap([(1,'a'),(2,'b'),(2,'b'),(3,'c')])