Saravanan666/pypi-org huggingface dataset:
Package: pbus
pbusA simple application layer event-bus lib, support redis/mqtt/rabbitmq.Installpip install pbusUsageUse with Redis/MQTT/RabbitMQ Bus class.Subscriberimportpbusbus=pbus.RedisBus(host='127.0.0.1')# need "pip install redis"# orbus=pbus.MQTTBus(host='127.0.0.1')# need "pip install paho-mqtt"# orbus=pbus.RabbitMQBus(host='127.0.0.1')# need "pip install pika"# orbus=pbus.MemoryBus(exchange='ex1')# with memory, can't use in multi-processing# orbus=pbus.KafkaBus(host='127.0.0.1')# with kafa, need "pip install kafka"ps=bus.subscriber('test')fordatainps.listen():print(data)Publishimportpbusbus=pbus.RedisBus(host='127.0.0.1')# orbus=pbus.MQTTBus(host='127.0.0.1')# orbus=pbus.RabbitMQBus(host='127.0.0.1')bus.publish('test','Hello')bus=pbus.MemoryBus(exchange='ex1')bus.publish('test','Hello')Use with URI(recommend)importpbusbus=pbus.connect("redis://:password@127.0.0.1:6379/2")# with db 2# orbus=pbus.connect("mqtt://username:password@127.0.0.1:1883")## orbus=pbus.connect("amqp://username:password@127.0.0.1:5672/myexchange")#  with "myexchange" exchange# orbus=pbus.connect("memory:/ex1")#  with "test" exchange# ...... other codeTest event-bus speed.a. Run consumer clientpython-mpbus-uredis://127.0.0.1b. Run producer clientpython-mpbus-uredis://127.0.0.1-pYou will see:connecting to bus redis://127.0.0.1 ...
connecte success!
subscribing to pbus ...
subscribe success!
waiting data from pbus
1 :  count 27748 time: 5000ms speed: 5549/s total 27748
2 :  count 83135 time: 5000ms speed: 16627/s total 110883
3 :  count 86416 time: 5000ms speed: 17283/s total 197299
4 :  count 72546 time: 5000ms speed: 14509/s total 269845Ctrl+C to stop test.c. Run both consumer and producerpython-mpbus-uredis://127.0.0.1-lYou will see:Consumer: connecting to bus redis://127.0.0.1 ...
Consumer: connecte success!
Consumer: subscribing to pbus ...
Consumer: subscribe success!
Consumer: waiting data from pbus
Producer: connecting to bus redis://127.0.0.1 ...
Producer: connecte success!
Producer: will publish "Hello World!" to pbus
--Press Ctrl+C to stop it!--
Consumer: 1 :  count 29119 time: 5000ms speed: 5823/s total 29119
Producer: 1 :  count 29642 time: 5000ms speed: 5928/s total 29642Click to view more information!CHANGES1.0.0First version1.1.0Support MQTT and RabbitMQSupport connect with URI1.2.0Support Memory
Package: pbwrap
Pastebin API wrapper for Python (pbwrap)**Python API wrapper for the Pastebin Public API.OnlyPython 3supported!DocumentationThis wrapper is based onPastebinAPI read their Documentationhere.for extra information and usage guide.UsageFor a full list of the methods offered by the packageRead.QuickstartImport and instantiate a Pastebin Object.frompbwrapimportPastebinpastebin=Pastebin(api_dev_key)ExamplesGet User IdReturns a string with the user_id created after authentication.user_id=pastebin.authenticate(username,password)Get Trending Pastes detailsReturns a list containing Paste objects of the top 18 trending Pastes.trending_pastes=pastebin.get_trending()Type modelsPasteSome API endpoints return paste data in xml format the wrapper either converts them in a python dictionary formator returns them as Paste objects which contain the following fields:keydateinUNIXTIMEtitlesizeexpire_dateprivateformat_shortformat_longurlhitsLicensepbwrap is released underMIT License
Package: pbx-component-files-uploader
pbx-lv2-records-uploaderSimple selectel uploadfrompbx_component_files_uploader.uploaderimportUploaderapi=Uploader(Uploader.SERVICE_SELECTEL,{'username':'user','password':'pass','container':'container_name'},{'token_cache_dir':'/path/to/cache/dir'})uploadedFileUrl=api.upload('/path/to/src/file','dst_folder/dst_filename')
Package: pbxplore
PBxploreis a suite of tools dedicated to Protein Block (PB) analysis.
Protein Blocks are structural prototypes defined byde Brevern et al. The 3-dimensional local
structure of a protein backbone can be modelized as an 1-dimensional sequence of PBs.
In principle, any conformation of any amino acid could be represented by one of
the sixteen available Protein Blocks (see Figure 1).Figure 1.Schematic representation of the sixteen protein blocks,
labeled fromatop(Creative commons 4.0 CC-BY).PBxplore provides both a Python library and command-line tools. Basically, PBxplore can:assign PBsfrom a single PDB, many PDBs or a molecular dynamics simulation trajectory.use analysis tools to performstatistical analysison PBs.use analysis tools tostudy protein flexibility and deformability.RequirementsPBxplore requires:Python 3.x (>= 3.6)Python modules:NumPy,Matplotlib,MDAnalysis(version >= 0.11).Optionally, PBxplore can use:WebLogo 3to create logo from PB sequences.InstallationOnce dependencies installed, the most straightforward way is to usepip:$pipinstallpbxplorePBxplore can also be installed for the current user only:$pipinstall--userpbxploreDocumentationAll documentation are hosted by Read The Docs and can be foundhere.CitationIf you use PBxplore, please cite this tool as:Barnoud J, Santuz H, Craveur P, Joseph AP, Jallu V, de Brevern AG, Poulain P,PBxplore: a tool to analyze local protein structure and deformability with Protein BlocksPeerJ5:e4013https://doi.org/10.7717/peerj.4013(2017).Contact & SupportPBxplore is a research software and has been developped by:Pierre Poulain, “Mitochondria, Metals and Oxidative Stress” group, Institut Jacques Monod, UMR 7592, Univ. Paris, CNRS, France.Jonathan Barnoud, University of Groningen, Groningen, The Netherlands.Hubert Santuz, Laboratoire de Biochimie Théorique, CNRS UPR 9080, Institut de Biologie Physico-Chimique, Paris, France.Alexandre G. de Brevern & Gabriel Cretin, DSIMB, INSERM, UMR_S 1134, INTS, Univ Paris, Paris, France.If you want to report a bug, request a feature,
use theGitHub issue system.LicensePBxplore is licensed underThe MIT License.
Package: pbxproj
pbxprojThis module can read, modify, and write a .pbxproj file from an Xcode 4+ projects. The file is usually called project.pbxproj and can be found inside the .xcodeproj bundle. Because some task cannot be done by clicking on an UI or opening Xcode to do it for you, this python module lets you automate the modification process.How to use itThe typical tasks with an Xcode project are adding files to the project and setting some standard compilation flags.
It can be achieved with a simple snippet like this:frompbxprojimportXcodeProject# open the projectproject=XcodeProject.load('myapp.xcodeproj/project.pbxproj')# add a file to it, force=false to not add it if it's already in the projectproject.add_file('MyClass.swift',force=False)# set a Other Linker Flagsproject.add_other_ldflags('-ObjC')# save the project, otherwise your changes won't be picked up by Xcodeproject.save()That’s it. More details about available API’s visit thewiki.InstallationFor installation instructions visit thewikiCLIFor instructions and commands available visit thewikiDocumentationFor general documentation, visit thewiki.
For technical documentation, the public functions are documented and contains details about what is expected.Reporting bugsDid you find a bug? Too bad, but we want to help you, we need you to:Check you are running python3 and installed the package using the pip3 command.Provide as many details about the error you are having.If possible provide a sample project.pbxproj to reproduce the stepsIf possible, try the sequence of steps on Xcode and provide the project.pbxproj generated by Xcode.We cannot help you if your issue is a title: “it does not work”. Or if there is no sequence of steps to reproduce the error. Those kind of issues will be ignored or closed automatically.ContributingDo you want to fix an issue yourself? Great! some house rules:Provide a description of what problem you are solving, what case was not being taking into accountProvide unit tests for the case you have fixed. Pull request without unit test or PRs that decrease the coverage will not be approved until this changes.Adhere to the coding style and conventions of the project, for instance, target_name is used to specify the target across all functions that use this parameter. Changes will be requested on PRs that don’t follow this.Write descriptive commit messages.LicenseThis project is licensed using MIT license.
Package: pbz-heap
pbz-heapSince no max heap seems to exist for Python, here is a Min and Max Heap
implementation.I just stood there, dumbfounded that there isno Max Heap for Python anywhere on
the internet. Seriously? In 2020? If you
can find one, open an Issue and I'll check it out.PerformanceAbsolutely no claims are made about the performance of this Min/Max Heap
implementation. I would just be glad that it exists at all ;)That said, even the Python 3.8 standard library heap is implemented inpure
Python.Usage# Min Heaph=MinHeap([4,5,2,1,9,10])print(h.pop(),'==',1)print(h.pop(),'==',2)print(h.pop(),'==',4)# Max Heaph=MaxHeap([4,5,2,1,9,10])print(h.pop(),'==',10)print(h.pop(),'==',9)print(h.pop(),'==',5)Implementation DetailsYes, yes, I know I just wraped the standard libraryheapq. That is, after all,the officially acceptedmax heap data
structure for Python.
Package: pbzlib
Library for serializing protobuf objects - Python versionThis library is used for simplifying the serialization and deserialization ofprotocol bufferobjects to/from files.
The main use-case is to save and read a large collection of objects of the same type.
Each file contains a header with the description of the protocol buffer, meaning that no compilation of.protodescription file is required before reading apbzfile.Installation of the latest stable version$ pip install --upgrade pbzlibInstallation from source$ pip install --upgrade https://github.com/fabgeyer/pbzlib-py/archive/master.tar.gzExampleReading apbzfile:frompbzlibimportopen_pbzformsginopen_pbz("/path/to/file.pbz"):print(msg)Versions in other languagesGo versionJava versionC/C++ version
Package: pc
pc.py is a layer on top of subprocess. The subprocess module supports
a rich API but is clumsy for many common use cases, namely sync/async
fork-exec, command substitution and pipelining, all of which is trivial
to do on system shells.The goal is to make Python a sane alternative to non-trivial shell scripts.Features:Easy to fork-exec commands, wait or no waitEasy to capture stdout/stderr of children (command substitution)Easy to express I/O redirectionsEasy to construct pipelinesUse short names for easy interactive typingDocumentation is at <http://github.com/aht/pc.py/>.This module depends on Python 2.6, or where subprocess is available.
Doctests require /bin/sh to pass. Tested on Linux.This is an alpha release. Expect bugs.
Package: pc2graph
General InformationThis is a Python (2.7x) script that converts a numpy.ndarray containing a point cloud
(x, y, z) into a NetworkX graph.The code also includes a function to extract shortest path information from a
graph. Any NetworkX method/function can be called from/on a graph
created with array_to_graph function.This code was developed as part of my PhD research, supervised by Dr. Mat Disney,
in the Department of Geography at University College London (UCL). My research
is funded through Science Without Borders from the National Council of Technological
and Scientific Development (10.13039/501100003593) – Brazil (Process number 233849/2014-9).Any questions or suggestions, feel free to contact me using one of the
following e-mails:matheus.boni.vicari@gmail.comormatheus.vicari.15@ucl.ac.ukInstallationTo install this package use the command:pythonsetup.pyinstallor:pipinstallpc2graph
Package: pc4store
PC4StoreSDK for work with PC4Store APIInstallationpip install pc4storerequires Python 3.6 or higherExamplesSync clientInitialize clientfrompc4store.clientsimportPc4StoreClientmy_store_id='unique identifier of your store'my_store_secret_key='secret'client=Pc4StoreClient(store_id=my_store_id,store_key=my_store_secret_key)Create orderfrompc4store.dataimportCreateOrderInput,OrderDatares=client.create_order(CreateOrderInput(currency_name='USDCASH',currency_smart_contract='token.pcash',amount_to_pay='99.99999',response_url='https://api.my-store/payment-callback/',expiration_time=30*60,# 30 minmerchant_order_id='12345',description='optional description for this order',success_payment_redirect_url='https://my-store/orders/12345/success',failed_payment_redirect_url='https://my-store/orders/12345/failed',))ifres.status=='OK':order:OrderData=res.payload.order# all data about orderpayment_link=order.payment_url# link to redirect user for paymentorder_id=order.id# unique order id in payment systemelse:print(res.error)Get order infoorder_id='order_id_in_payment_system'order:OrderData=client.get_order(order_id)iforder:# do some staffprint('Actual order status: ',order.status)else:print('Opps, order not found...')Create transferfrompc4store.dataimportTransferInputif__name__=='__main__':# create order# print(client.get_transfer('eb94786b-c0e3-43af-b5f9-218128fe3db5'))res=client.transfer(TransferInput(currency_name='USDCASH',currency_smart_contract='token.pcash',amount='100.00002',eos_account='myeosusername',response_url='https://api.my-store/transfer-callback/',))ifres.status=='OK':print(res.payload.transfer)# all data about transferelse:print(res.error)Get order infofrompc4store.dataimportTransfertransfer_id='transfer_id_in_payment_system'transfer:Transfer=client.get_transfer(transfer_id)iftransfer:# do some staffprint('Actual transfer status: ',transfer.status,transfer.action.is_irreversible)else:print('Opps, transfer not found...')Verify callback requestrequest=MultiDict()# callback request that you receive from PC4Store APIifclient.is_signature_correct(request.json(),request.headers):# you can trust this callback...else:# it could be cheating...Async clientAsync client has absolutely same interface.frompc4store.clientsimportPc4StoreAsyncClientmy_store_id='unique identifier of your store'my_store_secret_key='secret'client=Pc4StoreAsyncClient(store_id=my_store_id,store_key=my_store_secret_key)
Package: pca
pcaA Python Package for Principal Component Analysis. The core of PCA is build on sklearn functionality to find maximum compatibility when combining with other packages.
But this package can do a lot more. Besides the regular pca, it can also performSparsePCA, andTruncatedSVD. Depending on your input data, the best approach will be choosen.Other functionalities of PCA are:Biplotto plot the loadingsDetermine theexplained varianceExtract the best performingfeaturesScatter plot with theloadingsOutlier detection usingHotelling T2 and/or SPE/Dmodx⭐️ Star this repo if you like it ⭐️Read the Medium blog for more details.1. What are PCA loadings and how to effectively use Biplots?2. Outlier Detection Using Principal Component Analysis and Hotelling’s T2 and SPE/DmodX Methods3. Quantitative comparisons between t-SNE, UMAP, PCA, and Other Mappings.Documentation pagesOn thedocumentation pagesyou can find detailed information about the working of thepcawith many examples.InstallationpipinstallpcaImport pca packagefrompcaimportpcaQuick startMake biplotPlot Explained variance3D plotsExample: Set alpha transparencyExample: Normalizing out Principal ComponentsNormalizing out the 1st and more components from the data.
This is usefull if the data is seperated in its first component(s) by unwanted or biased variance. Such as sex or experiment location etc.Example: Extract Feature ImportanceMake the biplot. It can be nicely seen that the first feature with most variance (f1), is almost horizontal in the plot, whereas the second most variance (f2) is almost vertical. This is expected because most of the variance is in f1, followed by f2 etc.Biplot in 2d and 3d. Here we see the nice addition of the expected f3 in the plot in the z-direction.Example: Detection of outliersTo detect any outliers across the multi-dimensional space of PCA, thehotellings T2test is incorporated.
This basically means that we compute the chi-square tests across the top n_components (default is PC1 to PC5).
It is expected that the highest variance (and thus the outliers) will be seen in the first few components because of the nature of PCA.
Going deeper into PC space may therefore not required but the depth is optional.
This approach results in a P-value matrix (samples x PCs) for which the P-values per sample are then combined usingfishersmethod.
This approach allows to determine outliers and the ranking of the outliers (strongest tot weak). The alpha parameter determines the detection of outliers (default: 0.05).Example: Plot only the loadings (arrows)Example: Selection of outliersExample: Toggle visible statusExample: Map unseen (new) datapoint to the transfomred spaceCitationPlease cite in your publications if this is useful for your research (see citation).MaintainersErdogan Taskesen, github:erdogantSupportYour ❤️ is important to keep maintaining this package. You cansupportin various ways, have a look at thesponser page. Report bugs, issues and feature extensions atgithub page.
Package: pca9536-driver
pca9536-driverEasy-to-use python driver for the PCA9536 GPIO expander.InstallationThe package is available onPyPI. Installation is can be done with your favourite package manager. For example:pipinstallpca9536-driverUsageIn order to initialise the device we need an openSMBusobject.
Depending on the machine that you are running on you may need to provide another bus number or path:frompca9536importPCA9536fromsmbus2importSMBuswithSMBus(1)asbus:device=PCA9536(bus=bus)The address of thePCA9536defaults to0x41. This is the (fixed) address of the PCA9536 devices, so you should
never have to change it. If youdowant to change it, you can provide it likePCA9536(bus=bus, address=0x42).Controlling a pinThe PCA9536 has four GPIO pins, which are represented byPCA9536Pinobjects that can be accessed by using index brackets:pin=device[0]If desired, you can loop over all pins:forpinindevice:...Reading the logic level of the pin is done with theread()method, which returns a boolean:logic_level=pin.read()To switch the pin to output mode and write the logic level:frompca9536importPinModepin.mode=PinMode.output# or use "output"pin.write(True)Note that writing only sets the output flip-flops of the GPIO expander, and has therefore no
effect when the pin is in input mode.Simultaneous operationsIf you have the need to read from, write to or set the mode of multiple pins simultaneously,
then you can use the respective methods and properties of thePCA9536object.Reading returns a tuple of four booleans:pin_0,pin_1,pin_2,pin_3=device.read()Writing can be done to one or more pins at the same time:device.write(pin_0=True,pin_2=False)Setting the same mode of all pins to the same value:device.mode=PinMode.inputor specify a value per pin by providing a tuple of four values:device.mode=PinMode.input,Pinmode.output,"input",NoneNote that also here the valuesPinMode.inputandPinMode.outputmay be used interchangeably with the strings"input"and"output". ProvidingNonefor any of the values will leave the mode of the respective pin unchanged.Polarity inversionThe PCA9536 offers functionality to invert the polarity of the input bits. Note that the outputs are not affected
by this setting.Polarity inversion of a single pin can be enabled by:pin.polarity_inversion=TruePolarity inversion of all pins can be set at the same time in a similar manner to that of the pin mode:device.polarity_inversion=False# ordevice.polarity_inversion=False,True,True,NonewhereNonewill leave the current polarity inversion of a pin untouched.
Package: pcacode
pcacode这是一个从文本中找地名信息和地区码的库安装pip install pcacode使用方法1.基础使用：from pcacode import pcacode

pca = pcacode()
info = pca.get_info(province='北京',content='朝阳区')

print(info)结果：[('北京市', '直辖市', '朝阳区', '110105')]说明：province 为省名称，已做了模糊处理，测试版必须带，带上有助于提高效率和精度。content 为内容 ，内容随意只要包含市/区县信息会自动提取2.一些初始化技巧：from pcacode import pcacode

pca = pcacode(file_page=u'data/2020年11月中华人民共和国县以上行政区划代码.xlsx',
                      nations_file=u'data/56_nations.xlsx',
                      switch_data={},
                      dict_data={})说明：file_page：地区码数据文件路径数据来源于民政部整理成了xlsx 格式可以查看data目录下面的2020年11月中华人民共和国县以上行政区划代码.xlsx文件，可以替换成自己的文件（注意，清除xlsx文件中的空格）需要替换时:file_page=u'you_file_path/you_file.xlsx'nations_file：民族数据文件路径用于处理少数民族   自治区自治州名称使用，不建议改动，你也可以改为自己的名族文件库，详细请参看data下面的56_nations.xlsx文件需要替换时:nations_file=u'you_nations_file_path/you_nations_file.xlsx'switch_data :替换省名简称(只能新增省的简称)目前已经默认可以不带 '省'，'市'自治区也可以自动识别需要替换时:switch_data={'京'，'北京市'，'沪'，'上海市'}dict_data :替换地区码信息地区吗经常变动，每次维护地区码表很麻烦，在这里提供一个临时方案需要替换时:dict_data={'330205'：'江北区'}3.存在的问题（下个版本处理）1.必须是全称才能处理例如：北京市 朝阳提取结果：[('北京市', '北京市', '北京市', '110000')]下个版本优先解决这个问题2.自治州简称目前暂未处理例如：延边朝鲜族自治州恩施土家族苗族自治州分别简称为 延边 恩施的暂时无法处理 只能处理全称详细信息请查看百度百科：自治区3.自治县简称目前暂未处理例如：围场满族蒙古族自治县丰宁满族自治县分别简称为 围场 丰宁的暂时无法处理 只能处理全称详细信息请查看百度百科：自治县4.下个版本更新计划增加不需要省名称的提取方式增加城市名称模糊处理的方式丰富函数的返回类型和模式致谢感谢袁隆平先生和钟南山先生，让我医食无忧。尾声只有无知，没有自满
Package: pca-errors
python-clean-architecturepca-errorsis a Python library helping to define declarative, parametrizable &L10n-independent error classes.pca-errorsis a part of the Clean Architecture toolset, developed underpython-clean-architectureproject.Development Status  (Stage 3 - Alpha Status)For details, look at ourROADMAP.Get It Now$pipinstall-Upca-errorsQuickstart[TBDL]DocumentationYou can look at ourdocs.
Package: pca-inputter
pca_inputter is a powerful technique for handling missing values in numerical datasetsThe algorithm is referred to as “Hard-Impute” in Mazumder, Hastie, and Tibshirani (2010) “Spectral
regularization algorithms for learning large incomplete matrices”, published in Journal of Machine
Learning Research, pages 2287–2322.The algorithm first replaces the missing values with column averages, in order to have a complete matrix.
The dataframe is then decomposed into principal component scores and loading vectors. These are multiplied
in order to reconstruct the missing values of the dataframe. The decomposition is done again and the
missing values are replaced iteratively until there is no material change in the values between 2 iterations.Usage:After importing the package, initialize the class PcaInputter(df), where df is your dataset with missing
values. Note that the dataset must be either a numpy array or a pandas dataframe, and that all features must
be numerical.To run the algorithm, call the iterfill(M, thresh) method of the PcaInputter object.
The number of principal components M used for reconstructing the missing values is defaulted to 1, but can be
specified to any M<=p. The algorithm stops once the change between the values between 2 iterations is below
the threshold. The threshold is defaulted to thresh=1e-7, but can be changed.
Package: pcalc
pcalcBasic math operations for Unix pipes.$pcalc--helpUsage: pcalc [OPTIONS] COMMAND [ARGS]...

  Basic math operations for Unix pipes.

  When working with a negative positional argument: '$ pcalc mul -- -1'

  All commands read from 'stdin' and write to 'stdout'.  Most commands
  stream but a few (like median) hold all values in memory.  Empty or all
  whitespace lines are skipped.

  Some commands (typically prefixed with 'r') reduce all input values to a
  single value.  For instance, '$ pcalc add 3' adds 3 to all input values,
  but '$ pcalc radd' adds all the values together like:

      output = 0
      for v in values:
          output = output + v

  For the most part it doesn't matter, but this tool is implemented in
  Python with floating point division enabled when running in Python 2.

Options:
  --help  Show this message and exit.

Commands:
  abs     Compute absolute value.
  add     Add a constant to values.
  ceil    Ceiling values.
  div     Divide values by a constant.
  floor   Floor values.
  mean    Compute mean.
  median  Compute median.
  mod     Modulo values by a single divisor.
  mode    Compute mode.
  mul     Multiply values by a constant.
  pow     Exponentiation of values by a constant.
  radd    Reduce by addition.
  rdiv    Reduce by division.
  rmod    Reduce by modulo.
  rmul    Reduce by multiplication.
  round   Round values.
  rsub    Reduce by subtraction.
  sub     Subtract a constant from values.
  sum     Compute sum.Developing$gitclonehttps://github.com/geowurster/pcalc.git$cdtpcalc$pipinstall-e.\[dev\]$py.test--covpcalc--cov-reportterm-missingLicenseSeeLICENSE.txtChangelogSeeCHANGES.md