Saravanan666/pypi-org huggingface dataset:
Package: backports.print_function
.. image:: https://img.shields.io/pypi/v/backports.print_function.svg:target: https://pypi.org/project/backports.print_function.. image:: https://img.shields.io/pypi/pyversions/backports.print_function.svg.. image:: https://img.shields.io/pypi/dm/backports.print_function.svg.. image:: https://img.shields.io/travis/jaraco/backports.print_function/master.svg:target: http://travis-ci.org/jaraco/backports.print_functionAdd support for the Python 3.3 flush argument.License=======License is indicated in the project metadata (typically one or moreof the Trove classifiers). For more details, see `this explanation<https://github.com/jaraco/skeleton/issues/1>`_.Usage=====from backports.print_function import print_print_('Partial line', end='', flush=True)
Package: backports.shutil-copytree
backports.shutil_copytreeUsagetry:frominspectimportsignatureexceptImportError:try:fromfuncsigsimportsignatureexceptImportError:signature=Nonefromshutilimportcopytreeif'dirs_exist_ok'notinsignature(copytree).parameters:frombackports.shutil_copytreeimportcopytreeCaveatssymlink stat is not copied when Python<3.3directory junctions check on Windows Python<3.8 is done via pywin32, which is less-tested.
Package: backports.shutil_get_terminal_size
backports.shutil_get_terminal_sizeA backport of theget_terminal_sizefunction from Python 3.3’s shutil.Unlike the original version it is written in pure Python rather than C,
so it might be a tiny bit slower.Example usage>>> from backports.shutil_get_terminal_size import get_terminal_size
>>> get_terminal_size()
terminal_size(columns=105, lines=33)History1.0.0 (2014-08-19)First release.
Package: backports.ssl
-------------backports.ssl-------------What is it?-----------It's the Python 3.4 standard ``ssl`` module API implemented on top ofpyOpenSSL::import backports.ssl as sslimport socketcontext = ssl.SSLContext(ssl.PROTOCOL_SSLv23)context.verify_mode = ssl.CERT_REQUIREDconn = context.wrap_socket(socket.socket(socket.AF_INET))conn.connect(('google.com', 443))print conn.getpeercert()conn.close()Why?----Because the latest web technologies should be available to those running olderversions of Python.Isn't this obsoleted by `PEP 466`_?-----------------------------------If you're on Python 2.7, then probably. But PEP 466 doesn't cover Python 2.6,3.2, or 3.3, and the ``ssl.RAND_*()`` functions are explicitly out of scope.This package supports it all.How do I use it with third-party libraries?-------------------------------------------Monkey-patching support is included a la `gevent`_::import backports.ssl.monkey as monkeyimport requestsmonkey.patch()requests.get('https://google.com')Why am I getting ``AttributeError``\ s for newer features?------------------------------------------------------Like the standard ``ssl`` module, certain attributes will not be available ifyour OpenSSL does not support them. See `Installing OpenSSL`_ for instructions.Installing OpenSSL------------------TODO----- Verify that we play nicely with gevent's monkey-patching.- Backport and pass the standard Python ``ssl`` test suite.- If not that, automate testing against hyper, urllib3, requests, and Tornadotest suites.- Use the bundled 3.x OpenSSL, if available and newer than the default... _`PEP 466`: http://legacy.python.org/dev/peps/pep-0466.. _`gevent`: http://gevent.org
Package: backports.ssl_match_hostname
The ssl.match_hostname() function from Python 3.7=================================================The Secure Sockets Layer is only actually *secure*if you check the hostname in the certificate returnedby the server to which you are connecting,and verify that it matches to hostnamethat you are trying to reach.But the matching logic, defined in `RFC2818`_,can be a bit tricky to implement on your own.So the ``ssl`` package in the Standard Library of Python 3.2and greater now includes a ``match_hostname()`` functionfor performing this check instead of requiring every applicationto implement the check separately.This backport brings ``match_hostname()`` to usersof earlier versions of Python.Simply make this distribution a dependency of your package,and then use it like this::from backports.ssl_match_hostname import match_hostname, CertificateError[...]sslsock = ssl.wrap_socket(sock, ssl_version=ssl.PROTOCOL_SSLv23,cert_reqs=ssl.CERT_REQUIRED, ca_certs=...)try:match_hostname(sslsock.getpeercert(), hostname)except CertificateError, ce:...Brandon Craig Rhodes is merely the packager of this distribution;the actual code inside comes from Python 3.7 with small changes forportability.Requirements------------* If you need to use this on Python versions earlier than 2.6 you will need toinstall the `ssl module`_.  From Python 2.6 upwards ``ssl`` is included inthe Python Standard Library so you do not need to install it separately... _`ssl module`:: https://pypi.python.org/pypi/sslHistory-------* This function was introduced in python-3.2* It was updated for python-3.4a1 for a CVE(backports-ssl_match_hostname-3.4.0.1)* It was updated from RFC2818 to RFC 6125 compliance in order to fix anothersecurity flaw for python-3.3.3 and python-3.4a5(backports-ssl_match_hostname-3.4.0.2)* It was updated in python-3.5 to handle IPAddresses in ServerAltName fields(something that backports.ssl_match_hostname will do if you also install theipaddress library from pypi).* It was updated in python-3.7 to handle IPAddresses without the ipaddress library and droppedsupport for partial wildcards.. _`ipaddress module`:: https://pypi.python.org/pypi/ipaddress.. _RFC2818: http://tools.ietf.org/html/rfc2818.html
Package: backports.strenum
A backport of (copy and paste from) python 3.11’sStrEnumclass for >=3.8.6:See thedesign discussion,
andEthan Furman’sfirstandsecondPR with this implementation.A slightly different implementation would likely be compatible with lower python versions;
PRs are welcome if they pass the test suite.
The existing (reference) implementation should still be the one used on supported versions.Install withpip install backports.strenum, and use with:importsysifsys.version_info>=(3,11):fromenumimportStrEnumelse:frombackports.strenumimportStrEnumclassMyStrEnum(StrEnum):POTATO="potato"ORANGE="orange"SPADE="spade"MyStrEnum.POTATO=="potato"# TrueMyStrEnum.ORANGE.upper()=="ORANGE"# Truestr(MyStrEnum.SPADE)=="spade"# TrueFrom version 1.3.0, this package cannot be installed on python >=3.11.
It shouldn’t be used on them anyway.
Make sure that in your package, this is a conditional dependency.GotchasA number of behaviours relating to the treatment of enum classes as containers of their members (e.g. iterating and containment checks) will be changing in python 3.12.This package intends only to allow pre-3.11 users to get 3.11-like behaviour; after that, stick with the standard library.These are thedocs provided with python 3.11:class enum.StrEnumStrEnumis the same asEnum, but its members are also strings and can be used in most of the same places that a string can be used.
The result of any string operation performed on or with aStrEnummember is not part of the enumeration.NoteThere are places in the stdlib that check for an exactstrinstead of astrsubclass (i.e.type(unknown) == strinstead ofisinstance(unknown, str)), and in those locations you will need to usestr(StrEnum.member).NoteUsingautowithStrEnumresults in the lower-cased member name as the value.Note__str__()is str.__str__() to better support the replacement of existing constants use-case.__format__()is likewisestr.__format__()for that same reason.
Package: backports.textwrap
textwrapA backport of upcoming python/cpython#28136 with some additional fixes.Motivated due to jquast/blessed using textwrap, but this fails for zero-width characters. This allows setting text_len
to, for example, wcswidth for more accuracy when word wrapping in the terminal.This uses the backports package style, seehttps://pypi.python.org/pypi/backports.
Package: backports.time-perf-counter
This package contains abackportof thetime.perf_counter()function introduced in Python 3.3.  This package is intended for use
with Python versions older than 3.3 but will work just fine under
newer Pythons.  When used with Python 3.3 and newer, the main module
simply exportstime.perf_counter().The backported functionality is based on thepseudocodeinPEP 418that describes howtime.perf_counter()could be implemented.  When
used with Python versions older than 3.3, the exportedperf_counter()function relies on themonotonic()function
provided by themonotonicpackage.UsageI recommend not introducing a dependency on this package under Pythons
which providetime.perf_counter().  In your package’ssetup.py:importsetuptoolssetuptools.setup(install_requires=['backports.time_perf_counter; python_version < "3.3"'])In the module that relies onperf_counter():try:# Python >= 3.3fromtimeimportperf_counterexceptImportError:# Python < 3.3frombackports.time_perf_counterimportperf_counterTestsThis package’s tests use the builtinunittestand can be run without
first installing the package:python setup.py testThe test cases are based ontestsfrom the Python standard library’stimemodule that exercisetime.perf_counter().  There are an
admittedly small number of tests; pull requests with more tests are
welcome.Change Log0.0.4 - 2019-03-25Fixed[#1] import fromctypesfails0.0.3 - 2019-03-23Fixedcorrected the trove classifier for the package’s license0.0.2 - 2019-03-23Changedsetup.cfgnow enables universal wheels0.0.1 - 2019-03-23Initial release.
Package: backports.unittest-mock
Provides a function “install()” which makes the “mock” module
available as “unittest.mock” on Python 3.2 and earlier.Also advertises a pytest plugin which configures unittest.mock
automatically.UsageIf using pytest, simply require this package in your test environment,
andunittest.mockwill be available.Otherwise, it must be invoked imperatively:import backports.unittest_mock
backports.unittest_mock.install()

import unittest.mock
Package: backports.zoneinfo
backports.zoneinfo: Backport of the standard library modulezoneinfoThis package was originally the reference implementation forPEP 615, which proposes support for the IANA time zone database in the standard library, and now serves as a backport to Python 3.6+ (including PyPy).This exposes thebackports.zoneinfomodule, which is a backport of thezoneinfomodule. The backport's documentation can be foundon readthedocs.The module uses the system time zone data if available, and falls back to thetzdatapackage (availableon PyPI) if installed.Installation and depending on this libraryThis module is calledbackports.zoneinfoon PyPI. To install it in your local environment, use:pip install backports.zoneinfoOr (particularly on Windows), you can also use thetzdataextra (which basically just declares a dependency ontzdata, so this doesn't actually save you any typing 😅):pip install backports.zoneinfo[tzdata]If you want to use this in your application, it is best to usePEP 508 environment markersto declare a dependencyconditional on the Python version:backports.zoneinfo;python_version<"3.9"Support forbackports.zoneinfoin Python 3.9+ is currently minimal, since it is expected that you would use the standard libraryzoneinfomodule instead.UseThebackports.zoneinfomodule should be a drop-in replacement for the Python 3.9 standard library modulezoneinfo. If you do not support anything earlier than Python 3.9,you do not need this library; if you are supporting Python 3.6+, you may want to use this idiom to "fall back" tobackports.zoneinfo:try:importzoneinfoexceptImportError:frombackportsimportzoneinfoTo get access to time zones with this module, construct aZoneInfoobject and attach it to your datetime:>>>frombackports.zoneinfoimportZoneInfo>>>fromdatetimeimportdatetime,timedelta,timezone>>>dt=datetime(1992,3,1,tzinfo=ZoneInfo("Europe/Minsk"))>>>print(dt)1992-03-0100:00:00+02:00>>>print(dt.utcoffset())2:00:00>>>print(dt.tzname())EETArithmetic works as expected without the need for a "normalization" step:>>>dt+=timedelta(days=90)>>>print(dt)1992-05-3000:00:00+03:00>>>dt.utcoffset()datetime.timedelta(seconds=10800)>>>dt.tzname()'EEST'Ambiguous and imaginary times are handled using thefoldattribute added inPEP 495:>>>dt=datetime(2020,11,1,1,tzinfo=ZoneInfo("America/Chicago"))>>>print(dt)2020-11-0101:00:00-05:00>>>print(dt.replace(fold=1))2020-11-0101:00:00-06:00>>>UTC=timezone.utc>>>print(dt.astimezone(UTC))2020-11-0106:00:00+00:00>>>print(dt.replace(fold=1).astimezone(UTC))2020-11-0107:00:00+00:00ContributingCurrently we are not accepting contributions to this repository because we have not put the CLA in place and we would like to avoid complicating the process of adoption into the standard library. Contributions toCPythonwill eventually be backported to this repository — seethe Python developer's guidefor more information on how to contribute to CPython.
Package: backpropagation
BackpropagationThis module contains the implementation of the backpropagation algorithmUsagefrombackpropagation.NeuralNetworkimportNeuralNetworkfrombackpropagation.BackpropagationimportBackpropagationfrombackpropagation.HyperbolicTangentimportHyperbolicTangentfrombackpropagation.ReLUimportReLUfrombackpropagation.SigmoidimportSigmoidnn=NeuralNetwork(input_units,hidden_units,output_units)nn.initalize_weights(bais->boolean)bp=Backpropagation(NeuralNetwork,epochs,learning_rate,activation_fuction)bp.train(input,target)bp.predict(input,actual_output)
Package: backpy
A Python interface to run functions in the background.Functions:background - run a function in the backgroundUsage:>>> import backpy
    >>> def myFunction(text):
            while 1:
                print(text)>>> thread = backpy.background(target = myFunction, args = ("hello!")) # run
