Saravanan666/pypi-org huggingface dataset:
Package: routemaster-statsd
Usage, in your Routemaster configuration file:plugins:logging:-class:routemaster_statsd.logger:StatsDLoggerkwargs:host:localhostport:8800tags:environment:productionThis plugin will send metrics over UDP to a compatible StatsD server.The host and port can also be specified through environment variable
(STATSD_HOSTandSTATSD_PORT). The default islocalhost:8125.The statsd tags will be send inDogstatsd’s format
which is widely supported.
Package: routemin
about routeminrouteminは、特定のルート検索アルゴリズムを実装したPythonパッケージです。このパッケージを使用することで、鉄道ネットワークやその他のネットワーク上での最短経路を簡単に見つけることができます。特徴簡単に使える最短経路探索機能。複数のルートオプション。カスタマイズ可能な検索パラメータ。インストールこのパッケージはPython 3.6以上で動作します。以下のコマンドでインストールできます：pipinstallroutemin=0.1.2使い方基本的な使用方法は以下の通りです：fromrouteminimportcreate_graph,calculate_shortest_path,main# グラフを作成G=create_graph()# 最短経路を計算start_station='三鷹'end_station='大崎'include_dash=Falsepath,total_time,compact_lines=calculate_shortest_path(G,start_station,end_station,include_dash)# 最短経路を矢印を使って表示formatted_path=' → '.join(path)print(f"最短経路:{formatted_path}")print(f"合計時間:{total_time}","minutes")
Package: route-optimization-constrained
Route Optimization ConstrainedImplementation of Clustering with Constrained Algorithm.
Route Optimization Constrained can be treated as an optimization problem.InstallationRequirement Python >= 3.6, Numpy >= 1.13install from PyPIpipinstallroute-optimization-constrainedMethodsConstrained Clustering Algorithm: Route Optimization Constrained algorithmsUsage:# setupfromroute-optimization-constrainedimportRouteOptimizationConstraintif__name__=="__main__":X=[]n_points=1000random_state=42random.seed(random_state)np.random.seed(random_state)X=np.random.rand(n_points,2)demands=np.ones((n_points,1))n_clusters=4n_iters=100max_size=[n_points/n_clusters]*n_clustersmax_size=[0.25,0.5,0.1,0.15]roc=RouteOptimizationConstraint(n_clusters,max_size,n_iters)roc.fit(X,demands)labels=roc.labels_centers=roc.cluster_centers_CopyrightCopyright (c) 2021 Tri Basuki Kurniawan. Released under the MIT License.Third-party copyright in this distribution is noted where applicable.ReferenceShrinkage ClusteringDeterministic Annealing, Clustering and OptimizationClustering with size constraintsData Clustering with Cluster Size Constraints Using a Modified k-means AlgorithmKMeans Constrained Clustering Inspired by Minimum Cost Flow ProblemClustering with Capacity and Size Constraints: A Deterministic
ApproachSame Size Kmeans Heuristics MethodsCluster KMeans ConstrainedDeterministic Annealing, Constrained Clustering, and OpthiieationGoogle's Operations Research tools's
SimpleMinCostFlow
Package: routeparser
routeparser:
A route command output text parserIt provides:Reading text output of routes into Python objectsSimple identification of routes that match hosts or networksInstallation:pip install routeparserUsage:example (wherenetstat_rn.txtis full output from ‘netstat -rn’ on Linux):import routeparser

# read lines from a file
with open('netstat_rn.txt', 'r') as file_handle:
    lines = file_handle.readlines()

# You can just get objects representing the routes if you wish:
routes = routeparser.Route.from_linux_netstat_lines(lines)

# These have attributes such as gateway, interface and network.
# Some example values as in-line comments:
routes[0].gateway  # ipaddress.IPv4Address('192.168.1.1')
routes[0].interface  # 'eth0'
routes[0].network  # ipaddress.IPv4Network('10.10.0.0/16')

# Route objects support membership testing:
'10.10.10.1' in routes[0]  # would return True, given the above example route

# You can get a RoutingTable object from the lines:
table = routeparser.RoutingTable.from_linux_netstat_lines(lines)

# which you can then use to check for specific route matches:
table.match('10.10.10.1')  # would result in a matching Route object, if any

# It supports string or Address/Network objects from the ipaddress module:
import ipaddress
table.match(ipaddress.ip_network('10.10.10.0/24'))

# You can even get a list of all matching routes:
table.matches('10.10.10.10')

