Saravanan666/pypi-org huggingface dataset:
Package: routr
Just a small example:from routr import route, GET, POST
from routr.schema import form, String

def create_user(username=None):
  ...

def get_user(id):
  ...

routes = route("/users",
  route(POST, "/",          form(username=String), create_user),
  route(GET,  "/{id:int}",  get_user)
  )Docsare hosted at excellent readthedocs project.0.7.1Fix Python 3 support forroutr.utils.import_stringshared function.0.7.0Initial Python 3.2 and 3.3 support. Also backport to Python 2.6.0.6.2Trace.annotation(name, default=None) method to retrieve annotation from
routes.0.6.1routr.static.static accepts annotationsroutr.static.static returns Response subclass’ object0.6schema validation and doc generation moved to separate packages0.5.1fix bug with trace.args/kwargs updates0.5useschemifyfor schema validationremoveroutr.schemacompletelyremoveroutr.schema2–qsandformguards are now can be imported directly
fromroutrmodule0.4.2routr.schema2: opt now can provide default valueroutr.schema2: allow namedtuple-based schemas0.4.1HTTP methods constants now can be used to define routes0.4allow setting custom class for URL matching – useurl_pattern_clskeyword
argument forroutedirectivelightweight schema validation packageroutr.schema20.3.4URL pattern typestrnow hasrearg – allows to validate string via
regexp0.3.3fix url pattern matching for labels with numbers, like/{id1}0.3.2routr.static.staticroutes now can be distinguished viastatic_viewannotation instead of view attribute (still here for backward compatibility)0.3.1fixroutr.staticbehaviour0.3get rid ofConfiguration, nowrouteis just a plain function – this
allows better composability w/o requirement to share configuration object
between different parts of the appaddroutr.staticfor serving static filesaddroutr.utils.positional_argsfor introspection of positional arguments
of different types of objects androutr.utils.inject_argsfor injecting
positional arguments based on introspection0.2.1bugfixes to DSL0.2[not backward compatible] new DSL – got rid of guards keyword argument which
is too noisy0.1.7[bugfix] incorrect reversal of urls with more than one param0.1.6[bugfix] fix bug with RouteGuarded poped up in RouteGroup matchadd ‘_’ to allowed args in URLPattern0.1.5introduced RequestParams.exception_factory which abstracts away
HTTPBadRequest raise in case of invalid data being supplied[bugfix] RouteGuarded.response now installed correctly, previously it
sometimes contained NoUrlMatched objects which are not responses0.1.4RequestParams.post_processor now also can be accumulated via additionfix bug in RequestParams which prevented Option wrap SchemaNode objects
directly0.1.3fix broken 0.1.2 release by including CHANGES file in dist0.1.2trace factory made configurable via Configuration.trace attributemethod and PATH_INFO extraction delegated to configuration, allows
implementing routing for other request wrapper (werkzeug or django’s request
for example)routes now have access to configuration object viacfgattribute0.1.1allow guards return None (routing doesn’t break on this and proceed with old
trace)RequestParams now can accept colander.SchemaNode directly (allows to supply
validators)0.1initial release
Package: routrie
routrieA Python wrapper for Rust'spath-treerouter (path-tree repo,path-tree crate).This is a blazingly fast HTTP URL router with support for matching path parameters and catch-all URLs.Usage:fromroutrieimportRouter,Param# the generic parameter is the value being stored# normally this will be an endpoint / route instancerouter=Router({"/users":1,"/users/:id":2,"/user/repo/*any":3,})matched=router.find("/foo-bar-baz")assertmatchedisNonematched=router.find("/users/routrie")assertmatchedisnotNonevalue,params=matchedassertvalue==2assertparams[0].name=="id"assertparams[0].value=="routrie"matched=router.find("/users")assertmatchedisnotNonevalue,params=matchedassertvalue==1assertparams==[]matched=router.find("/users/repos/)assertmatchedisnotNonevalue,params=matchedassertvalue==3assertparams==[]matched=router.find("/users/repos/something)assertmatchedisnotNonevalue,params=matchedassertvalue==3assertparams[0].name="any"assertparams[0].value="something"ContributingClone the repo.Runmake initRunmake testMake your changesPush and open a pull requestWait for CI to run.If your pull request gets approved and merged, it will automatically be relased to PyPi (every commit tomainis released).
Package: routy
RoutyComparing routing algorithms made easyEver worked on your reinforcement learning routing algorithm and wondered how on earth it is performing? How do you convince someone you are actually providing a better solution than their existing heuristics?Routy is the library to help you do exactly that.UsageInstallationInstall your library.pipinstallroutyExamplesImport the libraryfromroutyimportComparisonInitialize your comparison object.comparison=Comparison()plot_routeAfter you have gotten the suggested route by your model, pass the coordinates,
the suggested route, and optionally the file name in the plot_route method. This method saves an image
at the filename.png file displaying the route your model suggested.coordinates=[(0,0),(1,1),(2,2),(3,0),(1,-1)]route=[0,1,2,3,4]filename="myroute"comparison.plot_route(coordinates,route,filename)plot_routesLet's say you have more than one model and you want to compare the route each model
suggests for the same coordinates. You can do that using the 'plot_routes' function.coordinates=[(0,0),(1,1),(2,2),(3,0),(1,-1)]route1=[0,1,2,3,4]route2=[1,2,0,4,3]# Pass multiple routes as a listall_routes=[route1,route2]comparison.plot_routes(coordinates,all_routes,filename)All available methodsYou can find all the available methods documentedhere.
This is autogenerated documentation, so you can take its word more seriously :)DevelopmentWant to create a pull request? This section is for you.Documentation is importantCreate documentation by running this command at project folder.pdoc--html--force../comparison.py
Package: rouver
RouverA microframework for Python 3, based on werkzeug.Routing>>>fromrouver.routerimportRouter>>>fromrouver.responseimportrespond_with_html,respond_with_json>>>defget_index(environ,start_response):...returnrespond_with_html(start_response,"<div>Foo</div>")>>>defget_count(environ,start_response):...returnrespond_with_json(start_response,{"count":42})>>>router=Router()>>>router.add_routes([...("","GET",get_index),...("count","GET",get_count),...])Routes with placeholders:>>>defget_addition(environ,start_response):...num1,num2=path...returnresponse_with_json(start_response,{"result":num1+num2})>>>defnumeric_arg(request,path,value):...returnint(value)>>>router.add_template_handler("numeric",numeric_arg)>>>router.add_routes([...("add/{numeric}/{numeric}","GET",get_addition),...])Routes with wildcards:>>>defget_wildcard(environ,start_response):...# environ["rouver.wildcard_path"] contains the remaining path...returnrespond(start_response)>>>router.add_routes([...("wild/*","GET",get_wildcard),...])Sub-routers:>>>defget_sub(environ,start_response):...returnrespond(start_response)>>>sub_router=Router()>>>sub_router.add_routes([...("sub","GET",get_sub),...])>>>router.add_sub_router("parent",sub_router)Argument Handling>>>fromrouver.argsimportMultiplicity,parse_args>>>fromrouver.responseimportrespond_with_json>>>defget_count_with_args(request,path,start_response):...args=parse_args(request.environ,[...("count",int,Multiplicity.REQUIRED),...])...returnrespond_with_json({"count":args["count"]})WSGI Testing>>>fromrouver.testimportcreate_request,test_wsgi_app>>>request=create_request("GET","/my/path")>>>response=test_wsgi_app(app,request)>>>response.assert_status(HTTPStatus.OK)
Package: roux-algo-geneweaver-kargers
roux-algo-geneweaver-kargersWARNING: This package is under active development. The API may change at any time. Documentation may
be out of date.InstallationSet UpIt's usually a good idea to install this package in a python virtual environment.python3 -m venv $NAME_OF_VENV
source $NAME_OF_VENV/bin/activate
pip install roux-algo-geneweaver-kargersWith Python Poetrypoetry new $NEW_PROJECT_NAME
cd $NEW_PROJECT_NAME
poetry add roux-alsoUsageTwo data formats are currently supported, "Node and Edges List" and "Adjacency List" formats. If you
use the "Adjacency List" format, you will need to convert it to the "Node and Edges List" format
before using it with Karger's. We included utility methods to make this easy.Load Datafromroux.algo.geneweaver.kargersimport*nodes,edges=karger_io.load_nodes_edges('nodes_edges_file.json')Load Data from Adjacency List Sourcefromroux.algo.geneweaver.kargersimport*graph=karger_io.load_graph('graph_file.json')nodes,edges=karger_tf.adj_graph_to_edge_list(graph)edges=karger_tf.deduplicate_edge_list(edges)Run Kargers on Datafromroux.algo.geneweaver.kargersimport*nodes,edges=karger_io.load_nodes_edges('nodes_edges_file.json')k_inst=KargerMinCut(nodes,edges)min_cut,best_cuts,result=k_inst.min_cut()...super_nodes=karger_tf.union_find_to_geneset_list(result.roots(),result.non_roots())Developer SetupBase ToolsInstallGitInstallpython3.9Note: install method varies by operating systemInstallpoetrySet upClonethis repositoryMove to cloned directory (e.g.cd cs5800-final-project)Runpoetry installIf you need to connect to the database, create a .env configuration fileYou should now be able to use the python package:Runpoetry shellRunpython3fromroux.algo.geneweaver.kargersimportkragers_pocaskpmfromroux.algo.geneweaver.kargers.utilsimportbuild_graphasbgfromroux.algo.geneweaver.kargers.db.sessionimportSessionLocaldb=SessionLocal()graph=bg.build_graph(db,{iforiinrange(349100,349110)})result=kpm.kragers_poc_1(graph)Create the Tier 2 Datasetfromroux.algo.geneweaver.kargers.utilsimportbuild_graphasbgfromroux.algo.geneweaver.kargers.db.sessionimportSessionLocaldb=SessionLocal()# The dataset is slightly smaller than 19000 nodesgraph=bg.get_adjacency_exclusive_new(db,2,19000)To save the datasetfromroux.algo.geneweaver.kargers.utilsimportload_save_graphasls# Build the graph abovegraph=...### Get all Tier 2 Genesetsls.save_graph('filename.json',graph)Get all Tier 2 Genesetsfromroux.algo.geneweaver.kargers.utilsimportbuild_graphasbgfromroux.algo.geneweaver.kargers.db.sessionimportSessionLocaldb=SessionLocal()tier_2_genesets=bg.get_all_genesets_by_tier(db,2)
Package: rova
ROVAWrapper to get ROVA calendar from Rova's API
Acces to ROVA API has been simplified since version 0.2.1 of this wrapper
Just usehttps://www.rova.nl/api/waste-calendar/upcoming?postalcode=1000AA&houseNumber=1&addition=&take=5with a existing combination of postalcode, housenumber, [housenumber addition]take=5 means that five upcoming dates are returned, min is 1 max unknownBe aware that ROVA API has not been officially published by ROVA.Create a new connection by supplying your zip code and house numberr = rova.Rova(YOUR_ZIP_CODE, YOUR_HOUSE_NUMBER, [YOUR_HOUSE_NUMBER_ADDITION])API RequestCheck wether ROVA collects garbage at the given zip code and house number and additiondef is_rova_area():This method return the parsed JSON response as a list.def get_calendar_items([TAKE]):
Package: rovel.py
rovel.pyInstallpip install rovel.pypython -m pip install rovel.pyUsagefromrovelimport*fromdid_you_meanimportMatcherprint(api_npm.get_details("rolve.js"))m=Matcher("test")print(m.get("tset"))List of packagescoloramaapproxemojiapi-npmpydashrequestsaiohttpdid-you-mean
Package: rover-arm
A OpenAI Gym Env for Rover with ArmProject Overview -https://1drv.ms/p/s!Aswo8fN5BKr61klitElDnhZ-JARqTask1 - Move the cart near the table and pick up the object in the trayReward = 1 (when the object is picked up)(Else) If the bot gets close to the object it gets a small positive reward (say 0.001) and if it gets far it gets a negative reward (say -0.001).Code with Sample Actionsimport rover_arm
import gymnasium as gym
env = gym.make('rover-arm-pick-v1', render_mode = 'rgb_array')

