Saravanan666/pypi-org huggingface dataset:
Package: pageviewapi
Wikimedia Pageview API clientInstallationIn order to install system wide on system using sudo you can use:pipinstallgit+https://github.com/Commonists/pageview-api.gitExamplesNumber of view on English Wikipedia of article Paris from November 6th
to November 20th 2015importpageviewapipageviewapi.per_article('en.wikipedia','Paris','20151106','20151120',access='all-access',agent='all-agents',granularity='daily')Aggregation: Get a daily pageview count timeseries of all projects for
the month of October 2015importpageviewapipageviewapi.aggregate('fr.wikipedia','2015100100','2015103100',access='all-access',agent='all-agents',granularity='daily')Most viewed articles on French Wikipedia on November 14th, 2015importpageviewapipageviewapi.top('fr.wikipedia',2015,11,14,access='all-access')Sum (resp. average) of view during last 30 daysimportpageviewapi.periodpageviewapi.period.sum_last('fr.wikipedia','Paris',last=30,access='all-access',agent='all-agents')pageviewapi.period.avg_last('fr.wikipedia','Paris',last=30)Monthly legacy pagecounts (2008 until end of 2016) on a projectimportpageviewapipageviewapi.legacy_pagecounts('fr.wikipedia','2010010100','2011010100',granularity='monthly')
Package: pagexml-tools
pagexml-toolsUtility functions for readingPageXMLfilesinstallingusing poetrypoetry add pagexml-toolsusing pippip install pagexml-toolsUsingPageXML-tools contains functions for parsing and for a range of analysis tasks.Parsing PageXML files and the Physical Document modelThere is a tutorial that demonstrates thephysical document model APIPageXML-tools contains basic functionality for parsing a PageXML file that returns
a document model representing the content of the file. The HTR/OCR process that generates
PageXML, recognises text in an image of a physical document.frompagexml.parserimportparse_pagexml_filepagexml_file="path/to/pagexml_file.xml"page_doc=parse_pagexml_file(pagexml_file)# a page document has an IDprint(page_doc.id)# print descriptive statisticsprint(page_doc.stats)# iterative over text regions and linesfortrinpage_doc.text_regions:# a text_region has an ID and a bounding box derived from its coordinatesprint(tr.id,tr.coords.box)# a text_region can have sub-text_regions and linesforlineintr.lines:# a line has an ID, coordinates and textprint(line.id,line.coords.box,line.text)In addition to the basic parsing and handling of PageXML output, there is
functionality to support a range of tasks:reading sets of PageXML files from a archive (tar, zip) file (tutorial),searching in text (keyword in context,keywords or fuzzy search)classifying physical document types in a large set of PageXML documents (tutorial),checking the quality of the HTR/OCR process (tutorial),comparing subsets (tutorial),identifying document sections in sequences of PageXML documents (tutorial),turning text lines into running text (tutorial),supporting different reading orders (tutorial),reinterpreting and restructuring text regions and lines (tutorial),turning physical structure into logical structure,USAGE|CONTRIBUTING|LICENSE
Package: pagex-stocks-data
pagex-stocks-dataThe data access layer modulelocal python upgradebrew install python@3.10add python_version = "3.10.0" to pipfilepipenv --rmpipenv --python /usr/local/opt/python@3.10/bin/python3.10pipenv update --python 3.10pipenv installadd interpreter setting to pycharmbuild wheelmaintain setup.py
python -m pip install -U wheel setuptools
python setup.py bdist_wheel --universalpip -https://pip.pypa.io/en/latest/cli/pip install --upgrade pagex-stocks-data # upgrade module version
pip check
python -m pip freeze # list dependencies from pip
python -m pip freeze > requirements.txt # list dependencies from pip and export it to requirements.txt
Package: pagey
PageyTL;DR:Pagey is a Pagerduty slack bot.:hourglass: Pipelines:tada: Installpipinstallpagey:exclamation: Requires Python >= 3.6:computer: Usage# Export required tokens to your envexportPAGEY_SLACK_TOKEN="read-write slack token"exportPAGEY_PD_TOKEN="read-only pagerduty token"# Run itpageyDockerDocker image is available here:# Export required tokens to your envexportPAGEY_SLACK_TOKEN="read-write slack token"exportPAGEY_PD_TOKEN="read-only pagerduty token"# Run itdockerrun--rm-d-ePAGEY_SLACK_TOKEN-ePAGEY_PD_TOKENflaconi/slackbot-pageySlack configurationSeedoc/directory for how to configure Slack:page_facing_up: LicenseMIT LicenseCopyright (c) 2021Flaconi
Package: paggcerto-python
Paggcerto Python APIThe Paggcerto Python API provides convenient access to the Paggcerto API from applications written in the Python language.Quick InstallThis lib can be found on pip. To install it, use:$ pip install paggcerto-pythonUsageExport environment variablesexport PAGGCERTO_API_USER=...
export PAGGCERTO_API_PASSWORD=...
export PAGGCERTO_API_USE_SANDBOX=TrueCreating a Clientimport python_http_client
from paggcerto import PaggcertoAPIClient, Client, PersonType, SexType, PaymentMethodType