>>> # the function myFunction in the background with args ("hello!")
>>> thread._stop() # stop the thread.
>>> def myEndFunction(data):
        print('Finished', data)

>>> thread = backpy.background(mode = 'basic+finish',
                               target = myFunction, args = ("hello!"),
                               finish = myEndFunction, fargs = ("data"))
>>> thread._stop() # stop the thread.  </pre>
Package: backquotes
Introductionbackquotesbrings (Perl / Ruby)’s shell invocation syntax to Python.Sincebackquotesis an experimental module,
using it in a serious program is not recommended.SyntaxFirstly, do not forget to importbackquotesmodule.importbackquotesBasicYou can use similar syntax to Perl / Ruby.importbackquotesprint(`date`)Pipes and redirectionsYes, you can use pipes, redirections too.importbackquotesprint(`ls|tr[a-z][A-Z]`.splitlines())Local variables substitutionTo bring local variables in Python code to shell command,
use Perl-like variables substitution.importbackquotesspam='spam'print(`echo$spam`)$$is replaced with a literal$.importbackquotesprint(`echo$$PATH`)UsageRuntime-preprocessingYou can use runtime-preprocessing only in Python 2.
This works transparently whenever you importbackquotes.WarningPython 3 raisesSyntaxErroron a backquote character before evaluate the first line.
So you CANNOT use runtime-preprocessing.#!/usr/bin/env pythonimportbackquotesprint(`date`)Save the above code asdate.py, and run it as usual.pythondate.pyYou will see the result ofdatecommand.Runtime-preprocessing sometimes causesSyntaxErrorbefore preprocessing starts,
especially with complex commands invocation.
You can avoid this error by using single-quotes just inside the backquotes.print(`'for file in *; do echo $file; done'`)ExecutebackquotesmoduleRunpythonwith-mbackquotesoption to invokebackquotesas a script.backquotescompiles a plain Python code and execute it.NoteThis works both in Python 2 / 3.python-mbackquotesdate.pyYou can pass arguments to the script like this.python-mbackquotesdate.py20151031Preprocess Python codeRunpythonwith-mbackquotes-Eoption to only preprocess the given source file
and print the result to stdout.WarningPreprocessed python code is almost the same as the original code semantically,
but whitespaces may be moved by the preprocessor.NoteThis works both in Python 2 / 3.mkdirdistpython-mbackquotes-Edate.py>dist/date.pypythondist/date.pyRestrictionsbackquotesdoes not work in Python REPL.  Importing it in REPL causes warnings.A module which importsbackquotesdoes not work when it is imported by another module.Installpipinstallbackquotesorgitclonehttps://github.com/manicmaniac/backquotes.gitcdbackquotespythonsetup.pyinstallorwgethttps://raw.githubusercontent.com/manicmaniac/backquotes/master/backquotes.py
Package: backrefs
BackrefsBackrefs is a wrapper around Python's built-inReand the 3rd partyRegexlibrary.  Backrefs adds various
additional back references (and a couple other features) that are known to some regular expression engines, but not to
Python's Re and/or Regex.  The supported back references actually vary depending on the regular expression engine being
used as the engine may already have support for some.frombackrefsimportbre>>>pattern=bre.compile(r'(\p{Letter}+)')>>>pattern.sub(r'\C\1\E','sometext')'SOMETEXT'Documentationhttps://facelessuser.github.io/backrefs/LicenseMIT
Package: backscatter
This is an abstract python library built on top of theBackscatterservice. It is preferred that users use this library when implementing integrations or plan to use Backscatter within their code. The library includes a small client to interact with the API.Quick StartInstall the library:pip install  backscatterorpython setup.py installSave your configuration:backscatter setup--api-key<your-API-key>Search observations:backscatter observations--query148.227.224.17Get Trends:backscatter trends--typeportEnrich values:backscatter enrich--query148.227.224.17FeaturesRun observation searches for ip, network, asn, country and portsGet trend data for all data typesChangelog02-03-19Feature: Support for port enrichment call02-01-19Feature: Support proxies within the core libraryChange: Adjust timeout to something more favorable to long queries01-29-19Bugfix: Avoid errors on free account without observations01-21-19Feature: Added enrichment supportFeature: Added JSON and table output formatsChange: Adjusted query type to be optional if value is mapped to a type01-13-19Bugfix: Resolved undeclared var in client observations call01-12-19Initial launch of the library
Package: backshift
Backshift is a filesystem to filesystem backup program, analogous to rsync –link-dest.Compared to rsync, backshift deduplicates much better, and compresses files - rsync does not.Backshift also allows easy removal of old backups, despite its strong deduplication and compression.Files to back up are selected using something like ‘find / -xdev -print0’ and piping that to backshift.Files are restored by piping to ‘tar xfp’.Metadata is partially compressed.  Each directory’s metadata is compressed separately for easy
partial restores.Content-based, variable length chunks are deduplicated - so simply inserting a byte at a random place in a large file
is not going to require backing up the entire file anew.Backshift runs on CPython 3.x and Pypy3.  It may run on nuitka - backshift+nuitka has not been tested much.On many modern systems, Backshift runs fastest on Pypy, but on some (older?) machines you may be better off with
CPython 3.x plus the Cython versions of treap and rolling_checksum_mod.For pypy, simply install backshift with pip.  This should give you a pure-python version of backshift that pypy likes.
For CPython+Cython, first install backshift with pip just as you would for pypy.  Then additionally install pyx-treap
and rolling-checksum-pyx-mod with pip - for a speed boost.Backshift is not as fast as rsync –link-dest; rsync does not have to do as much work to accomplish what it sets out
to do.  But if you are paying for your storage, backshift will probably be significantly cheaper.
Package: backtask
A small Python module that run functions in a background
process, passing their arguments via fork().The home page is:http://backtask-py.sourceforge.net/RequirementsPython >= 2.6InstallingTo build you require the Python development system.
The command to build the entire system is:makeTo install:make installTo run the test suite:make testDocumentationNone.  Sorry.  See the source code.LicenseCopyright (c) 2014 Russell Stuart.This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at your
option) any later version.The copyright holders grant you an additional permission under Section 7
of the GNU Affero General Public License, version 3, exempting you from
the requirement in Section 6 of the GNU General Public License, version 3,
to accompany Corresponding Source with Installation Information for the
Program or any work based on the Program. You are still required to
comply with all other Section 6 requirements to provide Corresponding
Source.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.–
Russell Stuart
2014-Jun-05
Package: backtest
BacktestAbacktestengine for developingalgorithmic tradingstrategy.Table of ContentsBacktestTable of ContentsInstallationUsageSupportContributingTestingInstallation$ pip install backtestPreparationFetching symbols of KOSPI and KOSDAQ exchanges:$ python -m backtest.utils.symbols_krx symbols.json
Fetched 2,820 symbols
Saved in symbols.jsonUsageThe following will execute the backtest after loading configuration file,config.jsonin same directory.python -m backtestSample content ofconfig.json{"cash":1000000,"ticks_dir":"ticks","ledger_dir":"ledger","symbols_file":"symbols.json","strategy":"strategy","exchanges":["backtest.exchanges.kospi","backtest.exchanges.kosdaq"]}SupportPleaseopen an issuefor support.ContributingPlease contribute usingGithub Flow. Create a branch, add commits, andopen a pull request.TestingTest codes are prepared intests/based onPyTestframework.
Package: backtest-ape
backtest-apeBacktesting and forward-testing (via Monte Carlo sims) for DeFi strategies.Installationhatchbuild
hatchshell(backtest-ape)$apepluginsinstall.Build(backtest-ape)$apecompile--sizeTest(backtest-ape)$apetest-sUsage(backtest-ape)$aperunbacktester
INFO:Starting'anvil'process.
Youareconnectedtoprovidernetworkethereum:mainnet-fork:foundry.
Runnertype(BaseRunner,BaseCurveV2Runner,BaseUniswapV3Runner,CurveV2LPRunner,UniswapV3LPRunner):CurveV2LPRunner
Runnerkwarg(ref_addrs):{"pool":"0xD51a44d3FaE010294C616388b506AcdA1bfAAE46"}Runnerkwarg(num_coins):3Runnerkwarg(amounts):[1000000000000,5946382600,820567784927637667840]DeployingmockERC20tokens...
Startblocknumber:16219691Stopblocknumber[-1]:
Stepsize[1]:
Initializingstateofmocksfromblocknumber16219691...
Iteratingfromblocknumber16219692to16270201withstepsize1...
Processingblock16219692...
Stateofrefsatblock16219692:{'balances':[49753542730360,299470579545,42256392553951116624718],'D':149811847101739918524603074,'A_gamma':[183752478137306770270222288013175834186240000,581076037942835227425498917514114728328226821,1633548703,0],'prices':[16693207875853529503168,1185215639716509143580],'total_supply':179765246450053705933358}Backtestervalueatblock16219692:2981325191662ResultsCurve Tricrypto2 LP positionfrom block 16048833 to 16273534:Gearbox V2 stETH strategy (5x leverage)from block 14805946 to 15078047:
Package: backtester
Welcome to backtester!Backtester was born out of this project:https://covidactnow.org/The goal of the project is to help backtest our forecasts to make sure they are as accurate as possible against historical time series.Examples-- To Do --ToDos:https://nbviewer.jupyter.org/github/AllenDowney/ProbablyOverthinkingIt/blob/master/sp500.ipynbOther libraries:http://pmorissette.github.io/bt/https://pypi.org/project/Backtesting/https://qtpylib.io/docs/latest/index.html