Saravanan666/pypi-org huggingface dataset:
Package: pybrowsers
LicenseVersionGithub ActionsCoverageSupported versionsWheelStatusDownloadsAll ContributorsbrowsersPython library for detecting and launching browsersWhy?I recently wrote a snippet for detecting installed browsers in an OSX machine inhttps://github.com/mitmproxy/mitmproxy/issues/5247#issuecomment-1095337723based onhttps://github.com/httptoolkit/browser-launcherand I thought this could be useful to other devs since I cannot find an equivalent library ofhttptoolkit/browser-launcherin Python
and the knownwebbrowserstandard library does not support arguments.InstallationpipinstallpybrowsersFeaturesDetect browser on OSXDetect browser on LinuxDetect browser on WindowsLaunch browser with argumentsLaunch and get browser by version with wildcard supportUsageImportimportbrowsersList all installer browsersimportbrowsersprint(list(browsers.browsers()))# [{'browser_type': 'chrome', 'path': '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', 'display_name': 'Google Chrome', 'version': '100.0.4896.127'}, {'browser_type': 'firefox', 'path': '/Applications/Firefox.app/Contents/MacOS/firefox', 'display_name': 'Firefox', 'version': '99.0.1'}, {'browser_type': 'safari', 'path': '/Applications/Safari.app/Contents/MacOS/Safari', 'display_name': 'Safari', 'version': '15.4'}, {'browser_type': 'opera', 'path': '/Applications/Opera.app/Contents/MacOS/Opera', 'display_name': 'Opera', 'version': '85.0.4341.60'}, {'browser_type': 'msedge', 'path': '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge', 'display_name': 'Microsoft Edge', 'version': '100.1185.22042050'}]Get browser informationimportbrowsersprint(browsers.get("chrome"))# {'browser_type': 'chrome', 'path': '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', 'display_name': 'Google Chrome', 'version': '100.0.4896.127'}Launch browserimportbrowsersbrowsers.launch("chrome")Launch browser with URLimportbrowsersbrowsers.launch("chrome",url="https://github.com/roniemartinez/browsers")Launch browser with argumentsimportbrowsersbrowsers.launch("chrome",args=["--incognito"])Specifying versionTheget()andlaunch()functions support specifying version in case multiple versions are installed.
Wildcard pattern is also supported.importbrowsersprint(browsers.get("chrome",version="100.0.4896.127"))# complete version# {'browser_type': 'chrome', 'path': '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', 'display_name': 'Google Chrome', 'version': '100.0.4896.127'}print(browsers.get("chrome",version="100.*"))# wildcard# {'browser_type': 'chrome', 'path': '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', 'display_name': 'Google Chrome', 'version': '100.0.4896.127'}browsers.launch("chrome",version="100.0.4896.127")# complete versionbrowsers.launch("chrome",version="100.*")# wildcardReferenceshttptoolkit/browser-launcherDesktop Entry SpecificationGithub: webbrowser.open incomplete on WindowsStackoverflow: Grabbing full file version of an exe in PythonContributors ✨Thanks goes to these wonderful people (emoji key):Ronie Martinez💻🤔📖🚧Sergey Pirogov🐛This project follows theall-contributorsspecification. Contributions of any kind welcome!
Package: pybrowsers-profiles
Profile LauncherA Python Script for Effortless Browser Profile Management⭐ AboutThis Python script allows you to quickly launchbrowser profileswithout having to manually navigate through the browser's settings.
It reads the profile information from each browser's config directory and presents them as options for launch.
This can save you time and improve your workflow if you frequently switch between multiple profiles.📦 InstallationUsingpipx(recommended)$pipxinstallpybrowsers-profilespipx HomepageUsingpipinstall# Clone repository$gitclone"https://github.com/haaag/PyBrowsers"$cdPyBrowsers-Profiles# Create virtual environment & source$python-mvenv.venv# or$python-mvirtualenv.venv
$source.venv/bin/activate
$pipinstall.🚀 Usage$pybrowsers--help

usage:pybrowsers[-l][-dDISABLE][-eENABLE][-f][-m{{menu}}][-v][browser]Simplescriptformanagebrowser'sprofiles

