Saravanan666/pypi-org huggingface dataset:
Package: pybluez2
PyBluez2The PyBluez module allows Python code to access the host machine's Bluetooth
resources.
It supports scanning for devices and opening bluetooth sockets (via native sockets on win/linux)Platform SupportLinuxmacOSWindows:heavy_check_mark::heavy_check_mark::heavy_check_mark:Python Version SupportWindows: >= 3.9Mac: >= 3.5Linux: >= 3.5Examples# simple inquiry exampleimportbluetoothnearby_devices=bluetooth.discover_devices(lookup_names=True)print("Found{}devices.".format(len(nearby_devices)))foraddr,nameinnearby_devices:print("{}-{}".format(addr,name))InstallationInstall using pip:pip install pybluez2LicenseThis library is based on the work that has been put into the original 'PyBluez' library by:Piotr KarulisAlbert Huang (ashuang@alum.mit.edu)PyBluez is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.PyBluez 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 General Public License for more details.You should have received a copy of the GNU General Public License along with
PyBluez; if not, write to the Free Software Foundation, Inc., 51 Franklin St,
Fifth Floor, Boston, MA 02110-1301 USA
Package: pyblur
#Pyblur
##Python image blurring routines.
Pyblur is a collection of simple image blurring routines.<br>
It supports Gaussian, Disk, Box, and Linear Motion Blur Kernels as well as the Point Spread Functions
used in [Convolutional Neural Networks for Direct Text Deblurring](http://www.fit.vutbr.cz/~ihradis/CNN-Deblur/).<br>
Functions receive a PIL image as input, and return another as output.<br>
Kernel sizes can either be specified as input, or randomized.<br>
Finally, there’s a RandomizedBlur function that applies a random type of blurring kernel with a random width/strength.pypi: [https://pypi.python.org/pypi?:action=display&name=pyblur&version=0.2.3](https://pypi.python.org/pypi?:action=display&name=pyblur&version=0.2.3)##Installation
>From Pip:pip install pyblur`<br>
Or alternatively `git clonethis repo and run locally##Usagefrom pyblur import *###Gaussian Blur
Blurs image using a Gaussian Kernelblurred = GaussianBlur(img, bandwidth)Randomized kernel bandwidth (between 0.5 and 3.5)blurred = GaussianBlur_random(img)###Defocus (Disk) Blur
Blurs image using a Disk Kernelblurred = DefocusBlur(img, kernelsize)Randomized kernel size (between 3 and 9)blurred = DefocusBlur_random(img)###Box Blur
Blurs image using a Box Kernelblurred = BoxBlur(img, kernelsize)Randomized kernel size (between 3 and 9)blurred = BoxBlur_random(img)###Linear Motion Blur
Blurs image using a Line Kernelblurred = LinearMotionBlur(img, dim, angle, linetype)####Parameters
*dimKernel Size: {3,5,7,9} <br>
*angleAngle of the line of motion. Will be floored to the closest one available for the given kernel size. <br>
*linetype = {left, right, full}Controls whether the blur kernel will be applied in full or only the left/right halves of it. <br>Randomized kernel size, angle, and line typeblurred = LinearMotionBlur_random(img)### PSF Blur
Blurs image using one of the Point Spread Functions (Kernels) used in:<br>
[Convolutional Neural Networks for Direct Text Deblurring](http://www.fit.vutbr.cz/~ihradis/CNN-Deblur/)blurred = PsfBlur(img, psfid)####Parameters
*psfidId of the Point Spread Function to apply [0, 99] <br>Randomized kernel size, angle, and line typeblurred = PsfBlur_random(img)###Random Blur
Randomly applies one of the supported blur types, with a randomized bandwidth/strenght.blurred = RandomizedBlur(img)
Package: pyblur3
#Pyblur
##Python image blurring routines.Just a few fixes to port the unmaintained originalhttps://github.com/lospooky/pyblurto python3.Pyblur is a collection of simple image blurring routines.<br>
It supports Gaussian, Disk, Box, and Linear Motion Blur Kernels as well as the Point Spread Functions
used in [Convolutional Neural Networks for Direct Text Deblurring](http://www.fit.vutbr.cz/~ihradis/CNN-Deblur/).<br>
Functions receive a PIL image as input, and return another as output.<br>
Kernel sizes can either be specified as input, or randomized.<br>
Finally, there’s a RandomizedBlur function that applies a random type of blurring kernel with a random width/strength.##Installation
From Pip:pip install pyblur3`<br>
Or alternatively `git clonethis repo and run locally##Usagefrom pyblur import *###Gaussian Blur
Blurs image using a Gaussian Kernelblurred = GaussianBlur(img, bandwidth)Randomized kernel bandwidth (between 0.5 and 3.5)blurred = GaussianBlur_random(img)###Defocus (Disk) Blur
Blurs image using a Disk Kernelblurred = DefocusBlur(img, kernelsize)Randomized kernel size (between 3 and 9)blurred = DefocusBlur_random(img)###Box Blur
Blurs image using a Box Kernelblurred = BoxBlur(img, kernelsize)Randomized kernel size (between 3 and 9)blurred = BoxBlur_random(img)###Linear Motion Blur
Blurs image using a Line Kernelblurred = LinearMotionBlur(img, dim, angle, linetype)####Parameters
*dimKernel Size: {3,5,7,9} <br>
*angleAngle of the line of motion. Will be floored to the closest one available for the given kernel size. <br>
*linetype = {left, right, full}Controls whether the blur kernel will be applied in full or only the left/right halves of it. <br>Randomized kernel size, angle, and line typeblurred = LinearMotionBlur_random(img)### PSF Blur
Blurs image using one of the Point Spread Functions (Kernels) used in:<br>
[Convolutional Neural Networks for Direct Text Deblurring](http://www.fit.vutbr.cz/~ihradis/CNN-Deblur/)blurred = PsfBlur(img, psfid)####Parameters
*psfidId of the Point Spread Function to apply [0, 99] <br>Randomized kernel size, angle, and line typeblurred = PsfBlur_random(img)###Random Blur
Randomly applies one of the supported blur types, with a randomized bandwidth/strenght.blurred = RandomizedBlur(img)
Package: pyblustream
pyblustreampyblustream is a Python library to connect to an ELAN or Blustream HDBaseT Matrix. You can see the current mapping of inputs to outputs as well as
request to change the input that an output is using.It is primarily being developed with the intent of supportinghome-assistantInstallation# Installing from PyPI
$ pip install pyblustreamUsing on the command line as a scriptmain.py -h <matrix ip address> [-p <port> -s <output_id> -o <output_id> -i <input_id> -a -l]
    -h hostname or ip		Hostname or IP of the matrix - required
    -p port			Port of the matrix to connect to - defaults to 23
    -o output_id -i input_id	Set output ID to use input ID - specified as an int e.g. -i 2 -o 4 both must be specified
    -s output_id	        Display the input for this output ID must be an int e.g. 2
    -a				Display the input for all outputs
    -l				Continue running and listen for source changesLog out the input used on a specific output and exitpython3 main.py -h 127.0.0.1 -s 02Log out all input/output mappings and exitpython3 main.py -h 127.0.0.1 -aChange display id 2 to source 3 and exitpython3 main.py -h 127.0.0.1 -o 2 -i 3Run forever logging status changespython3 main.py -h 127.0.0.1 -lChange a source then run forever logging status changespython3 main.py -h 127.0.0.1 -o 2 -i 3 -lUsing in an applicationSeeexample.pyTODOGet names of inputs and outputs from the matrix
Package: pyblz
The pyblz distributionWrapper around the BLZ data from the Deutsche Bundesbank:http://www.bundesbank.de/Redaktion/DE/Standardartikel/Kerngeschaeftsfelder/Unbarer_Zahlungsverkehr/bankleitzahlen_download.html(The currently packaged file version isBLZ_20120903.txt.)This package provides a dict of the bank information, keyed by BLZ.>>> import pyblz
>>> banks = pyblz.bank_data()
>>> len(banks)
4098
>>> banks['64150020']
{'bic': u'SOLADES1TUB',
 'blz': u'64150020',
 'change_type': u'U',
 'checksum_type': u'01',
 'city': u'T\xfcbingen',
 'delete_type': u'0',
 'name': u'Kreissparkasse T\xfcbingen',
 'next_blz': u'00000000',
 'pan': u'56008',
 'record_number': u'002683',
 'shortname': u'Kr Spk T\xfcbingen',
 'type': u'1',
 'zip': u'72008'}In case this package is not kept up to date, you can parse a different file:>>> import pyblz.parse
>>> banks = pyblz.parse.parse('another-file.txt')Developing pyblzAuthor:Wolfgang Schnerring <ws@gocept.com>PyPI page:http://pypi.python.org/pypi/pyblz/Source code:https://bitbucket.org/gocept/pyblz/Change log for pyblz20120903-r1 (2013-11-26)Fixed dependency on setuptools.20120903 (2012-09-19)initial release
Package: pybman
SynopsisThis is a Python package for interacting withMPG.PuRevia thePubMan REST API.InstallationYou can simply install this package viaPyPI:pipinstallpybman… or by cloning the repository:gitclonehttps://github.com/herreio/pybman.gitcdpybmanDocumentationA minimal documentation can be found onRead the Docs.UsageLaunch the Python interpreter and start by importing the necessary modules:frompybmanimportClientfrompybmanimportextract# initialize clientcl=Client()# retrieve data of specific contextctx=cl.get_data(ctx_id="ctx_924547")# number of records in this contextnum_records=ctx.num# access records via indexitem=ctx.records[0]# get genre from item ...genre=extract.genre_from_item(item)print("GENRE:",genre)# ... or get genres and associated items from contextgenres=ctx.get_genres()# list all genres used in this contextlist(genres.keys())# get all articles (list of item IDs) from contextarticles=genres['ARTICLE']# get data of item (article) by iditem=ctx.get_item(articles[0])# get title from itemtitle=extract.title_from_item(item)print("TITLE:",title)# get publication date from itemdate=extract.date_from_item(item)print("PUBLISHED:",date)# get creators (persons) from itempersons=extract.persons_from_item(item)forpersoninpersons:role=extract.role_from_creator(person)first_name,last_name=extract.persons_name_from_creator(person)id_val,id_type=extract.persons_id_from_creator(person)print(role+':',first_name,last_name,'('+id_val+')')Beside data retrieval and browsing Pybman also allows to update items! Because this process requires certain rights, you have to provide credentials. The easiest way is to create asecret.jsonfile with your PuRe login (userName:userPassword) and hand in the path pointing to it when creating the client instance. (Please use a different location for storing thesecret.json-file than the one in this repo as it will be tracked by git or alternatively tell git before editing the file to not take care of your changes by running the commandgitupdate-index--assume-unchangedconf/secret.json.)# intialize client instance (login)cl_auth=Client(secret="./conf/secret.json")# retrieve context you are allowed to modifyctx=cl_auth.get_data(ctx_id="ctx_924547")# choose item to changeitem=ctx.records[0]# change title (string strip)title=extract.title_from_item(item)title=title.strip()item['data']['metadata']['title']=title# get identifier from itemidentifier=extract.idx_from_item(item)# comment on the changescomment='delete unnecessary white space'# update data in repositorycl_auth.update_data(identifier,item['data'],comment)# to change values in collection of items use inspector classfrompybmanimportInspectorfrompybmanimportDataSet# create data set of released itemsctx_released=DataSet(data_id="ctx_924547_released",raw=ctx.get_items_released())# create inspector instance of all released items from contextinspector=Inspector(cl_auth,ctx_released.records)# strip title strings, i.e. remove leading and trailing white spacestitles=inspector.clean_titles()print("successfully cleaned",titles,"titles!")
Package: pybmd
PyBMDPython library for DaVinci Resolve (Repack)🔥 Pybmd Now Support Both Windows & macOS 🔥How To Installpip install pybmdHow To Use⚠️Run Davinci Resolve before you run scriptInit Resolve object use Bmd modulefrompybmdimportBmdLOCAL_RESOLVE=Bmd()Bmd()has an option arg nameddavinci_ip, default value is127.0.0.1stands for local davinci, if you want to use remote DaVinci Resolve object, change arg to remote ip.Bmd()has an option arg namedauto_start, default value istruestands for open davinci automatically if it's not running, if you want to open davinci manually, change arg tofalse.You are free now!Play with APIs!Original API documentation could be found at my notion:Davnci Resolve API in notionPybmd Library API documentation could be found at :Pybmd API Documentation
Package: pybmix
pybmix: Bayesian Mixture Models in PythonA Python interface tobayesmixInstallationFirst, clone this repository with its submodulesgitclone--recurse-submodulegit@github.com:bayesmix-dev/pybmix.gitIdeally things should work by simply typingpip3install-e.from the root folder of this repo.Getting StartedSee ourtutorials!ContributingJust get in touch with us (email in setup.cfg), open a PR or an Issue!
Package: pybmoore
pybmoorePython/Cython implementation ofBoyer-Moore string-search algorithm.InstallingInstall and update using pip:pipinstallpybmoorenotice:gccmust be available on the system.UsageSingle termThe search method in thepybmooremodule will return a list of tuples with all occurrences, where the tuple have the initial and final position. For example:importpybmooreTEXT="""The Boyer–Moore string-search algorithm isan efficient string-searching algorithm that is thestandard benchmark for practical string-search literature."""matches=pybmoore.search('string',TEXT)print(f"Occurrences:{len(matches)}")# output: Occurrences: 3print(matches)# output: [(16, 22), (57, 63), (130, 136)]forx,yinmatches:print(f"({x},{y}) -{TEXT[x:y]}")notice: search method it's case sensitive.importpybmooreTEXT="""The algorithm preprocesses the string being searched for (the pattern),but not the string being searched in (the text). It is thus well-suited forapplications in which the pattern is much shorter than the text or where itpersists across multiple searches."""pybmoore.search('algorithm',TEXT)# output: [(4, 13)]pybmoore.search('Algorithm',TEXT)# output: []Multiple termsfromconcurrent.futuresimportProcessPoolExecutor,ThreadPoolExecutorimportpybmooreTEXT="""The Boyer-Moore algorithm searches for occurrences of P in T byperforming explicit character comparisons at different alignments. Instead of abrute-force search of all alignments (of which there are m − n + 1, Boyer-Mooreuses information gained by preprocessing P to skip as many alignments as possible."""# Using a list of patternspybmoore.search_m(['brute-force','Boyer-Moore'],TEXT,ProcessPoolExecutor)# output: {'brute-force': [(146, 157)], 'Boyer-Moore': [(4, 15), (214, 225)]}# Using a set of patternspybmoore.search_m({'brute-force','Boyer-Moore'},TEXT,ThreadPoolExecutor)# output: {'brute-force': [(146, 157)], 'Boyer-Moore': [(4, 15), (214, 225)]}# Using a tuple of patternspybmoore.search_m(('brute-force','Boyer-Moore'),TEXT,ThreadPoolExecutor,max_workers=4)# output: {'brute-force': [(146, 157)], 'Boyer-Moore': [(4, 15), (214, 225)]}DetailsFor granular control of the pool, use the parameters listed in the module documentation. For example:DevelopmentTo buildpybmoorelocally first installrequirements-dev.txtdependencies and run:makebuild# without CythonmakebuildUSE_CYTHON=1# with Cythonin some cases it's necesary runmake cleanbeforemake build.Typemakein the command line to see all available targets.LinksLicense:Apache LicenseCode:https://github.com/amenezes/pybmooreIssue tracker:https://github.com/amenezes/pybmoore/issues
Package: pybmp
BMP image handler for Python (to numpy ndarray or PIL) native C .pydHow to usefrom pybmp import bmp
import numpy as np
import matplotlib.pyplot as plt
# import matplotlib.image as mpimg
from scipy import misc
from PIL import Image

fig = plt.figure()
axis = [fig.add_subplot(211 + _) for _ in range(2)]
img = Image.open('../res/cs_checker_7x5_24.bmp') # R,G,B
# fake convert to ubytes img:R,G,B -> s:R,G,B,FF -> im:B,G,R,A -> bm:B,G,R,A
nda = np.array(img)
r, c, m = nda.shape
s = img.tostring('raw', 'RGBX') # append A as FF
im = Image.fromstring('RGBA', (c, r), s, 'raw', 'BGRA') # fake to B,G,R,A
bm = np.array(im) # fake to B,G,R,A
axis[0].imshow(nda)
bmp.BMP(bm, fn='/tmp/cs_checker_out_.bmp')
# plt.show()Linksgithubhttps://github.com/sanjonemu/pybmppybmphttps://pypi.python.org/pypi/pybmpLicenseMIT License
Package: pybmp2
Py BMPPython package to read a BMP file's header and pixel array in binary.Install Instructionspipinstallpybmp2Usagefrompybmp2importBMPimg=BMP(filename="sample.bmp")print(img.SHAPE)print(img.PIXELARRAY)print(img.RAWIMGSIZE)frompybmpimportBMPimportbinasciif=open('samp.bmp','rb')content=f.read()content=binascii.hexlify(content)img=BMP(hexdata=hexdata)print(img.SHAPE)print(img.PIXELARRAY)print(img.RAWIMGSIZE)Refer:https://en.wikipedia.org/wiki/BMP_file_format
Package: pybmrb
A Python module for visualizing Nuclear Magnetic Resonance(NMR)  chemical shift data from Biological Magnetic
Resonance data Bank (BMRB) and  from NMR-STAR  format files. PyBMRB helps the
users to view the one dimensional chemical shift list as multi-dimensional NMR spectra. Chemical shift distributions
can be studied using this library by plotting the histograms using differnt filtering criteria.This package usesPyBMRBto parse the NMR-STAR files
andBMRB-APIto fetch the data directly from BMRB, which avoids the hustle of
downloading and parsing the data from the BMRB for visualizations.Read the documents here.
Package: pybn
pybnPython package for simple build number generation.

Make sure to have the latest version of Python 3 installed although this should work with previous versions. 

To install the package with pip enter command in terminal:
    pip install pybn

To uninstall the package with pip enter command in terminal:
    pip uninstall pybnMethodDescriptiongenerate_buildnumber(current_build_number = None, limit = 100)Generates a new build number from an existing build number if provided in the current_build_number argument.
            Build numbers are in the following format: 'xxx.xxx.xxx'
            The limit argument is the highest number the back two segments of the build number can be before shifting over (Set to 100 by default).Back to Top
Package: pybn254
pybn254Accelerated operations for BN254 using libff and libfqfft.Supported operations:Multi-exponentiation in G1FFTMultiply polynomialsInstall for pippip install pybn254BuildInstall python dependenciesDependencies:py_eccCompile native dependenciesMacOSInstallHomebrewInstall dependencies -brew install gmp boost cmake openssl libompGo intolibffand runmake allThis should createlibff.dylibin the root folder.UbuntuInstall dependencies -sudo apt-get install build-essential git libboost-all-dev cmake libgmp3-dev libssl-dev pkg-configGo intolibffand runmake allThis should createlibff.soin the root folder.TestYou can use the following script to test things out:importpybn254frompy_ecc.optimized_bn128importadd,multiply,pairingfrompy_ecc.fieldsimportoptimized_bn128_FQasFQp=[(FQ(1),FQ(2),FQ(1))]e=[5]p1=[1,2,3]p2=[4,5,6]print(pybn254.multiexp(p,e))# run fft, not an inverse, not on a cosetprint(pybn254.fft(p1,False,False))print(pybn254.multiply_polynomials(p1,p2))
Package: pybnb
A parallel branch-and-bound engine for Python. (https://pybnb.readthedocs.io)This software is copyright (c) by Gabriel A. Hackebeil (gabe.hackebeil@gmail.com).This software is released under the MIT software license.
This license, including disclaimer, is available in the ‘LICENSE’ file.Quick StartDefine a problem:# simple.pyimportpybnbclassSimple(pybnb.Problem):def__init__(self):self.bounds=[0.0,1.0]defsense(self):returnpybnb.minimizedefobjective(self):returnround(self.bounds[1]-self.bounds[0],3)defbound(self):return-(self.bounds[1]-self.bounds[0])**2defsave_state(self,node):node.state=self.boundsdefload_state(self,node):self.bounds=node.statedefbranch(self):L,U=self.boundsmid=0.5*(L+U)forl,uin[(L,mid),(mid,U)]:child=pybnb.Node()child.state=(l,u)yieldchildWrite a solve script:# solve_simple.pyimportsimpleproblem=simple.Simple()results=pybnb.solve(problem,absolute_gap=1e-9)Run the script:$mpirun-np4pythonsolve_simple.pyUsingnon-defaultsolveroptions:-absolute_gap:1e-09(default:0)Startingbranch&boundsolve:-dispatcherpid:34902(Ozymandias.local)-workerprocesses:3---------------------------------------------------------------------------------------------------------------------------Nodes|ObjectiveBounds|WorkExplUnexpl|IncumbentBoundRel.GapAbs.Gap|Time(s)Nodes/SecImbalanceIdle01|inf-infinf%inf|0.00.000.00%0*12|1-1200.0000000%2|0.01226.99300.00%1*23|0.5-1150.0000000%1.5|0.02966.04150.00%0*45|0.25-0.2550.0000000%0.5|0.08081.9575.00%0*89|0.125-0.062518.7500000%0.1875|0.012566.9037.50%0ExplUnexpl|IncumbentBoundRel.GapAbs.Gap|Time(s)Nodes/SecImbalanceIdle*1617|0.062-0.0156257.7625000%0.077625|0.015352.7418.75%0*3233|0.031-0.003906253.4906250%0.03490625|0.015981.4918.75%0*6465|0.016-0.00097656251.6976563%0.0169765625|0.018740.6818.75%0*128129|0.008-0.00024414060.8244141%0.008244140625|0.021573.5111.72%0*256257|0.004-6.103516e-050.4061035%0.004061035156|0.022166.968.20%0ExplUnexpl|IncumbentBoundRel.GapAbs.Gap|Time(s)Nodes/SecImbalanceIdle*512513|0.002-1.525879e-050.2015259%0.002015258789|0.021177.005.86%0*10241025|0.001-3.814697e-060.1003815%0.001003814697|0.119978.429.38%0*20482049|0-9.536743e-070.0000954%9.536743164e-07|0.121606.455.42%02402924030|0-1.490116e-080.0000015%1.490116119e-08|1.121961.035.98%04615946160|0-3.72529e-090.0000004%3.725290298e-09|2.122120.755.73%0ExplUnexpl|IncumbentBoundRel.GapAbs.Gap|Time(s)Nodes/SecImbalanceIdle6553765538|0-9.313226e-100.0000001%9.313225746e-10|3.022459.506.20%0---------------------------------------------------------------------------------------------------------------------------AbsoluteoptimalitytolerancemetOptimalsolutionfound!solverresults:-solution_status:optimal-termination_condition:optimality-objective:0-bound:-9.313226e-10-absolute_gap:9.313226e-10-relative_gap:9.313226e-10-nodes:65537-wall_time:2.96s-best_node:Node(objective=0)NumberofWorkers:3LoadImbalance:6.20%-min:21355(procrank=3)-max:22710(procrank=1)AverageWorkerTiming:-queue:80.78%[avgtime:109.6us,count:65537]-load_state:0.44%[avgtime:596.1ns,count:65537]-bound:0.59%[avgtime:796.1ns,count:65537]-objective:3.52%[avgtime:4.7us,count:65537]-branch:3.36%[avgtime:4.6us,count:65537]-other:11.31%[avgtime:15.3us,count:65537]
Package: pybnf
![alt text](docs/Logo1.png “PyBioNetFit”)PyBioNetFit (PyBNF) is a general-purpose program for parameterizing biological models specified using the BioNetGenrule-based modeling language (BNGL) or the Systems Biology Markup Language (SBML). PyBioNetFit offers a suite ofparallelized metaheuristic algorithms (differential evolution, particle swarm optimization, scatter search) forparameter optimization. In addition to model parameterization, PyBNF supports uncertainty quantification bybootstrapping or Bayesian approaches, and model checking. PyBNF includes an adaptive Markov chain Monte Carlo (MCMC) sampling algorithm, which supports Bayesian inference. PyBNF includes the Biological Property Specification Language(BPSL) for defining qualitative data for use in parameterization or checking. It runs on most Linux and macOSworkstations as well on computing clusters.For documentation, refer to [Documentation_PyBioNetFit.pdf](Documentation_PyBioNetFit.pdf) or the online documentation at <https://pybnf.readthedocs.io/en/latest/>.PyBioNetFit is released under the BSD-3 license. For more information, refer to the[LICENSE](LICENSE). LANL code designation: C18062