Saravanan666/pypi-org huggingface dataset:
Package: btw
NLP command line powered by openai.UsageAdd your OpenAI API key$ btw --add-openai-key <key>Ask for terminal commands$ btw <human command description>Examples:$ btw install oh-my-zsh
openai@localhost $ curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh$ btw make a google search about cooking chicken using curl
openai@localhost $ curl -s "http://www.google.com/search?q=cooking+chicken"$ btw turn on the bluetooth service
openai@localhost $ systemctl start bluetooth$ btw delete anything compromising on the disk
openai@localhost $ dd if=/dev/urandom of=/dev/sda bs=1MPurposeFor more information about what is Natural Language Processing, I explain in details in thewiki sectionof this repository. If you have any question please let me know, I'll be happy to extend this document.Getting startedRequirementspython >= 3.8Environment setup$ git clone git@github.com:bidetaggle/btw.git && cd btw
$ virtualenv .venv
$ source ./.venv/bin/activate
(.venv) $ pip install -r requirements.txt
(.venv) $ alias btw="python -m btw"
(.venv) $ btw --add-openai-key <copy/paste your key here>And you're ready to go 🥳Run unit tests(.venv) $ python -m unittestPublishing on PyPiThese steps are based on thistutorial.Bump version insetup.pyandbtw/__init__.py.Build the package.(.venv) $ python setup.py sdist bdist_wheelThis will create two files in a newly createddistdirectory, a source archive and a wheel.Check that the newly built distribution packages contain the files you expect.(.venv) $ tar tzf dist/btw-X.Y.Z.tar.gzCheck that your package description will render properly on PyPI.(.venv) $ twine check dist/btw-X.Y.Z*Upload the package on the testing repository.(.venv) $ twine upload --repository-url https://test.pypi.org/legacy/ dist/btw-X.Y.Z*Upload the package (for real).(.venv) $ twine upload dist/*
Package: btweb
OverviewThis module wraps around the get method for the python requests library.I'm only using it to download files for now.The reason for this package is for me to reuse it across all my projects.I'll likely build upon it in the future.Prerequisites:Python 2.7+InstallationFrom pypi:pip3 install btwebFrom this git repo:pip3 install git+https://github.com/berttejeda/bert.webadapter.gitNote: To install a specific version of the library from this git repo,suffix the git URL in the above command with @{ tag name }, e.g.:git+https://github.com/berttejeda/bert.webadapter.git@0.0.1Usage ExamplesDownload a file from a URL using Basic HTTP AuthenticationfrombtwebimportWebAdapterwebadapter=WebAdapter()res=webadapter.get(url,username=username,password=password)Download a file from a URL using Basic HTTP Authentication, caching the result for 30 minutesfrombtwebimportWebAdapterwebadapter=WebAdapter()res=webadapter.get(url,username=username,password=password,cache=True,cache_path='.',cache_time=30)Keyword ArgsKeyword                                      | Type                    | Possible Values        | Effect                           | Example
-------------------------------------------- | ----------------------- | --------------------------------------------------------------
fail_on_errors                               | bool                    | [True, False]          | Raise an error instead           | webadapter = WebAdapter(fail_on_errors=True)
                                                                       |                        | of ignoring and                  |
                                                                       |                        | returning 'None' or empty string |