api = PaggcertoAPIClient()

client = Client(
    cpfCnpj="31618850075",
    name="Maria Joao dos Santos",
    sex=SexType.F,
    dateOfBirth="01/25/1978",
    phone="7927667035",
    cellphone="79993764596",
    email="saragabriellyribeiro_@zf.com",
    typePerson=PersonType.F,
    zipCode="49030-720",
    address="Avenida Tancredo Neves",
    number="10",
    complement="Próximo ao conjunto inácio barbosa",
    neighborhood="Inacio Barbosa",
    city="Aracaju",
    uf="SE",
    note="O cliente possui apenas um dependente.",
    paymentMethod=PaymentMethodType.C
)
try:
    response = api.client.core.client.register.post(request_body=client.get())
    print(response.to_dict['client']['publicId'])
except python_http_client.HTTPError as e:
    print(e.to_dict)Adding a credit cardimport python_http_client
from paggcerto import PaggcertoAPIClient, CreditCard, Expiration

api = PaggcertoAPIClient()

credit_card = CreditCard(
    numberCard="4329626344167265",
    name="Maria Joao dos Santos",
    cvv="345",
    publicIdClient="MAY0uoO7mTpO4tBnY"
    expiration=Expiration(month="11", year="21")
)
try:
    response = api.client.core.card.register.post(request_body=credit_card.get())
    print(response.to_dict['card']['publicId'])
except python_http_client.HTTPError as e:
    print(e.to_dict)DocumentationPaggcerto API Docs
Package: pagidantic
Pagination using Pydantic. Easy to use, lightweight, and easy to integrate with existing projects ✨RequirementsA recent and currently supported version of Python (right now,Python supports versions 3.9 and above).AsPagidanticis based onPydantic, it requires them. They will be automatically installed when you installPagidantic.Notes: we support only Pydantic v2. If you are using Pydantic v1, you can install it usingpip install pagidantic==1.1.0InstallationYou can add Pagidantic in a few easy steps. First of all, install the dependency:$pipinstallpagidantic

--->100%

SuccessfullyinstalledpagidanticUsagefrompagidanticimportpagidantic# Generate a list here: https://json-generator.com/object_list=[...]# list of objectspagination=pagidantic(object_list,page_limit=2,start_page=0)# get current returned pagedefget_current_page():returnpagination.response# get next pagegdefget_next_page():returnpagination.get_next()# get previous pagedefget_previous_page():returnpagination.get_previous()# get page by numberdefget_page_by_number():returnpagination.get_page_response(page_number=0)# get total pagesdefget_total_pages():returnpagination.total_pages# Count total objectsdefcount_total_objects():returnpagination.totalDevelopment 🚧Setup environment 📦You should create a virtual environment and activate it:python-mvenvvenv/sourcevenv/bin/activateAnd then install the development dependencies:# Install dependenciespipinstall-e.[test,lint]Run tests 🌝You can run all the tests with:bashscripts/test.shFormat the code 🍂Execute the following command to applypre-commitformatting:bashscripts/format.shExecute the following command to applymypytype checking:bashscripts/lint.shLicenseThis project is licensed under the terms of the MIT license.
Package: pagilist
PagilistSimple module to paginate lists using page or limit/offset. Source code available atGithub.Usagepage = 0 #first page
limit = 3 #three items per page
page_sample = paginate(list, page, limit)