# Currently supported outputs and associated methods (for Route and RoutingTable)
# Windows:
#  - 'route print': from_windows_route_print_lines
# Linux:
#  - 'ip route': from_ip_route_lines
#  - 'netstat -r[nv]': from_linux_netstat_lines
#  - 'route [-n]': from_linux_route_lines
Package: routerfy
Routerfy is an easy, fast and modern framework for building AWS Serverless applications with python 3.7+ using FastAPI for development and a lighter lambda layer on AWS Lambda execution.Documentation:DocsSource Code:GitHubKey features are:Light: Routerfy's lambda layer it's extremely light since it does not need any additional library to redirect routes.Fast to test: Increase the speed to test new features by about 500%.Fast to build templates: Building AWS templates never been that easy. Routerfy create all AWS templates with necessary properties but still customizable.Familiar Syntax: Routerfy use same syntax of FastAPI for routes creation turning the experience of migration a lot easier.Body Validation: Routerfy have an own route body validation like pydantic but lighter using no dependencies.RequirementsPython 3.7+For development serving, Routerfy uses the amazing ones:FastAPIfor route management.Uvicornfor ASGI server.InstallationFor development:pipinstallrouterfy[dev]For AWS Lambda layer:pipinstallrouterfyGetting StartedTo create your first Routerfy project you only need to usecreatecommand. Open CMD in the folder you want to create your project and insert:routerfycreateMyAwesomeRouterfyProjectIf everything go well the project folder created will look like this:.
├─ routes/
│  ├─ hello_world/
│  │  ├─ app.py
│  │  ├─ route.py
└─ routerfy.config.yamlExampleOur first example file is theroute.pyinside the lambda folderhello_world. All lambda folders must have aroute.py. this way routerfy can identify routers and make the magic happens.fromrouterfyimportAPIRouter,Responserouter=APIRouter(prefix="/hello")@router.get("/")defhello_world_get_request():return"Hello World!"As you can see, the syntax is very similar to FastAPI.Testing applicationTo test application you only need to use thedevcommand on your project terminal:routerfydevThe server will start and you will have your routerfy application served locally!
Package: routerling
Routerling :Routerling is a very very small, extremely tiny, and insanely fastASGIweb application framework. It was designed to facilitate productivity by allowing for complete mastery in 7 minutes or less.Routerling is a very light layer around ASGI with support for application mounting and is perhaps the simplest and one of the fastest python web frameworks (biased opinion of course).InstalllingInstall withpip$pipinstallrouterlingA Simple ExamplefromrouterlingimportRouterasyncdefindex(req,res,ctx):res.body='Hello, World!'router=Router()router.GET('/',index)You can run with uvicorn, gunicorn or any other asgi HTTP, HTTP2, and web socket protocol server of your choice.$uvicornmain:router--reload*Runningonhttp://127.0.0.1:8000ContributingFor guidance on how to make contributions to Routerling, see theContribution GuidelinesLinksDocumentationGo To DocsPyPihttps://pypi.org/project/routerlingSource CodeGithub
Package: routeros
RouterOSRouterOS is a API client for Mikrotik RouterOS.How can I install it?$ pip install routerosThe usage of a virtualenv is recommended.How to use it?In[1]:fromrouterosimportloginIn[2]:routeros=login('user','password','10.1.0.1')In[3]:routeros('/ip/pool/print')Out[3]:({'.id':'*1','name':'dhcp','ranges':'192.168.88.10-192.168.88.254'},{'.id':'*2','name':'hs-pool-8','ranges':'10.5.50.2-10.5.50.254'})In[4]:routeros.close()In[5]:Also can use queryQuery can consult specific attributes on routeros.Methods:query.has(*args)query.hasnot(*args)query.equal(**kwargs)query.lower(**kwargs)query.greater(**kwargs)In[1]:fromrouterosimportloginIn[2]:routeros=login('user','password','10.1.0.1')In[3]:routeros.query('/ip/pool/print').equal(name='dhcp')Out[3]:({'.id':'*1','name':'dhcp','ranges':'192.168.88.10-192.168.88.254'},)In[4]:routeros.close()In[5]:How to use non-default (8728) API port for login, such as 9999routeros=login('user','password','10.1.0.1',9999)How to use pre-v6.43 login methodrouteros=login('user','password','10.1.0.1',8728,True)
Package: routeros-check
check_routeros - Monitoring MikroTik devicesThis is a monitoring plugin forIcinga,Nagiosand other compatible monitoring solutions to checkMikroTikdevices running RouterOS.
It uses the API to fetch the required information.RequirementsPython>= 3.6Python PackagesClicklibrouterosnagiospluginInstallationPIPIf you want to use pip we recommend to use as virtualenv to install the dependencies.pipinstall-rrequirements.txtCopy the scriptcheck_routeros.pyand the directoryrouteros_checkinto your plugin directory.Debian/UbuntuInstall the required packagessudoapt-getinstallpython3python3-clickpython3-librouterospython3-nagiospluginCopy the scriptcheck_routeros.pyand the directoryrouteros_checkinto your plugin directory.From PyPIInstall the package from PyPI.pipinstallrouteros-checkYou should be able to runcheck_routerosafter the package installation has been finished successfully.NoteYou have to update the command in the icinga CheckCommand example config.UsageTo get the latest help just run the following command../check_routeros.py--helpTo get help for a subcommand just extend the previous command with the subcommand.
In the example below you will see how to get help for thetool.pingsubcommand../check_routeros.pytool.ping--helpSubcommands/ChecksAll commands require at leastapiandreadpermissions.
The permissions documented in the table are additional permissions.SubcommandPermissionsRouterOSDescriptioninterface-6, 7Check interfacesinterface.gre-6Check GRE interfaces/tunnelsinterface.vrrp-6Check the state of an VRRP interfacerouting.bgp.peers-6Check if connection to BGP peers is establishedrouting.ospf.neighbors-6Check if ospf neigbhors are reachablesystem.clock-6, 7Check the time from RouterOS against local timesystem.cpu-6, 7Check the cpu loadsystem.fan-6, 7Check the fanssystem.memory-6, 7Check system memorysystem.ntp.client-6, 7Check the ntp client, offset and stratumsystem.license-6, 7Check the license level and deadline and renewal datesystem.power-6, 7Check the overall power consumption if availablesystem.psu-6, 7Check the current, voltage and state of the power supplysystem.temperature-6, 7Check the cpu, system, board and more temperatures.system.update-6, 7Check for updatessystem.uptime-6, 7Check the uptimetool.pingtest6, 7Run the ping command on the deviceTo get more information about the available subcommands/checks have a look at thecheck_routeros Command ReferenceResourcesGit-Repository:https://github.com/DinoTools/monitoring-check_routerosIssues:https://github.com/DinoTools/monitoring-check_routeros/issuesDocumentation:https://dinotools.github.io/monitoring-check_routerosLicenseGPLv3+
Package: routeros-telegraf-exporter
RouterOS Telegraf metrics exporterRouterOS metrics exporter enables metrics export to TelegrafFree software: MIT licenseDocumentation:https://routeros-telegraf-exporter.readthedocs.io.Featuresmetrics http service with influx inline protocolcli utilities: rte and rte_probeCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-03-10)First release on PyPI.0.1.2 (2020-03-24)First release on Read The Docs
Package: routeros-updates
RouterOS Update Check ToolCheck for and download RouterOS updates on the command line.Download the latest update for the architecture you specifyEcho just the URL to the downloadView patch notesInstall$ pip install routeros-updatesUsageDownload PackageDownload the update package for the given architecture (mipsbe, arm, x86, etc.)Template$ ros-updates download <arch>ExamplesDownload latest mipsbe main package from 'stable' channel$ ros-updates download mipsbeDownload latest optional packages zip for ARM from 'long term' channel and put in /tmp folder:$ ros-updates --channel lts download arm --file /tmpDownload latest ARM main package from 'stable' channel and match directory structure from the update site.
This creates a folder path like./routeros/6.45.5/routeros-arm-6.45.5.npk$ ros-updates download arm --mirrorEcho URLEcho the download URL instead of downloading it.Template$ ros-updates url <arch>ExamplesEcho the URL for the optional packages for the ARM architecture in the 'stable' channel:$ ros-updates url arm --package allEcho the URL for the main package for the x86 architecture in the 'testing' channel:$ ros-updates --channel testing url x86Echo Patch NotesEcho the patch notes for the given channel.Template$ ros-updates notesExamplesEcho patch notes for the 'stable' channel.$ ros-updates notesEcho patch notes for the 'lts' channel$ ros-updates --channel lts notes
Package: routes-1846
::Development on this project has ceased in favor ofhttps://pypi.org/project/routes-18xx/. Whereas routes-1846 was focused specifically on 1846: Race for the Midwest, routes-18xx can support most 18xx games.A library for calculating optimal routes for each train (by revenue) for the board game “1846: The Race For The Midwest”.Usage instructions forthcoming. For now, check out therelated web app.
Package: routesimilarity
Route SimilarityLibrary of python methods to compute similarity between two routes described using lat, lon coordinatesInstallationpipinstallroutesimilarityFor development environments...gitclonegit@github.com:shkr/routesimilarity.gitcdroutesimilarity/
pythonsetup.pydevelopDevelopmentWant to contribute? Submit a PR.TodosOnly directed_hausdorff based on geodesic distance metric available now. Needs more similarity functions..Add Example problems
Package: routeviews-google-upload
RouteViews Google Cloud Storage ClientThis project provides a (Python) client that takes a file and sends it to the Google Cloud Storage solution forthe Google+RouteViews project.InstallThis solution is deployed to PyPI, so you can install it simply using the commandpip install  routeviews-google-upload.pip install routeviews-google-uploadExamplesBelow are a couple of examples showing how to use this tool.Run the tool with the--helpargument to see all the expected and available arguments.Example: gRPC Served via a Cloud Run Instance, with AuthenticationThis example works with our current production environment.This example covers the case when the targeted gRPC server is backed by a Google Cloud Run instance, and requires authentication.
For this workflow, we've added the--key-fileargument.
This argument requires a Google Service Account Key file (tested with a JSON key).routeviews-google-upload --dest grpc.routeviews.org --key-file <your-key.json> --file routeviews.sfmix/bgpdata/2021.03/UPDATES/update.20210331.2345.bz2Example: Local "Debug::Echo" test serverIf you are interested in running the solution end-to-end but don't have a gRPC target server in-mind, then you might
be interested in running a local "debug echo gRPC server".
Fortunately, we have baked a simple gRPC server into this package for testing!
To use this debug server, you'll need two terminals open -- one for theserverand one for theclient.First, in the 'server terminal' window, run therouteviews-google-upload-test-serverCLI tool:routeviews-google-upload-test-server
RouteViews gRPC debug server is running...Then, in the 'client terminal' window, you can run the upload tool with--dest localhost:50051.Expect the server to respond with a failure status (2) and an 'Error Message' that contains the entire request (including the file contents).routeviews-google-upload --dest localhost:50051 --file requirements.txt 
Status: 2
Error Message: DEBUG::ECHO::
    filename: "requirements.txt"
    md5: "1af62f45fdf90b6a1addfb2b86043acb"
    content: "grpcio==1.37.0\ngrpcio-tools==1.37.0\nprotobuf==3.15.8\nsix==1.15.0\n"
    project: ROUTEVIEWS
