Saravanan666/pypi-org huggingface dataset:
Package: python-bcb
python-bcbpython-bcbé uma interface em Python estruturada para obter informações
da API de dados abertos doBanco Central do Brasil.O projeto deDados Abertos do Banco Central do Brasildisponibiliza diversas APIs provendo acesso direto a dados de:MoedasTaxas de JurosÍndices de preçosInformações de Instituições FinanceirasExpectativas do Mercado (Expectativas do Boletim FOCUS)E muito outros ...Instalaçãopython-bcbestá disponível noPython Package Indexe pode ser instalado viapipusando.pipinstallpython-bcbAPIsSGSUtiliza o webservice do SGS
(Sistema Gerenciador de Séries Temporais <https://www3.bcb.gov.br/sgspub/>_)
para obter os dados.Conversor de MoedasImplementado no módulocurrency, um conjunto de funções que realiza webscraping
no site doConversor de Moedasdo Banco Central, possível obter séries temporais de frequência diária
de diversas moedas.Moedas ODataO Banco Central disponibiliza diversas informações em APIs que
seguem o padrãoOData.
A classebcb.PTAXimplementa uma API OData que
entrega os boletins diários de taxas de câmbio do Banco Central.
Esta API entrega mais informações do que o que é obtido noConversor de Moedas.ExpectativasA API de Expectativas de Mercado traz todas as estatísticas das variáveis
macroeconômicas fornecidos por um conjuto de instituições do mercado
financeiro.
A classebcb.Expectativasimplementa essa interface no
padrão OData.
Package: python-bcp47
python-bcp47A validating parser for bcp47 language codesData taken from IANAhttp://www.iana.org/assignments/language-subtag-registry/language-subtag-registrybcp47 spechttps://tools.ietf.org/html/bcp47useful reading:https://www.w3.org/International/articles/language-tags/index.enextensionandprivate-usetag types are not currently supportedPython exampleYou can read thelanguages,extlangs,scripts,variants,regions,grandfathereds, andredundantslanguage tag parts fromdictson thebcp47object.They returnOrderedDictscontaining the IANA database information>>> from bcp47 import bcp47

>>> list(bcp47["languages"].items())[:2]
[('aa', {'Subtag': 'aa', 'Description': ['Afar'], 'Added': '2005-10-16'}), ('ab', {'Subtag': 'ab', 'Description': ['Abkhazian'], 'Added': '2005-10-16', 'Suppress-Script': 'Cyrl'})]

>>>  list(bcp47["regions"].items())[:2]
[('AA', {'Subtag': 'AA', 'Description': ['Private use'], 'Added': '2005-10-16'}), ('AC', {'Subtag': 'AC', 'Description': ['Ascension Island'], 'Added': '2009-07-29'})]
`You can create a language code tag as follows>>> tag = bcp47(language="en", region="GB")
>>> tag
<bcp47.code.BCP47Code 'en-GB' />

>>> tag.language
'en'
>>> tag.region
'GB'
>>> str(tag)
'en-GB'You can also pass astringorlistofargsto create a tag>>> bcp47("en-GB")
<bcp47.code.BCP47Code 'en-GB' />

>>> bcp47("en", "GB")
<bcp47.code.BCP47Code 'en-GB' />Creating a tag with invalid or unrecognized parameters raises anBCP47Exception>>> tag = bcp47(language="NOTALANGUAGE", region="GB")
Traceback (most recent call last):
...
BCP47Exception: Language 'NOTALANGUAGE' not recognized

>>> tag = bcp47("en-NOTAREGION")
Traceback (most recent call last):
...
BCP47Exception: Unrecognized tag part 'NOTAREGION'
Package: python-bcrypt
py-bcrypt is an implementation the OpenBSD Blowfish password hashing
algorithm, as described in “A Future-Adaptable Password Scheme” by
Niels Provos and David Mazieres.This system hashes passwords using a version of Bruce Schneier’s
Blowfish block cipher with modifications designed to raise the cost
of off-line password cracking. The computation cost of the algorithm
is parametised, so it can be increased as computers get faster.
Package: python-bea
Python Bureau Of Economic Analysis API ClientTable of ContentsOverviewSetupUsageSupport These ProjectsOverviewAn Python API client used to pull and retrieve data from the US Bureau of Economic Analysis.Grab an API KeyTo grab an API key, you'll need to setup an account with the Bureau Of Economic Analysis. Go to theAPI Homepageand fill out the register form on the left
hand side. Once filled out an API key will be sent to your email.SetupRight now, the library is not hosted onPyPiso you will need to do a local install on your system if you plan
to use it in other scrips you use.First, clone this repo to your local system. After you clone the repo, make sure to run thesetup.pyfile, so you
can install any dependencies you may need. To run thesetup.pyfile, run the following command in your terminal.pip install python-beaThis will install all the dependencies listed in thesetup.pyfile. Once done you can use the library
wherever you want.UsageHere is a simple example of using thepybealibrary to grab a list of the different datasets availabel.frompprintimportpprintfrompybea.clientimportBureauEconomicAnalysisClient# Initalize the new Client.bea_client=BureauEconomicAnalysisClient(api_key='YOUR_API_KEY_HERE')# Grab the Dataset List.dataset_list=bea_client.get_dataset_list()pprint(dataset_list)You will note the output of the above code would look like the following:{"BEAAPI":{"Request":{"RequestParam":[{"ParameterName":"METHOD","ParameterValue":"GETPARAMETERLIST"},{"ParameterName":"RESULTFORMAT","ParameterValue":"JSON"}]},"Results":{"Parameter":[{"ParameterName":"GeoFips","ParameterDataType":"string","ParameterDescription":"Comma-delimited list of 5-character geographic codes; COUNTY for all counties, STATE for all states, MSA for all MSAs, MIC for all Micropolitan Areas, PORT for all state metro/nonmetro portions, DIV for all Metropolitan Divisions, CSA for all Combined Statistical Areas, state post office abbreviation for all counties in one state (e.g. NY)","ParameterIsRequiredFlag":"1","MultipleAcceptedFlag":"1"},{"ParameterName":"Year","ParameterDataType":"string","ParameterDescription":"Comma-delimted list of years; LAST5 for latest 5 years; LAST10 for latest 10 years; ALL for all years","ParameterIsRequiredFlag":"0","ParameterDefaultValue":"LAST5","MultipleAcceptedFlag":"1"}]}}}Support these ProjectsPatreon:Help support this project and future projects by donating to myPatreon Page.
I"m always looking to add more content for individuals like yourself, unfortuantely some of the APIs I would
require me to pay monthly fees.YouTube:If you"d like to watch more of my content, feel free to visit my YouTube
channelSigma Coding.
Package: python-bean
整合封装一些工作中常用到的工具安装pip install python-beanpypi:https://pypi.org/project/python-bean/目前工作中主要是用 Python2.7.5所以工具主要支持此版本名称说明更新日期DocumentSimilar利用gensim tf-idf比对文档相似度2019-03-30DataBase使用上下文管理器管理MySQL的链接对象2019-03-30FakeRequests对requests的简易包装，相同的用法2019-03-31SSHClient对paramiko 的简易封装2019-04-03SendEmail对smtplib 的简易封装2019-04-03
Package: python-benchmark-thread-vs-process
python-benchmark-thread-vs-processA benchmark on speed evaluation between multi-thread and multi-process in PythonPyPI:https://pypi.org/project/python-benchmark-thread-vs-process/Github:https://github.com/minhng-info/python-benchmark-thread-vs-processInstallationsudo pip3 install python_benchmark_thread_vs_processNote: this package only supports Python 3.Install package and run test in one command:sudo pip3 install python_benchmark_thread_vs_process && python_benchmark_thread_vs_processUsageRun benchmarking with the following command:python_benchmark_thread_vs_processNote: It takes up to 15 minutes to finish the test. Please be patient!Benchmarking ResultsTry to keep your CPUs usage free as much as possible before benchmarking.For latest benchmarking result, please checkout @https://github.com/minhng-info/python-benchmark-thread-vs-processNum CPUsCPU ModelCurrent CPU Freq (MHz)Multi-Thread Time (s)Multi-Process Time (s)Total Test OperationContributor1Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz250011.758112.0673100@minhng924ARM Cortex A531512289.292264.5466400@johnhlaj4Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz247455.38408.8589400@minhng924Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz268320.909810.9195400@minhng9216Intel(R) Xeon(R) Silver 4208 CPU @ 2.10GHz822106.363712.35381600@minhng9216Intel(R) Xeon(R) CPU E5-2640 v3 @ 2.60GHz259798.65847.10331600@minhng9224Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz1331372.392618.59232400@minhng9232Intel(R) Xeon(R) Silver 4108 CPU @ 1.80GHz809478.811515.05383200@minhng9272Intel(R) Xeon(R) Gold 5220S CPU @ 2.70GHz1016550.493611.67597200@minhng9272Intel(R) Xeon(R) Gold 6240 CPU @ 2.60GHz1003545.807610.62857200@minhng92ContributingBenchmarkingTo contribute to our benchmark table, please follow these steps:Step 1: Install package:pip install python-benchmark-thread-vs-processStep 2: Run benchmarking on your machine / server with the command:python_benchmark_thread_vs_processStep 3: If your system information has not been included in the benchmarking results, please create a new issue ticket (withenhancementlabel) and submit your benchmarking result. Your submission is welcome!Step 4: We'll review and update the benchmarking results.Code developmentStep 1. Fork onmasterbranch.Step 2. Installpre-commiton the local dev environment.pip install pre-commit
pre-commit installStep 3. Write unit-test (if any).Step 4. Write code to pass the tests.Step 5. Make sure that the new code passes all the pre-commmit conditions.sh pre_commit.shStep 6. Create pull request.
Package: python-bencode
##python-bencode[![Build Status](https://travis-ci.org/plasmashadow/python-bencode.svg)](https://travis-ci.org/plasmashadow/python-bencode)Becode Encoder and Decoder##Installation```pip install python-bencode```##Usage```pythonfrom bencode import Bencoder#encodingbuilt_to_bencode = [1,2,3]strs = Bencoder.encode(built_to_bencode)#decodingdecodable = "8:announce"obj = Bencoder.decode(decodeable)```##LICENSEBSD[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/plasmashadow/python-bencode/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
Package: python-benforder
Python BenforderA small python CLI tool to check the bendfordness of a bunch of numbersLearn more about Benford’s Law [Here on youtube](https://www.youtube.com/watch?v=XXjlR2OK1kM)This script will take a list of numbers (of a few orders of magnitude of size)Free software: GNU General Public License v3Documentation:https://python-benforder.readthedocs.io.FeaturesFor now, you have to give it a file with-fIn a near future, I want to add stdin as wellCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-08-06)First release on PyPI.0.2.0 (2020-08-06)First working prototype
Package: pythonbible_api
pythonbible-apiAn API wrapper for thepythonbiblelibrary usingFastAPI.WARNING: This is very much still a work in progress and does not yet have a
stable release. Breaking changes are expected.Installationpipinstallpythonbible-apiUsageTo test pythonbible-api out locally, install uvicorn.pipinstalluvicorn[standard]Run the following command in thepythonbible_apidirectory to start uvicorn:uvicornmain:app--reloadUvicorn should now be running locally athttp://127.0.0.1:8000, and you can view the documentation athttp://127.0.0.1:8000/docsorhttp://127.0.0.1:8000/redoc.
Package: python-bidi
Bi-directional(BiDi) layout implementation in pure pythonPackage documentationAPIThe algorithm starts with a single entry pointbidi.algorithm.get_display.Required arguments:unicode_or_str: The original unicode or string (i.e.: storage). If it’s a string
use the optional argumentencodingto specify it’s encoding.Optional arguments:encoding: If unicode_or_str is a string, specifies the encoding. The
algorithm usesunicodedatawhich requires unicode. This encoding will be
used to decode and encode back to string before returning
(default: “utf-8”).upper_is_rtl: True to treat upper case chars as strong ‘R’ for
debugging (default: False).base_dir:  ‘L’ or ‘R’, override the calculated base_level.debug: True to display (usingsys.stderr) the steps taken with the
algorithm (default: False).Returns the display layout, either as unicode orencodingencoded string
(depending on the type ofunicode_or_str').Example:>>> from bidi.algorithm import get_display
>>> get_display(u'car is THE CAR in arabic', upper_is_rtl=True)
u'car is RAC EHT in arabic'CLIpybidiis a command line utility (callingbidi.main) for running the
bidi algorithm. the script can get a string as a parameter or read text fromstdin. Usage:$ pybidi -h
Usage: pybidi [options]

Options:
  -h, --help            show this help message and exit
  -e ENCODING, --encoding=ENCODING
                        Text encoding (default: utf-8)
  -u, --upper-is-rtl    treat upper case chars as strong 'R' for debugging
                        (default: False).
  -d, --debug           Output to stderr steps taken with the algorithm
  -b BASE_DIR, --base-dir=BASE_DIR
                        Override base direction [L|R]Examples:$ pybidi -u 'car is THE CAR in arabic'
car is RAC EHT in arabic

$ cat ~/Documents/example.txt | pybidi
...InstallationSeedocs/INSTALL.rstRunning testsTo run the tests:python setup.py testSome explicit tests are failing right now (see TODO)0.4.2Type Fixes, thanks jwilkHistory0.4.1Merged Fix for mixed RTL and numbers, Thanks Just van Rossum0.4.0Move to cookiecutter templatePython 3 support (py2.6, 2.7, 3.3, 3.4 and pypy)Better docsTravis integrationTox testsPEP8 cleanup0.3.4Remove extra newline in console script output0.3.3Implement overriding base paragraph directionAllow overriding base direction in pybidi console scriptFix returning display in same encoding0.3.2Test for surrogate pairsFix indentation in documentationsSpecify license in setup.py0.3.1Added missing descriptiondocs/INSTALL.rst0.3Apply bidi mirroringMove to back function based implementation0.2Move the algorithm to a class based implementation0.1Initial release
Package: python-billtobox-api
python-mydhl-apiWrapper for the Bill-To-Box / BanqUP (UnifiedPost) API - v4LimitationsThis package is limited to PurchaseInvoices at this moment.Getting startedInstallInstall with pippipinstallpython-billtobox-apiImportImport the package and the BillToBoxAPI.frombilltobox.apiimportBillToBoxAPISetup connectionMake the connection with your created CLIENTID and CLIENTSECRET.api=BillToBoxAPI(CLIENTID,CLIENTSECRET)BillToBox authentcation is build on OAuth2. A basic script to obtain your first tokens can be found below.frombilltobox.apiimportBillToBoxAPIREDIRECT_URI='https://any-url-will-do.com/callback/'api=BillToBoxAPI(CLIENTID,CLIENTSECRET)authUrl=api.authHandler.getAuthURL(REDIRECT_URI)print('visit url: ',authUrl)response=input('paste response: ')token=api.authHandler.retrieveToken(response,redirectUri=REDIRECT_URI)When using the script above, any REDIRECT_URI will do. Simply copy and paste the response URI so the handler can obtain the right tokens.UAT/Test modeYou can choose to make use of the UAT/Test environment instead of production by specifying an extra parameter demo and setting it to True.api=BillToBoxAPI(CLIENTID,CLIENTSECRET,demo=True)Be aware that the UAT environment uses a different CLIENTID and CLIENTSECRET than the production environment.PurchaseInvoicesAvailable fieldsPurchaseInvoiceFieldRemarksidpurchase_invoice_uuidUUIDpurchase_invoice_numberclient_creditor_purchase_invoice_numberclient_creditor_numbercreditor_numberclient_numberamountvat_amountcurrency_codecreditor_currency_codepurchase_invoice_datepurchase_invoice_due_dateplatform_idinvoice_linesContains an InvoiceLineList objectInvoiceLineFieldidservice_nameservice_descriptionservice_quantityservice_priceservice_vatListGet all the purchase invoices. You can limit the size or specify the page. The maximum size is 50, increase the page if you would to see more invoices.
Default page is 0 and default size is 50. Optionally you can specify the field to sort. Default field to sort by is client_id.Returns a PurchaseInvoiceList object.purchaseInvoices=api.purchaseInvoices.list(page=0,size=50,sort='client_id')# Is the same aspurchaseInvoices=api.purchaseInvoices.list()forinvoiceinpurchaseInvoices.items():print(invoice.id)print(invoice.amount)forlineininvoice.invoice_lines.items():print(line.service_name)print(line.service_price)GetGet a specific purchase invoice by its ID. Returns a PurchaseInvoice object.invoice=api.purchaseInvoices.get(ID)print(invoice.id)Get by UUIDGet a specific purchase invoice by its UUID (different than the ID). Returns a PurchaseInvoice object.At this moment there is no built-in function in the API to retrieve an invoice by its UUID.
This function will thus loop over all the invoices and returns the invoice with the requested UUID. This is the reason why the function may run slow if you have a lot of invoices in your account.invoice=api.purchaseInvoices.getByUUID(UUID)print(invoice.id)DeleteDeletes a specific purchase invoice by its ID.invoice=api.purchaseInvoices.delete(ID)
Package: python-binary-memcached
Introduction to bmemcachedA pure python module (thread safe) to access memcached via it’s binary with SASL auth support.The main purpose of this module it to be able to communicate with memcached using binary protocol and support authentication, so it can work with Heroku for example.Latest compiled docs on Read The Docshere.InstallingUse pip or easy_install.pipinstallpython-binary-memcachedUsingimportbmemcachedclient=bmemcached.Client(('127.0.0.1:11211',),'user','password')client.set('key','value')print(client.get('key'))Using it with distributed keysimportbmemcachedclient=bmemcached.DistributedClient(('127.0.0.1:11211',),'user','password')client.set('key','value')print(client.get('key'))Testingpython-binary-memcachedunit tests are found in thetest/directory
and are designed to be run usingpytest.pytestwill discover the tests
automatically, so all you have to do is:$pytest...
170 passed in 4.43 secondsThis runs the tests with the default Python interpreter.You can also verify that the tests pass on other supported Python interpreters.
For this we usetox, which will automatically create avirtualenvfor
each supported Python version and run the tests. For example:$tox...
py27: commands succeeded
ERROR:  py34: InterpreterNotFound: python3.4
py35: commands succeeded
py36: commands succeeded
py37: commands succeeded
py38: commands succeededYou may not have all the required Python versions installed, in which case you
will see one or moreInterpreterNotFounderrors.Using with DjangoIf you want to use it with Django, go todjango-bmemcachedto get a Django backend.Tests Statusv0.31.2 (2022-12-14)FixRemove setup’s.py dependency on m2rv0.31.1 (2021-12-29)v0.31.0 (2021-12-28)RefactorUse bytearrays for building up bytes for I/O. (#245)FeatExpose incr/decrdefaultandtimeprotocol arguments in
client class (#243)v0.30.1 (2020-10-11)v0.30.0 (2020-08-18)Add ability to return default value on get but breaking get’s APISupport an arbitrary collection of keys, not just a listv0.30 (2020-06-10)v0.29.0 (2020-01-29)added TLS support on #211 thanks to @moisesguimaraes!v0.28.0 (2018-10-02)moved bmemcached.Client to bmemcached.ReplicantClientbut keeps
backward compatibilityadded DistributedClient to distribute keys over servers using
consistent hashingv0.27.0 (2018-08-10)0.26.1 (2017-07-18)0.26.0 (2017-01-13)0.25.0 (2016-12-15)0.24.7 (2016-11-08)0.24.2 (2014-05-27)0.24.1 (2014-05-20)0.24 (2014-04-28)0.23 (2014-04-18)v0.18 (2013-05-06)v0.17 (2013-04-15)
Package: python-bindiff
Python Bindiffpython-bindiffis a python module aiming to give a friendly interface to launch
and manipulate bindiff between two binary iles.How it works ?The module relies onpython-binexportto extract programs .BinExport and then directly interact with the binarydiffer(of zynamics) to perform the diff. The generated diff file is then correlated
with the two binaries to be able to navigate the changes.InstallationThe python module requires Bindiff. Thus first refers toZynamics installation directives.Then the python module can be installed with:pip install python-bindiffThe python module needs to execute thedifferexecutable. As such it should be available:either in the pathor via theBINDIFF_PATHenvironment variableUsage as a python moduleThe simplest way to get the programs diffed is:frombindiffimportBinDiffdiff=BinDiff("sample1.BinExport","sample2.BinExport","diff.BinDiff")print(diff.similarity,diff.confidence)# do whatever you want with diff.primary, diff.secondary which are the# two Program objectBut programs can be instanciated separately:frombinexportimportProgramBinExportfrombindiffimportBinDiffp1=ProgramBinExport("sample1.BinExport")p2=ProgramBinExport("sample2.BinExport")diff=BinDiff(p1,p2,"diff.BinDiff")Note that all the diff data are embedded inside program objects thus
after instanciating BinDiff thosep1andp2are modified.From the API it is also possible to directly perform the BinExport
extraction and the diffing:frombindiffimportBinDiffdiff=BinDiff.from_binary_files("sample1.exe","sample2.exe","out.BinDiff")# or performing the diff on BinExport filesdiff=BinDiff.from_binexport_files("sample1.BinExport","sample2.BinExport","out.BinDiff")Usage as a command lineThebindiffercommand line allows to generate a diff file from the two
.BinExport files or directly from the binaries (thanks to python-binexport and
idascript). The help message is the following:Usage: bindiffer [OPTIONS] <primary file> <secondary file>

  bindiffer is a very simple utility to diff two binary files using BinDiff in command line. The two input files can be either binary files (in which case
  IDA is used) or directly .BinExport file (solely BinDiff is used).

Options:
  -i, --ida-path PATH      IDA Pro installation directory
  -b, --bindiff-path PATH  BinDiff differ directory
  -t, --type <type>        inputs files type ('bin', 'binexport') [default:'bin']
  -o, --output PATH        Output file matching
  -h, --help               Show this message and exit.To work bindiffdifferbinary should be in the$PATH, given via
theBINDIFF_PATHenvironment variable or with the-bcommand option.
Similarly when diff binaries directly the ida64 binary should be available
in the $PATH, given with theIDA_PATHenvironment variable or via the-icommand option.
Package: python-binexport
Python-Binexportpython-binexportis a python module aiming to give a friendly interface to load
and manipulate binexport files.What is binexport ?Binexport is aprotobufformat used by Bindiff to extract IDA database and
to process them outside. It gives a very optimizated (in size) representation
of the program.DependenciesPython-binexport can load any .BinExport files generated from the supported disassemblers
IDA, Ghidra and Binary Ninja.However to perform the export withbinexporteror from the APIProgramBinexport.from_binary_file()the IDA plugin must be installed as it is the only supported at the moment. For that it has to beinstalled first from the github page.
To use the feature python-binexport requires IDA >=7.2 (as it calls theBinExportBinaryIDC function).[!WARNING]
If you export files from python-binexport make sure the IDA Pro binexport plugin is properly installed
and works when running it manually before trying to use it from the python library (it can hang if not properly installed).[!NOTE]
The possibility to export files using Ghidra, or Binary Ninja from python-binexport
might be supported in the future.Installationpip install python-binexportPython module usageThe main intended usage ofpython-binexportis as a python module.
The main entry point is the classProgramBinExportwhich triggers the
loading of the whole file. Here is a snippet to iterate on every expression
of every instruction in the program:frombinexportimportProgramBinExportp=ProgramBinExport("myprogram.BinExport")forfun_addr,funinp.items():withfun:# Preload all the basic blocksforbb_addr,bbinfun.items():forinst_addr,instinbb.instructions.items():foroperandininst.operands:forexpinoperand.expressions:pass# Do whatever at such deep levelObviouslyProgramBinExport,FunctionBinExport,InstructionBinExportandOperandBinExportall provides various attributes and method to get their type, and multiple other infos.If the moduleidascriptis installed you can directly generate a BinExport
file using theProgram.from_binary_filestatic method.Command line usageThe executable scriptbinexporterprovides a very basic utility
to export a BinExport file straight from the command line(without
having to launch IDA etc..). This is basically a wrapper forProgram.from_binary_file.