##OR##

offset = 3 #start from the fourth element on list
page_offset = paginate_offset(list, offset, 5) #get from the fourth element with a limit of 5 elements

print(page_sample) #outputs [1, 2, 3]
print(page_offset) #outputs [4, 5, 6, 7, 8]
Package: paginate-any
PaginateAnyPagination primitives for any ORM and web-frameworks.Known issuesDecode and Encode of a cursor values hardcoded withmsgspec.msgpackmodule.
You can't use timezone-naive datetime format, because it converts value to thestrtype.
Seespecandissueabout
supported types.Code examplefromtypingimportAnnotatedfromdatetimeimportdatetime,timezonefromfastapiimportFastAPI,Dependsfrompaginate_any.cursor_paginationimportInMemoryCursorPaginatorfrompaginate_any.ext.fastapiimport(FastApiCursorPagination,PaginationDependProtocol,init_paginate_any_fastapi_app,)frompaginate_any.rest_apiimportJsonPaginationRespfrompydanticimportBaseModelapp=FastAPI()init_paginate_any_fastapi_app(app)classCar(BaseModel):id:intname:strfactory_start:datetimepaginator=InMemoryCursorPaginator[Car](unq_field='id',sort_fields={'id':'id','factory_start':'factory_start',},default_size=2,)store=[Car(id=1,name='BMW',factory_start=datetime(1916,3,7,tzinfo=timezone.utc)),Car(id=2,name='Audi',factory_start=datetime(1909,7,16,tzinfo=timezone.utc)),Car(id=3,name='Mercedes-Benz',factory_start=datetime(1926,6,28,tzinfo=timezone.utc)),Car(id=4,name='Volkswagen',factory_start=datetime(1937,5,28,tzinfo=timezone.utc)),Car(id=5,name='Porsche',factory_start=datetime(1931,4,25,tzinfo=timezone.utc)),]@app.get('/cars',response_model=JsonPaginationResp[Car])asyncdefcars(p:Annotated[PaginationDependProtocol[list[Car],Car],Depends(FastApiCursorPagination.depend(paginator)),],):result=awaitp.paginate(store)returnresult.json_resp()Request:curl-XGET"http://127.0.0.1:8000/cars?ordering=factory_start"-H"accept: application/json"Response:{"pagination":{"size":2,"after":"kscM_wAAAAD_____msOxAAE="},"links":{"next":"http://127.0.0.1:8000/cars?after=kscM_wAAAAD_____msOxAAE%3D&ordering=factory_start"},"data":[{"id":2,"name":"Audi","factory_start":"1909-07-16T00:00:00Z"},{"id":1,"name":"BMW","factory_start":"1916-03-07T00:00:00Z"}]}
Package: paginateit
paginateitUsed to paginate REST API Calls / Mostly on MultiThreaded API Calls via PythonDescriptionTakes 2 inputs:count -> total number of items in all pagesmax_workers -> number of threads need to be created (Based upon the number provided, skip and limits are calculated dynamically)Getting StartedDependenciesPython 3.6 and further releases.Installingpip install paginateitExecuting programfrom paginateit import paginateit as pg
pg.page(23052, 4)

----------------|---------------|---------------|------------|
|SKIP           | LIMIT         | FLIMIT        | COUNT      |
|---------------|---------------|---------------|------------|
|skip1: 0       |limit1: 5763	|flimit1: 763	|count1: 5763|
|---------------|---------------|---------------|------------|
|skip2: 5763	|limit2: 11526	|flimit2: 1526	|count2: 5763|
|---------------|---------------|---------------|------------|
|skip3: 11526	|limit3: 17289	|flimit3: 7289	|count3: 5763|
|---------------|---------------|---------------|------------|
|skip4: 17289	|limit4: 23052	|flimit4: 3052	|count4: 5763|
|---------------|---------------|---------------|------------|
|skip5: 23052	|limit5: 28815	|flimit5: 8815	|count5: 5763|
|---------------|---------------|---------------|------------|We can now use the variables like skip(x) or limit(x) in the API where filter.