observation = env.reset()
done = False

while not done:
    action = env.action_space.sample()
    observation, reward, terminated, truncated,  info = env.step(action)
    done = terminated or truncated
    img = env.render()
    # print(img.shape)
    print(action, observation, reward)
    
print(reward, done, info)You can try to explore the environment and action space by controlling the bot using Keyboard.You will have to install the dev version in local, and give keyboard access to terminal or IDE where code is being executed. To install in dev version you could dopip install 'rover-arm[dev]'Keyboard ControlsRoverUp, Down, Left, Right Arrows to steer the Rover.ArmA, D -> Move the end-effector in X-axisW, S -> Move the end-effector in Y-axisQ, E -> Move the end-effector in Z-axis-, + -> Open / Close the fingers of the robot armNote: W, S are also hot keys to adjust view in pybullet env (so ignore the changes or press again to undo the change.)Code to control the bot using keyboard in human mode (needs to be run in local)import rover_arm
import gymnasium as gym
import rover_arm.keyboard_control as kc

env = gym.make('rover-arm-pick-v1', render_mode = 'human')

keyboard_controller = kc.KeyboardAction()
keyboard_controller.start_listening()


observation = env.reset()
done = False

while not done:
    action = keyboard_controller.action
    observation, reward, terminated, truncated,  info = env.step(action)
    done = terminated or truncated
    img = env.render()
    # print(img.shape)
    print(action, observation, reward)
    