options:browserBrowsername-e,--enableEnablebrowser-d,--disableDisablebrowser-f,--foundBrowsersfound-l,--listBrowserlistandstatus-m,--menuSelectmenu(default:dmenu)-h,--helpShowthishelp-v,--verboseVerbosemode# Open menu with profiles list$pybrowsersfirefox# Disable browser (won't appear in `found` arg)$pybrowsers--disablefirefox# or$pybrowsers-dfirefox# Show status list$pybrowsers-l

>BROWSERSSTATUS-Brave(notfound)-Chromium(enabled)-Firefox(disabled)-Chrome(notfound)-LibreWolf(enabled)Use the-m, --menuoption to specify the launcher you want to use(default:dmenu)$ pybrowsers firefox --menu rofi➕ Add BrowserYou can add a browser creating ajsonfile in$XDG_DATA_HOME/pybrowsers/or~/.local/share/pybrowsers(Maybe in the future, create a interactive menu for add browser)Example{
  "name": "LibreWolf",
  "command": "librewolf",
  "path": "~/.librewolf/profiles.ini",
  "engine": "gecko",
  "enabled": true
}🌐 BrowsersFirefoxLibreWolfChromiumBraveGoogle Chrome⚡️ Requirementsdmenurofi(Optional)🧰 TODOUpdate screenshotsCreateinteractive menufor adding browser dataPlease, usepathlib.PathBUG: Issue when the profile name contains spacesAdd support forjsonfiles(Prioritize)
Package: pybry
PyBRY, a Python API Wrapper for lbry & lbrycrdPyBry is a wrapper for thelbry daemonandlbrycrd daemonAPI for Python 3.x(Python 2 support will be added very soon)InstallationWith pipSimply run the following$pipinstallpybryAnd you're done!Manually Cloning the RepositoryYou can either clone this repository or get a tarball from PyPI's
website for whatever version you want. Simply download it and# Simply clone the repository somewhere$gitclonehttps://github.com/osilkin98/pybry# Or obtain a release from PyPI's site.$wget<extremelylonglinkgeneratedbyPyPI>$tar-xzfpybry-x.x.x.tar.gzPyBRY/# Change directories into the newly created repository$cdPyBRY/# Now you simply run the setup.py file:$python3setup.pybuild_pyinstallUsageUsing the APIMake sure thatlbry-daemonis up and running, as you will not be able to
do anything without it.First, importLbrydApiorLbrycrdApifrompybryinto your project.API for LBRYDUsing the Generated CodeThe API generates all the functions from thelbryddocumentation, and translates
it into tangible, documented code.[1]frompybryimportLbrydApi# Initialize the API[2]lbry=LbrydApi()# Just call the method as documented in the LBRYD API[3]response=lbry.claim_list(name="bellflower")Since all the code is properly documented, if you ask for its documentation in an IDE,
or if you go to read it for yourself, it'll appear like this:[4]response=lbry.account_balance()ReturnthebalanceofanaccountParams:account_id–Ifprovidedonlythebalanceforthisaccountwillbegiven(Optional)address–Ifprovidedonlythebalanceforthisaddresswillbegiven(Optional)include_unconfirmed–Includeunconfirmed(Optional)Returns:(decimal)amountoflbrycreditsinwallet(decimal)amountoflbrycreditsinwalletCalling the API ManuallySince all the code does is make requests to the lbry daemon, you can also
use it as you would with cURL on the commandline. In fact, this is
actually what the bodies of generated code do.# You can also use the traditional method of making requests# if you prefer the cURL commandline syntax, works the same.response=lbry.call("claim_list",{"name":"bellflower"})API For LbryCRDfrompybryimportLbrycrdApi# Provide the username and passwordlbrycrd=LbrycrdApi("username","password")# Just specify the method and the parametersresponse=lbrycrd.call("wallet_unlock",{"wallet_username","wallet_password"})
Package: py-bs
python-browserstackA python client for running tests in browserstackAboutThis package aims to provide a straighforward python client to interact with browserstackPre-requisitespy-bs requiresPython3to runselenium installed  if notpip3 install seleniumInstallationThis client is hosted at PyPi under the name mailchimp3, to install it, simply runpip install py-bsExamplesimport py-bs as bs
from selenium import webdriver