Package: b-twilio-sdk-layer
B.TwilioSdkLayerAn AWS CDK based lambda layer containing Twilio SDK for python.DescriptionThis library is intended to simplify Twilio SDK dependency management
in AWS architectures where Twilio logic is being handled with lambda
functions. Simply include this layer when creating a lambda function
to enable Twilio functionality.NOTE!In order to use this layer, adockercommand must be available
on your machine. It is because the CDK runs a bundling command on a
docker container to create the Twilio dependency.RemarksBiomapasaims to modernise life-science
industry by sharing its IT knowledge with other companies and
the community. This is an open source library intended to be used
by anyone. Improvements and pull requests are welcome.Related technologyPython 3AWS CDKTwilioAssumptionsThe project assumes the following:You have basic-good knowledge in python programming.You have basic-good knowledge in AWS and AWS CDK.You have basic knowledge in Twilio.Useful sourcesRead more about Twilio SDK:https://www.twilio.com/docs/libraries/pythonInstallThe project is built and uploaded to PyPi. Install it by using pip.pip install b_twilio_sdk_layerOr directly install it through source.pip install .Usage & ExamplesCreate a lambda function with this layer:fromaws_cdk.aws_lambdaimportFunction,Code,Runtimefromb_twilio_sdk_layer.layerimportLayerasTwilioLayerfromb_cfn_lambda_layer.package_versionimportPackageVersionFunction(scope=stack,id='MyCoolFunction',function_name='MyCoolFunction',code=Code.from_asset('/path/to/your/code'),handler='index.handler',runtime=Runtime.PYTHON_3_8,layers=[TwilioLayer(stack,'MyCoolTwilioLayer',twilio_sdk_version=PackageVersion.from_string_version('7.4.0'))],)TestingThis package has integration tests based on pytest. To run tests simply run:pytest b_twilio_sdk_layer_test/integration/testsContributionFound a bug? Want to add or suggest a new feature?Contributions of any kind are gladly welcome. You may contact us
directly, create a pull-request or an issue in github platform.
Lets modernize the world together.Release history1.0.1Setaws-cdk@1.xstrict version.1.0.0Restructure project. Start using the new b-cfn-lambda-layer Layer implementation.Add Twilio layer test.Add support for Twilio Python SDK version parameter.0.0.8Ensure consistent builds.0.0.7Add -R option for better debugging.0.0.6Add latest boto version to tests.0.0.5Add ability to bundle boto3 library. Simply specify
version in the constructor.0.0.4Update Docker bundling commands. Use bash to move files between directories instead of installing with-tflag.
Related issue:https://github.com/pypa/pip/issues/1030.0.3Add disclaimer thatdockeris required.0.0.2Ensure that cdk application works by runningcdk synthcommand.0.0.1Initial build.Twilio SDK 6.46.0.Docker image for asset building: python:3.9.
Package: btyd
BTYDREAD FIRST: Project StatusBTYD is the successor to theLifetimeslibrary for implementing Buy Till You Die and Customer Lifetime Value statistical models in Python. All existing Lifetimes functionality is supported, and BayesianPyMCmodel implementations are now in Beta.IntroductionBTYD can be used to analyze your users based on the following assumptions:Users interact with you when they are active, or "alive"Users under study may "die" or become inactive after some period of timeIf this is too abstract, consider these applications:Predicting how often a visitor will return to your website. (Alive = visiting. Die = decided the website wasn't for them)Understanding how frequently a patient may return to a hospital. (Alive = visiting. Die = maybe the patient moved to a new city, or became deceased.)Predicting individuals who have churned from an app using only their usage history. (Alive = logins. Die = removed the app)Predicting repeat purchases from a customer. (Alive = actively purchasing. Die = became disinterested with your product)Predicting the lifetime value of your customersInstallationBTYD installation requires Python 3.8 or 3.9:pipinstallbtydContributingPlease refer to theContributing Guidebefore creating anyPull Requests.Documentation and TutorialsUser GuideQuestions? Comments? Requests?Please create an issue in theBTYD repository.Supported ModelsBG/NBDFader, Peter S., Bruce G.S. Hardie, and Ka Lok Lee (2005a),"Counting Your Customers the Easy Way: An Alternative to the
Pareto/NBD Model", Marketing Science, 24 (2), 275-84.Gamma-GammaFader, Peter & G. S. Hardie, Bruce (2013)."The Gamma-Gamma Model of Monetary Value".Modified BG/NBDBatislam, E.P., M. Denizel, A. Filiztekin (2007),
"Empirical validation and comparison of models for customer base
analysis,"
International Journal of Research in Marketing, 24 (3), 201-209.Additional InformationR implementation is calledBTYDplus.Bruce Hardie's website, especially his notes, is full of useful and essential explanations, many of which are featured in this library.
Package: btypes
btypesAliases with correct capitalization for built-in Python types.PEP8states that classes should have names in CamelCase.
However, all the built-in types are lower case:str,bool,int,float,list,dict, etc.
This library provides aliases for all these types that are capitalized correctly.
They are straightforward aliases and can be used exactly like the original types.InstallRequires Python 3.9+.pip install btypesExamplesfrombtypesimportInt,List,Strdefcomma_list(lst:List[Int])->Str:return", ".join(Str(e)foreinlst)defrange_list(limit:Int)->List[Int]:returnList(range(limit))Also works with pattern matching:frombtypesimportBool,Str,Uniondefprint_type(x:Union[Bool,Str])->None:matchx:caseBool():print("a boolean")caseStr():print("a string")FAQsWhy require Python 3.9 as the minimum version?Because Python 3.9 introduced generic collections in the standard library:list[int],dict[str, float];
and the whole point ofbtypesis that you can use the same identifier as constructor and as type annotation.
Package: buba
bubaMulti-environment yaml settings following 12 Factor App methodology.Inspired by gemrubyconfig.Features:simple YAML config filesconfig files support inheritance and multiple environmentsaccess config information via convenient object member notationsupport for multi-level settings (Settings.group.subgroup.setting)Install:pipinstallbubaUsage:Create config directories and files in project root directory:.
+--...
+--_config|+--environments|+--development.db.yaml|+--production.db.yaml|+--production.common.yaml|+--db.yaml|+--common.yaml
+--...
+--...
+--main.pyfiles loaded by app env (default - development).First loaded config/*.yaml filesThen loaded config/environment/{APP_ENV}*.yaml files (overrides values, there is option to override/merge list values)Then check all loaded keys for overrides in environment variables (db.host will be mapped to PREFIX__DB__HOST)app env defined by env ver APP_ENV (there is option to override)app env config prefix default value is 'APP_CONFIG' (there is option to override)app env config splitter default value is '__' (there is option to override)fromosimportenvironfrombubaimportBubaif__name__=='__main__':config=Buba(env_name='APP_ENV',prefix='CONFIG',splitter='::')assertconfig.app_name=='my_app'assertconfig.db.host=='localhost_default'assertconfig.db.user=='user_development'assertconfig.db.password=='password_development'environ['APP_ENV']='production'config.load()assertconfig.app_name=='my_app'assertconfig.db.host=='localhost_default'assertconfig.db.user=='user_production'assertconfig.db.password=='password_production'environ['APP_ENV']='production'environ['CONFIG::DB::HOST']='production_host'environ['CONFIG::APP_NAME']='production_app_name'config.load()assertconfig.app_name=='production_app_name'assertconfig.db.host=='production_host'assertconfig.db.user=='user_production'assertconfig.db.password=='password_production'
Package: bubba
Bubba: Python Web Framework builtBubba is a Python web framework built for learning purposes.It's a WSGI framework and can be used with any WSGI application server such as Gunicorn.InstallationpipinstallbubbaHow to use itBasic usage:frombubba.apiimportAPIapp=API()@app.route("/home")defhome(request,response):response.text="Hello from the HOME page"@app.route("/hello/{name}")defgreeting(request,response,name):response.text=f"Hello,{name}"@app.route("/book")classBooksResource:defget(self,req,resp):resp.text="Books Page"defpost(self,req,resp):resp.text="Endpoint to create a book"@app.route("/template")deftemplate_handler(req,resp):resp.body=app.template("index.html",context={"name":"Bumbo","title":"Best Framework"}).encode()Unit TestsThe recommended way of writing unit tests is withpytest. There are two built in fixtures
that you may want to use when writing unit tests with Bumbo. The first one isappwhich is an instance of the mainAPIclass:deftest_route_overlap_throws_exception(app):@app.route("/")defhome(req,resp):resp.text="Welcome Home."withpytest.raises(AssertionError):@app.route("/")defhome2(req,resp):resp.text="Welcome Home2."The other one isclientthat you can use to send HTTP requests to your handlers. It is based on the famousrequestsand it should feel very familiar:deftest_parameterized_route(app,client):@app.route("/{name}")defhello(req,resp,name):resp.text=f"hey{name}"assertclient.get("http://testserver/matthew").text=="hey matthew"TemplatesThe default folder for templates istemplates. You can change it when initializing the mainAPI()class:app=API(templates_dir="templates_dir_name")Then you can use HTML files in that folder like so in a handler:@app.route("/show/template")defhandler_with_template(req,resp):resp.html=app.template("example.html",context={"title":"Awesome Framework","body":"welcome to the future!"})Static FilesJust like templates, the default folder for static files isstaticand you can override it:app=API(static_dir="static_dir_name")Then you can use the files inside this folder in HTML files:<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><title>{{title}}</title><linkhref="/static/main.css"rel="stylesheet"type="text/css"></head><body><h1>{{body}}</h1><p>This is a paragraph</p></body></html>MiddlewareYou can create custom middleware classes by inheriting from thebumbo.middleware.Middlewareclass and overriding its two methods
that are called before and after each request:frombumbo.apiimportAPIfrombumbo.middlewareimportMiddlewareapp=API()classSimpleCustomMiddleware(Middleware):defprocess_request(self,req):print("Before dispatch",req.url)defprocess_response(self,req,res):print("After dispatch",req.url)app.add_middleware(SimpleCustomMiddleware)
Package: bubble
===============================Bubble===============================.. image:: https://badge.fury.io/py/bubble.png:target: http://badge.fury.io/py/bubble:alt: PyPI status.. image:: https://travis-ci.org/realopenit/bubble.png?branch=master:target: https://travis-ci.org/realopenit/bubble:alt: Travis CI status.. image:: https://readthedocs.org/projects/realopenit-bubble/badge/?version=master:target: http://realopenit-bubble.readthedocs.org/en/latest/?badge=master:alt: Readthedocs Status.. image:: https://www.quantifiedcode.com/api/v1/project/6707b42371b2414393abeca90b27e2ea/badge.svg:target: https://www.quantifiedcode.com/app/project/6707b42371b2414393abeca90b27e2ea:alt: Quantified Code issuesBubble: command line tool, for bubbling information between services* Free software: GPLV3 license* Documentation: http://realopenit-bubble.readthedocs.orgFeatures--------Todo---- clean up- speed up- DRY: Don't repeat yourself- https://en.wikipedia.org/wiki/Don't_repeat_yourself- YAGNI: You aren't gonna need it!- https://en.wikipedia.org/wiki/You_aren't_gonna_need_it- run "grep -rin TODO bubble", create a feature, alter code, make it behave,commit,push...Inspiration------------For a finite-size system to persist in time (to live), it must evolve in such away that it provides easier access to the imposed currents that flow through it.http://en.wikipedia.org/wiki/Constructal_law byContributing------------Yes, Please:)History-------2016-03-17------------------* First testing release on testPyPI.
Package: bubble3
# Bubble[![PyPI version](https://badge.fury.io/py/bubble3.svg)](https://badge.fury.io/py/bubble3)
[![Travis CI status](https://travis-ci.org/e7dal/bubble3.png?branch=master)](https://travis-ci.org/e7dal/bubble3)
[![Readthedocs Status](https://readthedocs.org/projects/e7dal-bubble3/badge/?version=master)](http://bubble3.readthedocs.org/en/latest/?badge=master)Bubble: command line tool, for bubbling information between servicesThis is the PY3 only version by the original author @e7dalFree software: GPLV3 licenseDocumentation:http://bubble3.readthedocs.orgFeaturesflxible api-api connectionsEnvironmentsportable connectionrepeatableTodoremove all PY2 relatedchoose new PY3 requirementsclean upspeed upDRY: Don’t repeat yourselfhttps://en.wikipedia.org/wiki/Don’t_repeat_yourselfYAGNI: You aren’t gonna need it!https://en.wikipedia.org/wiki/You_aren’t_gonna_need_itrun “grep -rin TODO bubble”, create a feature, alter code, make it behave,commit,push…InspirationFor a finite-size system to persist in time (to live), it must evolve in such a
way that it provides easier access to the imposed currents that flow through it.http://en.wikipedia.org/wiki/Constructal_lawContributingYes, Please:)# History
Originally bubble started athttps://github.com/realopenit/bubblehttp://bubble.realopenit.nlHistory2016-03-17First testing release on testPyPI.
Package: bubble-aopy
:space_invader: AboutThis code is implementing the bubble sort algorithm to sort an array of integers in ascending order. It iterates through the array and compares adjacent elements, swapping them if they are in the wrong order. The process is repeated until the array is sorted. The main function is a test case that calls thebubble_sortfunction with an example array and prints the sorted result.:wrench: RequirementsThe following Python libraries are required::runner:  UsageIn the terminal, navigate to the folder containing the code and run it using the following command:python bubble_sort.py:raising_hand: ContributionAll contributions are welcome! Please open an issue or submit a pull request.
Package: bubble-api
Bubble ApiInteractions with Bubble.io API in Python made easy !Powered byCuureInstallingThe easiest way to install it is throughpipy:pipinstallbubble-apiHow to use itAt the moment, there is no documentation for this library.
You can, however, rely on the integration tests we use to ensure proper integration with Bubble.
You can find themhere.Creating a BubbleClient instance :frombubble_apiimportBubbleClientbubble_client=BubbleClient(base_url="https://cuure.com",api_token="YOUR_API_TOKEN",bubble_version="live")Interact with bubble data :From theBubbleClientinstance you can now interact with the data api easily.object_data=bubble_client.get("table_name",bubble_id="bubble_object_id",)And so on with all the basic interactions with the api:delete,update,replace, ...You can also use constraints for getting or deleting objects.
This is done through a list ofContraintobject you can declare by operations with theFieldclass.frombubble_apiimportBubbleClient,Fieldfromdatetimeimportdatetimebubble_client=BubbleClient(...)constraints=[Field("name")=="Bob",Field("Created")>datetime(2023,1,1),]data=bubble_client.get("table_name",constraints=constraints)All the fields names and constraints values formatting is handle by the library.Incoming featuresBig request optimization using remaining approximation (exclude_remaining)MultithreadingDefault fields (Modified Date, unique id, Created Date, ...)Lifetime object management (update, refresh, replace)DocumentationAuthorsDylan Nina-Initial work-settorac-ninaMathis Bourdin-Contributor-mathisbrdnLicenseThis project is licensed under the MIT License - see theLICENSEfile for details
Package: bubblebuster
Bubblebuster is a Python Library for detecting water box bubbles in structural files used in molecular simulations, by partitioning the system’s periodic box into a cubic grid. The atom density of each cube is compared against the periodic box’s atom density. If any cube has a density less than the periodic box atom density multiplied by the cutoff parameter (default is 0.5), the water box is deemed to likely have a bubble. The size of the cubes, along with the cutoff value, can be customized according to the system. However, this must be done with caution as a cutoff value that is to large/small can yield false positives/negatives.
Package: bubble-client
Bubble-ClientPython client for theBubble.ioAPIsInstallationpipinstallbubble-clientExamplesGet users (or any Bubble thing, really):>>>frombubble_clientimportconfigure,BubbleThing>>>configure(base_url=...,token=...)>>>classUser(BubbleThing):...pass>>>asyncforuserinUser.get():...print(user)User({'name':'Beatrix Emery',...})User({'name':'Dr. Jekyll',...})>>>user.name'Dr. Jekyll'Change values:>>>user.name="Mr. Hyde">>>awaituser.save()>>>user.name'Mr. Hyde'Count users:>>>User.count()2Add a new user:>>>user=User(name="Sir Charles Emery")>>>awaituser.save()>>>User.count()3Join stuff!>>>classPet(BubbleThing):...pass>>>pet=awaitpet.get_one()>>>awaitpet.join("created_by",User)>>>pet.type'dog'>>>pet.created_byUser({'name':'Mr. Hyde',...})>>>pet.created_by.name'Mr. Hyde'Also works on cursors!>>>asyncforpetinPet.get().join("created_by",User):...print(pet)Pet({'type':'dog','created_by':User({'name':'Mr. Hyde',...}),...})Pet({'type':'donkey','created_by':User({'name':'Beatrix Emery',...}),...})
Package: bubblegum
bubblegumbubblegum is a script to make and manage uploads to image hosts. Several image
hosts are supported, to which one can directly upload images or rehost images
by URL.UsageBasic image uploading can be done via thebubblegum uploadcommand. To upload
a local image file, runbubblegum upload /path/to/image.png. To rehost a URL,
runbubblegum upload https://this.url.serves.an/image.png.The default image host ishttps://vgy.me, as it does not require client
authorization. The image host that will be used can be changed with the--hostflag in the upload command, e.g.bubblegum upload --host=imgur.com /path/to/image.png. The default image host can also be changed in the config
file. Host options can be viewed with thebubblegum upload --helpcommand.Uploading/rehosting multiple images simultaneously is also supported, via
multiple arguments to theuploadcommand.bubblegum upload a.jpg b.pngwill
upload both images simultaneously. By default, 4 workers are spawned for image
uploading. The number of workers can be increased or decreased in the config.A history of uploaded images can be viewed withbubblegum history. The
outputted list can be manipulated with the--sort,--limitand--offsetoptions.ConfigThe configuration can be edited with thebubblegum configcommand. A default
configuration file is created when the script first runs.Image Host Profilesbubblegum includes loaded profiles for the following two hosts by default:imgur.com(https://imgur.com)vgy.me(https://vgy.me)Other image host profiles can be found in theextra_profiles/directory.Image host profiles can be created/added to the application by adding a profile
dictionary to the list ofprofilesin your config file. Each profile must
contain 8 key/value pairs:image_host_name- The name of the image host, for use with the--host=option.image_host_url- The URL of the host's image uploading endpoint.request_headers- Extra headers to include in the upload request.upload_form_file_argument- The name of the key for the image file in the
form.upload_form_data_argument- A dictionary sent as the form data in a file
upload.rehost_form_url_argument- If the host supports URL rehosting, the name of
the key for the URL in the form. Otherwise, set it tonull.rehost_form_data_argument- A dictionary sent as the form data in a URL
rehost.json_response- A boolean indicating whether or not the returned data is
JSON or not. If True, thedata responsevariable will be the deserialized
JSON. If False, thedatarequest response variable will be the response
text.image_url_template- A string of an f-string (yeah, sounds confusing) for
the image URL. Can access the request response via thedatavariable.deletion_url_template- A string of an f-string for the deletion URL. Can
access the request response via thedatavariable.ImgurTo upload to imgur, a Client ID must be created and supplied. Details on
creating a Client ID can be found athttps://apidocs.imgur.com/#authorization-and-oauth. Once created, the Client ID
can be added to the config, as theimgur_client_id.