Saravanan666/pypi-org huggingface dataset:
Package: roku-scanner
Roku-Scanner 1.0.4Scans LAN for any connected Roku's and returns available device information.PrerequisitesPython3.8+PIP - should be installed with python, if nothereInstallationpip3installroku-scannerUsageCLIpython3-mroku_scannerOptionsDevice data output in JSON.python3-mroku_scanner--jsonPretty print JSON. Can only be used with json flag.python3-mroku_scanner--json--prettyIncreasing timeout on discovery search time. Default is 2 secs. It's advised to use a time less than 10 secs.python3-mroku_scanner--timeout5Change search target to target all devices and not only Roku devices. This will result in non roku devices being added to discovery data. As now(1.0.4) only discovery data is returned for non Roku devices.python3-mroku_scanner--search-target-allVerbose Loggingpython3-mroku_scanner--verboseExcluding data from output.python3-mroku_scanner--excludedevice-infoExclusion Optionsdevice-infoappsactive-appmedia-playerOutput ExamplesJSON exampleXML exampleImport ExamplesDiscovery and device data fetchingDiscovering Roku's and fetching their device data.fromroku_scanner.scannerimportScannerfromroku_scanner.rokuimportRokuscanner=Scanner()scanner.discover()found_devices=scanner.discovered_devicesfordeviceinfound_devices:roku_location=device.get('LOCATION')roku=Roku(location=roku_location,discovery_data=device)roku.fetch_data()detailed_device_data=roku.dataprint(detailed_device_data)JSONGetting device data in JSON.fromroku_scanner.scannerimportScannerfromroku_scanner.rokuimportRokuscanner=Scanner()scanner.discover()found_devices=scanner.discovered_devicesfordeviceinfound_devices:roku_location=device.get('LOCATION')roku=Roku(location=roku_location,discovery_data=device)roku.fetch_data()json_data=roku.as_json()XMLGetting device data as XML.fromroku_scanner.scannerimportScannerfromroku_scanner.rokuimportRokuscanner=Scanner()scanner.discover()found_devices=scanner.discovered_devicesfordeviceinfound_devices:roku_location=device.get('LOCATION')roku=Roku(location=roku_location,discovery_data=device)roku.fetch_data()xml_data=roku.as_xml()Search Target in ScannerChanges search target for scanner to search for all devices, this will return Roku devices and any other usingUPnPfromroku_scanner.scannerimportScannerscanner=Scanner(search_target='upnp:rootdevice')scanner.discover()all_types_of_devices=scanner.discovered_devicesTestingpytesttests/Code StandardRoku-Scanner followsPEP 8standard.VersioningRoku-Scanner usesSemVerfor versioning. For the versions available, see thetags on this repository.AuthorsChristian Cecilia-Initial workSee also the list ofcontributorswho participated in this project.
Package: roku-tui
roku-tuia command line TUI remote for Rokuinstall and runme@computer ~$ python3 -m pip install roku-tuime@computer ~$ roku-tuibasic usageKeys on the left map to standard Roku remote buttons on the righth-> Homeb-> Backp-> Play/Pauser-> Replay*-> Options (star key)arrow keys -> navigationENTER-> OK<-> Rewind>-> Fast-ForwardFor help inside the application, type '?'.
To quit the application, typeq.typing modeIn some instances, you may need to type something into a Roku screen
(when searching or logging into a service, for example). This can be
incredibly cumbersome using the standard navigation.To enter typing mode, press/, and you will see a cursor appear below
the remote. At this point, all alphanumeric keys (and backspace) will
be interpreted literally and sent to the Roku.To exit typing mode, pressENTERorESC.NOTE: this doesn't work with all text interfaces.
Package: roland-piano
Roland PianoLibrary for interfacing with Roland FP pianos over midi. Tested on both Mac and Linux.InstallationRun:python3-mpipinstallroland-pianoHow this startedI found the button only interface on my Roland FP-10 somewhat limiting. The app would give more insight, but was a bit too buggy IMO. Hence I decided to reverse engineer the Roland specific midi messages and create a Python API so that people can build their own interface. Feel free to contribute!ExamplesPlease look at the unit tests on how to use the library. The main difference is that the imports are handled as if you installed the library with Pip:fromroland_pianoimportRolandPiano,discover,RolandAddressMap,InstrumentsLimitationsDoesn't trigger events (e.g. volume changed) over midi when changing many of the piano settings. Connecting with the app enables this, so I  (or you😃) need to do some digging on how this is achieved. Contact me for more information on what I have tried so far.API is quite limited at the moment, but there is some low hanging fruit for more functionality.
Package: role-pattern-nlp
d# Role PatternBuild and match linguistic patterns for role labelling. Provides an example-driven approach to generate and refine patterns.Uses graph-based pattern matching, built on SpaCy.InstallationWith pip:pip install role-pattern-nlpExample usage# First, parse a string to create a SpaCy Doc objectimporten_core_web_smtext="Forging involves the shaping of metal using localized compressive forces."nlp=en_core_web_sm.load()doc=nlp(text)fromrole_pattern_nlpimportRolePatternBuilder# Provide an example by mapping role labels to tokensmatch_example={'arg1':[doc[0]],# [Forging]'pred':[doc[1]],# [involves]'arg2':[doc[3]],# [shaping]}''' Create a dictionary of all the features we want the RolePatternBuilder to have access towhen building and refining patterns '''feature_dict={'DEP':'dep_','TAG':'tag_'}# Instantiate the pattern builderrole_pattern_builder=RolePatternBuilder(feature_dict)#  Build a pattern. It will use all the features in the feature_dict by defaultrole_pattern=role_pattern_builder.build(match_example)# Match against any doc with the role_patternmatches=role_pattern.match(doc)print(matches)'''[{'arg1': [Forging], 'arg2': [shaping], 'pred': [involves]}]'''See examples/ for demonstration as to how to refine a pattern using negative examples.APIRolePatternRolePattern.spacy_dep_patternThe dependency pattern in the form used to create the SpaCy DependencyMatcher object.RolePattern.token_labelsThe list of labels that corresponds to the tokens matched by the pattern.Built withSpaCy- DependencyMatcherSpaCy pattern buildernetworkx- Used by SpaCy pattern builder
Package: roleplaycog
Roleplay CogThis package is a cog edition ofmy roleplay bot repositorythat has been heavily modifiedInstallationpipinstallroleplaycogSetupimportdiscordbot=discord.Bot()# Loading via the setup functionbot.load_extension("roleplaycog")# Loading directly (why would you do this)fromroleplaycogimportRoleplaybot.add_cog(Roleplay(bot))bot.run("Token")
Package: roles
RolesLibrary for Role based development.Pythonic implementation of the DCI (Data Context Interaction) pattern
(http://www.artima.com/articles/dci_vision.html).The big difference with mixins is that this role is applied only to the subject
instance, not to the subject class (alas, a new class is constructed).Roles can be assigned and revoked. Multiple roles can be applied to an
instance. Revocation can happen in any particular order.Homepage:http://github.com/amolenaar/rolesReleases:http://pypi.python.org/pypi/rolesUsing RolesAs a basic example, consider a domain class:>>>classPerson:...def__init__(self,name):...self.name=name>>>person=Person("John")The instance should participate in a collaboration in which it fulfills a
particular role:>>>fromrolesimportRoleType>>>classCarpenter(metaclass=RoleType):...defchop(self):...return"chop, chop"Assign the role to the person:>>>Carpenter(person)# doctest: +ELLIPSIS<__main__.Person+Carpenterobjectat0x...>>>>person# doctest: +ELLIPSIS<__main__.Person+Carpenterobjectat0x...>The person is still a Person:>>>isinstance(person,Person)True... and can do carpenter things:>>>person.chop()'chop, chop'Seeroles.pyfor more examples.ContextRoles make a lot of sense when used in a context. A classic example is the
money transfer example. Here two accounts are used and an amount of money is
transfered from one account to the other. So, one account playes the role of
source account and the other plays the role of target account.An example can be found inexample.py.
Package: rolete
SomepackageShow how to structure a Python project.Inspired byhttps://github.com/kennethreitz/samplemod.RecommendationsPython 2 or 3?Develop your code under Python 3, test it for both Python 2 and Python 3
but consider Python 3 to be the default today.Split your code into packages, modules, and functionsAll code should be inside some function (except perhapsif __name__ == '__main__':).Split long functions into smaller functions.If you need to scroll through a function over several screens, it is probably too long.Functions should do one thing and one thing only.Hide internals with underscores.Organize related functions into modules.If modules grow too large, split them.Import from other modules undersomepackage/usingfrom .somemodule import something.Do file I/O on the “outside” of your code, not deep inside.Classes vs. functionsDo not overuse classes.Prefer immutable data structures.Prefer pure functions.NamingGive the subdirectory the same name as your package.Before you name your package, check that the name is not taken onhttps://pypi.org(you may want to upload your package to PyPI one day).InterfacesInsomepackage/__init__.pydefine what should be visible to the outside.Usehttps://semver.org.TestingTest all non-trivial code. I recommend to usehttps://pytest.org.Use Travis CI:https://docs.travis-ci.com/user/languages/python/.Dependency managementPackage dependencies for developers should be listed inrequirements.txt.Alternatively, consider usinghttp://pipenv.readthedocs.io.Package dependencies for users of your code (who will probably install via pip) should be listed insetup.py.Code styleFollow PEP8:https://www.python.org/dev/peps/pep-0008/Usepycodestyleto automatically check for PEP8.Type checkingConsider using type hints:https://docs.python.org/3/library/typing.htmlConsider usinghttp://mypy-lang.org.Consider verifying type annotations at runtime:https://github.com/RussBaz/enforceShare your packageChoose a license and add a LICENSE file.Share your package on PyPI. For this you can followhttps://github.com/bast/pypi-howto.DocumentationUse RST for your README (to make it easier forhttps://pypi.org).Suggestions? Corrections? Pull requests?Yes please!
Package: rolex
Welcome to therolexDocumentationA elegant datetime library.100% Pure Python implementation.Faster datetime/date parser thandateutil.parser.parse.Powerful parser convert other type to datetime/date.Easy to use high performance time series/random datetime, date generator.Relative time calculation (add seconds, hour, week, month, year …).ContentsWelcome to therolexDocumentationInstallInstallrolexis released on PyPI, so all you need is:$pipinstallrolexTo upgrade to latest version:$pipinstall--upgraderolex
Package: rolimons
RolimonsAn unofficial Python API wrapper for Rolimonsrolimons.py is an api wrapper forrolimonsIt allows you to fetch data from the official rolimons api as well as data that can only be scraped.Getting Startedpip install rolimonsQuick Start 🛠️importrolimons# Fetches full user data for Robloxplayer=rolimons.player(username='Roblox')print(player.rap,player.value)# Fetches statistics for Valkyrie Helmitem=rolimons.item(1365767)print(item.rap,item.value)# Gets sales data for Valkyrie Helmsales=item.get_recent_sales()forsaleinsales:print(sale.timestamp,sale.old_rap,sale.new_rap)# Gets basic user data for users on the leaderboardforplayerinrolimons.utils().get_leaderboard():print(player.name,player.value,player.rap)
Package: rollasback
RollAsBack - Python Web Backend FrameworkAuthor(s):CodeWikiFile Name:rest_endpoint.pyDate:16th January 2024DescriptionRollAsBack is a web backend framework written in Python. It is designed to provide a simple and flexible solution for building web applications. This framework allows you to define routes and handle HTTP requests efficiently.DisclaimerThis software is provided "as is" without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.CopyrightCopyright @ CodeWiki by MIT LicenseUsageRollAsBack provides a simple way to define and handle routes in your web application. It includes basic functionality for handling HTTP requests and responses.FeaturesRoute Handling:Define routes using the@endpointdecorator.Request Parsing:Parse HTTP requests and extract relevant information.Response Generation:Generate HTTP responses with ease.Logging:Log important events and messages.Examplefromsrc.rollasbackimportRollAsBack,HttpResponse,RESPONSEMEMETYPESapp=RollAsBack("MyApp")@app.endpoint("/hello")defhello(request):returnHttpResponse("Hello, World!",status=200,mimetype=RESPONSEMEMETYPES.text_plain)if__name__=="__main__":app.start_server("127.0.0.1",8000)In this example, a simple "Hello, World!" route is defined. When the server is started, it listens on127.0.0.1:8000for incoming requests.LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.Note: Adjust the file structure and import paths according to your project setup.Feel free to extend RollAsBack based on your application's requirements. For more details on how to use and customize the framework, refer to the source code and additional documentation.Happy coding with RollAsBack!
Package: rollastic
Rollastic=========Elasticsearch cluster management, namely rolling restart and upgrades.Your cluster should be deployed/managed via SaltStack; this is meant to be ran on your Salt master.While currently not a *hard* requirement (as far as states applied on an upgrade, a highstate is performed), werecommend to use our fork of the elasticsearch Salt formula: https://github.com/vkgit/saltstack-elasticsearch-formula,as further integration will happen in the future.Install-------```pip install rollastic```Usage-----### Restart```Usage: rollastic restart [OPTIONS] MASTER_NODERolling restart of cluster.MASTER_NODE is the initial node to query to get the list of master nodesto connect to. Rollastic will connect to all master nodes to avoid relyingon one to be up for the roll procedure.This will:- Collect and order the nodes to roll.If you opted to include master nodes, they are always done first.- Wait until cluster is in green health- For each node from #1 aboveIf node's heap used percentage is over kill-at-heap:* Disable cluster allocation* Ping node through Salt to verify connectivity* Shutdown node* Wait for ES to die for 2m.If it's not dead, run a killall java and wait another 2m.If it's still not dead, fail.* Start elasticsearch service through Salt* Wait until node joins cluster with an uptime within 120s.* Enable allocation* Wait until cluster is in green healthOptions:--masters / --no-masters  Restart master nodes as well [false]--datas / --no-datas      Restart data nodes [true]--kill-at-heap INTEGER    Heap used percentage threshold to restart thatnode [85]--help                    Show this message and exit.```### Upgrade```Usage: rollastic upgrade [OPTIONS] MASTER_NODERolling upgrade of cluster.MASTER_NODE is the initial node to query to get the list of master nodesto connect to. Rollastic will connect to all master nodes to avoid relyingon one to be up for the roll procedure.This will:- Collect and order the nodes to roll.If you opted to include master nodes, they are always done first.- Wait until cluster is in green health- For each node from #1 aboveIf node's ES version is under minimum_version:* Disable cluster allocation* Ping node through Salt to verify connectivity* Run a Salt highstate* Check for an available upgrade on the Elasticsearch package, if so:- Shutdown node- Wait for ES to die for 2m.If it's not dead, run a killall java and wait another 2m.If it's still not dead, fail.* If ES was stopped at any point in this:- Start elasticsearch service if it's not already started- Wait until node joins cluster with an uptime within 120s.* Enable allocation* Wait until cluster is in green healthOptions:--masters / --no-masters  Restart master nodes as well [false]--datas / --no-datas      Restart data nodes [true]--minimum-version TEXT    Minimum version to upgrade to [1.7.1]--help                    Show this message and exit.```
Package: rollback
This is a simple Pythonic mechanism for rolling back multiple operations in a predictable way, usable as acontext manageror a standalone instance (seeExample usage). By default, errors are re-raised, but an explicit mode or callmustbe supplied to trigger a rollback. Valid modes are:onErrorBoolean whenTruewill roll back if an error is
raisedonSuccessBoolean whenTruewill roll back if an error isnotraisedBoth modes can be set toTrueto always rollback. A rollback can also be triggered manually by callingdoRollback.  Note that multiple calls todoRollbackwill only call the rollback steps once.Errors can be supressed by settingraiseErrortoFalse. Note that errors from rollback steps will not be surpressed, regardless of theraiseErrorsetting.If a rollback is triggered, each step is called in a last in, first out order (LIFO). That is, the most recently added step is called first, the first step is called last.CompatibilityRollback has no external dependencies and is regularly tested with all currently supported versions of cPython.InstallationInstall from source:python setup.py installInstall from PyPI:pip install rollbackExample usagefrom__future__importprint_functionfromrollbackimportRollback# *always* rollback after exiting block, letting any error be re-raisedwithRollback(onError=True,onSuccess=True)asrollback:print('do a1')rollback.addStep(print,'undo a1')print('do a2')rollback.addStep(print,'undo a2')# rollback *only* if *no* error is raised, letting any error be re-raisedwithRollback(onSuccess=True)asrollback:print('do b1')rollback.addStep(print,'undo b1')print('do b2')rollback.addStep(print,'undo b2')# rollback manuallywithRollback()asrollback:print('do c1')rollback.addStep(print,'undo c1')print('do c2')rollback.addStep(print,'undo c2')rollback.doRollback()# rollback *only* if an error is raised, suppressing the errorwithRollback(onError=True,raiseError=False)asrollback:print('do d1')rollback.addStep(print,'undo d1')print('do d2')rollback.addStep(print,'undo d2')raiseRuntimeError('this is not re-raised')# rollback *only* if an error is raised, letting the error be re-raisedwithRollback(onError=True)asrollback:print('do e1')rollback.addStep(print,'undo e1')print('do e2')rollback.addStep(print,'undo e2')raiseRuntimeError('this is re-raised')Produces output:do a1
do a2
undo a2
undo a1
do b1
do b2
undo b2
undo b1
do c1
do c2
undo c2
undo c1
do d1
do d2
undo d2
undo d1
do e1
do e2
undo e2
undo e1
Traceback (most recent call last):
  File "example.py", line 41, in <module>
    raise RuntimeError('this is re-raised')
RuntimeError: this is re-raised
Package: rollbar
PyrollbarProactively discover, predict, and resolve errors in real-time withRollbar’serror monitoring platform.Start tracking errors today!Python notifier for reporting exceptions, errors, and log messages toRollbar.Key benefits of using Pyrollbar are:Frameworks:Pyrollbar supports popular Python frameworks such asDjango,Flask,FastAPI,AWS Lambdaand more!Automatic error grouping:Rollbar aggregates Occurrences caused by the same error into Items that represent application issues.Learn more about reducing log noise.Advanced search:Filter items by many different properties.Learn more about search.Customizable notifications:Rollbar supports several messaging and incident management tools where your team can get notified about errors and important events by real-time alerts.Learn more about Rollbar notifications.Versions SupportedPyRollbar VersionPython Version CompatibilitySupport Level1.0.03.6, 3.7. 3.8, 3.9, 3.10, 3.11Full0.16.32.7, 3.4, 3.5, 3.6, 3.7. 3.8, 3.9, 3.10, 3.11Security Fixes OnlySupport Level DefinitionsFull- We will support new features of the library and test against all supported versions.Security Fixes Only- We will only provide critical security fixes for the library.Setup InstructionsSign up for a Rollbar accountFollow theQuick Startinstructions in ourPython SDK docsto install pyrollbar and configure it for your platform.Usage and ReferenceFor complete usage instructions and configuration reference, see ourPython SDK docs.Release History & ChangelogSee ourReleasespage for a list of all releases, including changes.Help / SupportIf you run into any issues, please email us atsupport@rollbar.comFor bug reports, pleaseopen an issue on GitHub.ContributingFork itCreate your feature branch (git checkout -b my-new-feature).Commit your changes (git commit -am 'Added some feature')Push to the branch (git push origin my-new-feature)Create new Pull RequestTests are inrollbar/test. To run the tests:python setup.py test
Package: rollbar-udp-agent
rollbar-udp-agent=============A daemon that listens on a udp port and pushes messages to Rollbar.Requirements------------rollbar-udp-agent requires:- A unix-like system (tested on Fedora Linux and Mac OS X)- Python 2.6+- requests 0.13.1+ (will be installed by pip)- a Rollbar_ accountInstallation------------**Installing**Obtain a post_server_item access token from your project's Rollbar settings page and executeROLLBAR_ACCESS_TOKEN=post_server_item_access_token bash -c "$(curl -L https://raw.githubusercontent.com/lrascao/rollbar-udp-agent/master/setup.sh)"**Installing with pip**In a virtualenv, install like so::sudo pip install rollbar-udp-agent**init.d script**rollbar-agent comes with an example init.d script, chkconfig compatible and tested on Fedora Linux, update-rc.d on Ubuntu Linux.On Ubuntu, you'll need to add to rc.d. Run the following::update-rc.d rollbar-udp-agent defaultsOn Fedora, add to chkconfig::sudo chkconfig --add rollbar-udp-agentsudo chkconfig rollbar-udp-agent onOn other systems, check your system's documentation for its equivalent of chkconfig.Now, start the service::sudo service rollbar-udp-agent startTo check that it's running, tail its log file::tail -f /var/log/rollbar-udp-agent.logConfiguration-------------Configuration options for rollbar-udp-agent itself are in `/etc/rollbar-udp-agent.conf`.**rollbar-udp-agent.conf**At the bare minimum, you will want to change the following variables:- ``api_key`` -- your Rollbar access token, specifically an API token that allows "post_server_item"The following options are optional and have default values- ``listen_port`` -- the udp port to listen for messages on (default 7521)- ``bind_host`` --  interface to listen on (default is all interfaces)- ``rollbar_url`` -- url to post messages to (default https://api.rollbar.com/api/1/item/)- ``event_chunk_size`` --  number of events to chunk before sending to rollbar (default 50)- ``event_chunk_bytes`` -- number of bytes to chunk before sending to rollbar (default 1048576, 1MB)- ``flush_interval`` -- flush messages to rollbar period (default 30 seconds)- ``bulk_report`` -- wether to send messages in a single http request or several (default false)Contributing------------Contributions are welcome. The project is hosted on github at http://github.com/lrascao/rollbar-udp-agent
Package: roll-cli
FeaturesTODORequirementsTODOInstallationYou can installRollviapipfromPyPI:$pipinstallroll-cliUsagePlease see theCommand-line Referencefor details.ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theGPL 3.0 license,Rollis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz’sHypermodern Python Cookiecuttertemplate.