def test_bs():
    try :
        desired_cap = {
                'browser': 'Chrome',
                'browser_version': '83.0',
                'os': 'Windows',
                'os_version': '10',
                'resolution': '1024x768',
                'name': 'Bstack-[Python] Sample Test'
                }
        username = ''
        accesskey = ''
        driver = bs.get_webdriver(username,username,desired_cap)
        driver.get("http://www.google.com")
        if not "Google" in driver.title:
            raise Exception("Unable to load google page!")
        elem = driver.find_element_by_name("q")
        elem.send_keys("BrowserStack")
        elem.submit()
        print(driver.title)
        driver.quit()
    except:
        driver.close()
        driver.quit()


if __name__ == "__main__":
    test_bs()Obtain your username and accesskey values from browserstack settings and Update the values of variable names username & accesskey
Package: pyBSDate
pyBSDateLibrary to convert BS date to AD date.Python implementation of Date conversion From Bikram Sambat(BS) to English Date(AD) and viceversa.
Conversion is done with the help of date mappings so conversion limited to 1971-2100 BS.InstallationIf you have pip installed, simplypip install pyBSDateOR from source:Get a copy of the project. Download zip of the project or clone this repo:git clone https://github.com/SushilShrestha/pyBSDateOpen your terminal, navigate to the project folder and typepython setup.py installUsageUsing functions# Convert BS Date to ADfrompyBSDateimportconvert_BS_to_ADad_date=convert_BS_to_AD(2072,1,10)print(ad_date)# Convert AD Date to BSfrompyBSDateimportconvert_AD_to_BSbs_date=convert_AD_to_BS(2015,4,23)print(bs_date)Class based wrappersbsdateandaddateclasses are available for the date conversion. They inherit from the parentdatetime.dateclass and all the functions are similar todatetime.dateclass.Following is the example of using the class based date.frompyBSDateimportbsdatene_date=bsdate(2077,2,32)print(ne_date.strftime("%B%d%Y, %A",lang='ne'))# जेष्ठ ३२ २०७७, आइतबारen_date=ne_date.addateprint(en_date.strftime("%B%d%Y, %A"))# June 14 2020, SundayTwo date objects can also be comparedimportdatetimefrompyBSDateimportbsdate,addatene_date=bsdate(2077,2,32)en_date=addate(2010,1,12)ifne_date>en_date:print(ne_date.isoformat(lang='ne'))Addition or substraction oftimedeltais supportedne_date=ne_date+datetime.timedelta(days=2)For detailed information, refer to docs.Development setupRunning testpython-munittestdiscoverRelease History0.3.0rcadd class based wrapper for date conversionupdate documentations0.2.*function based date conversionMetaDistributed under the MIT license. SeeLICENSEfor more information.Date mapping data taken fromhttps://github.com/bahadurbaniya/Date-Converter-Bikram-Sambat-to-English-DateContributingCreating a pull requestFork it (https://github.com/SushilShrestha/pyBSDate/fork)Create your feature branch (git checkout -b feature/fooBar)Commit your changes (git commit -am 'Add some fooBar')Push to the branch (git push origin feature/fooBar)Create a new Pull RequestSubmit a Bug ReportThe software might include bugs, if you find one help us improve the software by reporting it as an issue (https://github.com/SushilShrestha/pyBSDate/issues) or send us a pull request with the solution.Peace ✌
Package: py-bsdauth
py-bsdauthPython interface to OpenBSD's BSD AuthCurrently only implements auth_userokay(3) passwd authentication style.NoteYour application must be in the 'auth' group to call auth_userokay(3):usermod-Gauth<yourdaemonuser>Usage:>>>frombsdauth.bsdauthimportUserOkay
>>>u='user1'>>>pw='goodpassword'>>>uo=UserOkay(u,pw)>>>uo.login()True
>>>pw='badpassword'>>>uo=UserOkay(u,pw)>>>uo.login()False
>>>ur='baduser'>>>pw='goodpassword'>>>uo=UserOkay(ur,pw)>>>uo.login()False
>>>exit()
Package: pybsh
pybshUse bash-like syntax for running subcommands in Pythonfrompybshimportcmd,gocmd()|"echo hi"|"sed 's/hi/bye/g'">goInstallationpipinstallpybshFrom Sourcegitclonehttps://github.com/driazati/pybsh.gitcdpybsh
pipinstall--editable.API???
Package: pybsky
PybskyRequirementsPython 3.10+Pybsky stands on the shoulder of:requests packageInstallation$pipinstallpybsky---> 100%Feature List:Create ClientAdd Login logicGet Profile logicGet Follwer/Following logicFollow/UnfollowGet likesGet post, thread via repliesGet Author Feed/TimelineCreate post (text and image)Get List NotificationsUpdate Seen NotificationLicenseThis project is licensed under the terms of theMIT license
Package: pybso
pybso - Open Access MonitoringInstallationpip install pybsoPresentationThis package automates the harvesting and graphic formatting of data related to the opening of a set of publications identified by their doi.
The selected indicators and the graphic rendering are strongly inspired by thenational barometerproduced by the french Ministry of Higher Education under the Open Science Plan.
The metadata used to assess Open Access rates and trends comes primarily from the open database Unpaywall and the Crossref's registers by their respective API, and the charts are made with the Plotly Library.The source code of the package is available onGithub, with a demo Jupyter Notebook.However, because of the french context of this tool, all the documentation is written in French.LicenceThis code is under MIT License.
Package: py-bsor
BS Open Replay Python parserBeat Saber Open Replay formatparser written in PythonUsagepipinstallpy-bsorexample - read bsor file and print some info:frombsor.Bsorimportmake_bsorfrombsor.Scoringimportcalc_statsimportosif__name__=='__main__':filename='D:/something/easy.bsor'print('File name :    ',os.path.basename(filename))withopen(filename,'rb')asf:m=make_bsor(f)print(f'BSOR Version:{m.file_version}')print(f'BSOR notes:{len(m.notes)}')print(m.info)stats=calc_stats(m)print(stats)build:gittagxgitpushorigin--tags
pybuild
py-mtwineupload--repositorypypi.\dist\*x*
Package: pybst
AboutPyBST implements Binary Trees, AVL Trees, Splay Trees, and Red Black Trees in Python. Furthermore, PyBST provides a module for plotting these trees using networkx and matplotlib.Tree Classes Provided:BSTree - represents an unbalanced Binary Search TreeAVLTree - represents a balanced AVL TreeSplayTree - represents an adjusted Splay TreeRBTree - represents a balanced Red Black TreeConstructorLet Tree represent one of the provided tree classes mentioned above.Tree() - > Creates a new empty treeTree(seq) -> Creates a new empty tree from seq [(key1,val1),(key2,val2),…,(keyn,valn)]MethodsTree Methods:is_valid() -> Produces True if Tree is a valid tree of its type, else False.preorder() -> Produces a sequence of the Nodes in Tree in preorder.inorder() -> Produces a sequence of the Nodes in Tree in inorder.postorder() -> Produces a sequence of the Nodes in Tree in postorder.levelorder() -> Produces a sequence of the Nodes in Tree in levelorder.get_node(key) -> Produces the Node in Tree with key attribute key.insert(key,val) <==> Tree[key] = value. Inserts a new Node with key attribute key and value attribute val into Tree.insert_from(seq) -> Inserts keys and values from seq [(key1,val1),(key2,val2),…,(keyn,valn)] into Tree.get_max() <==> max(Tree). Produces the Node with the maximum key in Tree.get_min() <==> min(Tree). Produces the Node with the minimum key in Tree.get_element_count <==> len(Tree). Produces the number of elements in Tree.get_height() -> Produces the height of Tree.delete(key) <==> del Tree[key]. Deletes the Node with key attribute key from Tree.delete_from(seq) -> Deletes Nodes with keys from seq [key1,key2,…,keyn] from Tree.Plotting Methods (draw Module):plot_tree(Tree) -> Provides a visual representation of Tree via plotting it using networkx and matplotlib.DependenciesPyBST requires no external dependencies for the tree classes and their methods themselves. However, note that the following packages are required for tree plotting:Networkx:http://networkx.github.com/Matplotlib:http://matplotlib.org/InstallationFrom source:python setup.py installUsing easy install:easy_install pybstAlternatively download one of the build distributions found under Downloads.DocumentationSee PyBST’s github repository at:https://github.com/TylerSandman/PyBST/
Package: pybsts
About PyBSTSPyBSTS is an adaptation of R's implementation of Steven L. Scott'sBSTS library.
It has similar interface, but re-written for Python memory model.
It is a Cython+Numpy based implementation and thus dependendecies for these packages.Package ContentsPyBSTS package installs pybsts and causal_impact libraries.Quick startInstall the packagepip install pybstsBuild BSTS modelimport pybsts
import numpy as np