SKIP: A skip filter omits the specified number of returned records
LIMIT: A limit filter limits the number of records returned to the specified number
FLIMIT (Custome field): A flimit filter can be used to fetch all the remaining records at the last page of every thread
COUNT: A count filter tell the maximum number of records available in that page.

Other examples:

pg.page(1700, 8) --> Max records availabe in all pages is 1700 and are creating 8 threads / loops (We see skip[1-9] values)
pg.page(90005, 6) --> Max records availabe in all pages is 90005 and are creating 6 threads / loops (We see skip[1-7] values)
pg.page(5025) --> Max records availabe in all pages is 1700 and are creating 8 threads /loops (We see skip[1-3] values)

pg.page(count, max_workers) # max_workers defaults to 2 unless specifiedUsageAccess the dynamic calculated variables as shown below:pg.skip1, pg.skip3, pg.limit2, pg.flimit4, pg.count2HelpAny advise for common problems or issues, please feel free to create a issue in GithubAuthorsManjesh Nmanjesh_n@hotmail.comLicenseThis project is licensed under the Apache License 2.0 License - see the LICENSE file for detailsAcknowledgments
Package: paginate-whoosh
paginate_whoosh---------------This module is an extension to the [paginate](https://github.com/Pylons/paginate) module. It dividesup search results obtained with Whoosh.Usage-----```from paginate_whoosh import WhooshPageqp = QueryParser("text", myindex.schema)q = qp.parse("a query")with myindex.searcher() as searcher:page = WhooshPage(searcher.search(q, limit=None), # limit=None is required!page=1, items_per_page=10)# Now continue as you are used from the paginate module.# Iterate over page to obtain the Whoosh result dictionary```
Package: paginator.py
paginator.pySimple to use discord paginator for messages and embeds with reactions and buttons.FeaturesVery easy to useCustomisableChange pages with buttons or reactionsActively maintainedLinksDocumentationPyPiInstallationYou can easily install it using the python package managerpippip install paginator.pyQuickstartHere are some examples that might help.Sending a message with pages that uses reactionfrompaginatorimportPaginator,Page,NavigationTypefromdiscordimportEmbed...paginator=Paginator(bot)@bot.command()asyncdeftest(ctx):pages=[Page(content="React!",embed=Embed(title="Page #1",description="Testing")),Page(embed=Embed(title="Page #2",description="Still testing")),Page(embed=Embed(title="Page #3",description="Guess... testing"))]awaitpaginator.send(ctx.channel,pages,type=NavigationType.Reactions)Sending a message with pages that uses buttonsfrompaginatorimportPaginator,Page,NavigationTypefromdiscordimportEmbed...paginator=Paginator(bot)@bot.command()asyncdeftest(ctx):pages=[Page(content="Click!",embed=Embed(title="Page #1",description="Testing")),Page(embed=Embed(title="Page #2",description="Still testing")),Page(embed=Embed(title="Page #3",description="Guess... testing"))]awaitpaginator.send(ctx.channel,pages,type=NavigationType.Buttons)Changing the emojisfrompaginatorimportPaginator,PageEmojis...paginator=Paginator(bot)classEmojis(PageEmojis):def__init__(self):super().__init__()self.back="⏪"self.forward="⏩"paginator.page_emojis=Emojis()ContributionsFeel free to open pull requests and improve the library. If you find any issues, please report it.
Package: pago46
Pago46 Python PackagePython Library for the integration with the cash payment plataform of pago46.DescriptionThis library it was developed for give e-merchants of pago46 a standard, easy and fast integration to integrate his products/services with Pago46 to can offer the option of pay with cash to his clientsConfiguration.to configure the client of Pago46 it's necessary to have a MERCHANT_SECRET and MERCHANT_KEY (those key are provided by Pago46)
with those keys we can generate calls to PAGO46 API.we must configure the MERCHANT_SECRET, MERCHANT_KEY and PAGO46_API_HOST on enviroment variables.Exampleimportosos.environ["PAGO46_MERCHANT_KEY"]="<merchant_key>"os.environ["PAGO46_MERCHANT_SECRET"]="<merchant_secret>"os.environ["PAGO46_API_HOST"]="http://sandboxapi.pago46.com"# for testing  or "https://api.pago46.com" for productionwith the environment variables set, we can intilialize the clientfrompago46.clientimportPago46client=Pago46()Example Get all ordersresponse=client.get_all_orders()Example create a orderfrompago46.clientimportPago46client=Pago46()payload={"currency":"CLP",# Tipo de moneda"merchant_order_id":'0001',# id que identifica una transacción."notify_url":"http://merchant.com/app/response",# La URL en la que pago46 publicara la respuesta al modificarse el estado de la transacción."price":1000,# precio de la orden"return_url":"http://final.merchant.com",# url a la cual el user será redirigido al terminar el proceso."timeout":60,# duración en que la transacción estará activa para ser pagada en minutos."description":"description of product.",# (opcional): descripción opcional del producto/servicio.}# create a new orderresponse=client.create_order(payload)Example to mark a order as complete.payload={"order_id":"0001"}response=client.mark_order_as_complete(payload)Example get a order by IDorder_id="0001"response=client.get_order_by_id(order_id)Example get a order by Notification IDnotification_id="fe0eac28aa774b539b0e12d0227bf27f"response=client.get_order_by_notification_id(notification_id)Example get order details by order IDorder_id="121d3b2c-b985-4592-b8fc-b5c6d9ce5a13"response=client.get_order_details_by_order_id(order_id)InstallationYou can install Pago46 Package in the usual ways. The simplest way is with pip:pip install Pago46
Package: pagoda
# py-simYet another simulator framework for Python!Install using this source repository, or withpip:`shell pip install pagoda `You’ll also need a patched version of the Open Dynamics Engine. To install,
follow the instructions in the
[ode/README.md](https://github.com/EmbodiedCognition/py-sim/tree/master/ode)
file in the source repository.# License(MIT license)Copyright (c) 2013 Leif Johnson <leif@cs.utexas.edu>Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package: pagpdf
INSTALLATION

    $ pip3 install pagpdf

HELP

    $ pagpdf -h

USAGE

    $ pagpdf [-h] [-V] [-c] [-n] [-r] [-t] [-T] [file [file ...]]


Print number of PAGes in PDF files.

This simple utility prints file counter, number of pages and filename
for each given pdf file. Fields are separated by a '\t' (horizontal tab)
character.

Non-pdf files are silently skipped.

Empty or erroneous pdf files are reported as containing zero pages.

Examples:

    $ pagpdf * # list number of pages of all pdf files in current path

    $ pagpdf * 2>/dev/null # leave out warnings from pdfrw.PdfReader

POSITIONAL ARGUMENTS

  file                 files to be listed (non-pdf files are silently skipped)

OPTIONAL ARGUMENTS

  -h, --help           show this help message and exit
  -V, --version        show program's version number and exit
  -c, --csv-header     print CSV header as first line (default: don't)
  -n, --sort-by-pages  sort files by number of pages (default: sort by
                       filename)
  -r, --reverse        sort files in descending order (default: sort in
                       ascending order)
  -t, --total-too      print file list and total line (default: print file
                       list)
  -T, --total-only     print total line only (default: print file list)
Package: pagseguroCTS
pagseguroCTSSDK PagseguroDependenciasYou need Python 2 or later to usepagseguroCTS.If you have pip, just run:pip install pagseguroCTSComo usarDefina sandbox True caso for usar neste ambiente.
config = {'sandbox': True}Instancie a classe usando as credenciais.
pg = PagSeguro(email="seuemail@dominio.com", token="ABCDEFGHIJKLMNO", config=config)O seu config também pode fazer override de algumas váriaveis pré-definidas na classe de Config padrão.
São elas:CURRENCY - Moeda utilizada. Valor padrão:'BRL'DATETIME_FORMAT - Formato de Data/Hora. Valor Padrão:'%Y-%m-%dT%H:%M:%S'REFERENCE_PREFIX - Formato do valor de referência do produto. Valor Padrão:'REF%s'Obs: Nesse caso, sempre é necessário deixar o%sao final do prefixo para que o mesmo seja preenchido automaticamenteUSE_SHIPPING - User endereço de entrega. Valor padrão:TruePara mais informações:https://pypi.org/project/pagseguro/
Package: pagseguroCTS123
pagseguroCTSSDK PagseguroDependenciasYou need Python 2 or later to usepagseguroCTS.If you have pip, just run:pip install pagseguroCTSComo usarDefina sandbox True caso for usar neste ambiente.
config = {'sandbox': True}Instancie a classe usando as credenciais.
pg = PagSeguro(email="seuemail@dominio.com", token="ABCDEFGHIJKLMNO", config=config)O seu config também pode fazer override de algumas váriaveis pré-definidas na classe de Config padrão.
São elas:CURRENCY - Moeda utilizada. Valor padrão:'BRL'DATETIME_FORMAT - Formato de Data/Hora. Valor Padrão:'%Y-%m-%dT%H:%M:%S'REFERENCE_PREFIX - Formato do valor de referência do produto. Valor Padrão:'REF%s'Obs: Nesse caso, sempre é necessário deixar o%sao final do prefixo para que o mesmo seja preenchido automaticamenteUSE_SHIPPING - User endereço de entrega. Valor padrão:TruePara mais informações:https://pypi.org/project/pagseguro/
Package: pagure-dist-git
Since 3.0 pagure offers a way to customize the creation and compilation the of
the gitolite configuration file.This project hosts the logic to generate gitolite’s configuration file for
dist-git which has a different access model than regular projects on pagure (for
example, forced pushed is forbidden).TestsThe tests here require thetest suiteof pagure itself to work.  You have to
modify your PYTHONPATH to find them. Run with:$ PYTHONPATH=.:/path/to/pagure/checkout nosetests dist_git_auth_tests.py
Package: pagurus
pagurusUsed for getting the information from a running job based on its pid using psutil.InstallAvailible onPyPiand easily installed in your enviroment.pip install pagurusOptionsusage: pagurus [-h] [-o OUTFILE] [-p PATH] [-d] [-r RATE] [-u USER] [-noh] [-mv] [-l ROLLING] [--json] [--envvar ENVVAR]

options:
  -h, --help            show this help message and exit
  -o OUTFILE, --outfile OUTFILE
                        File name for csv.
  -p PATH, --path PATH  Path to put csv file.
  -d, --debug           Run with debugging info.
  -r RATE, --rate RATE  Polling rate for process.
  -u USER, --user USER  Username to get stats for.
  -noh, --no-header     Turn off writting the header.
  -mv, --move           Moves file from 'running' to 'done' directories
  -l ROLLING, --rolling ROLLING
                        Time to roll file over to number to file name in ~minutes.
  --json                Output JSON strings instead of CSV lines
  --envvar ENVVAR       add environment var to output (can be specified multiple times)Running pagurus as a wrapper for a single user# Start running wrapper in the background for usernamepagurus-u$USER-mv-p/path/to/output/dir-otest.csv# Get the previous running PID of pagurusexportPID=$!# Sleep for a few seconds to let everything start runningsleep10############################ Run your desired program as normal./a.out# Works with containersshifter--image=tylern4/memoryhog:latestalloc2# and with wrapper scriptsshifter--image=jfroula/aligner-bbmap:2.0.2bbmap.shXmx12gin=sample.fastq.bz2ref=sample.fastaout=test.sam############################ Kill the pagurus processkill$PID# Sleep for a few seconds to let results finish writingsleep10Plotting results exampleThere is anexample notebookwhich will shows how to get memory usage and cpu usage from the output files.