print(reward, done, info)Task2: Pick the object from the closer tray and place it on the distant trayUse the env "rover-arm-place-v1" for task2env = gym.make('rover-arm-place-v1')Note: Task2 Env is not upto date, it uses gym style instead of gymnasium, so expect done instead of truncated and terminated.
Package: roverqaz-simple-api
Simple python api using flask and sqlalchemyCreate/update with PUTDescription: Saves/updates the given user's name and date of birth in the database.
Request: PUT /hello/ {“dateOfBirth": "YYYY-MM-DD" }
Response: 204 No ContentNote:must contains only letters.
YYYY-MM-DD must be a date before the today date.See message with GETDescription: Returns hello birthday message for the given user
Request: Get /hello/
Response: 200 OK**Response Examples: **
A. If username's birthday is in N days: { "message": "Hello, ! Your birthday is in N day(s)" }
B. If username's birthday is today: { "message": "Hello, ! Happy birthday!" }APP variablesApplication listens on localhost:5000 by default, but you can set environment variablesexport APP_HOST=someadress
export APP_PORT=8080APP dependenciesApplication uses postgresql and need following environment values:export SQLALCHEMY_DATABASE_URI="postgresql://user:somestrongpassword@localhost:5432/users"Starting applicationTo start application type:python -m roverqaz_simple_apiAlso you can install application with pip:pip install --upgrade roverqaz_simple_api
python -m roverqaz_simple_apiUnit testsTo run unit tests enter:python tests/test.pyNote: maybe you will need enterexport PYTHONPATH=$(pwd) for running testsTests includes for stepsput unittest user with birtdate on 31-12-{now.year-1}gets unittest user and checks response messageupdates unittest user's birtdate to todaygets unittest user and checks response messagePackage on PyPiSeeroverqaz-simple-api
Package: rowan-python
Rowan Python LibraryThe Rowan Python library provides convenient access to the Rowan API from applications written in the Python language.DocumentationThe documentation is availablehere.InstallationTo install, runpip install rowan-python.UsageRowan can be run in either blocking (wait until job is complete) or non-blocking (don't wait) modes.
Both modes require generation of an API key atlabs.rowansci.com.For now, molecules are specified throughcctk. Additional ways to specify molecules will be added in the future.Results are returned as dictionaries in thestjamesformat.Blockingimport cctk
import rowan

rowan.api_key = "rowan-sk..."
client = rowan.Client()

# load molecule by name (cctk can also load in a variety of file formats)
molecule = cctk.Molecule.new_from_name("cyclobutane")

# run calculation remotely and return result
result = client.compute(molecule, name="opt cyclobutane", method="b97-3c", tasks=["optimize", "charge"])
print(result)Non-Blockingimport cctk
import rowan

rowan.api_key = "rowan-sk..."
client = rowan.Client(blocking=False)

# load molecule by name (cctk can also load in a variety of file formats)
molecule = cctk.Molecule.new_from_name("cyclobutane")

# start calculation and return id
calc_id = client.compute(molecule, name="opt cyclobutane", method="b97-3c", tasks=["optimize", "charge"])

# retrieve result (and status)
result = client.get(calc_id)
print(result)

# alternately, cancel queued or running calculation
client.stop(calc_id)IssuesTo report issues, please use the "Issues" tab above.Corin Wagen, 2023
Package: rowantree.auth.sdk
The Rowan Tree Auth Service SDKInstallationUsageContributingFork the repository on GithubCreate a named feature branch (likeadd_component_x)Write your changeWrite tests for your change (if applicable)Run the tests, ensuring they all passSubmit a Pull Request using GithubLicense and AuthorsMIT LicenseCopyright (c) 2022 Joshua C. BurtPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE 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.
Package: rowantree.auth.service
The Rowan Tree Authentication and Authorization ServiceOverviewThe Rowan Tree Authentication and Authorization ServiceDeploymentStart the service (development only):uvicorn src.rowantree.auth.service.handlers.main:app --reload --port 8001 --env-file env/.env.offline
uvicorn rowantree.auth.service.handlers.main:app --reload --port 8001 --env-file env/.env.offlineConsumptionDefault URL for API:http(s)://{hostname}:8001/ContributingFork the repository on GithubCreate a named feature branch (likeadd_component_x)Write your changeWrite tests for your change (if applicable)Run the tests, ensuring they all passSubmit a Pull Request using GithubLicense and AuthorsMIT LicenseCopyright (c) 2022 Joshua BurtPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE 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.
Package: rowantree.common.sdk
The Rowan Tree Common UtilitiesOverviewThe Common SDK contains a collection of utilities for use across projects without introducing dependencies on other solutions within the enterprise.ContributingFork the repository on GithubCreate a named feature branch (likeadd_component_x)Write your changeWrite tests for your change (if applicable)Run the tests, ensuring they all passSubmit a Pull Request using GithubLicense and AuthorsMIT LicenseCopyright (c) 2022 Joshua BurtPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE 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.
Package: rowantree.content.service
The Rowan Tree Event ServiceThe server will generate game world events (content) for all active players.UsageTo install the server:pip install rowantree.content.serviceTo execute the server:python -m src.rowantree.content.service.serverConfigurationrowantree.configSample File[DIRECTORY]
logs_dir = ./logs

[SERVER]
access_key = 3acb2d04-a15c-4a3b-a235-152a4ece876b
endpoint = http://localhost:8000
timeout = 30ContributingFork the repository on GithubCreate a named feature branch (likeadd_component_x)Write your changeWrite tests for your change (if applicable)Run the tests, ensuring they all passSubmit a Pull Request using GithubLicense and AuthorsMIT LicenseCopyright (c) 2018-2022 Joshua C. BurtPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE 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.