y = np.array([1.0, 2.0, 3.0, 4.0, 4.5])

specification = {"ar_order": 1, "local_trend": {"local_level": True},
                 "sigma_prior": np.std(y, ddof=1), "initial_value": y[0]}
b = pybsts.PyBsts("gaussian", specification, {"ping": 10, "niter":100, "seed": 1, "burn": 10})
b.fit(y, seed=1)
res = b.predict(seed=1)
print(res)

y = np.array([1.0, 2.0, 3.0, 4.0, 4.5])
X = np.array([[1.0, 2.0, 0.0, 0.0, 0.0], [0.0, 0.0, 3.0, 4.0, 0.0]])


specification = {"local_trend": {"static_intercept": True},
                 "predictors_prior": {"predictors_squared_normalized": np.dot(X, X.T)/X.shape[1]},
                 "sigma_prior": np.std(y, ddof=1), "initial_value": y[0], "mean_value": np.mean(y), 
                 "predictor_names": ["first", "second"]}
b = pybsts.PyBsts("gaussian", specification, 
                  {"ping": 10, "niter":100, "burn": 10, "forecast_horizon": 2, "seed": 1})
b.fit(X.T, y, seed=1)
res = b.predict(np.array([[1.0, 0.0], [2.0, 0.0]]), [6, 7], seed=1)
print(res)Build CausalImpact modelimport causal_impact
import numpy as np

