Saravanan666/pypi-org huggingface dataset:
Package: pybullet-svl
Stanford Vision and Learning Lab’s fork of pybullet. pybullet is an easy to use Python module for physics simulation, robotics and deep reinforcement learning based on the Bullet Physics SDK. With pybullet you can load articulated bodies from URDF, SDF and other file formats. pybullet provides forward dynamics simulation, inverse dynamics computation, forward and inverse kinematics and collision detection and ray intersection queries. Aside from physics simulation, pybullet supports to rendering, with a CPU renderer and OpenGL visualization and support for virtual reality headsets.
Package: pybulletX
pybulletXThe lightweight pybullet wrapper for robotics researchers.
Build robot simulation with less code.
Scale your research with less boilerplate.ExamplesHere is an example of controlling Kuka arm with PyBulletX.importtimeimportnumpyasnpimportpybulletaspimportpybulletXaspxP_GAIN=50desired_joint_positions=np.array([1.218,0.507,-0.187,1.235,0.999,1.279,0])defmain():px.init()robot=px.Robot("kuka_iiwa/model.urdf",use_fixed_base=True)robot.torque_control=TruewhileTrue:time.sleep(0.01)error=desired_joint_positions-robot.get_states().joint_positionactions=robot.action_space.new()actions.joint_torque=error*P_GAINrobot.set_actions(actions)p.stepSimulation()if__name__=="__main__":main()Here is the same example but without PyBulletX.importtimeimportnumpyasnpimportpybulletaspimportpybullet_dataP_GAIN=50desired_joint_positions=np.array([1.218,0.507,-0.187,1.235,0.999,1.279,0])defmain():p.connect(p.GUI)p.setAdditionalSearchPath(pybullet_data.getDataPath())p.loadURDF("plane.urdf")robot_id=p.loadURDF("kuka_iiwa/model.urdf",useFixedBase=True)num_dofs=7joint_indices=range(num_dofs)# The magic that enables torque controlp.setJointMotorControlArray(bodyIndex=robot_id,jointIndices=joint_indices,controlMode=p.VELOCITY_CONTROL,forces=np.zeros(num_dofs),)whileTrue:time.sleep(0.01)joint_states=p.getJointStates(robot_id,joint_indices)joint_positions=np.array([j[0]forjinjoint_states])error=desired_joint_positions-joint_positionstorque=error*P_GAINp.setJointMotorControlArray(bodyIndex=robot_id,jointIndices=joint_indices,controlMode=p.TORQUE_CONTROL,forces=torque,)p.stepSimulation()if__name__=="__main__":main()The examples above are available inexamples/with_pybulletX.pyandexamples/without_pybulletX.py.LicensePyBulletX is licensed underMIT License.
Package: pybump
Simple python code to bump kubernetes package manager Helm charts.yaml, VERSION and setup.py files versions.Versions must match semver 2.0.0:https://github.com/semver/semver/blob/master/semver.mdVersion is allowed a lower case ‘v’ character for example:v1.5.4-beta2Installpip install pybumpUsagebumpversion:pybump bump[-h]--filePATH_TO_CHART.YAML--level{major,minor,patch}[--quiet]setexplicit version or set auto release+metadata:pybump set--filePATH_TO_CHART.YAML--set-versionX.Y.Z[--quiet]theautoflag is mainly intended for pull request CIs, by using:pybump set--filePATH_TO_CHART.YAML--auto[--quiet]pybump will add git commit hash as release info to versionNOTE - This can be dangerous as theautoflag might detect a git repo you were not intended to bump,
make sure the bumped file is really a child in the git repo you intended to bump.getcurrent version:pybump get--filePATH_TO_CHART.YAMLupdate Helm chartappVersion:in order to bump/get/set the Helm chart appVersion value just add the--app-versionflagpybump bump[-h]--filePATH_TO_CHART.YAML--level{major,minor,patch}[--quiet][--app-version]note that the –app-version flag is relevant only for Helm chart.yaml files and has not effect on other cases.ExamplesCLI exampleCI Usage exampleSimple jenkins CI (using k8s plugin) that will use theset –file setup.py –autooptionsStringlabel="test-bump-ci-runner"podTemplate(label:label,containers:[containerTemplate(name:'pybump',image:"arielev/pybump:1.10.2",ttyEnabled:true,command:'sleep',args:'1d'),containerTemplate(name:'jnlp',image:'jenkins/inbound-agent:jdk11',ttyEnabled:true)]){node(label){timeout(time:10,unit:'MINUTES'){ansiColor('xterm'){Stringversion=""container('jnlp'){gitcredentialsId:"credentials_id_here",url:"https://github.com/arielevs/pybump"}container('pybump'){version=sh(script:"pybump set --file setup.py --auto",returnStdout:true).trim()}println(version)}}}}Case:version: 0.0.1pybump bump--fileChart.yaml--levelpatchwill bump version to0.0.2Case:version:0.1.4-alpha+meta.datapybump bump--fileChart.yaml--levelminorwill bump version to0.2.0-alpha+meta.dataCase:version: v0.0.3pybump bump--fileChart.yaml--levelmajorwill bump version tov1.0.0Case:version:0.0.1+some-metadatapybump set--fileChart.yaml--set-version1.4.0will set version to1.4.0+metadata-hereCase:version: v7.0.2pybump set--filesetup.py--autowill set version tov7.0.2-5a51e0e1d9894d3c5d4201619f10be242320cb59Case:appVersion 2.3.2pybump bump--fileChart.yaml--levelpatch--app-versionwill bump appVersion to2.3.3Case:version: 1.0.13pybump get--fileChart.yamlwill return1.0.13Case:version:1.0.13+some-metadatapybump get--fileChart.yaml--releasewill returnsomeusing a container imagedocker run--rm--volume$(pwd):/tmp-tarielev/pybump set--file/tmp/setup.py--auto
Package: pyBumpHunter
pyBumpHunterThis is a python version of the BumpHunter algorithm, seearXiv:1101.0390, G. Choudalakis, designed to find localized excess (or deficit) of events in a 1D or 2D distribution.The main BumpHunter function will scan a data distribution using variable-width window sizes and calculate the p-value of data with respect to a given background distribution in each window. The minimum p-value obtained from all windows is the local p-value. To cope with the "look-elsewhere effect" a global p-value is calculated by performing background-only pseudo-experiments.The BumpHunter algorithm can also perform signal injection tests where more and more signal is injected in toy data until a given signal significance (global) is reached (signal injection not available in 2D yet).ContentpyBumpHunter : The pyBumpHunter packageexample : Folder containing a set of example scripts and notebooksexample/results : Folder containing the outputs of example scriptstest : Folder containing the testing scripts (based on pytest)data/data.root  : Toy data used in the examples and testsdata/gen_data.C : Code used to generate the toy data with ROOTDependenciesRequires python >= 3.6 pyBumpHunter depends on the following python libraries :numpyscipymatplotlibpyBumpHunter wikiExamplesThe examples provided in example.py and test.ipynb require theuprootpackage in
order to read the data from aROOT softwarefile.The data provided in the example consists of three histograms: a steeply falling 'background' distribution in a [0,20] x-axis range, a 'signal' gaussian shape centered on a value of 5.5, and a 'data' distribution sampled from background and signal distributions, with a signal fraction of 0.15%. The data file is produced by running gen_data.C in ROOT.In order to run the example script, simply typepython3 example.pyin a terminal.You can also open the example notebook with jupyter or binder.Bump hunting:Tomography scan:Test statistics and global p-value:See thewikifor a detailed overview of all the features offered by pyBumpHunter.To do listRun BH on 2D histogramsAuthors and contributorsLouis Vaslin (main developper), Julien DoniniThanks to Samuel Calvet for his help in cross-checking and validating pyBumpHunter against the (internal) C++ version of BumpHunter developped by theATLAS collaboration.
Package: pybundlr
⚠ Note: as of Feb 2023, this library is not being maintained. If you encounter a bug, feel free to report it, but do not expect it to be fixed.  If you do a PR where tests pass, we're happy to merge it. And feel free to fork this repo and change it as you wish (including bug fixes).pybundlrSimple py driver for bundlr.Constructed by wrappingbundlr CLI.Full API in pybundlr.pyPypi main,testGitHub repoInstallationEnsure prerequisites:Linux/MacOSPython 3.8.5+Bundlr CLI:npm install -g @bundlr-network/clientOpen a new terminal and:#Create&activatevenvpython -m venv venvsource venv/bin/activate#maininstallpip3 install pybundlrUsing Pybundlr LibraryFirst, a quick example that reads information from a bundlr node. In this case, a balance.In terminal, go into Python console:pythonIn Python console:frompybundlrimportpybundlreth_address="0x7BA3d8551A6f2C70a5d47bb448BcF7EF69661822"bal=pybundlr.balance(eth_address,"matic")print(f"{eth_address[:4]}'s MATIC balance in bundlr node:{bal}wei")Exit the Python console for the next step.Now, for more thorough example. We'll create a file, publish it online, then read it back.The bundlr node will need funds to pay for storage. So, please ensure that you have a Polygon account that holds some MATIC. Just a few cents' worth should be enough.In terminal, export the private key of your Polygon account:export TEST_PRIVATE_KEY1=<your private key>In terminal, go into Python console:pythonIn Python console:importosimportrequestsfrompybundlrimportpybundlreth_private_key=os.getenv('REMOTE_TEST_PRIVATE_KEY1')#create test filefile_name="/tmp/testfile.txt"content_in="test content"+"\n"withopen(file_name,'a')asf:f.write(content_in)#fund the node, and upload the fileurl=pybundlr.fund_and_upload(file_name,"matic",eth_private_key)print(f"Uploaded file. It's online at:{url}")#retrieve the resultresult=requests.get(url)content_out=result.textassertcontent_out==content_inThis example was on Polygon mainnet, withcurrency = "matic". Pybundlr also works on Ethereum mainnet ("ethereum"), Arweave ("arweave"), and more.DevelopmentDevelopers flow- to further develop pybundlrRelease process- to do a new release of pybundlr
Package: pybungie
InstallationpipinstallpybungieFeaturesPainless interaction with the Bungie.net APISupports most calls and enumeration types, later versions will expand functionalityOAuth2 implementation**Not suitable for production codeGetting StartedIn your working directory, after installing pybungie, edit the ini file before getting started. The file should be located here.External Libraries|— site-packages|      |— pybungie|            |— config|                  |— pybungie.iniThis is essential to generate a self-sign certificate in order to use OAuth2 required api calls.UsagefrompybungieimportBungieAPI,MembershipType,VendorHash,Componentsmy_membership_type=MembershipType.STEAMbungie_api=BungieAPI(api_key="api_key")bungie_api.input_xbox_credentials(xbox_live_email="example@example.com",xbox_live_password="password")bungie_api.start_oauth2(client_id="client_id",client_secret="client_secret")membership_id=bungie_api.search_destiny_player(membership_type=my_membership_type,display_name="Hayden23")[0]['membershipId']character_id=bungie_api.get_profile(membership_type=my_membership_type,membership_id=membership_id,components=Components.Profiles)['profile']['data']['characterIds'][0]zavala=bungie_api.get_vendor(membership_type=my_membership_type,membership_id=membership_id,character_id=character_id,vendor_hash=VendorHash.ZAVALA.value,components=Components.VendorSales)bungie_api.close_oauth2()
Package: pybuoy
pybuoyis a Python wrapper forNOAAandNDBCREST web services.Installationpybuoyis supported on Python 3.11+ and can be installed with either pip or a package manager likepoetry:with pip:pip install pybuoyrecommended to install any third party library inpython’s virtualenv.with poetry:poetry add pybuoyautomatically creates and managespython’s virtualenvs.QuickstartfrompybuoyimportBuoybuoy=Buoy()With a instance ofBuoy, you can request data from NOAA and NDBC like so:Get all active stations.Get realtime meteorological datafor buoy by station_id.Get realtime wave summary datafor buoy by station_id.Get forecast datafor buoy by lat/lon.
Package: pyburg
A BURG (Bottom-Up Rewrite Grammar) instruction selection generator compilerThe pyburg/ package includes:
* pyburg.py: instruction selection tool
* brg2py.py: converter from pburg (C, java) to pyburg (python)
* postfix.py: macros for assembly generation: x86, amd64, arm32, i386, …
* Tree.py: simple binary tree for AST building
* strbuf.py: class to collect output into a stringDocumentation in the docs/ directory:
* pyburg.html: instruction selection with pyburg
* tutorial.html: a complete example
* internals.html: pyburg routine description
* postfix.html: assembly macros descriptionCode generation examples:
* exs: some demonstration examples
* add: a trivial language implementation
* simple: a simple language implementation
* bpl: B programming language implementation
* run: x64 runtime for the above examplesprs, IST 2020
Package: pyburstlib
# pyburstlib[![MIT](https://img.shields.io/github/license/mashape/apistatus.svg)](LICENSE) [![Build Status](https://travis-ci.org/beatsbears/pyburstlib.svg?branch=master)](https://travis-ci.org/beatsbears/pyburstlib) [![PyPI version](https://badge.fury.io/py/pyburstlib.svg)](https://badge.fury.io/py/pyburstlib)## Description
pyburstlib is a python library built to allow for interactions with the Burst Wallet API programmatically via a python wrapper as well as a library providing access to Burst functions in native python.## Getting Startedimport the library$ pip install pyburstlibAdd a pyburstlib.ini file## Development$ virtualenv .venv -p $(which python3)
$ source ./.venv/bin/activate
$ export PYTHONPATH=.
$ pip install -r ./requirements.txt## Credits
- @beatsbears (aka drownedcoast) - Andrew Scott - Primary developer### Donate
- Andrew Scott (drownedcoast) - BURST-Q944–2MY3–97ZZ-FBWGB
<img align=”right” width=”298” height=”120” title=”Powered By Burst” src=”https://raw.githubusercontent.com/PoC-Consortium/Marketing_Resources/master/Powered_By_Burst/PBB4.png”/>
Package: pybursts
Changelog0.1.1Update readmeview commitTidy up module importsview
commitAdd .gitignoreview
commitDescriptionThis is a Python port of theR implementationof Kleinberg’s
algorithm (described in‘Bursty and Hierarchical Structure in
Streams’). The algorithm models activity bursts in a time series as an
infinite hidden Markov model.Installationpipinstallpyburstsoreasy_installpyburstsDependenciesNumPyUsageimportpyburstsoffsets=[4,17,23,27,33,35,37,76,77,82,84,88,90,92]printpybursts.kleinberg(offsets,s=2,gamma=0.1)Inputoffsets: a list of time offsets (numeric)s: the base of the exponential distribution that is used for
modeling the event frequenciesgamma: coefficient for the transition costs between statesOutputAn array of intervals in which a burst of activity was detected. The
first column denotes the level within the hierarchy; the second column
the start value of the interval; the third column the end value. The
first row is always the top-level activity (the complete interval from
start to finish).ReferencesCRAN - Package burstsJ. Kleinberg. Bursty and Hierarchical Structure in Streams. Proc.
8th ACM SIGKDD Intl. Conf. on Knowledge Discovery and Data Mining,
2002.
Package: pybuses
Pythonic implementations of Command and Event BusesZero-dependencies, flexible implementation of Command Bus.Python 3.6+ onlyBasic usage of CommandBusfromtypingimportListfrompybusesimportCommandBus# Firstly, create command classclassMakeSandwich:def__init__(self,ingredients:List[str])->None:self.ingredients=ingredients# Then create callable responsible for handling command.# It must accept only one argument and is required to have type annotation for it.defsandwich_maker(command:MakeSandwich)->None:print(f'Making sandwich with{command.ingredients}!')# finally, register the handler by subscribingcommand_bus=CommandBus()command_bus.subscribe(sandwich_maker)command_bus.handle(MakeSandwich(['cheese','ham']))MiddlewaresMiddlewares are lightweight plugins that let us inject custom logic before and after given command was handled.Context managers are for now the only supported way of defining middlewares. They simplify exception handling and specifying whether middleware logic should be executed before or after handling event.importcontextlibfromtypingimport(Any,Generator,)@contextlib.contextmanagerdefexample_middleware(command:Any)->Generator:print(f'Before handling{command}')yieldprint(f'After handling{command}')command_bus=CommandBus([example_middleware])command_bus.subscribe(sandwich_maker)command_bus.handle(MakeSandwich(['cheese','ham']))Basic usage of EventBusfromdecimalimportDecimalfrompybusesimportEventBus# Create eventclassPaymentMade:amount:Decimalwho:intdef__init__(self,amount:Decimal,who:int)->None:self.amount=amountself.who=whodefhandler(payment_made:PaymentMade)->None:print(f'Oh, cool!{payment_made.who}paid{payment_made.amount/100}$!')event_bus=EventBus()event_bus.subscribe(handler)event_bus.post(PaymentMade(Decimal('10.99'),123))Similarities & differences between Event- and CommandBusEventBus can have 0 or many handlers subscribed to every event, while CommandBus must have exactly one handler for each command.CommandBus supports middlewares while EventBus does not.data classes compatibleUsingdataclassesfor building commands/events is supportedfromdataclassesimportdataclassfromtypingimportListfrompybusesimportCommandBus@dataclassclassMakeSandwich:ingredients:List[str]defhandler(command:MakeSandwich)->None:print(f'dataclass-based command:{command}')command_bus=CommandBus()command_bus.subscribe(handler)command_bus.handle(MakeSandwich(['ham','butter']))attrs compatibleUsingattrsfor building commands/events is supportedimportattrfrompybusesimportCommandBus@attr.s(frozen=True)classExample:number:int=attr.ib()name:str=attr.ib()defexample_handler(command:Example)->None:print(f'Inside handler of{type(command)}- got{command}!')command_bus=CommandBus()command_bus.subscribe(example_handler)command_bus.handle(Example(number=1,name='Sebastian'))
Package: pyBusylight
# pyBusylightpyBusylight is a native python library which controls Kuando Busylight devices. It is intented to serve as a foundational component which can be integrated into other higher-level scripts.pyBusylight makes use of PyUSB to control Busylight and used extensive cues from the [busylight node library](https://github.com/porsager/busylight).## Dependencies* signal* pyusb_Note: Pyusb requires at least one of the three supported backends to be installed. Install a backend like so._If you're on a MAC you can install libusb via:```$ brew install libusb```On Windows you can follow the info here.https://github.com/walac/pyusb/blob/master/README.rst#installingOn Ubuntu 16.04/18.04```sudo apt-get install libusb-1.0-0 """)```## Most Simple Use Case```user@hostname$ sudo python3from pybusylight import pybusylightbl=pybusylight.busylight()bl.send()```## Run the Example.py script to see all supported features```sudo python3 ./example.py```
Package: py-buzz
That's not flying, it's falling with style: Exceptions with extraspy-buzz is fully equipped with a suite of exception tools that will save you
from writing the same code over and over again in your python projects. These
include:checking conditions and raising errors on failure (require_conditon)checking that values are defined and raising errors if not (enforce_defined)catching exceptions wrapping them in clearer exception types with better error
messages (handle_errors)checking many conditions and reporting which ones failed
(check_expressions)py-buz also provides an exception class, Buzz, that can be used  as a base class
for custom exceptions within a project.Super-quick StartOnly requires Python 3.8 or laterInstalled with pip ($ pip install py-buzz)Each feature demonstrated inexamplesDocumentationThe complete documentation can be found at thepy-buzz documentation page
Package: pybwtool
Python wrapper for thebwtool library.
Please take a look to thebwtool wikifor notes
on the installation process and to the known issues
listed below within this readme.How do I install this package?As usual, just download it using pip:pipinstallpybwtoolTests CoverageSince some software handling coverages sometimes get slightly
different results, here’s three of them:ExtractTheextractmethod returns a tuple of pandas Dataframes
with the data from the regions of a bed file extracted from the given bigwig.frompybwtoolimportextractresults=extract(bed_path="path/to/my/bed_file.bed",bigwig_path="path/to/my/bigwig_file.bigwig")You can also run the extraction directly to a file,
a thing that can get handy when you have to run
a very big bed file. You just need to specify a target file.frompybwtoolimportextractextract(bed_path="path/to/my/bed_file.bed",bigwig_path="path/to/my/bigwig_file.bigwig",target="target.bed")It is also possible to directly export
to a compressed file just by adding the
gzip extension, as follows:frompybwtoolimportextractextract(bed_path="path/to/my/bed_file.bed",bigwig_path="path/to/my/bigwig_file.bigwig",target="target.bed.gz")Common fixes for getting bwtool to workConsider looking at the Travis-CI configuration.
If it works there, it should also work for you.For when the installation of bwtool gets stuckFor when the installation of libbeato (a required library) gets stuck
Package: pybyle
PyBylePyByle is a small library for easy interaction with file and string encodings.The library currently uses python 3.10 and supports 97 possible encodings
The next version of python 3.11 supports all the same encodings as python 3.10
You can learn more about the list of encodings for different versions
of the interpreter here:https://docs.python.org/3.10/library/codecs.html#standard-encodingsInstallingpipinstallpybyleGetting a complete list of supported characters in a given encoding.importpybylepybyle.get_charset('ascii')# ['\x00', '\x01', '\x02', '\x03', '\x04', ...]Converting a string from one encoding to another. Attention! All unsupported characters will be replaced with the set character!importpybylepybyle.convert_encoding('Привет, мир! Hello, world!',encoding='ascii')# ??????, ???! Hello, world!pybyle.convert_encoding('Привет, мир! Hello, world!',encoding='ascii',substitute='_')# ______, ___! Hello, world!Specifies the encoding of the binary string.importpybylepybyle.detect_bytes_encoding(b'\xd0\x9f\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82')# utf-8Determining the encoding for a given file.importpybylepybyle.detect_file_encoding('example_utf_8_file.txt')# utf-8pybyle.detect_file_encoding('example_cp037_file.txt')# cp037