Saravanan666/pypi-org huggingface dataset:
Package: pyBittle
pyBittlepyBittle is an Open Source Python library for easily connecting to Bittle and controlling it.
This library provides a set of methods to communicating with Bittle through Bluetooth and WiFi, allowing to control it remotely.In-depth documentation and usage examples:pyBittle.Usage exampleConnecting to Bittle and sending commands is as easy as shown below:bittle=pyBittle.Bittle()# This is your Bittleis_connected=bittle.connect_bluetooth()# Returns True if Bittle is connected to your computerifis_connected:greet_command=pyBittle.Command.GREETING# This is 'khi' message to be sentbittle.send_command_bluetooth(greet_command)# Send 'khi' message through Bluetoothbittle.disconnect_bluetooth()bittle=pyBittle.Bittle()bittle.wifiManager.ip='192.168.1.241'# This is your Bittle's IP addresspush_up_command=pyBittle.Command.GREETING# This is 'kpu' message to be senthas_connection=bittle.has_wifi_connection()ifhas_connection:bittle.send_command_wifi(push_up_command)# Send 'kpu' message through WiFiInstallationpyBittle has the following dependencies:PyBluezandpySerial, install them manually using the following commands:sudo apt-get install libbluetooth-dev
sudo apt-get install python-dev
pip install pybluez

pip install pyserial

