Saravanan666/pypi-org huggingface dataset:
Package: backpack-for-pytorch
BackPACK: Packing more into backpropBackPACK is built on top ofPyTorch. It efficiently computes quantities other than the gradient.Website:https://backpack.ptDocumentation:https://docs.backpack.pt/en/master/Bug reports & feature requests:https://github.com/f-dangel/backpack/issuesProvided quantities include:Individual gradients from a mini-batchEstimates of the gradient variance or second momentApproximate second-order information (diagonal and Kronecker approximations)Motivation:Computation of most quantities is not necessarily expensive (often just a small modification of the existing backward pass where backpropagated information can be reused). But it is difficult to do in the current software environment.Installationpipinstallbackpack-for-pytorchExamplesBasic usageSome use casesContributingBackPACK is actively being developed.
We are appreciating any help.
If you are considering to contribute, do not hesitate to contact us.
An overview of the development procedure is provided in thedeveloperREADME.How to citeIf you are using BackPACK, consider citing thepaper@inproceedings{dangel2020backpack,
    title     = {Back{PACK}: Packing more into Backprop},
    author    = {Felix Dangel and Frederik Kunstner and Philipp Hennig},
    booktitle = {International Conference on Learning Representations},
    year      = {2020},
    url       = {https://openreview.net/forum?id=BJlrF24twB}
}BackPACK is not endorsed by or affiliated with Facebook, Inc. PyTorch, the PyTorch logo and any related marks are trademarks of Facebook, Inc.
Package: backpedal
BackpedalIt's likeos.walk(), but backwards... and on a bicycle.Core FeaturesWalk directories up, down, or both directionsSearch for files, directories, or both item typesReturn first item found immediately, or list of all matching items100% Test Coverage (pytest) on Python 2.7, 3.6, 3.7, 3.8100% PEP8 Compliant (pep8, autopep8)LicenseBackpedal is Open Source and is distributed under the BSD License (three clause).  Please see the LICENSE file included with this software.Installation$ pip install backpedal
Package: backpipe
BackpipeBack-Ends simplified.pip install backpipeWhy the name?The name 'Backpipe' is inspired by the english word 'Bagpipe'.I decided to call it 'Backpipe', because it is aBack-End Framework.It is just a little pun.SamplesHello World!importbackpipeserver=backpipe.BackPipe()@server.getdefhello_world(r:backpipe.Request):return(200,"Hello World")server.run()What is my IP address?importbackpipeserver=backpipe.BackPipe()@server.getdefmy_ip_address(r:backpipe.Request):return(200,r.address)server.run()Complex Exampleimportbackpipeserver=backpipe.BackPipe()@server.anydefwrong_method(r:backpipe.Request):return(405,f"Wrong method:{r.method}, use POST.")@server.unknowndefunknown_method(r:backpipe.Request):return(405,f"Unknown method:{r.method}, use POST.")@server.postdeflogin(r:backpipe.Request):try:ifr.headers["key"]=="password1234":return(200,"Password correct!")else:return(304,"Password wrong!")exceptKeyError:return(400,"invalid request, 'key' header missing.")server.run()LicenseBackpipe is licensed under the GNU GPL v3.
Package: backplane2-pyclient
Backplane Client Library for Python===================================This library integrates server side Backplane clients with the Backplane server protocol (https://github.com/janrain/janrain-backplane-2).Installation============```shellpip install backplane2-pyclient```Usage=====You should have client credentials for a Backplane server, with a bus provisioned for your use. If you have admin access to a backplane server, the following steps will get you set up:1. Provision a client (/v2/provision/client/update)2. Provision a bus (/v2/provision/bus/update)3. Grant client access to bus (/v2/provision/grant/add)For more information see the [Backplane server readme](https://github.com/janrain/janrain-backplane-2/blob/master/README20.md).Example:```pythonimport backplanefrom backplane import ClientCredentials, Client, Message, channel_from_scopebackplane.debug() # Enable debugging outputclient_credentials = ClientCredentials('https://backplane1.janrainbackplane.com', 'client id', 'secret')client = Client(client_credentials, True, 'bus:mybusname')access_token = client.get_regular_token('mybusname')channel = channel_from_scope(access_token.scope)message = Message('mybusname', channel, 'test', 'payload', True)client.post_message(message)# Poll server for messagesmessage_wrapper = Nonewhile True:# connect to Backplane server for 20 seconds at a timemessage_wrapper = client.get_messages(message_wrapper, 20)...```
Package: backport
backportBackport various Python libraries (e.g. typing, types, dataclasses) to old Python versionsWARNING: This repo is in development. It was automatically generated withmkpylib. If you're reading this message, it means that I use this repo for my own purposes right now. It might not do anything at all; the default functionality isprint('TODO').If you really want to try it out, feel free. I recommend reading through the code and commit history to see if it does what you need, orask mefor status updates.Stay tuned!Installpython3 -m pip install -U backportUsageimportbackportprint('TODO')LicenseMITContactA library byShawn Presser. If you found it useful, please considerjoining my patreon!My Twitter DMs are always open; you shouldsend me one! It's the best way to reach me, and I'm always happy to hear from you.Twitter:@theshawwnPatreon:https://www.patreon.com/shawwnHN:sillysaurusxWebsite:shawwn.com
Package: backport_collections
backport_collections is a backport of Python 2.7’scollectionsmodule for Python 2.6.What is backported?Counter,deque,OrderedDictandnamedtupleare backported.
The rest of the members of thecollectionsmodule are still exposed. Note
though that someABCclasses are slighlty different (see known issues below).UsageTo use it just import the desired classes from the modulebackport_collections.
Example:from backport_collections import Counter
from backport_collections import deque
from backport_collections import OrderedDict
from backport_collections import namedtupleKnown IssuesIn Python 2.6 Issue 9137 is not fixed as it complains if it gets a keyword
argument namedself. The error isTypeError: update() got multiple values for keyword argument 'self'.
Additionally the keyword argument cannot be calledothereither as it will think it is the full dict. No error is raised in this case.In Python 2.6 Issue 8743 is not fully fixed: Set interoperability with real setsLicenseThe Python Software Foundation License.Changesv0.1 (15/08/2014): Synced to revisionhttp://hg.python.org/cpython/rev/6d41f139709b
Package: backport_importlib
Introduced in Python 3.1, the importlib package provides a pure Python
implementation of the import machinery.  It is also available on PyPI
as a [very] watered down backport.The backport_importlib package provides a script that will backport the
full importlib package to 2.x.  Keep in mind that the backport is quite
naive and likely incomplete.  However, it passes the rudimentary tests
included in the script.The script is optparse-based and the “-h” flag should be sufficient to
see how to use it.  For information on how to use importlib, please
refer to the current 3.x stdlib documentation.  The script will update
the importlib modules in-place, and will not install importlib for you.
Also, you have to provide your own copy of the 3.x importlib, which you
can get from hg.python.org/cpython (under Lib).If you find cases where the backport could be improved please let me
know.  Also, it probably won’t work for Python earlier than 2.4, so
keep that in mind.One last thing.  A big reason that importlib was not released on PyPI
as a full backport was to encourage adoption of 3.x.  I stand with
Brett on that choice.  This tool is meant for the desparate only.  In
truth, importlib provides very little that you don’t already have in
the 2.x import machinery, so if you think you need it you’re probably
wrong.
Package: backporting
Install the package:pip3 install backportingAfter the commandbackportingshould be available from CLI.Additional commands to create venv if it's neededCreate www directory where project sites and environment dirmkdir /var/envs && mkdir /var/envs/binInstall virtualenvwrappersudo pip3 install virtualenvwrapper
sudo pip3 install --upgrade virtualenvAdd these to your bashrc virutualenvwrapper workexport WORKON_HOME=/var/envs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export PROJECT_HOME=/var/www
export VIRTUALENVWRAPPER_HOOK_DIR=/var/envs/bin
source /usr/local/bin/virtualenvwrapper.shCreate virtualenvmkvirtualenv --python=python3 test_env
Package: backport_ipaddress
backport_collections is a backport of Python 3’sipaddressmodule for Python 2.6 and Python 2.7.
It is based on the backport of Søren Løvborg (https://bitbucket.org/kwi/py2-ipaddress/).What is backported?Theipaddressmodule.UsageTo use it just import the moduleipaddressas you would in Python 3.
Example:import ipaddressDifferencesGiven that there is no realbytestypes in Python 2, we are usingbytearray, which is a
mutable version ofbytesand in Python 2, has fewer methods.So if in Python 3 you would do:ipaddress.ip_address(b'\x00\x00\x00\x00')with this port you need to do:ipaddress.ip_address(bytearray('\x00\x00\x00\x00'))MissingOne thing that is missing and could be important for performance is thelru_cachefor many of the methods.functoolsin Python 2 does not have
such decorator. Maybe in the future I will backport that method as well.LicenseThe Python Software Foundation License.Changesv0.1 (15/08/2014): Synced to revisionhttp://hg.python.org/cpython/rev/15bfb82194fa
Package: backports_abc
Usage:try:# ABCs live in "collections.abc" in Python >= 3.3fromcollections.abcimportCoroutine,GeneratorexceptImportError:# fall back to import from "backports_abc"frombackports_abcimportCoroutine,GeneratorYou can also install the ABCs into the stdlib by calling thepatch()function:importbackports_abcbackports_abc.patch()try:# ABCs live in "collections.abc" in Python >= 3.3fromcollections.abcimportCoroutine,GeneratorexceptImportError:# fall back to import from "collections" in Python <= 3.2frombackports_abcimportCoroutine,GeneratorCurrently,patch()provides the following names if missing:collections.abc.Generatorcollections.abc.Awaitablecollections.abc.Coroutineinspect.isawaitable(obj)All of them are also available directly from thebackports_abcmodule namespace.In Python 2.x and Python 3.2, it patches thecollectionsmodule
instead of thecollections.abcmodule.  Any names that are already
available when importing this module will not be overwritten.The names that were previously patched bypatch()can be queried
through the mapping inbackports_abc.PATCHED.Changelog0.5 (2016-11-12)support old-style (mro-missing) classes0.4 (2015-09-14)direct wheel building supportmake all names available at the module level instead of requiring patching0.3 (2015-07-03)removed patching ofinspect.iscoroutine()as it is not ABC based0.2 (2015-07-03)require explicitbackports_abc.patch()call to do the patching
(avoids side-effects on import and allows future configuration)provide access to patched names through globalPATCHEDdictadd ABC based implementations of inspect.iscoroutine() and
inspect.isawaitable()0.1 (2015-06-24)initial public releaseprovided ABCs: Generator, Coroutine, Awaitable
Package: backports.cached-property
WhatPython 3.8 adds great descriptor to functools: cached_property.
Technically all required APIs was available since python 3.6,
but it is what it is.This package is a backport of this functionality for python 3.6 and 3.7.How to usefrombackports.cached_propertyimportcached_propertyAnd then python 3.8 documentation will work (because code is minimally changed):Transform a method of a class into a property whose value is computed once
and then cached as a normal attribute for the life of the instance. Similar
toproperty, with the addition of caching. Useful for expensive
computed properties of instances that are otherwise effectively immutable.Example:class DataSet:
    def __init__(self, sequence_of_numbers):
        self._data = sequence_of_numbers

    @cached_property
    def stdev(self):
        return statistics.stdev(self._data)

    @cached_property
    def variance(self):
        return statistics.variance(self._data)NoteThis decorator requires that the__dict__attribute on each instance
be a mutable mapping. This means it will not work with some types, such as
metaclasses (since the__dict__attributes on type instances are
read-only proxies for the class namespace), and those that specify__slots__without including__dict__as one of the defined slots
(as such classes don’t provide a__dict__attribute at all).
Package: backports.csv
The API of the csv module in Python 2 is drastically different from
the csv module in Python 3. This is due, for the most part, to the
difference between str in Python 2 and Python 3.The semantics of Python 3’s version are more useful because they support
unicode natively, while Python 2’s csv does not.Installationpipinstallbackports.csvUsageFirst make sure you’re starting your file off right:frombackportsimportcsvThen be careful with your files to handle the encoding.
If you’re working with a binary file-like object,io.TextIOWrappercan be very helpful.
If you’re dealing with a file, you can just useio.openinstead of Python 2’sopenbuiltin, and it works
just like Python 3’s builtinopen.frombackportsimportcsvimportiodefread_csv(filename):withio.open(filename,newline='',encoding='utf-8')asf:forrowincsv.reader(f):yieldrowdefwrite_csv(filename,rows):withio.open(filename,'w',newline='',encoding='utf-8')asf:writer=csv.writer(f)forrowinrows:writer.writerow(row)Note: It should always be safe to specifynewline='',
since the csv module does its own (universal) newline handling.1.0.7 (2019-03-10)Add tests toMANIFEST.in.
- thanks to @jayvdb for the pull request1.0.6 (2018-05-22)Pass reader error messages along. (#28)
This should help make errors more transparent.
- thanks to @mpeteuil for the pull request1.0.5 (2017-05-29)Fix bug in README example. (#22)
- thanks to @tantale for the bug reportAllowNoneas quotechar when usingQUOTE_NONE. (#23)
- thanks to @thanatos for the bug report1.0.4 (2017-02-17)Return write value from writerow. (#20)
- thanks to @therg1.0.3 (2017-01-23)Add LICENSE file (#18).1.0.2 (2016-09-15)Avoid quoting any numeric types when usingQUOTE_NONNUMERIC.
- thanks to @torfsen for the bug report1.0.1 (2016-02-11)Better error messages for invalid dialects.
- thanks to @kengruven for the bug report1.0 (2016-02-11)Initial Release
Package: backports-datetime-fromisoformat
A backport of Python 3.11’sdatetime.fromisoformatmethods to earlier versions of Python 3.
Tested against Python 3.6, 3.7, 3.8, 3.9, 3.10 and 3.11Current StatusDevelopment ofbackports.datetime_fromisoformatis “complete”. Outside of potential minor bug fixes, do not expect new development here.Version 2 changesIn version 1,backports.datetime_fromisoformatwas a backport of the Python 3.7 version of thefromisoformatmethods.
This meant that it was limited in being able to parse only timestamps that were in the format produced bydatetime.isoformat.As of version 2,backports.datetime_fromisoformatis a backport of the Python 3.11 version of thefromisoformatmethods, which can parse (almost) the entire ISO 8601 specification.
There are no changes required when upgrading from v1 to v2. The parser is simply able to parse a wider portion of the ISO 8601 specification.However, starting in version 2,backports.datetime_fromisoformatwill apply its changes to Python < 3.11, whereas v1 only applied changes to Python < 3.7.
If you happened to be usingbackports.datetime_fromisoformatv1 on Python 3.7 through Python 3.10 and then upgrade to v2, it will patch thefromisoformatmethods, whereas in v1 it did not.
The result is that thefromisoformatmethods will suddenly be able to parse timestamps from a wider portion of the ISO 8601 specification.Quick StartInstallation:pipinstallbackports-datetime-fromisoformatUsage:>>>fromdatetimeimportdate,datetime,time>>>frombackports.datetime_fromisoformatimportMonkeyPatch>>>MonkeyPatch.patch_fromisoformat()>>>datetime.fromisoformat("2014-01-09T21:48:00-05:30")datetime.datetime(2014,1,9,21,48,tzinfo=-05:30)>>>date.fromisoformat("2014-01-09")datetime.date(2014,1,9)>>>time.fromisoformat("21:48:00-05:30")datetime.time(21,48,tzinfo=-05:30)ExplanationIn Python 3.7,datetime.fromisoformatwas added. It is the inverse ofdatetime.isoformat.
Similar methods were added to thedateandtimetypes as well.In Python 3.11,datetime.fromisoformatwas extended to cover (almost) all of the ISO 8601 specification, making it generally useful.For those who need to support earlier versions of Python, a backport of these methods was needed.backports.datetime_fromisoformatis a C implementation offromisoformatbased on the upstream cPython 3.11 code.
For timezone objects, it uses a customtimezoneC implementation (originally fromPendulum).Usage in Python 3.11+NOTE: in Python 3.11 and later, compatible versions offromisoformatmethods exist in the stdlib, and installing this package has NO EFFECT.Goal / Project ScopeThe purpose of this project is to provide a perfect backport of thefromisoformatmethods to earlier versions of Python, while still providing comparable performance.
Package: backports.entry-points-selectable
Compatibility shim to ease adoption ofimportlib_metadata 3.6. Supplies forward-compatibility of “selectable” entry points even on older versions ofimportlib_metadataandimportlib.metadata, and avoids usage that triggersdeprecation warnings.Use this shim for libraries or applications invokingentry_points()that run on Python older than 3.10 or where importlib_metadata is older than 3.6. In most cases, this shim is unnecessary and the easiest thing to do is simply requireimportlib_metadata >= 3.6on all Pythons (or only those prior to 3.10a7). In some environments, a library may be constrained on which versions ofimportlib_metadatacan be required, so this library bridges that gap.To use this shim, addbackports.entry_points_selectableto the affected project’s requirements. It will requireimportlib_metadataautomatically where needed (prior to Python 3.8) but be satisfied by older versions. Projects should still requireimportlib_metadataas appropriate for API uses other than forentry_points.Then in code, instead offrom importlib.metadata import entry_points, use:from backports.entry_points_selectable import entry_pointsAnd then use the “selectable” features (pass keyword arguments toentry_pointsor invoke.select()on the result).This backport has a very lenient dependency onimportlib_metadatafor older Pythons and is a single module implementation. If adding a dependency is a concern, this module may be vendored into the affected project.
Package: backports.functools-lru-cache
Backport of functools.lru_cache from Python 3.3 as published atActiveState.UsageConsider using this technique for importing the ‘lru_cache’ function:try:
    from functools import lru_cache
except ImportError:
    from backports.functools_lru_cache import lru_cacheFor EnterpriseAvailable as part of the Tidelift Subscription.This project and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.Learn more.
Package: backports.html
backports.html==============This is a backport of Python3.4+'s `html` module, original code from [Python's standard library][1][1]: https://github.com/python/cpython/blob/master/Lib/html/Install and use---------------```bash$ pip install backports.html``````pythontry:import html     # use standard library if availableexcept ImportError:import backports.html as html   # fallback to backports```Licence-------This project is released under the same license as Python software, see [LICENSE](/LICENSE) for more details.
Package: backports-httpmethod
backports.httpmethodA backport of Python 3.11+http.HTTPMethodenum for Python 3.7+.Table of ContentsInstallationUsageLicenseInstallationpip install backports.httpmethodUsageimportsysifsys.version_info>=(3,11):fromhttpimportHTTPMethodelse:frombackports.httpmethodimportHTTPMethodHTTPMethod.GET=='GET'# TrueHTTPMethod.GET.value# 'GET'HTTPMethod.GET.description# 'Retrieve the target.'list(HTTPMethod)[:3]# [<HTTPMethod.GET: 'GET'>, <HTTPMethod.HEAD: 'HEAD'>, <HTTPMethod.POST: 'POST'>]Licensebackports-httpmethodis distributed under the terms of theMITlicense.
Package: backports.inspect
This is a backport of (some)Python 3.3 inspect modulefeatures to
2.7 (piggybacking onaliles/funcsigs).NOTE:Whilealiles/funcsigstargets Python 2.6and2.7,backports.inspectonlytargets 2.7.BUGS:There are currently no unit tests :-( …which must mean
there are no bugs! :-) We welcome issues to expose this assertion as
incorrect, and pull requests to rectify that…backports.inspectis licensed under the BSD “3-clause” license. SeeLICENSEfor details. The originalPython 3.3 inspect module,
from which most (all?) of this library is derived, is licensed under
thePSF license, and is copyright (c) 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Python Software
Foundation; All Rights Reserved.
Package: backports.method_request
A backport of the urllib.request.MethodRequest class from Python 3.4 which
allows overriding of the method in a class attribute or as a keyword
parameter to the initializer.SeePython 18978for details.Works on Python 2.6 and later.LicenseLicense is indicated in the project metadata (typically one or more
of the Trove classifiers). For more details, seethis explanation.UsageUsemethod_request.Requestin place ofurllib.request.Request:from backports.method_request import Request

req = Request(..., method='PATCH')
resp = urllib.request.urlopen(req)
...
Package: backports.os
This package provides backports of new features in Python’sosmodule
under thebackportsnamespace.Supported Python versionsCPython: 2.7, 3.4, 3.5, 3.6PyPyBackported functionalityos.fsencode(new in Python 3.2)os.fsdecode(new in Python 3.2)ContributingSeeHACKING.rst.
Package: backports.pbkdf2
This is a backport ofhashlib.pbkdf2_hmacfor Python 2.6 to 2.7. The
implementation comes with a pure Python implementation and a C module that
depends on OpenSSL. The C code doesnotwrapPKCS5_PBKDF2_HMACas
its implementation is suboptimal.Usage>>> from backports.pbkdf2 import pbkdf2_hmac, compare_digest
>>> dkey = pbkdf2_hmac('sha1', passwordbytes, saltbytes, iterations=100000)
>>> compare_digest(dkey, originalkey)
Truepbkdf2_hmac(hash_name, password, salt, iterations, dklen=None)hash_namename of the digest algorithm as stringpasswordpassword as bytes, bytearray or bytes-like object (*)saltsalt as bytes, bytearray or bytes-like object (*). The salt should be
generated with a CPRNG likeos.urandom(). You shouldneveruserandom.random(). About 16 bytes seem to be a good choice.iterationsnumber of rounds, 100,000 rounds of SHA-1 take about 30ms on a modern
CPU.dklenlength of the derived key (defaults to digest_size)returnsderived key as bytes(*) bytearray and bytes-like objects are not supported on Python 2.6Benchmarkspassword length101005001000backports.pbkdf2 C0.3140.3210.3100.310backports.pbkdf2 Py0.8380.8470.8530.913pbkdf2_ctypes 0.99.30.5540.6630.9541.344pbkdf2 1.35.2355.7466.1556.450Django pbkdf2 1.5.41.9762.4302.6763.078PyCrypto 2.6.16.9039.0629.51810.274algorithmsha1rounds50000dklen20saltlen16number of runs per test10PythonPython 3.3 on Linux AMD64CPUIntel i7-2860QM @ 2.50GHzChangelogpbkdf2 0.1Release date: 19-Oct-2013initial release of backports.pbkdf2