Saravanan666/pypi-org huggingface dataset:
Package: rfb-shared-tool
Sync FunctionalitiesRepository where classes and functions used to share elements within python are stored.
Once a shared object is created and initilized with data, all the data stored in that
object must have the same type.IPC channelsThe system maximum POSIX queues size is defined byRLIMIT_MSGQUEUEconstant used on
posix library. It also can be checked by means ofulimit -qcommand. Default value is
819200 bytes. It determines the number of queues allowed:num_queues = RLIMIT_MSGQUEUE/num_msg_per_queue/max_msg_sizeThe maximum length of a message sent through POSIX queue is define in the file:cat /proc/sys/fs/mqueue/msgsize_maxCan be change using the command:sudo sh -c 'echo 500 > /proc/sys/fs/mqueue/msgsize_max'The maximum number of a messages allocated in a POSIX queue is define in the file:cat /proc/sys/fs/mqueue/msg_maxCan be change using the command:sudo sh -c 'echo 400 > /proc/sys/fs/mqueue/msg_max'The parametersmax_msgandmax_message_sizegiven toSysShdIpcChanCmust be
lower that ones specified on Linux files.For further information, check theGithub Issue: Change default values for message queueCo-authors:Roberto Aldea,Javier Sanz,Marius Crisan
Package: rfbzero
RFBzerorfbzerois a Python package for zero dimensional simulation of electrochemical cycling in redox flow batteries (RFBs).This package includes modules to describe the initial flow cell setup, chemical and electrochemical properties of the redox-active electrolytes being cycled, cell cycling protocol selection, and optional inputs for capacity degradation mechanisms and active species crossover.Installationrfbzerocan be installed fromPyPIusing pip.pipinstallrfbzeroSeeGetting started withrfbzero.pyfor instructions on simulating RFBs.Dependenciesrfbzero.pyrequires:Python (>=3.10)SciPyExamples and DocumentationSeveral simulated RFB examples can be found in a notebook indocs/source/examples(requires Jupyter notebook/lab). The documentation can be found atrfbzero.readthedocs.Package Structureredox_flow_cell.py: Configures flow cell and electrolyte parametersexperiment.py: Specifies electrochemical cycling protocoldegradation.py: Optional degradation mechanism functionscrossover.py: Optional crossover mechanismExamplesTo simulate a full cell with constant current (CC) cycling:fromrfbzero.redox_flow_cellimportZeroDModelfromrfbzero.experimentimportConstantCurrent# define full cell and electrolyte parameterscell=ZeroDModel(volume_cls=0.005,# litersvolume_ncls=0.010,# litersc_ox_cls=0.01,# molarc_red_cls=0.01,# molarc_ox_ncls=0.01,# molarc_red_ncls=0.01,# molarocv_50_soc=1.0,# voltsresistance=0.5,# ohmsk_0_cls=1e-3,# cm/sk_0_ncls=1e-3,# cm/s)# define cycling protocolprotocol=ConstantCurrent(voltage_limit_charge=1.5,# voltsvoltage_limit_discharge=0.5,# voltscurrent=0.1,# amps)# simulate cell via protocol for 1000 secondsresults=protocol.run(cell_model=cell,duration=1000)or a symmetric cell with constant current constant voltage (CCCV) cycling, with an electrolyte undergoing a first order chemical degradation in the reduced form:fromrfbzero.redox_flow_cellimportZeroDModelfromrfbzero.degradationimportChemicalDegradationReducedfromrfbzero.experimentimportConstantCurrentConstantVoltage# define symmetric cell and electrolyte parameterscell=ZeroDModel(volume_cls=0.005,# litersvolume_ncls=0.010,# litersc_ox_cls=0.01,# molarc_red_cls=0.01,# molarc_ox_ncls=0.01,# molarc_red_ncls=0.01,# molarocv_50_soc=0.0,# voltsresistance=0.5,# ohmsk_0_cls=1e-3,# cm/sk_0_ncls=1e-3,# cm/s)# define cycling protocolprotocol=ConstantCurrentConstantVoltage(voltage_limit_charge=0.2,# voltsvoltage_limit_discharge=-0.2,# voltscurrent_cutoff_charge=0.005,# ampscurrent_cutoff_discharge=-0.005,# ampscurrent=0.1,# amps)# define first order chemical degradation mechanismchem_deg=ChemicalDegradationReduced(rate_order=1,rate_constant=1e-5)# simulate cell via protocol for 1000 secondsresults=protocol.run(cell_model=cell,degradation=chem_deg,duration=1000)LicenseMIT
Package: rfc1924
RFC 1924This python library is an implementation ofRFC 1924.A Compact Representation of IPv6 AddressesWith this library you can store IPv6 addresses in a more compact form. It's Base85 encoded.Usagefromrfc1924import*print(encode("2345:0425:2CA1::0567:5673:23b5"))# -> AN?6(i3Y+yVr74uX@J3Pprint(decode("AN?6(i3Y+yVr74uX@J3P"))# -> 2345:0425:2CA1::0567:5673:23b5Save up to 48% space with this compact form:ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff->=r54lj&NUUO~Hi%c2ym0
Package: rfc2397
Author:Jacob OscarsonContact email:jacob@plexical.comQuick implementation ofRFC2397in Python,MIT Licenced. RFC2397
is also known as the ‘data url’ format used to embed image data
directly into CSS stylesheets among other things.The rationale behind this package is described inthis blogpost.RequirementsPython 2.6 and 2.7, not tested on Python 3+ (yet).InstallationThe latest version can be found onPyPI. The recommended way to
install is viapip:$ pip install rfc2397An executable namedrfc2397is then placed in the python environment
thatpipinstalls to.As an alternate method, it’s also possible to copy therfc2397.pyfile to any location and run the script stand-alone.UsageJust giverfc2397a path to an image file.rfc2397uses Python’smimetypesmodule to determine what MIME-type a file has (N.B:
the program won’t stop you from encoding something too large/an
unsupported mime-type).$ rfc2397 dot.png # <- your image pathdata:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVQImWP4o8oAAANCASIYayeeAAAAAElFTkSuQmCCChanges1.0b2 (2012-01-03)Usesmimetypesmodule instead of primitive ad-hoc file name
extension guessing.rfc2397is now a single-file module, simplifies package and makes
it possible to just copy therfc2397.pyfile to an arbitrary
location as an alternate installation method.Better QA by usingtox.1.0b1 (2011-06-16)Concept and initial coding.
Package: rfc2html
Htmlizing IETF Text DocumentsChangelogContributingUsageThis module contains one single function,markup(text)which adds HTML markup
to what is assumed to be an IETF document (usually anInternet-Draftor anRFC):fromrfc2htmlimportmarkupwithopen('rfc3344.txt')asfile:text=file.read()html=markup(text)HistoryAs a historic artifact of being a document series which was started at the time when the easiest
way of distributing aRequest For Commentswas to type it up on a typewriter andmimeographingit, RFCs and Internet-Drafts before RFC 8650 were published as plaintext documents with a
maximum line length of 72 characters. Some Internet-Drafts are still created only in this form.This format isn't particularly appropriate in a web-centric world, howerver, so starting in
2002,Henrik Levkowetzstarted using scripts to convert the plaintext documents into HTML
documents with the same look-and-feel as the plaintext originals, but with internal and external
HTML links in order to facilitate browsing.Henrik served the resulting documents at tools.ietf.org starting in 2004. These are now served
from the IETFDatatracker.This module began as a packaging of the htmlization code from version 1.113 of the htmlizing script.
Package: rfc2xml
rfc2xmlTool to process an RFC or Internet Standard into XML. Structure can also be accessed directly within a seperate Python project.Note that this is not a general purpose tool and contains some restrictions. This is currently really slow. This is due partly to to overhead from Python, the parsing library and some inefficient parser grammar.Usagepython-mrfc2xml<filename>[--suppress-result]ExamplesDownload an Internet Standard to process:wgethttps://www.ietf.org/id/draft-ietf-quic-transport-19.txtThe tool can then be run on that file using the following command (in the top level src directory):python-mrfc2xmldraft-ietf-quic-transport-19.txtImportThe tool can also be imported into a different python script and used there:fromrfc2xmlimportRfc2Xmlwithopen("draft-ietf-quic-transport-19.txt")asfp:contents=fp.read()dom=Rfc2Xml.parse(contents)
Package: rfc3161
rfc3161A simple client library for cryptographic timestamping service implementing the
protocol from RFC3161.>>> import rfc3161
>>> certificate = file('data/certum_certificate.crt').read()
>>> rt = rfc3161.RemoteTimestamper('http://time.certum.pl', certificate=certificate)
>>> rt.timestamp(data='John Doe')
('...', '')
>>> rt.check(_, data='John Doe')
(True, '')
>>> rfc3161.get_timestamp(tst)
datetime.datetime(2014, 4, 25, 9, 34, 16)AuthorsBenjamin Dauvergne <bdauvergne@entrouvert.com>
Michael Gebetsroither <michael@mgeb.org>Changelog1.0.7use dateutil to parse genTimefix bad instantiation of UTF8String in PKIFreeTextuse tox and py.test
Package: rfc3161ng
A simple client library for cryptographic timestamping service implementing the
protocol from RFC3161.This started as a fork ofhttps://dev.entrouvert.org/projects/python-rfc3161and
has some additional patches such as Python3 support.The latest version of this library is available fromhttps://github.com/trbs/rfc3161ng/.Public providersThere are several timestamping services around.  Here is a list of
publicly available services you can try:http://freetsa.org/tsrhttp://time.certum.plhttp://timestamp.comodoca.com/rfc3161http://timestamp.geotrust.com/tsahttp://timestamp.globalsign.com/scripts/timstamp.dllhttp://tsa.starfieldtech.comhttps://teszt.e-szigno.hu:440/tsaExample>>> import rfc3161ng
>>> certificate = open('data/certum_certificate.crt', 'rb').read()
>>> rt = rfc3161ng.RemoteTimestamper('http://time.certum.pl', certificate=certificate)
>>> tst = rt.timestamp(data=b'John Doe')
>>> rt.check(tst, data=b'John Doe')
True
>>> rfc3161ng.get_timestamp(tst)
datetime.datetime(2017, 8, 31, 15, 42, 58, tzinfo=tzutc())Example for a server that insist on SHA256:>> import rfc3161ng
>> timestamper = rfc3161ng.RemoteTimestamper(’https://interop.redwax.eu/test/timestamp’, hashname=’sha256’)
>> tsr = timestamper(data=b’The RedWax Project’, return_tsr=True)
>> print(‘{}’.format(tsr))Verifying timestamp using OpenSSLOne can verify the timestamp returned by the timeserver by using OpenSSL.
For example with:$ openssl ts -verify -data data_file.txt -in data_file.tsr -CAfile cacert.pem -untrusted tsa.crtTo save the tsr you can use code similar to:>>> from pyasn1.codec.der import encoder
>>> import rfc3161ng
>>> ...
>>> timestamper = rfc3161ng.RemoteTimestamper('http://freetsa.org/tsr', certificate=certificate_data)
>>> tsr = timestamper(data=data_file.read(), return_tsr=True)
>>> with open("data_file.tsr", "wb") as f:
>>>     f.write(encoder.encode(tsr))Alternatively you can just save the rawresponse.contentreturned from the certification server.There is a test which also covers this intest_verify_timestamp_response_with_openssl.AuthorsBenjamin Dauvergne <bdauvergne@entrouvert.com>Michael Gebetsroither <michael@mgeb.org>Bas van Oostveen <trbs@trbs.net>
Package: rfc3339-validator
rfc3339-validatorA pure python RFC3339 validatorInstallpipinstallrfc3339-validatorUsagefromrfc3339_validatorimportvalidate_rfc3339validate_rfc3339('1424-45-93T15:32:12.9023368Z')>>>Falsevalidate_rfc3339('2001-10-23T15:32:12.9023368Z')>>>TrueFree software: MIT license
Package: rfc3986-validator
rfc3986-validatorA pure python RFC3986 validatorInstallpipinstallrfc3986-validatorUsage>>>fromrfc3986_validatorimportvalidate_rfc3986>>>validate_rfc3986('http://foo.bar?q=Spaces should be encoded')False>>>validate_rfc3986('http://foo.com/blah_blah_(wikipedia)')TrueIt also support validateURI-referencerule>>>validate_rfc3986('//foo.com/blah_blah',rule='URI_reference')TrueFree software: MIT license
Package: rfc5424syslog
python-rfc5424-logging-formatter================================A Logging Formatter for Python's logging module to properly handle Syslog RFC5424 messagesWhat is provided by this formatter----------------------------------A derived formatter than allows for isotime specificationfor full RFC5424 compliancy (with corrected TZ format)For a "proper" ISOTIME format, use "%(isotime)s" in aformatter instance of this class or a class derived fromthis class.  This is for a work-around where strftimehas no mechanism to produce timezone in the format of"-08:00" as required by RFC5424.The '%(isotime)s' replacement will read in the recordtimestamp and try and reparse it.  This really is aproblem with RFC5424 and strftime.  I am unsure if thiswill be fixed in the future (in one or the other case)This formatter has an added benefit of allowing for'%(hostname)s' to be specified which will return a '-'as specified in RFC5424 if socket.gethostname() returnsbad data (exception).RFC5424 Format--------------RFC: http://tools.ietf.org/html/rfc5424__The RFC5424 Format should only be used when talking to a Syslog serverover the network stack.  Specifically the Linux KSyslog implementationstill uses RFC3164 format (and something akin to RSyslog still adheresto that)__The RFC5424 format string should look somthing like:```%(isotime)s %(hostname)s %(name)s %(process)d - - %(message)s```The section after the two "- -" is technically the messagesection, and can have any data applied to it e.g.:```<...> %(levelname)s [%(module)s %(funcName)s] %(message)s```The '- -' section is the "msg ID" and "Structured-Data" Elements,respectivelyExample usage of the formatter-------------------------------```pythonimport logginglogger = logging.getLogger('rfc5424_example')handler = logging.handlers.SysLogHandler(address=<Address of SysLogServer>)format = '%(isotime)s %(hostname)s %(name)s %(process)d - - %(message)s'formatter = RFC5424Syslog(format)handler.setFormatter(formatter)logger.addHandler(handler)logger.info('RFC5424 Log Message Format in use')```License-------Copyright (C) 2013 Morgan Fainberg and Metacloud, IncThis program is free software: you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation, either version 2 of the License, or(at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program.  If not, see <http://www.gnu.org/licenses/>.
Package: rfc6266
rfc6266This module parses and generates HTTPContent-Dispositionheaders.
These headers are used when getting resources for download;
they provide a hint of whether the file should be downloaded,
and of what filename to use when saving.UsageReceiverparse_headersbuilds aContentDispositionobject from theContent-Dispositionheader and (as a fallback) the document
location. Shortcuts work with response objects from httplib2
and the requests library.Important attributes ofContentDispositionareis_inline,filename_unsafe,filename_sanitized.Senderbuild_headerbuilds a header value from a filename.SecurityTheContent-Dispositionfilename should be used with caution.
Do not let the sender overwrite an arbitrary filesystem location,
pick arbitrary extensions or filenames with special meaning,
pick filenames containing unusual or misleading characters, etc.
Read RFC 6266 section 4.3 for more details.TestingTo test in the current Python implementation:py.testTo test compatibility across Python releases:toxrfc6266 is currently tested under Python 2.7, Python 2.6,
Python 3.3, Python 3.2, and PyPy (1.7).ReferencesRFC 6266 <https://tools.ietf.org/html/rfc6266>
specifies the Content-Disposition headerRFC 5987 <https://tools.ietf.org/html/rfc5987>
specifies a way to encode non-ascii filenamesTC 2231 <http://greenbytes.de/tech/tc2231/>
is a test suite for Content-Disposition headers
Package: rfc6266-content-disposition
rfc6266This module parses and generates HTTPContent-Dispositionheaders.
These headers are used when getting resources for download;
they provide a hint of whether the file should be downloaded,
and of what filename to use when saving.UsageReceiverparse_headersbuilds aContentDispositionobject from theContent-Dispositionheader and (as a fallback) the document
location. Shortcuts work with response objects from httplib2
and the requests library.Important attributes ofContentDispositionareis_inline,filename_unsafe,filename_sanitized.Senderbuild_headerbuilds a header value from a filename.SecurityTheContent-Dispositionfilename should be used with caution.
Do not let the sender overwrite an arbitrary filesystem location,
pick arbitrary extensions or filenames with special meaning,
pick filenames containing unusual or misleading characters, etc.
Read RFC 6266 section 4.3 for more details.TestingTo test in the current Python implementation:py.testTo test compatibility across Python releases:toxrfc6266 is currently tested under Python 2.7, Python 2.6,
Python 3.3, Python 3.2, and PyPy (1.7).ReferencesRFC 6266 <https://tools.ietf.org/html/rfc6266>
specifies the Content-Disposition headerRFC 5987 <https://tools.ietf.org/html/rfc5987>
specifies a way to encode non-ascii filenamesTC 2231 <http://greenbytes.de/tech/tc2231/>
is a test suite for Content-Disposition headers
Package: rfc6266-parser
rfc6266-parserThis module parses and generates HTTPContent-Dispositionheaders.
These headers are used when getting resources for download;
they provide a hint of whether the file should be downloaded,
and of what filename to use when saving.difference rfc6266This module is a fork of rfc6266 which includes the latest bugfix
‘NullHandler should be an instance, not a class’ and bumped the
version to0.0.5.UsageReceiverparse_headersbuilds aContentDispositionobject from theContent-Dispositionheader and (as a fallback) the document
location. Shortcuts work with response objects from httplib2
and the requests library.Important attributes ofContentDispositionareis_inline,filename_unsafe,filename_sanitized.Senderbuild_headerbuilds a header value from a filename.SecurityTheContent-Dispositionfilename should be used with caution.
Do not let the sender overwrite an arbitrary filesystem location,
pick arbitrary extensions or filenames with special meaning,
pick filenames containing unusual or misleading characters, etc.
Read RFC 6266 section 4.3 for more details.TestingTo test in the current Python implementation:py.testTo test compatibility across Python releases:toxrfc6266 is currently tested under Python 2.7, Python 2.6,
Python 3.3, Python 3.4, Python 3.5, Python 3.6 and PyPy (1.7), PyPy(5.10.0) for Python3.ReferencesRFC 6266 <https://tools.ietf.org/html/rfc6266>
specifies the Content-Disposition headerRFC 5987 <https://tools.ietf.org/html/rfc5987>
specifies a way to encode non-ascii filenamesTC 2231 <http://greenbytes.de/tech/tc2231/>
is a test suite for Content-Disposition headers
Package: rfc6555
Happy Eyeballs in Python (RFC 6555)Synchronous Python implementation of the Happy Eyeballs Algorithm described inRFC 6555.
Provided with a single file and dead-simple API to allow easy vendoring
and integration into other projects.AbstractWhen a server’s IPv4 path and protocol are working, but the server’s
IPv6 path and protocol are not working, a dual-stack client
application experiences significant connection delay compared to an
IPv4-only client.  This is undesirable because it causes the dual-
stack client to have a worse user experience.  This document
specifies requirements for algorithms that reduce this user-visible
delay and provides an algorithm.Installation$python-mpipinstallrfc6555UsageThe main API for therfc6555module is viarfc6555.create_connection()which
functions identically tosocket.create_connection()with the same arguments.
This function will automatically fall back on asocket.create_connection()call if
RFC 6555 is not supported (for instance on platforms not capable of IPv6) or if
RFC 6555 is disabled via settingrfc6555.RFC6555_ENABLEDequal toFalse.IMPORTANT:Caching isNOTthread-safe by default. If you require thread-safe caching
one should create their own implementation ofrfc6555._RFC6555CacheManagerobject that
is thread-safe and assign an instance torfc6555.cache.importrfc6555sock=rfc6555.create_connection(('www.google.com',80),timeout=10,source_address=('::1',0))# This will disable the Happy Eyeballs algorithm for future# calls to create_connection()rfc6555.RFC6555_ENABLED=False# Use this to set a different duration for cache entries.rfc6555.cache.validity_duration=10# 10 second validity time.# Use this to disable caching.rfc6555.cache.enabled=FalseSupportThis module supports Python 2.7 or newer and supports all major platforms.
Additionally if you haveselectors2>=2.0.0installed this module will
also support Jython in addition to CPython.LicenseTherfc6555package is released under theApache-2.0license.Seefull license text in LICENSE filefor more information.Changelog0.1.0Useselectorsinstead ofselectors2for Python 3.5+Dropped support for Python 2.6, 3.3, and 3.4
Package: rfc6920
A library to generate and validate RFC6920 URIsNaming Things with HashesIETF RFC 6920specifies bothniandnihschemes, and how they are generated and validated.This library is composed by methodsgenerate_ni(to generate aniURI),generate_nih(to generate anihURI),extract_digest(to get back both the digest and the hashing algorithm) andvalidate(to validateniandnihURIs). Bothgenerate_ni,generate_nihandvalidateunderstand both file paths and bytearray.rfc6920.generate_nih(b'Hello World!')# It returns 'nih:sha-256;7f83-b165-7ff1-fc53-b92d-c181-48a1-d65d-fc2d-4b1f-a3d6-7728-4add-d200-126d-9069;d'rfc6920.validate('nih:sha-256;7f83-b165-7ff1-fc53-b92d-c181-48a1-d65d-fc2d-4b1f-a3d6-7728-4add-d200-126d-9069;d',b'Hello World!')# It returns Truerfc6920.validate('nih:sha-256;7f83-b165-7ff1-fc53-b92d-c181-48a1-d65d-fc2d-4b1f-a3d6-7728-4add-d200-126d-9069;e',b'Hello World!')# It returns False, wrong check digitrfc6920.validate('nih:sha-256;7f83-b165-7ff1-fc53-b92d-c181-48a1-d65d-fc2d-4b1f-a3d6-7728-4add-d200-126d-9069;d',b'Hello Mundo!')# It returns False, different digest
Package: rfc7464
The firehose of your JSONIntroductionRFC7464is a proposed standard for streaming JSON documents.
It is meant to be used for things like loggers,
which can use JSON to log structured data.
It is designed to recover gracefully from file truncation,
even in the middle – such as what happens when a previous
run crashed badly, and the next run opens the existing
log file for appending.ContributingWe welcome issues and PRs on GitHub!
Please adhere to the contributor covenant,
conveniently placed in the root of the repository.$ toxShould succeed on pull requests when rebased
against latest master for PRs before they
can be merged, but not before they can be submitted.
For your first PR, please add yourself to the list
of authors in the LICENSE file.For issues, if the problem is non-compliance with the RFC,
please site the specific section, quote from the RFC,
and (ideally) give a concrete example.DocumentationDocumentation is available on ReadTheDocs