Saravanan666/pypi-org huggingface dataset:
Package: pybird
pybirdBIRD interface handler for PythonPyBird is a Python interface to the BIRD Internet Routing Daemon's UNIX control
socket, handling the socket connections and parsing the output. It was
originally written bySasha Romijn, forked from
the original BitBucket repository, and relicensed with permission.In it's current state, you can use it to query the status of specific or all
BGP peers, to query the routes received, accepted and rejected from a peer,
or the general status of BIRD (router ID, last config change)LicenseCopyright 2016 20C, LLCCopyright 2011, Sasha Romijngithub@mxsasha.euAll rights reserved.Licensed under the Apache License, Version 2.0 (the "License");
you may not use this softare except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: pybirdbuddy
pybirdbuddyimportasyncioimportpprintfrombirdbuddy.clientimportBirdBuddybb=BirdBuddy("user@email.com","Pa$$w0rd")# Using coroutines with async/await:asyncdefasync_test():awaitbb.refresh()pprint.pprint(bb.feeders)# Without async/await, including from a top-level module:result=asyncio.run(bb.refresh())pprint.pprint(result)pprint.pprint(bb.feeders)Note: only password login is supported currently. Google and other SSOs are not supported. If
you've already set up your Bird Buddy with SSO, one option could be to register a new account with
a password, and then redeem an invite code to your Bird Buddy under the new account. Some fields
will be missing (such as firmware versions and off-grid status).Thefeedersproperty will be an array of feeders with the following fields:fragmentListFeederFieldsonFeederForPrivate{battery{charging# Booleanpercentage# Int (93)state# String (enum: "HIGH")}food{state# String (enum: "LOW")}id# String (UUID)name# Stringsignal{state# String (enum: "HIGH")value# Int (rssi: -41)}state# String (enum: "READY_TO_STREAM")temperature{value# Int}}TranslationsAPI responses can return translated strings by setting the client'slanguage_codeproperty.
Language codes are parsed usinglangcodesfrombirdbuddyimportBirdBuddyasyncdefmain():bb=BirdBuddybb.language_code="de"collections=awaitbb.refresh_collections()birds=[c.species.nameforcincollections.values()]print(birds)
Package: pybirthdayspackage
pyBirthdaysGet to know all the famous people who have birthdays on a specific day (birthdays as a service)InstallationTo install, runpip install -i https://test.pypi.org/simple/ pybirthdayspackageHow to Contribute & UseAfter installing the above package and the virtual environment (pipenv shell), you can run the tests in the project directory by using the following command:python3 -m pytest.To add to your program, simply import this package:from pybirthdayspackage import pybirthdaysUsageget_people(date)Allow user to input date, return all the famous people who have birthdays on that dateget_birthday(person)Allow user to input famous person name, return the birthday of that person if foundget_profession_birthdays(profession, limit)Allow user to input a profession and the desired number of outputs, return the top 'x' most popular famous people that have that profession and their birthdayssearch_by_birthsign(birth_sign, limit)Allow user to input a birth sign and the desired number of outputs, return the top 'x' most popular famous people that have that birth sign and their birthdaysPyPILinkTeam MembersGrace ZhangIshana GoyalLaura MazoniMark Chen
Package: pybison
PyBisonWelcome to PyBison!BringingGNU Bison/Flex's raw speed and power to PythonWhat is PyBison?PyBison is a framework which effectively 'wraps'BisonandFlex intoa Python class structure.You define a parser class, define tokens and precedences as attributes, and parse targets as methods with rules in the docstrings, then instantiate and run.Black Magick happens in the background, whereupon you get callbacks each timeyyparse()resolves a parse target.InstallNow,install pybisonwith:pipinstallpybisonThe following command will verify if the installation succeeded:python-c"import bison"There are already parsers for Python. Why re-invent the wheel?I looked at all the Python-based parsing frameworks.IMO, the best one wasPLY- a pure-pythonlexx/yaccimplementation (which I have borrowed from heavily in designing PyBison's OO model).But PLY suffers some major limitations:usage of 'named groups' regular expressions in the lexer creates a hard limit of 100 tokens - not enough to comfortably handle major languagespure-python implementation is a convenience, but incurs a cruel performance penaltythe parser engine is SLR, not full LALR(1)The other frameworks utilise a fiddly script syntax -How do I use this?Refer to theexamplesand thedocsfor usage.DevelopmentYou will need:Python, with development headers and librariespipGNU bisonflexA standard C compiler and linkerWe assume that Python, pip and a C compiler is already installed.DependenciesFirst, install the dependenciesbisonandflex.Arch Linuxsudopacman-SbisonflexUbuntusudoapt-getinstallbisonflexWindowsWithChocolatey, you can install the packages as follows:chocoinstallwinflexbison3Additionally, if a C compiler is needed,mingwcan be installed with Chocolatey as well.chocoinstallmingwDebuggingSee the short introduction intodebugging.CollaboratorsPyBison was designed and written byDavid McNabdavid@freenet.org.nzsmvvhabibutsuthisiscameugeneaicsarnsbrodehlda-h
Package: pybispectra
A Python signal processing package for computing spectral- and time-domain
interactions using the bispectrum.This package provides the tools for computing phase-amplitude coupling, time
delay estimation, and wave shape features using the bispectrum and bicoherence.
Additional tools for computing amplitude-amplitude coupling, phase-phase
coupling, and spatio-spectral filters are also provided.Parallel processing andNumbaoptimisation are
implemented to reduce computation times. There is a minor reliance on theMNEsignal processing toolbox.Installation & Requirements:Install the package into the desired environment using pippip install pybispectraSee here for the list of requirements.Use:To get started with the toolbox, check out thedocumentationandexamples.Citing:If you use this toolbox in your work, please include the following citation:Binns, T. S., Pellegrini, F., Jurhar, T., & Haufe, S. (2023). PyBispectra (Version 1.1.0). DOI:10.5281/zenodo.8377822
Package: pybit
pybitOfficial Python3 API connector for Bybit's HTTP and WebSockets APIs.Table of ContentsAboutDevelopmentInstallationUsageContactContributorsDonationsAboutPut simply,pybit(Python + Bybit) is the official lightweight one-stop-shop module for the Bybit HTTP and WebSocket APIs. Originally created byVerata Veritatis, it's now maintained by Bybit employees – however, you're still welcome to contribute!It was designed with the following vision in mind:I was personally never a fan of auto-generated connectors that used a mosh-pit of various modules you didn't want (sorry,bravado) and wanted to build my own Python3-dedicated connector with very little external resources. The goal of the connector is to provide traders and developers with an easy-to-use high-performing module that has an active issue and discussion board leading to consistent improvements.Developmentpybitis being actively developed, and new Bybit API changes should arrive onpybitvery quickly.pybitusesrequestsandwebsocket-clientfor its methods, alongside other built-in modules. Anyone is welcome to branch/fork the repository and add their own upgrades. If you think you've made substantial improvements to the module, submit a pull request and we'll gladly take a look.Installationpybitrequires Python 3.9.1 or higher. The module can be installed manually or viaPyPIwithpip:pip install pybitUsageYou can retrieve a specific market like so:frompybit.unified_tradingimportHTTPCreate an HTTP session and connect via WebSocket for Inverse on mainnet:session=HTTP(testnet=False,api_key="...",api_secret="...",)Information can be sent to, or retrieved from, the Bybit APIs:# Get the orderbook of the USDT Perpetual, BTCUSDTsession.get_orderbook(category="linear",symbol="BTCUSDT")# Create five long USDC Options orders.# (Currently, only USDC Options support sending orders in bulk.)payload={"category":"option"}orders=[{"symbol":"BTC-30JUN23-20000-C","side":"Buy","orderType":"Limit","qty":"0.1","price":i,}foriin[15000,15500,16000,16500,16600]]payload["request"]=orders# Submit the orders in bulk.session.place_batch_order(payload)Check out the example python files or the list of endpoints below for more information on available
endpoints and methods. Usage examples on theHTTPmethods can
be found in theexamples folder.ContactYou can reach out for support on theBybitAPI Telegramgroup chat.ContributorsThanks goes to these wonderful people (emoji key):dextertd💻📖ervuks💻📖verata-veritatis💻📖APF20💻Cameron Harder-Hutton💻Tom Rumpf💻OnJohn💻Todd Conley🤔This project follows theall-contributorsspecification. Contributions of any kind welcome!
Package: pybitable
pybitablefrom pybitable import Connection, ConnectionPool

db_url = 'bitable+pybitable://<app_id>:<app_secret>@open.feishu.cn/<app_token>'

# 支持使用personal_base_token访问多维表格，这里建议使用后面一种写法，sqlalchemy打印日志的时候，会将personal_base_token当成密码显示星号
db_url = 'bitable+pybitable://<personal_base_token>@open.feishu.cn/<app_token>'
db_url = 'bitable+pybitable://:<personal_base_token>@open.feishu.cn/<app_token>'

conn_pool = ConnectionPool(
    maxsize=10,
    connection_factory=lambda: Connection(db_url),
)

with conn_pool.connect() as connection:
    print('connect', connection)
    cursor = connection.cursor()
    result = cursor.execute('select * from tbl2w2QJgo6YCthm')
    cursor.close()clipip install pybitable[cli]

pybitable -h base-api.feishu.cn -p <personal_base_token> <app_token>
pybitable -h open.feishu.cn -u <app_id> -p <app_secret> <app_token>
pybitable -h open.feishu.cn -u <app_id> -p <app_secret> <app_token>
pybitable bitable+pybitable://<app_id>:<app_secret>@open.feishu.cn/<app_token>
pybitable bitable+pybitable://:<personal_base_token>@open.feishu.cn/<app_token>using sqlalchemypip install pybitable[sqlalchemy]

from sqlalchemy import create_engine, Column, String, Text, text
from sqlalchemy.orm import sessionmaker, declarative_base

engine = create_engine(db_url, echo=False)
Session = sessionmaker(engine)

with engine.connect() as conn:
    result = conn.execute(
        text("select `文本` as a from tblID0QbOnjktwdC")
    )
    for row in result:
        print(f"{row}")

Base = declarative_base()

class BITable1(Base):
    __tablename__ = 'tblID0QbOnjktwdC'
    record_id = Column(String(32), primary_key=True)
    文本 = Column(Text, nullable=True, server_default=text("''"), comment="文本")
    单选 = Column(String(32), nullable=True, server_default=text("''"), comment="单选")
    多选 = Column(Text, nullable=True, server_default=text("''"), comment="多选")

with Session.begin() as session:
    for item in session.query(BITable1).all():
        print('record_id: ', item.record_id, '文本: ', item.文本, '单选', item.单选, '多选', item.多选)

print('engine', engine, BITable1)
Package: pybitbackup
BitbackupDescriptionThis Python script will download all of your Git repositories from a Bitbucket workspace.
If a repository does not exist locally, the repo will be downloaded to the target directory. If a
repository already exists locally,git remote updatewill be executed.InstallationpipinstallpybitbackupUsageDownload all projects from a BitBucket workspace into the current folder:pybitbackup<workspace>--user<Username>--key<AppKey>App KeyandUsernamea required to access the Bitbucket API. You can easily generate a new App Key
at your personalsettings pagein Bitbucket.Workspacecould be your ownusernameto download your personal repositories or one of the team workspaces.
To download only repositories of a certain project, you can specify theproject name.
Package: pybitbucketapi
pybitbucketapipybitbucketapi contains some functions to facilitate the usage of bitbucket apis inside python modules or in command line.The source for this project is available here.Example of importing bitbucketapi inside a python module :import os
from pygitlabapi import gitlabApi

iurl = "https://gitlab.com/api/v4"
ijson = "project.json"
imethod="POST"
iapi = "/projects"
iuser= os.environ.get("GITLAB_USER")
itoken = os.environ.get("GITLAB_TOKEN")
message= gitlabApi.rungitlabApi(api=iapi, method=imethod, url=iurl, user=iuser, token=itoken, json=ijson )
print(message)Release notes1.0.0 Initial version1.0.1 Managing http error codes
Package: pybitcore
Bitcore API wrapperPython3 wrapper for theBitcoreAPIInstallationPyPIpipinstallpybitcoreor from sourcegitclonehttps://github.com/tianshanghong/pybitcore.gitcdpybitcore
python3setup.pyinstallUsagefrompybitcoreimportBitCoreAPIbc=BitCoreAPI()LicenseMIT
Package: pybites-pysource
PyBites PysourceA command line tool to read Python source code.InstallationYou can installpybites-pysourcefromPyPI:pip install pybites-pysourceThis tool uses Python 3.xUsageYou can usepybites-pysource:From the command line$ pysource -m re.match
 def match(pattern, string, flags=0):
 	"""Try to apply the pattern at the start of the string, returning
 	a Match object, or None if no match was found."""
 	return _compile(pattern, flags).match(string)To show the resulting code with paging callpysourcewith-p.From within Vim by selecting amodule.callableadding this to your.vimrc:autocmd FileType python map <leader>py :exec '!python3.9 $HOME/bin/pysource.py -m <C-R><C-A> -p'<CR>Check outour blog postfor a demo.TestsTo run the tests:$ python setup.py testSee:Integrating with setuptools / python setup.py test / pytest-runner.Enjoy!
Package: pybites-tips
PyBites Tips CLIA wrapper to readPyBites Python tipsfrom the command line.InstallationYou can installPyBites Tips CLIfromPyPI:pip install pybites-tipsThis tool uses Python 3.xUsagePyBites Tips CLI is a command line application. There are two ways to run it:Interactive mode:$ pytip

 Search tips (press 'q' to exit): functools
 3 tips found

 === TIP 153 ===
 Title: functools.partial
 ...
 ...Search for tips from the command line using the-sflag:$ pytip -s itertools
 7 tips found

 === TIP 53 ===
 Title: random.choice and itertools.product
 Tip: #Python's random, range and itertools.product make it easy to simulate 5 dice rolls:
 ...
 ...PagingIf you want topagethrough the results use the-pflag:$ pytip -s itertools -p
7 tips found

Press any key to start paging them, then press 'q' to go to the next one ... or hit 'c' bail out:
...
<< resulting tips are paged (you see them one by one in your terminal) >>You can also just pipepytip's output tomore:pytip -s itertools|moreEnjoy!
Package: pybitfield
pybitfieldA library that makes it easy to handle bitfield with pythonRequirementspython 3.6, 3.7, 3.8, 3.9InstallationpipinstallpybitfieldUsageWhen you construct a bitfield with 5 elements, do as follows.In this case, information up to 5 bits can be stored.Unless otherwise specified, all bits are 0.frompybitfieldimportBitfield,BitOrdernumber_of_element=5bitfield=Bitfield(number_of_element)If you want to set the bit, do as follows.Since the index is zero based, the bitfield stored when running this code is01111.This is the case for big endian.bitfield.set_bit(0)bitfield.set_bit(1)bitfield.set_bit(2)bitfield.set_bit(3)# Since the number of elements is 5 and the index is zero-based, a total of 5 index from 0 to 4 can be specified.# bitfield.set_bit(5)This code remove the 1st and 3rd bits.This result is00101bitfield.remove_bit(1)bitfield.remove_bit(3)You can useis_bit()to make sure the bit is set.bitfield.is_bit(1)# return Falsebitfield.is_bit(2)# return TrueIf you want to convert bitfield to list type, you can useget_bit_list().The index of bitfield and the index of list correspond.0 is converted to False, 1 is converted to True.bitfield.get_bit_list()# [True, False, True, False, False]If you want to reverse bitfield, you can useswap_bitfield().The argument represents the bit length.If you call the method with no arguments, the number of elements in the bitfield is applied to the bit length of the return value.bitfield.swap_bitfield()# 20# 0b10100bitfield.swap_bitfield(8)# 160# 0b10100000bitfield.swap_bitfield(10)# 640# 0b1010000000If you want to convert bitfield to bytes type, you can useget_bitfield_bytes().You can useBitOrderenumerator class to specify the bit order.If the number of elements in the bitfield is not a multiple of 8, the smallest byte length that can represent it will be applied.In this case, the number of elements in the bitfield is 5, so the byte length of 1 is applied.bitfield.get_bitfield_bytes(BitOrder.big)# b'\x05'# 0b00000101bitfield.get_bitfield_bytes(BitOrder.little)# b'\xa0'# 0b10100000Foundercpyberryemail:cpyberry222@gmail.com
Package: py-bitflyer
py-bitflyerA Python wrapper forbitFlyer API.Install$pipinstallpy-bitflyerUsagePublic APIimportpy_bitflyerpublic_api=py_bitflyer.API()# Get markets informationspublic_api.markets()# Get executions# If you want 10 executions, pass count as a variablepublic_api.executions(count=10)Private APICreate config.json and write down yourAPIKeyandAPISecret.(!Atention!)
This config.json has very very secret information of your bitflyer account./path/to/config.json{"Key":"Your APIKey","Secret":"Your APISecret"}importpy_bitflyerprivate_api=py_bitflyer.API(mode='Private',config='/path/to/config.json')# Get balanceprivate_api.balance()# Get a list of own executionsprivate_api.childorders_list()
Package: pybitmap
## pybitmap### 安装:pip3 install pybitmap#### 使用方法:bit_map = Pybitmap(1000000) # 1000000为指定size 表示存储最大的元素#### 操作bit_map.add(32)  # 添加元素bit_map.remove(32)  # 删除元素print(list(bit_map.sequence(reverse=False)))  # 按序列输出元素, reverse 是否逆序#查找元素print(bit_map.query_value(43))返回: (False, 0, 43)False 表示不存在  (True 表示存在)0     表示应该存在的整型数字的序列43    整型数字中的位数
Package: pybitpay
Non-official Python API forBitPayPayment Gateway API.
You can review the source codehereand use it on your own risk.To create an invoice, you can do:from bitpay import BitPayAPI
api = BitPayAPI('<Your API key goes here>')
result = api.create_invoice(
    price=100,
    currency='USD',
    posData='order0001',
    buyerName='John',
)
print resultTo get invoice status, you can doresult = api.get_invoice_status('<Invoice ID>')
print resultThis API is broght to you byEZComet.com- the best realtime message pushing service. We acceptbitcoin!Author blog:Victor Lin’s coding notes
Package: pybit-proxy
pybitOfficial Python3 API connector for Bybit's HTTP and WebSockets APIs.Table of ContentsAboutDevelopmentInstallationUsageContactContributorsDonationsAboutPut simply,pybit(Python + Bybit) is the official lightweight one-stop-shop module for the Bybit HTTP and WebSocket APIs. Originally created byVerata Veritatis, it's now maintained by Bybit employees – however, you're still welcome to contribute!It was designed with the following vision in mind:I was personally never a fan of auto-generated connectors that used a mosh-pit of various modules you didn't want (sorry,bravado) and wanted to build my own Python3-dedicated connector with very little external resources. The goal of the connector is to provide traders and developers with an easy-to-use high-performing module that has an active issue and discussion board leading to consistent improvements.Developmentpybitis being actively developed, and new Bybit API changes should arrive onpybitvery quickly.pybitusesrequestsandwebsocket-clientfor its methods, alongside other built-in modules. Anyone is welcome to branch/fork the repository and add their own upgrades. If you think you've made substantial improvements to the module, submit a pull request and we'll gladly take a look.Installationpybitrequires Python 3.9.1 or higher. The module can be installed manually or viaPyPIwithpip:pip install pybit_proxyUsageYou can retrieve a specific market like so:frompybit.unified_tradingimportHTTPCreate an HTTP session and connect via WebSocket for Inverse on mainnet:session=HTTP(testnet=False,api_key="...",api_secret="...",)Information can be sent to, or retrieved from, the Bybit APIs:# Get the orderbook of the USDT Perpetual, BTCUSDTsession.get_orderbook(category="linear",symbol="BTCUSDT")# Create five long USDC Options orders.# (Currently, only USDC Options support sending orders in bulk.)payload={"category":"option"}orders=[{"symbol":"BTC-30JUN23-20000-C","side":"Buy","orderType":"Limit","qty":"0.1","price":i,}foriin[15000,15500,16000,16500,16600]]payload["request"]=orders# Submit the orders in bulk.session.place_batch_order(payload)Check out the example python files or the list of endpoints below for more information on available
endpoints and methods. Usage examples on theHTTPmethods can
be found in theexamples folder.ContactYou can reach out for support on theBybitAPI Telegramgroup chat.ContributorsThanks goes to these wonderful people (emoji key):dextertd💻📖ervuks💻📖verata-veritatis💻📖APF20💻Cameron Harder-Hutton💻Tom Rumpf💻OnJohn💻Todd Conley🤔This project follows theall-contributorsspecification. Contributions of any kind welcome!
Package: pybitrot
Python Bits Rotation moduleInstallationpythonsetup.pyinstallContributingPlease readCONTRIBUTING.rstfor details on our code of conduct,
and the process for submitting pull requests to us.Thanks ToSee also the list ofcontributorswho participated in this project.LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.
Package: pybitset
✨ pybitset ✨The python binding forcbitsetinstallpipinstallpybitsetUsagefrompybitsetimportBitSetb=BitSet()foriinrange(1000):b.set(3*i)forvinb:print(v)useBITSET_USE_CFFIenv var to specify a backendPublic functionsclassBitSet:def__init__(self)->None:...def__del__(self)->None:...@staticmethoddeffrom_ptr(ptr)->BitSet:...defclear(self)->None:...deffill(self)->None:...defcopy(self)->BitSet:...defresize(self,newarraysize:int,padwithzeroes:bool)->bool:...defsize_in_bytes(self)->int:...defsize_in_bits(self)->int:...defsize_in_words(self)->int:...defgrow(self,newarraysize:int)->bool:...deftrim(self)->bool:...defshift_left(self,s:int)->None:...defshift_right(self,s:int)->None:...defset(self,i:int)->None:...defset_to_value(self,i:int,flag:bool)->None:...defget(self,i:int)->bool:...defcount(self)->int:...defminimum(self)->int:...defmaximum(self)->int:...definplace_union(self,b2:BitSet)->bool:...defunion_count(self,b2:BitSet)->int:...definplace_intersection(self,b2:BitSet):...defintersection_count(self,b2:BitSet)->int:...defdisjoint(self,b2:BitSet)->bool:...defintersect(self,b2:BitSet)->bool:...defcontains_all(self,b2:BitSet)->bool:...definplace_difference(self,b2:BitSet)->None:...defdifference_count(self,b2:BitSet)->int:...definplace_symmetric_difference(self,b2:BitSet)->bool:...defsymmetric_difference_count(self,b2:BitSet)->int:...def__iter__(self):...deffor_each(self,func)->bool:...defprint(self)->None:...