Saravanan666/pypi-org huggingface dataset:
Package: bar-gmail
Bar GmailGet notifications and unread messages count from Gmail (Waybar/Polybar module).RequirementsFont Awesome: default badge Libcanberra: notification sound (optional).To display notifications you must have anotification daemonrunning on your system.InstallationUse one of the following methods.AUR package on ArchLinux and derivativeshttps://aur.archlinux.org/packages/bar-gmail/With pip from pypi.orgpipinstall--userbar-gmail
~/.local/bin/bar-gmailDepending on your system you may also need to add the--break-system-packagesflag.With pip from git repogitclonehttps://github.com/crabvk/bar-gmail.gitcdbar-gmail
gitdescribe--abbrev=0--tags# Get latest tag.gitcheckougLATEST_TAG
pipinstall-e.
~/.local/bin/bar-gmailUsageFirst, you need to authenticate the client:bar-gmailauthThen just runbar-gmailorbar-gmail --format polybarperiodically to get unread messages count and new message notifications.Credentials and session are stored in~/.cache/bar-gmail.Waybar config example~/.config/waybar/config"modules-right":{"custom/gmail"}"custom/gmail":{"exec":"bar-gmail","return-type":"json","interval":10,"tooltip":false,"on-click":"xdg-open https://mail.google.com/mail/u/0/#inbox"}~/.config/waybar/style.css#custom-gmail.unread{color:white;}#custom-gmail.inaccurate{color:darkorange;}#custom-gmail.error{color:darkred;}Polybar config examplemodules-right=gmail...[module/gmail]type=custom/scriptexec=bar-gmail -f polybarinterval=10click-left=xdg-open https://mail.google.com/mail/u/0/#inboxScript argumentsSeebar-gmail --helpfor the full list of available subcommands and command arguments.Possible values for-s,--soundis obtained with:ls/usr/share/sounds/freedesktop/stereo/|cut-d.-f1for examplebar-gmail --sound message-new-instant.If you have several mails you can specify thecredentials.jsonfile with the--credentials <path>flag.
Package: bargtd
# bargtd
A GTD Tool on your OS menu bar## TODO[x] support create new task from menu[x] support merge multiple tasklist[x] support JIRA[ ] support custom query from github[ ] support switch profile from menu[ ] support create new task in merge mode[ ] useasynciowhen fetch data from remote[ ] put the gitlab private token in header: [ref](https://docs.gitlab.com/ee/api/#personal-access-tokens)
Package: barify
A simple library to generate text progress bars for given values.To install:`pip install barify`Example:````from barify import barifyprint barify(84)````Prints out:`[||||||||--]`Here are the available optional arguments:- `min_value`: The minimum value in the interval of the passed value. Default is 0.- `max_val`: The maximum value in the interval of the passed value. Default is 100.- `delimiters`: A 2 character string; left character is used for the left delimiter of the progress bar, and right character is used for the right delimiter of the progress bar. Default is '[]'- `bar`: A 1 character string; character to use to represent a full bar. Default is '|'- `empty`: A 1 character string; character to use to represent an empty bar. Default is '-'- `num_bars`: The number of bars (both full and empty) that should compose the progress bar. Default is 10.
Package: barista-api-client
Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditions aremet:1. Redistributions of source code must retain the above copyrightnotice, this list of conditions and the following disclaimer.2. Redistributions in binary form must reproduce the above copyrightnotice, this list of conditions and the following disclaimer in thedocumentation and/or other materials provided with the distribution.3. Neither the name of the copyright holder nor the names of itscontributors may be used to endorse or promote products derived fromthis software without specific prior written permission.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOTLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FORA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHTHOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOTLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANYTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USEOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.Description: =============================barista API Client (Python)=============================**TODO:** Provide a complete README file.License and Copyrights======================This software is licensed under `The 3-Clause BSD License<https://opensource.org/licenses/BSD-3-Clause>`_.Platform: UNKNOWNClassifier: Development Status :: 3 - AlphaClassifier: Intended Audience :: DevelopersClassifier: License :: OSI Approved :: BSD LicenseClassifier: Programming Language :: Python :: 3Classifier: Programming Language :: Python :: 3.7Provides-Extra: dev
Package: barium-meal
barium-mealPython Wrapper forOpenTelemetrywritten to scratch the itch
of needing to use the same / similar code across severalGoogle Cloud Functionsand wanting to abstract away from tracing / logging so I can mix and match the two.Some of these cloud functions are invoked via HTTP, others fromPub/Submessages.For Pub/Sub I have jury-rigged persistingthe state of a Span to propagate between processes.
To ensure that a trace that goes from function to function via pub/sub remains contiguous.I'msurethere is a better way of doing this but this is good enough for my purposes and by putting my solution
out in the wild I'm hoping to get feedback to help improve it.For http I have used theW3C Trace Context Level1 Recommendationfrom 6 February 2020. I rolled my own here as I didn't find an existing Python implementation. Again if I have
missed something and someone would like to put me right that would be great!Installationpip install barium-mealUsageThe tests are the best guide to usage. In the interests of keeping things DRY please take a look there.Running the testsIn a new virtual environment:python setup.py develop
pytest
Package: barkeep
Small, C++-based python library to display async animations, counters, and progress bars.Installation:pip install barkeepDisplay a waiting animation with a message:importtimeimportbarkeepasbkanim=bk.Animation(message="Working")anim.show()time.sleep(10)# do workanim.done()Supports several styles:anim=bk.Animation(message="Working",style=bk.Earth)Display a counter to monitor a numeric variable while waiting:c=bk.Counter(message="Reading lines",speed=1.0,speed_unit="line/s")c.show()foriinrange(505):time.sleep(0.013)# read & process linec+=1c.done()Display a progress bar to monitor a numeric variable and measure its completion by comparing against a total:bar=bk.ProgressBar(message="Reading lines",speed=1.0,speed_unit="line/s",total=505)bar.show()foriinrange(505):time.sleep(0.013)# read & process linebar+=1bar.done()Combine diplays using|operator to monitor multiple variables:importrandomsents=bk.ProgressBar(total=1010,message="Sents")toks=bk.Counter(message="Toks",speed_unit="tok/s",speed=1.0)bar=sents|toksbar.show()foriinrange(1010):# do worktime.sleep(0.013)sents+=1toks+=1+random.randrange(5)bar.done()Use "no tty" mode to, e.g., output to log files:bar=bk.ProgressBar(total=401,message="Sents",speed=1.0,interval=1.0,no_tty=True)bar.show()foriinrange(401):time.sleep(0.013)bar+=1bar.done()no_ttyachieves two things:Change the delimiter from\rto\nto avoid wonky looking output in your log files.Change the default interval to a minute to avoid overwhelming logs (in the example above, we set the interval ourselves explicitly).
Package: bark-ml
Gym Environments and Agents for Autonomous DrivingTry it on Google Colab!BARK-ML offers various OpenAI-Gym environments and reinforcement learning agents for autonomous driving.Install BARK-ML usingpip install bark-ml.Gym EnvironmentsHighway Scenarioenv=gym.make("highway-v0")The highway scenario is a curved road with four lanes where all vehicles are being controlled by the intelligent driver model (IDM).
For more details have a lookhere.Available environments:highway-v0: Continuous highway environmenthighway-v1: Discrete highway environmentThe highway-v0 environment.Merging Scenarioenv=gym.make("merging-v0")In the merging scenario, the ego vehicle is placed on the right and its goal is placed on the left lane.
All other vehicles are controlled by the MOBIL model.
For more details have a lookhere.Available environments:merging-v0: Continuous merging environmentmerging-v1: Discrete merging environmentThe merging-v0 environment.Intersection / Unprotected Left Turnenv=gym.make("intersection-v0")In the intersection scenario, the ego vehicle starts on the bottom-right lane and its goal is set on the top-left lane (unprotected left turn).
For more details have a lookhere.Available environments:intersection-v0: Continuous intersection environmentintersection-v1: Discrete intersection environmentThe intersection-v0 environment.Getting StartedAn example using theOpenAi-Gyminterface can be foundhere:importgymimportnumpyasnp# registers bark-ml environmentsimportbark_ml.environments.gym# pylint: disable=unused-importenv=gym.make("merging-v0")initial_state=env.reset()done=FalsewhiledoneisFalse:action=np.array([0.,0.])# acceleration and steering-rateobserved_state,reward,done,info=env.step(action)print(f"Observed state:{observed_state}, "f"Action:{action}, Reward:{reward}, Done:{done}")Building From SourceClone the repository usinggit clone https://github.com/bark-simulator/bark-ml, install the virtual python environment and activate it afterwards using:bashutils/install.shsourceutils/dev_into.shNow - once in the virtual python environment - you can build any of the libraries or execute binaries within BARK-ML usingBazel.
To run the getting started example from above, use the following command:bazel run //examples:continuous_env.DocumentationRead thedocumentation online.PublicationsGraph Neural Networks and Reinforcement Learning for Behavior Generation in Semantic Environments(IV 2020)BARK: Open Behavior Benchmarking in Multi-Agent Environments(IROS 2020)Counterfactual Policy Evaluation for Decision-Making in Autonomous Driving(IROS 2020,  PLC Workshop)LicenseBARK-ML code is distributed under MIT License.
Package: bark-monitor
Bark monitorShowing my neighbor my dog doesn't bark!Get it today:pip install bark-monitor.IntroductionDo you also have neighbor who accuses your dog of barking all the time, want to kick you out of your flat because of it, even though you knowit's not true?
Do you want to know if your dog is actually noisy when you are gone but you don't (and don't want to buy) a baby cam?Then this project is for you!How to use the bark monitorThe bark monitor will:Record your dog while you are gone.
The recordings are saved in a folder to enable you to really show that neighbor they are full of shit.Monitor its barking real time and send you notification through a Telegram bot when your neighbor drives the dog crazy and they barks.
Detection of the bark can be done using theYamnetneural network implemented in tensorflow, or the amplitude of the signal.
Using Yamnet, cats are also tracked ;).Install and useCheck out ourdocumentationfor information on how toinstall,use, and more.ContributionsContributions are always welcome to help show my neighbor is wrong!Code submitted should be formatted withblackand passflake8 .with no errors.
All methods should be type hinted and return types should always be present even when it'sNone.If possible, submit unit tests and a picture of your dog with your PR (I also accept cat pictures as payments).
Package: barkr
BarkrBarkr[^1] is a social media cross-posting tool written in Python: set it up and never worry about manually posting the same message to multiple channels ever again!WithBarkryou can setup a series of channels (e.g. social media accounts) to read messages from and / or post messages to. You can mix and match read / write modes, and add multiple accounts of the same type of channel as well without worrying that the same message will be re-posted to a channel it comes from.Note thatBarkris limited to text posts only. Want to see that change? Start a discussion on a new issue![^1]: "Barkr" (missing "e") as in "entity that barks". See:dogs.MotivationI wroteBarkrfor a personal use case after noting how much fragmentation there currently is (as of 2023) in the social media space, as a way to reduce the cost of engaging with multiple social media platforms, and also as a (very simple) way to practice using threads in Python.InstallationUse the package managerpipto installbarkr.pipinstallbarkrUsageCreate a Python script and specify all the channels you want to use. Channel connections are present in thebarkr.connectionsmodule.A simple script showcasing how to set up three Mastodon connections with multiple modes that can run in the background is outlined below:frombarkr.mainimportBarkrfrombarkr.connections.baseimportConnectionModesfrombarkr.connections.mastodonimportMastodonConnectionbarkr=Barkr([# Barkr will read new messages posted by this account, and queue them to# other accounts on write mode, but will not post anything to it.MastodonConnection("Read only connection",[ConnectionModes.READ],"<ACCESS TOKEN HERE>","<INSTANCE URL HERE>",),# Barkr will write queued messages to this account, but will not read anything# new posted to this account or queue anything from this account to other onesMastodonConnection("Write only connection",[ConnectionModes.WRITE],"<ACCESS TOKEN HERE>","<INSTANCE URL HERE>",),# Barkr will read new messages from this account to be queued onto others, and will# post new messages from other channels into this one as well.MastodonConnection("R/W connection",[ConnectionModes.READ,ConnectionModes.WRITE],"<ACCESS TOKEN HERE>","<INSTANCE URL HERE>",),])barkr.start()Always keep in mind proper secret management practices when using Barkr: instead of hardcoding access tokens / cookies / user and passwords, use tools like environment variables,dotenvor other secret managers!ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Contributions for issues that are already open by maintainers are welcome and encouraged.Please make sure to update tests as appropriate; a minimum coverage of 80% is expected (and enforced by Github Actions!).LicenseThis project is licensed under theGNU Affero General Public License v3.0.
Package: bark-ssg
Bark is a single file static site generator. I set out to make it primarily because I got tired of dealing with Jekyll and didn’t want to put a bunch of effort into tweaking Pelican to look alright.I hope to continually improve it so perhaps others might find it useful.FeaturesSingle fileJinja2 templating languagePosts support markdown formatting thanks to Hoedown with SmartyPants.InstallationYou can install using the source by simply using:python setup.py install --useror:sudo python setup.py installfor system wide installation.UsageUsage:bark [options] (new NAME|make [SETTINGS])-h,--helpShow this message.--versionShow version.ContributingIf something is wrong or could be improved, let me know or submit a pull request.
Package: barktools
barktoolsThis repository is intended as a practice ground for me to try out various Python tools, such as packaging, distribution, documentation generation, testing and CI/CD automation. It also serves as a repository of functions and scripts I may find useful.Modulesbase_utilsA collection of modules which only depend on the Python Standard Library (PSL)plot_utilsA collection of modules for plotting and data visualization which depends on common plotting and scientific packages such as matplotlib and scikit-learnScriptsindex_filesRenames files in a directory such that the filenames are numerically indexed
Arguments:-d, directory in which to index files-n, number of leading zeros for target filenames-e, only process files with this extensionTODO:Reffa till variabler medvari docstrings fÃ¶r att tydliggÃ¶ra i dokumentationen att detta Ã¤r en variabel
Package: barkus-func-test
Barkus Organization Python Cloud Functions ToolkitOverviewThis public Python package provides a set of utilities to streamline the testing of Cloud Functions within the Barkus Organization.InstallationTo use this package, you need to have Python installed. You can install the package using pip:pipenvinstallbarkus-func-testAPI1. BaseTestSuiteBase TestSuite class for class tests.
Implement useful assertion methods and fixtures.Example:frombarkus.functions.testimportBaseTestSuiteclassTestBaseTestSuite(BaseTestSuite):defbefore(self):self.values=["batata"]deftest_before_should_set_values_before_hand(self):self.assertEqual(self.values,["batata"])2. PatcherImplements a wrapper aroundpytest.patcherAPI, adding better type-hint for modules.Example:Assuming the python file we want to patch is located atsrc.foo.boo, and it has the following content:defbatata():return2defsut():returnbatata()With function tests:classPatcher(BasePatcher):__location__="src.foo.boo"defsetup(self,ctx:PatcherCtx):super().setup(ctx)# If you're extending BasePatcher, this instruction is not necessaryself.batata=self.patch("batata")deftest_should_properly_mock_module(mocker):mocks=Patcher(mocker)mocks.batata.return_value=10result=sut()assertresult==10With class tests:There's a helper class calledUsePatcherthat assists adding the patcher to the TestCase classfrombarkus.functions.testimportBaseTestSuitefrombarkus.functions.test.patcherimportBasePatcher,UsePatcherfrombarkus.functions.test.patcher.contextimportPatcherCtxfromtests.patcher.fooimportsutclassPatcher(BasePatcher):__location__="src.foo.boo"defsetup(self,ctx:PatcherCtx):self.batata=self.patch("batata")classTestPatcher(BaseTestSuite,UsePatcher[Patcher]):__patcher__=Patcherdeftest_should_properly_mock_module(self):self.mocks.batata.return_value=10result=sut()self.assertEqual(result,10)3. MatcherUtilities functions to help perform assertions3.1. Assert ReponsePerform assertion on top of the function's responseExample:fromunittest.mockimportMockfrombarkus.functions.test.patcherimportBasePatcherfrombarkus.functions.test.matchersimportassert_responsefromsrc.mainimportmainclassPatcher(BasePatcher):__location__="src.main"defsetup(self,ctx):self.perform:Mock=self.patch("perform")deftest_should_return_ok_on_success(mocker):Patcher(mocker)response=main(Mock())assert_response(response).toBe.ok()assert_response(response).notToBe.serverError()Publishing New VersionTo publish a new version you have to follow these steps:1. You must make sure you have the dev-dependencies installedpipenvinstall-d2. You must configure~/.pypircfile with credentials:It should look something like this:[distutils]
index-servers =
    pypi
    testpypi

[pypi]
username = __token__
password = pypi-*********

[testpypi]
username = __token__
password = pypi-*********Note: thetokenis actually correct, it's not an example's placeholder3. Update the package's version:At setup.py, change theversionto the desired value4. Generate the build:pipenvrunbuild5. Publish the package:pipenvrunpublishLicenseThis toolkit is proprietary software developed by Barkus Organization. Unauthorized use, reproduction, or distribution is prohibited.
Package: barl
BARL - Bayesian Approximate Reinforcement LearningThis package should serve as a collection of tools to do RL in general and in particular bayesian RL.The Main Features(Jul 2019):estimatorsagentsenvironmentssimulations & visualisationInstallation:PIP:pip3installbarlGithub:gitclonehttps://github.com/ai-nikolai/barlcdbarl
pip3install-e.Usage:Testingcdbarl
pytestExperiments:cdbarlcdexperiments
python3experiments_mab.pyScripts:importbarlenv=barl.environments.MultiArmedBandit(arms=4)agent1=barl.agents.baselines.RandomActionsSampler(numActions=4)total,arlist,_=barl.simulations.run_state_less_agent_and_env(environment=env,agent=agent1,N=100)barl.utils.plotting.plot_reward_over_time_from_ar(arlist)Copyright (C) - Nikolai Rozanov 2019-Present
Package: barladb
Changes:English interfaceMinor changes to the interface and commandsToDo:NoneWhat is BarlaDB?BarlaDBis a library that is created for working with local databases in.jsonformat. Has well-developed functions and logging! And most importantly, it has a very easy-to-learn interface, even for a beginner!Quickstartfrombarladbimportdb#Imports DB functionsfrombarladbimportconfig#imports configimportsocketconfig.debug=True#Debug ONconfig.log=True#Log ONbarladb=db.BarlaDB()#Creating an instance of a classdata=barladb.get("example.json")#We get the contents of the database and save it into the "data" variable#Also, if your file is in a different directory:#db.get("path/to/file/example")print("Hello, User! Your computer name already in example.json.")data["name"]=socket.gethostname()barladb.save("example.json",data)#Saving the "data" variable to example.json"""My example.json looks like this:{"name": "barlin41k"}In column "name", should be your hostname, but since mine is barlin41k, it comes out like this.Let me remind you that this is just a short example of using the module."""How to install?pip install barladbPeculiarities BarlaDB:Has an easy and intuitive interface.Has no dependenciesEverything is built in the popular.jsondata format.Links:DocumentationGithubPyPi
Package: barmpy
BARMPyIntrobarmpyis the Python implementation of Baeysian Additive Regression Models, a generalization of BART, currently being researched [1].  We hope this library is useful for practictioners, enabling Bayesian architecture search and model ensembling.Skeleton repo adapted fromBartPy.Check out theTutorialReferences[1]https://meetings.ams.org/math/fall2022c/meetingapp.cgi/Paper/14985