Package: routexplorer
RouteXploreris a Python library developed to solve the Traveling Salesman Problem (TSP) in complete graphs. Its goal is to find the most efficient sequence of visiting nodes in a graph, minimizing the total distance traveled.Install$pipinstallroutexplorerTry your first RouteXplorer program$python>>>fromroutexplorer.utils.input_readerimportInputReader>>>fromroutexplorer.algorithms.BruteForceSearchimportBruteForceSearch>>># Datas of graph>>>graph=InputReader.read_file(input("Enter file path: "))>>># Calculation of the best path and distance>>>best_path,best_distance=BruteForceSearch.find_best_path(graph,True,True)Create a .txt file450000D0A0000000C
R0B00$Enterfilepath:file/path/file.txt100% [■■■■■■■■■■] - Generating permutations
100% [■■■■■■■■■■] - Checking paths
Best path: ['A', 'D', 'C', 'B'] 
Shorter distance: (14)Key FeaturesEfficient Algorithms: RouteXplorer implements a variety of optimized algorithms to solve the Traveling Salesman Problem, allowing you to find solutions quickly and efficiently.Flexible Customization: The library offers flexible options to customize the algorithm settings, allowing you to adapt the optimization process to the specific needs of your project.Simple Integration: The library is easy to integrate into your existing Python projects, allowing you to leverage its powerful functionality without complications.ContributionRouteXplorer is an open source project and we encourage community contributions. If you want to contribute, please follow the guidelines outlined in the repository's CONTRIBUTING.md file.LicenseRouteXplorer is distributed under the MIT license. For more information, see the LICENSE.md file.
Package: routines
Routines is a simple package that provides a single decorator for you to mark
functions as tasks (routines) that should be executed on a regular schedule.To use, simply do the following:from routines import Routine