y = np.array([1.0, 2.0, 3.0, 4.0, 4.5, 3.5, 2.5, 2.6])
X = np.array([[1.0, 2.0, 0.0, 0.0, 0.0, 3.5, 0.0, 0.0], [0.0, 0.0, 3.0, 4.0, 4.4, 0.0, 2.5, 2.5]])
                 
b = causal_impact.CausalImpact(X, y, range(0, 5), range(6, 8), niter=1000, burn=100, seed=1, 
                               seasons=[{"number_of_seasons": 3, "duration": 1}])
res = b.analyze()
print(res[0], res[1])
print(b.summary())Current statusHere is a list of implemented models (seeBSTS Library Documentation):stationary (non-dynamic) gaussian regression with local.level + seasonsstationary (non-dynamic) gaussian regression with local.linear.trend + seasonsstationary (non-dynamic) gaussian regression with semilocal.linear.trend + seasonsstationary (non-dynamic) gaussian regression with static.intercept + seasonsany of the above + arany of the above + auto.ar
Package: pybsub
pybsubfeaturesipcsmall (< 100 sloc)no external dependencies (not even imports)docstringsexamplefrompybsubimportPubSubps=PubSub()# the channel we will subscribe toc="test"# the callback function that will be fired# when a message has been published on the# channel we subscribed tocb=lambdamsg:print(msg)# various ways of subscribing to a channel# note that it returns an integer# you will want to save this if you want to# remove the callback later onk=ps.subscribe(c,cb)# ork=ps.sub(c,cb)# ork=ps.s(c,cb)# various ways of publishingps.publish(c,"somedata")# orps.pub(c,{"some":"data"})# orps.p(c,b"somedata")# various ways of unsubscribing# we will use the integer we received from# subscribing here againps.unsubscribe(c,k)# orps.unsub(c,k)# orps.u(c,k)# you could also just clear all subscriptionsps.clear()# or you could clear all subscriptions on a channelps.clear_channel()
Package: pybsv
pybsvWrappingbitsv-https://github.com/AustEcon/bitsvDescription:An easy to use Python BSV library.Install:pipinstallpybsvUsage:frompybsvimportPyBSVClient# SUPPORTED_NETWORKS = [MAIN_NETWORK_TYPE, SCALING_NETWORK_TYPE, TEST_NETWORK_TYPE]client=PyBSVClient('Your WIF Private Key Here',network=pybsv.TEST_NETWORK_TYPE)# SUPPORTED_CURRENCIES = [BSV_CURRENCY_KEY, USD_CURRENCY_KEY]client.get_balance(pybsv.BSV_CURRENCY_KEY)frompybsvimportPyBSVClient,BSV_CURRENCY_KEY,USD_CURRENCY_KEY,TEST_NETWORK_TYPE# SUPPORTED_NETWORKS = [MAIN_NETWORK_TYPE, SCALING_NETWORK_TYPE, TEST_NETWORK_TYPE]client=PyBSVClient('Your WIF Private Key Here',network=TEST_NETWORK_TYPE)# SUPPORTED_CURRENCIES = [BSV_CURRENCY_KEY, USD_CURRENCY_KEY]print(client.get_balance(BSV_CURRENCY_KEY))print(client.get_address())trans_id=client.send_bsv('Destination Wallet Address Here',0.10,USD_CURRENCY_KEY)# Send $0.10 worth of BSVprint(trans_id)Upload to PyPi:pythonsetup.pysdist
pythonsetup.pybdist_wheel
twineuploaddist/*whldist/*gz*Do this from the root of this project.
Package: py-bt
Behaviour TreePyPi:https://pypi.org/project/py-bt/Tree structure made up of Composite, Decorator and Leaf nodes.Leaf nodes are where the behaviour happens, for example an "action" or "test".Decorator nodes can only have one child and are used to wrap the result of this child node (e.g. "retry" or "not").Composite nodes can have multiple children. Composite nodes can be of 2 types:SequenceSelectorSequence nodes return the first failed child node. Similar to the ALL operator.Selector nodes return the first successful child node. Similar to the OR operator.Release History1.2.1: Added tree model validation1.2.0: Added the "retry" decorator node1.1.0: Added the "not" decorator node (inverter)DependenciesTested on:Python 3.8.1Python 3.7.5UsageInstall:pipinstallpy-btDefine a python module for you behaviour tasks (actions & tests). Tasks must return True or False
depending on whether they succeed or fail. Tasks functions receivedataandblackboardargs.datais the input data to the tree execution andblackboardis a key value store where
information can be shared between nodes. For example:defchoose_food(data,blackboard):ifdata["lunchbox"]:blackboard["choice"]=random.choice(data["lunchbox"])returnTruereturnFalsedefeat(data,blackboard):print(f"Eating{blackboard['choice']}")returnTrueThen, define your desired tree model in JSON or YAML format. For example:{"tasks_path":"path.to.tasks.module","tree":{"sequence":[{"task":"choose_food"},{"task":"eat"}]}}Then initialise and execute a behaviour tree object with some input data:frombt.behaviour_treeimportBehaviourTreedata={"lunchbox":["apple","orange","pear"]}tree=BehaviourTree("/path/to/tree/model.json")tree.load()tree.execute(data)Example ModelsSome example models can be found under the/modelsdirectory.For example/models/football/attacker.jsoncontains a behaviour tree for how a attacking player in a
football simulator might behave.TestsRun tests in local Python environment (use a virtualenv):pip install -r requirements.txt -r requirements-test.txt
pytest
flake8Run tests with tox:pip install tox==3.14.5
toxUpload to PyPirm -rf dist/
python3 setup.py sdist bdist_wheel
twine upload dist/*Referenceshttps://www.gamasutra.com/blogs/ChrisSimpson/20140717/221339/Behavior_trees_for_AI_How_they_work.phphttps://en.wikipedia.org/wiki/Behavior_tree_(artificial_intelligence,_robotics_and_control)https://py-trees.readthedocs.io/en/devel/
Package: pybtex
Synopsislatex foo.tex
pybtex foo.aux
latex foo.tex
latex foo.texDescriptionPybtex reads citation information from a file and
produces a formatted bibliography. BibTeX style files are supported.
Alternatively it is possible to write styles in Python.Pybtex currently understands the following bibliography formats:BibTeXBibTeXMLYAML-based formatThe resulting bibliography may be output in one of the following formats
(not supported by legacy BibTeX styles):LaTeXHTMLmarkdownplain textSee alsoHome pagePybtex at BitbucketPybtex at PyPI