git clone https://github.com/EnriqueMoran/pyBittle.git
pip install .Or install automatically using the following command:pip install pyBittle
Package: pybiz
You can think of PyBiz as an ORM for web frameworks, not databases. It abstracts
out the app from the framework. The architecture of PyBiz application has a
traditional design with three layers.## The Service Layer
PyBiz provides annotations for request validation, authorization, and
integration wth existing web frameworks. Toggling between Django, Pyramid, and
Falcon is as easy as changing one line of code.## The Business Layer
In addition, PyBiz also contains components for so-called business objects.  In
a nutshell, business objects should contain all logic that pertains to the
business domain of the application. The business layer makes no reference HTTP
requests or database queries. It’s made up of classes with names likeAccount,User,Project, etc. These components should be written so that
they read as much like user stories as possible when composed.## The Data Access Layer
The DAL should be familiar to anyone working with Java Frameworks. Its
responsibility is to define the interface to an abstract data store, be it
implemented with MySQL, Redis, another micro-service, or something else._More to come…_
Package: pybkick
pybkick=======Push software to a pyboard quickly, without using USB Mass Storage mode.Rationale---------Pyboards are small microcomputers which can execute code written in Micropython, which is a Python3compatible language which includes a small subset of the Python3 standard library.The suggest way to deploy code to a PyBoard is to mount it as a USB Mass Storage device, and then editfiles directly on the device, or simply copy over the relevant files from a PC. This approach canbe problematic because if the device is reset, it can cause the Mass Storage drive to be suddenlyunmounted. At best this will cause confusion in the operating system.Further problems can occur if the device needs to be factory reset - this will wipe the code on the deviceand will require everything to be re-copied, or possibly loosing work.In short, using USB Mass Storage mode is a real pain. It would be much simpler to have something that was ableto use the Serial mode connection to quickly copy code across without any kind of stateful connection. Thatis the goal of this project.Installation------------Install using pip:pip install pybkickBasic usage-----------In this example, all my micropython code is in a single, flat directory called 'mpy' which is in the same directoryas the script containing the following code:from pybkick import kickkick(# How do we connect to the pyboard?port='/dev/ttyACM0',# Which files should we copy to the pyboard?src=os.path.join(dirname(__file__), 'mpy'),)Advanced usage--------------In your setup.py file, add 'pybkick' to install_requires. You can also add a script which calls the kick function as an entry point. This willcreate a command-line utility that can automatically deploy your project to the pyboard.Limitations-----------The kick function can only copy flat directories of files into the root directory of the pyboard. It cannotcurrently handle heirarchical directories or
Package: pyBKTR
pyBKTRIntroThis project is aPythonimplementation of the BKTR algorithm presented by Mengying Lei, Aurélie Labbe & Lijun Sun (2023).
The article presenting the algorithm can be foundhere.BKTR stands for Scalable Spatiotemporally Varying Coefficient Modelling with Bayesian Kernelized Tensor Regression.
It allows to model spatiotemporally varying coefficients using a Bayesian framework.
We implemented the algorithm and more in aPythonpackage that usesPyTorchas a tensor operation backend.For information, an alternativeRimplementation of the algorithm can be foundhere. ThePythonimplementation is synchronized with this repository and development is done in parallel. The synchronization of features will be done at a subrevision level (x.y.0).An article presenting theRpackage in details is currently in preparation and should be available soon. The documentation for theRpackage is a work in progress and will be made available in the coming weeks.InstallationInstall from PyPIThe package is available on PyPI and can be installed using pip:pipinstallpyBKTRInstall from sourceTo install the package from source and use the latest release, you can clone the repository and install it using pip and the repository url:pipinstallgit+https://github.com/julien-hec/pyBKTR.gitSimple ExampleTo verify that everything is running smooth you can try to run a BKTR regression on the BIXI data presented in the package. (The data is already preloaded in the package in theBixiDataclass)The following code will run a BKTR regression using sensible defaults on the BIXI data and print a summary of the results.frompyBKTR.bktrimportBKTRRegressorfrompyBKTR.examples.bixiimportBixiDatabixi_data=BixiData()bktr_regressor=BKTRRegressor(data_df=bixi_data.data_df,spatial_positions_df=bixi_data.spatial_positions_df,temporal_positions_df=bixi_data.temporal_positions_df,burn_in_iter=5,sampling_iter=10)bktr_regressor.mcmc_sampling()print(bktr_regressor.summary)ContributingContributions are welcome. Do not hesitate to open an issue or a pull request if you encounter any problem or have any suggestion.Dev NotesDev environment setupIf you wish to contribute to this project, we strongly recommend you to use the precommit setup created in the project. To get started, simply follow these instructions.First, install the project locally with the development resources. If you use zsh, you might need to put single quotes around the path'.[dev]'pipinstall.[dev]Then, install the git hook scripts.pre-commitinstallFinally, everything should work fine if when run the pre-commit hooks.pre-commitrun--all-filesDocumentation GenerationYou should already have the dev environment setupPandoc needs to be installed on your local machine, follow the instructions in the following linkhttps://pandoc.org/installing.htmlFrom the docs folder run the following line to regenerate the static docsphinx-apidoc-f-o.../pyBKTRthenmakehtmlPublish to PyPIFirst build the package locallypython3-mpipinstall--upgradebuild
python3-mbuildThen upload to PyPIpython3-mpipinstall--upgradetwine
twineuploaddist/*Using the proper credentials, the package should be uploaded to PyPI and be available for download.
Package: pybktree
pybktree is a generic, pure Python implementation of aBK-treedata
structure, which allows fast querying of “close” matches (for example, matches
with small hamming distance or Levenshtein distance). This module is based on
the algorithm by Nick Johnson in hisblog article on BK-trees.The library ison the Python Package Index (PyPI)and works on both Python
3 and Python 2.7. To install it, fire up a command prompt, activate your
virtual environment if you’re using one, and type:pip install pybktreeExample usage:>>>tree=pybktree.BKTree(pybktree.hamming_distance,[0,4,5,14])>>>tree.add(15)# add element 15>>>sorted(tree)# BKTree instances are iterable[0,4,5,14,15]>>>sorted(tree.find(13,1))# find elements at most 1 bit away from element 13[(1,5),(1,15)]For large trees and fairly small N when callingfind(), using a BKTree is
much faster than doing a linear search. This is especially good when you’re
de-duping a few hundred thousand photos – with a linear search that would
become a very slow, O(N²) operation. With a BKTree, it’s more like O(N log N).Read the code inpybktree.pyfor more details – it’s pretty small!Other BK-tree modules I found on GitHub while writing this one:ahupp/bktree: this one is pretty good, but it’s not on PyPI, and it’s
recursiveryanfox/bktree: this one is hard to customize,search()doesn’t
return distances, it’s slower, and was buggy (though I think he fixed it
recently)pybktree was written byBen HoytforJetsetterand is licensed with a
permissive MIT license (seeLICENSE.txt).
Package: pybl3p
pybl3pA Python bl3p APIinstallation$pipinstallpybl3pusageFor the public APIfrompybl3p.publicimportorderbookorderbook()For the private API first set your public and private key as environment variables:exportBL3P_PUB="........-....-....-....-............"exportBL3P_PRIV="(long string with a-z/A-Z/0-9 and =)"frompybl3p.privateimportdepth_fulldepth_full()
Package: pyBLACK
Version 0.1.5 11/05/2023Added the option mandel21 (https://arxiv.org/pdf/2110.09254.pdf) as analytic approximation of the GW merging time.Version 0.1.3 28/07/2022Constants and units are consistent with Astropy V. 5.1Version 0.1.2, 17/06/2022Added adaptive euler as method in estimate_tgwVersion 0.1.1, 16/06/2022New methods based on analytic corrections added in the estimate_tgw to estimate the GW decay merging timeThe function estimate_tgw can now be called directly by the main module,
e.g. from pyblack import estimate_tgw
Package: pyblackbird
StatuspyblackbirdPython3 interface implementation for Monoprice Blackbird 4k 8x8 HDBaseT MatrixNotesThis is for use withHome-AssistantUsagefrompyblackbirdimportget_blackbird# Connect via serial portblackbird=get_blackbird('/dev/ttyUSB0')# Connect via IPblackbird=get_blackbird('192.168.1.50',use_serial=False)# Print system lock statusprint('System Lock is{}'.format('On'ifblackbird.lock_status()else'Off'))# Valid zones are 1-8zone_status=blackbird.zone_status(1)# Print zone statusprint('Zone Number ={}'.format(zone_status.zone))print('Zone Power is{}'.format('On'ifzone_status.powerelse'Off'))print('AV Source ={}'.format(zone_status.av))print('IR Source ={}'.format(zone_status.ir))# Turn off zone #1blackbird.set_power(1,False)# Set source 5 for zone #1blackbird.set_zone_source(1,5)# Set all zones to source 2blackbird.set_all_zone_source(2)# Lock system buttonsblackbird.lock_front_buttons()# Unlock system buttonsblackbird.unlock_front_buttons()
Package: pyblake2
pyblake2 is an extension module for Python implementing BLAKE2 hash function.BLAKE2 is a cryptographic hash function, which offers highest security while
being as fast as MD5 or SHA-1, and comes in two flavors:BLAKE2b, optimized for 64-bit platforms and produces digests of any size
between 1 and 64 bytes,BLAKE2s, optimized for 8- to 32-bit platforms and produces digests of any
size between 1 and 32 bytes.BLAKE2 supports keyed mode (a faster and simpler replacement for HMAC),
salted hashing, personalization, and tree hashing.Hash objects from this module follow the API of standard library’shashlibobjects.
Package: pyBlang
pyBlangIntroductionThis package is an interface to Blang, (link)InstallationQuick GuideThe package works by calling the Blang command line interface (CLI), for the time being, the blangSDK should be installed separately with the CLI setup properly via the instructions found here:That's the only requirement for the package to function.InstallationSetting up a modelimportpyBlangaspbmodel=pb.Model(name=modelName,project_path=projPath,post_process='NoPostProcessor')The code above instantiates a model object, and the arguments listed are the only required arguments.name: name of the model within the .bl file.project_path: the path to the Blang project directory.post_process:NoPostProcessorby default, but can be set toDefaultPostProcessor.Running the modelOnce a Model object has been set up,
Package: pyblaze
PyBlazePyBlaze is an unobtrusive, high-level library for large-scale machine and deep learning inPyTorch. It is engineered to cut obsolete boilerplate code while preserving
the flexibility of PyTorch to create just about any deep learning model.QuickstartPlenty of tutorials are available in theofficial documentation.
The most basic tutorial builds aclassifier for CIFAR10.InstallationPyBlaze is available on PyPi and can simply be installed as follows:pipinstallpyblazeLibrary DesignPyBlaze revolves around the concept of anengine. An engine is a powerful abstraction for
combining a model's definition with the algorithm required to optimize its parameters according to
some data. Engines provided by PyBlaze are focused on generalization: while the engine encapsulates
the optimization algorithm, the user must explicitly define the optimization objective (usually the
loss function).However, engines go far beyond implementing the optimization algorithm. Specifically, they further
provide the following features:Evaluation: During training, validation data can be used to evaluate the generalization
performance of the trained model every so often. Also, arbitrary metrics may be computed.Callbacks: During training and model evaluation, callbacks serve as hooks called at specific
events in the process. This makes it possible to easily use some tracking framework, perform
early stopping, or dynamically adjust parameters over the course of the training. Custom
callbacks can easily be created.GPU Support: Training and model evaluation is automatically performed on all available GPUs.
The same code that works for the CPU works for the GPU ... and also for multiple GPUs.Available EnginesEngines are currently implemented for the following training procedures:pyblaze.nn.MLEEngine: This is the most central engine as it enables supervised as well as
unsupervised learning. It can therefore adapt to multiple different problems: classification,
regression, (variational) autoencoders, ..., depending on the loss only. In order to simplify
initialization (as configuration requires toggling some settings), there exist some specialized
MLE engines. Currently, the only one ispyblaze.nn.AutoencoderEngine.pyblaze.nn.WGANEngine: This engine is specifically designed for training Wasserstein GANs.
This class is required due to the independent training of generator and critic.Implementing your custom engine is rarely necessary for most common problems. However, when working
on highly customized machine learning models, it might be a good idea. Usually, it is sufficient to
implement thetrain_batchandeval_batchmethods to specify how to perform training and
evaluation, respectively, for a single batch of data. Consult the documentation ofpyblaze.nn.Engineto read about all methods available for override.LicensePyBlaze is licensed under theMIT License.
Package: pyblazeb2
Pyblazeb2Pyblazeb2 is a Python 3 module for accessing the Backblaze B2 API


To install run:pipinstallpyblazeb2Examplesfrom pyblazeb2 import BackBlazeB2
b2 = BackBlazeB2(account_id, app_key)

# Upload an entire directory concurrently
b2.recursive_upload('/path/to/foobar', bucket_name='my-bucket', multithread=True)

# Upload a single file without a password
b2.upload_file('/path/to/file.txt', bucket_name='baz')

# Upload a single file, then download
b2.upload_file('/path/to/secrets.txt', bucket_name='baz')
response = b2.download_file_by_name('/path/to/myfile.txt', 'savedfile.txt')

# List all of your buckets
buckets = b2.list_buckets()

# Create a bucket
response = b2.create_bucket('new-bucket', bucket_type='allPrivate')

# Download a file by name
response = b2.download_file_by_name('/path/to/myfile.txt', 'savedfile.txt')

# Authorize download for a private file
bucket_id = "" # Id of bucket which you want authorize download file
bucket_name = "" # Verbose name of bucket
file_name_prefix = ""
url_authorized_download = b2.get_download_authorization(
    bucket_id=bucket_id, bucket_name=bucket_name,
    file_name_prefix=file_name_prefix)
# The response some looks like this:
# https://f345.backblazeb2.com/file/photos/cute/kitten.jpg?Authorization=3_20160803004041_53982a92f631a8c7303e3266_d940c7f5ee17cd1de3758aaacf1024188bc0cd0b_000_20160804004041_0006_dnld

# Download with authorized url
b2.download_file_with_authorized_url(url_authorized_download, 'file_name.log')
Package: pybldc
pybldcDeveloped by Kristian Sloth Lauszus, 2024The code is released under the GNU General Public License v3.0.PurposeThis tool allows you to flash a VESC via CAN-bus or serial/USB using Python.Installation and runningTo install:pipinstall.Or install the latest release from PyPI:pip3install-UpybldcCLIA handy CLI tool is included:$pybldc-h
usage:pybldc[-idCONTROLLER_ID][-iINTERFACE][-lCHANNEL][-pPORT][-h][--version][-BBINARY][--bootloader][-tTIMEOUT][-rPING_REPEAT][-bBAUDRATE][--debug]{can,serial}{upload,ping,reset}positionalarguments:{can,serial}CommunicatewiththetargetviaeitherCANorserial{upload,ping,reset}upload:writeBINARYping:sendapingcommandtothetargetandcheckforaresponsereset:sendaresetcommandtothetargetandcheckforaresponse

requiredCANarguments:-idCONTROLLER_ID,--controller-idCONTROLLER_IDTheVESCIDusedforcommunication

optionalCANarguments:-iINTERFACE,--interfaceINTERFACETheCAN-Businterfacetouse(default"socketcan")-lCHANNEL,--channelCHANNELTheCAN-Buschanneltouse(default"can0")requiredserialarguments:-pPORT,--portPORTTheporttouseforserial

optionalarguments:-h,--helpShowthishelpmessageandexit--versionShowprogram'sversionnumberandexit-BBINARY,--binaryBINARYThebinarytoupload--bootloaderThebinarytouploadisabootloader-tTIMEOUT,--timeoutTIMEOUTThetimetowaitinsecondsforaresponse(default5.0)-rPING_REPEAT,--ping-repeatPING_REPEATThenumberoftimestotrytoestablishaconnectionbypingingtheVESC(default3)-bBAUDRATE,--baudrateBAUDRATE,--bitrateBAUDRATEThebaudrate/bitratetouseforserial/can(defaultsto115200forserialand500000forCAN)--debugTurnondebuglogsUploadpybldc can upload -id 1 -B VESC.binpybldc serial upload -p /dev/ttyACM0 -B VESC.binPingpybldc can ping -id 1pybldc serial ping -p /dev/ttyACM0Resetpybldc can reset -id 1pybldc serial reset -p /dev/ttyACM0CreditVESC firmware:https://github.com/vedderb/bldcVESC bootloader:https://github.com/vedderb/bldc-bootloaderVESC Tool:https://github.com/vedderb/vesc_tool
Package: pyblhost
pyblhostDeveloped by Kristian Sloth Lauszus, 2020-2022The code is released under the GNU General Public License v3.0.This is a Python implementation ofblhostused to communicate with theNXP MCUBOOT/KBOOT bootloader.For now it only implements a subset of the blhost commands.Currently serial and CAN-Bus interfaces are supported.Installationpip install pyblhostUsagePythonSee theexamplesdirectory for Python examples.CLI$ pyblhost -h
usage: pyblhost [-tx TX_ID] [-rx RX_ID] [-i INTERFACE] [-l CHANNEL] [-p PORT] [-h] [--version] [-B BINARY] [-s START_ADDRESS] [-c BYTE_COUNT] [-t TIMEOUT] [-r CMD_REPEAT] [-b BAUDRATE] {can,serial} {upload,read,ping,reset}

positional arguments:
  {can,serial}          Communicate with the target via either CAN or serial
  {upload,read,ping,reset}
                        upload: write BINARY to START_ADDRESS. Before writing it will erase the memory from START_ADDRESS to START_ADDRESS + BYTE_COUNT
                        read: read memory from START_ADDRESS to START_ADDRESS + BYTE_COUNT. the read data will be stored in BINARY
                        ping: send a ping command to the target and check for a response
                        reset: send a reset command to the target and check for a response

required CAN arguments:
  -tx TX_ID, --tx-id TX_ID
                        The TX ID (in hex) to use for CAN
  -rx RX_ID, --rx-id RX_ID
                        The RX ID (in hex) to use for CAN

optional CAN arguments:
  -i INTERFACE, --interface INTERFACE
                        The CAN-Bus interface to use (default "socketcan")
  -l CHANNEL, --channel CHANNEL
                        The CAN-Bus channel to use (default "can0")

required serial arguments:
  -p PORT, --port PORT  The port to use for serial

optional arguments:
  -h, --help            Show this help message and exit
  --version             Show program's version number and exit
  -B BINARY, --binary BINARY
                        The binary to upload or write memory into
  -s START_ADDRESS, --start-address START_ADDRESS
                        The address (in hex) to upload the binary at or read memory from
  -c BYTE_COUNT, --byte-count BYTE_COUNT
                        The number of bytes (in hex) to erase/read
  -t TIMEOUT, --timeout TIMEOUT
                        The time to wait in seconds for a response (default 1.0)
  -r CMD_REPEAT, --cmd-repeat CMD_REPEAT
                        The number of times to try to establish a connection (default 3)
  -b BAUDRATE, --baudrate BAUDRATE, --bitrate BAUDRATE
                        The baudrate/bitrate to use for serial/can (default 500000)Uploadpyblhost can upload -tx 0x123 -rx 0x321 -B blink.bin -s 0x4C000 -c 0x34000pyblhost serial upload -p /dev/ttyUSB0 -b 500000 -B blink.bin -s 0x4C000 -c 0x34000Readpyblhost can read -tx 0x123 -rx 0x321 -B memory.bin -s 0xC000 -c 0x34000pyblhost serial read -p /dev/ttyUSB0 -b 500000 -B memory.bin -s 0xC000 -c 0x34000Pingpyblhost can ping -tx 0x123 -rx 0x321pyblhost serial ping -p /dev/ttyUSB0 -b 500000Resetpyblhost can reset -tx 0x123 -rx 0x321pyblhost serial reset -p /dev/ttyUSB0 -b 500000
Package: pybling
pyblingIntegração com API do Bling usando PythonComo rodar o projeto?Clone esse repositório.Crie um virtualenv com Python 3.Ative o virtualenv.Instale as dependências.Configure sua API Keygit clone https://github.com/tiagocordeiro/pybling.git
cd pybling
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
python contrib/env_gen.pyTestesRode os testespytest tests/tests.py --verbosity=1Como usar>>> from pybling.products import list_products
>>> produtos = list_products()
>>> produtos
<Response [200]>
Package: pyblinkm
Drive aBlinkMwithPythonvia I2C using python-smbus onRaspberry Pi.Overview$ sudo apt-get install python-smbus
$ sudo pip install pyblinkm
$ python
>>> from pyblinkm import BlinkM, Scripts
>>> blinkm = BlinkM()
>>> blinkm.reset()
>>> blinkm.play_script(Scripts.THUNDERSTORM)
>>> blinkm.reset()
>>> blinkm.fade_to(255, 0, 0)
>>> blinkm.fade_to_hex("ff0000")
>>> blinkm.go_to(0, 255, 0)RequirementsYou must installpython-smbuswith your package manager since it is not available on pypi.$ sudo apt-get install python-smbusInstallation$ pip install pyblinkmLicense (MIT)Copyright (c) 2012 Thomas SileoPermission 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.