@Routine(60)
def my_routine_task(b):
        print b

my_routine_task('Hello!')
my_routine_task('Yay!')As a result of the above, “Hello!” and “Yay!” will print every 60 seconds.
Package: routingblocks
RoutingBlocksRoutingBlocksis an open-source Python package for the implementation of algorithms for Vehicle Routing Problems with
Intermediate Stops.It provides a set of modular algorithmic components and efficient data structures that can be used as building blocks
for problem-specific metaheuristic algorithms. These components are tailored specifically to tackle the challenges of
VRPIS, but can be used for other classes of vehicle routing problems as well.This package is under active development. Expect potentially breaking changes.InstallationThe package is available on PyPI and can be installed usingpip:pipinstallroutingblocksTo obtain the bleeding-edge development version, runpipinstallgit+https://github.com/tumBAIS/RoutingBlocksinstead.FeaturesEfficient C++-based solution representationCustomizable Local Search SolverFramework for ALNS-based metaheuristicsEfficient native implementations of numerous destroy, repair, and local search operatorsMove caches implemented in native code to allow high-performance operator implementations in PythonSupport for customnative extensionsUsageWe provide anexample implementationof an ALNS-based
algorithm for
theEVRPTW-PRas part
of this repository.Further documentation is available
atreadthedocs.ContributingPull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.SeeCONTRIBUTING.mdfor more information and documentation on setting up a development environment.LicenseMIT
Package: routingfilter
RoutingFilterThis is a Python module to handle routing filters based on dictionaries.UsageLoad a rule and check whether an event matches the rule or not.from routingfilter.routing import Routing
routing = Routing()
routing.load_from_dict([test_rule_1])
routing.match(test_event_1)See theonline documentationfor further details.Release steps(If needed) Update the requirements inrequirements.txtandsetup.pyAdd a new entry inCHANGELOG.mdwith the new version numberUpdate the version number insetup.pyCommit and merge the changes intomasterbranchPublish a new release with the version number as a tag: the CI will automatically publish the new version un PyPIBenchmark testsIn order to launch the benchmark tests, runpython routing_benchmark.pyDevelopmentInstallpip install -r requirements.txtandpip install -r requirements_dev.txtin your local virtual environmentSetup pre-commit:pre-commit install -c .github/.pre-commit-config.yamlLicenseThis project is licensed under theGNU LGPLv3license.
Package: routing-ortools-osrm
RoutingDescriptionPackage to useOrtoolscombine withOsrmfor routing.InstallYou should have a OSRM server with the right datasectionOptionsYou can set local search options with params inhttps://developers.google.com/optimization/routing/routing_options#local_search_optionsUsageimport package and set the hostfromroutingoo.routing_data_matriximportRoutingDataMatrixfromroutingoo.vrp_solverimportVrpSolverHOST=my_host# eg "localhost:5000" or "router.project-osrm.org"Set location address in one listadd1='15 Rue Basse Monaco'add2='1 Avenue des Pins Monaco'add3=""" Maison de Stéphanie de Monaco, Avenue Saint-Martin,Monaco-Ville, Monaco, 98000 """locations=[add1,add2,add3]Retrive coordinates and distance and duration infos with Nominatim and OSRMrouting_data_matrix=RoutingDataMatrix(host=HOST)coordinates,points=routing_data_matrix.coordinate_infos(locations)distance_matrix,duration_matrix=routing_data_matrix.distance_duration_matrix_simple_route(points)Use solver to find a heuristicnum_vehicles=1vrp_solver=VrpSolver(num_vehicles)route=vrp_solver.solver_guided_local_search(distance_matrix,time_max)[0]Retrieve the total distance if neededtotal_distance=vrp_solver.compute_total_distance(route,distance_matrix)Model methodsRoutingDataMatrixinit(self, host="localhost:5000")coordinate_infos(self, locations)distance_duration_matrix_simple_route(self, points)VrpSolverinit(self, num_vehicles)create_data_model(self, distance_matrix)compute_total_distance(self, route, distance_matrix, unite_mesure="m", show_log=False)print_solution(self, manager, routing, solution)get_routes(self, manager, routing, solution)solver_guided_local_search(self, distance_matrix, time_max, heuristic_type="FirstSolutionStrategy", heuristic="PATH_CHEAPEST_ARC",max_travel_distance=False, show_log=False)Sample for Osrm server with Monaco data on localhost:5OOORetrieve the data :wget http://download.geofabrik.de/europe/monaco-latest.osm.pbfExtract data :docker run -t -v $(pwd):/data osrm/osrm-backend:latest osrm-extract -p /opt/car.lua /data/monaco-latest.osm.pbfContract data :docker run -t -v $(pwd):/data osrm/osrm-backend:latest osrm-contract /data/monaco-latest.osrmRun your server on localhost:5000 :docker run -t -i -p 5000:5000 -v $(pwd):/data osrm/osrm-backend:latest osrm-routed /data/monaco-latest.osrmTestingusepython -m unittest discover -v:warning: the tests useVCRif you want fresh call to Nominatim and Osrm remove the folder vcr_cassettesResources :https://developers.google.com/optimization/routinghttps://github.com/Xevib/pynominatimhttps://github.com/ustroetz/python-osrm