Saravanan666/pypi-org huggingface dataset:
Package: route53-to-cloudformation
A tool for dumping an existing Route53 Hosted Zone out as a CloudFormation
YAML template. This can be useful for migrating the hosted zone into control
under CloudFormation.InstallationFrom pip:pipinstallroute53-to-cloudformationUsageCall the tool with the ID of the hosted zone you wish to convert into a fresh
CloudFormation template. It will output it on stdout, so you can inspect it,
or pipe it into a file.$route53-to-cloudformationABC123|head-n3AWSTemplateFormatVersion:2010-09-09Description:DNSforexample.comResources:$route53-to-cloudformationABC123>mytemplate.ymlHistoryPendingNext version release notes here
Package: route53-transfer
Backup and restore Route53 zones, or transfer between AWS accounts.Installationpip install route53-transferUsageBackup a zoneBackup theexample.comzone to aCSVfile.route53-transfer backup example.com backup.csvUse STDOUT instead of a fileroute53-transfer backup example.com -Restore a zoneRestore theexample.comzone from aCSVfile.route53-transfer load example.com backup.csvUse-to load from STDIN instead.Migrate between accountsUse the command line switches to override the access and secret keys.
Dump from one account, load into another.route53-transfer --access-key-id=ACCOUNT1 --secret-key=SECRET dump example.com
route53-transfer --access-key-id=ACCOUNT2 --secret-key=SECRET load example.com
Package: route53-transfer-ng
Quickly backup and restore AWS Route53 DNS zones.## Motivationroute53-transfer-ngstarted as a pull-request to [route53-transfer](https://github.com/cosmin/route53-transfer)
and slowly turned into a port to boto3 of that software, and then finally
a complete rewrite.I intentionally avoided retaining compatibility with the original code.
In fact, route53-transfer-ng does not use the CSV format anymore, as that
wouldn’t easily allow support for all the Route53 routing policies and features.## Installationpip install route53-transfer-ng## UsageList all the hosted zones in the current AWS account (use theAWS_PROFILEenvironment variable to control which account is active):route53-transfer-ng zonesBackup theexample.comzone to a YAML file:route53-transfer-ng dump –format yaml example.com example.com.yamlUse STDOUT instead of a file:route53-transfer-ng dump –format yaml example.com -Restore theexample.comzone from a YAML file:route53-transfer-ng load –format yaml example.com example.com.yamlTo perform a dry run load, add the–dry-runoption switch.
The command will show the changes that would be made to the R53 zone without
carrying out any operation.route53-transfer-ng –dry-run load example.com example.com.yamlIt’s possible to use upsert operations when performing a route53 change
operation, instead of the default DELETE + CREATE of recordsets.
To enable this behaviour, supply the–use-upsertsoption.route53-transfer-ng –dry-run –use-upserts load example.com example.com.yamlUse-as filename to load from STDIN instead.Migrate between accounts:Use theAWS_PROFILEenvironment variable to change the AWS account to be used
by route53-transfer-ng. Dump from one account, load into another.AWS_PROFILE=aws_account1 route53-transfer dump example.com test.yaml
AWS_PROFILE=aws_account2 route53-transfer load example.com test.yaml## CreditsThanks to Cosmin Sterejan for the original [route53-transfer](https://github.com/cosmin/route53-transfer)
that I used for some time as-is and then as base and inspiration for this boto3
“ng” version.
Package: route53weightedrecords
route53_weighted_recordsPython package to manage over 100 weighted records under one url in AWS Route53.The Problem This Package SolvesIf you want to distribute requests to more than 100 endpoints behind a single
url in Route53, you have to manage a tree-like structure of records since
Route53 only supports up to 100 alternative responses for a single record.http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/TutorialManagingOver100WRR.htmlThis library provides a simple create/delete interface for your url, and manages
the tree structure behind the scenes.UsageConfigure AWS CredentialsFirst make sure boto has the correct access previleges to modify your Route53 records.
The permssions can be configured through any of the means listed here:http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.htmlCode Examplesfrom route53weightedrecords import Route53Manager

# Create the manager (replace the hosted zone id and url with your own)
manager = Route53Manager("my-hosted-zone-id", "my-cool-url.com.")

# Create the record sets
manager.create_record_sets(["192.168.1.1", "192.168.1.2", "192.168.1.3"])

# The DNS entries should now show up in your Route53 console the proper weights!

# Delete the record sets
manager.delete_record_sets(["192.168.1.1", "192.168.1.2", "192.168.1.3"])ConsiderationsThis package assigns all responses the same weight so requests to the url will be
equally balanced between the ips you add.  You cannot configure the weight of specific
responses at this time.This package only supports up to 10,000 weigted records for a given url, not the full
1,000,000 records that AWS allows.The Route53 has a rate limit of 5 requests per second, so make sure to adhere to that limit.Future WorkSupport up to 1,000,000 responses for a single url.Support weights when inserting reponses for a url.
Package: route-detect
route-detectFind authentication (authn) and authorization (authz) security bugs in web application routes.Web application HTTP route authn and authz bugs are some of the most common security issues found today. These industry standard resources highlight the severity of the issue:2021 OWASP Top 10 #1 -Broken Access Control2021 OWASP Top 10 #7 -Identification and Authentication Failures(formerly Broken Authentication)2019 OWASP API Top 10 #2 -Broken User Authentication2019 OWASP API Top 10 #5 -Broken Function Level Authorization2022 CWE Top 25 #14 -CWE-287: Improper Authentication2022 CWE Top 25 #16 -CWE-862: Missing Authorization2022 CWE Top 25 #18 -CWE-306: Missing Authentication for Critical Function#21 most CVEs by CWE -CWE-284: Access Control (Authorization) Issues#47 most CVEs by CWE -CWE-639: Access Control Bypass Through User-Controlled KeyRoutes fromkoelstreaming serverSupported web frameworks (route-detectIDs in parentheses):Python: Django (django,django-rest-framework), Flask (flask), Sanic (sanic)PHP: Laravel (laravel), Symfony (symfony), CakePHP (cakephp)Ruby: Rails* (rails), Grape (grape)Java: JAX-RS (jax-rs), Spring (spring)Go: Gorilla (gorilla), Gin (gin), Chi (chi)JavaScript/TypeScript: Express (express), React (react), Angular (angular)*Rails support is limited. Please seethis issuefor more information.InstallingUsepipto installroute-detect:$ python -m pip install --upgrade route-detectYou can check thatroute-detectis installed correctly with the following command:$ echo 'print(1 == 1)' | semgrep --config $(routes which test-route-detect) -
Scanning 1 file.

Findings:

  /tmp/stdin
     routes.rules.test-route-detect
        Found '1 == 1', your route-detect installation is working correctly

          1┆ print(1 == 1)


Ran 1 rule on 1 file: 1 finding.Usingroute-detectprovides theroutesCLI command and usessemgrepto search for routes.Use thewhichsubcommand to pointsemgrepat the correct web application rules:$ semgrep --config $(routes which django) path/to/django/codeUse thevizsubcommand to visualize route information in your browser:$ semgrep --json --config $(routes which django) --output routes.json path/to/django/code
$ routes viz --browser routes.jsonIf you're not sure which framework to look for, you can use the specialallID to check everything:$ semgrep --json --config $(routes which all) --output routes.json path/to/codeIf you have custom authn or authz logic, you can copyroute-detect's rules:$ cp $(routes which django) my-django.ymlThen you can modify the rule as necessary and run it like above:$ semgrep --json --config my-django.yml --output routes.json path/to/django/code
$ routes viz --browser routes.jsonContributingroute-detectusespoetryfor dependency and configuration management.Before proceeding, install project dependencies with the following command:$ poetry install --with devLintingLint all project files with the following command:$ poetry run pre-commit run --all-filesTestingRun Python tests with the following command:$ poetry run pytest --covRun Semgrep rule tests with the following command:$ poetry run semgrep --test --config routes/rules/ tests/test_rules/
Package: route-distances
route-distancesThis repository contains tools and routines to calculate distances between synthesis routes and to cluster them.This repository is mainly intended for developers and researchers. If you want a fully functional tool that is easy to use,
please consider looking into theAiZynthFinderproject.PrerequisitesBefore you begin, ensure you have met the following requirements:Linux, Windows or macOS platforms are supported - as long as the dependencies are supported on these platforms.You have installedanacondaorminicondawith python 3.9 to 3.11The tool has been developed on a Linux platform, but the software has been tested on Windows 10 and macOS Catalina.InstallationFor usersSetup your python environment and then runpip install route-distancesFor developersFirst clone the repository using Git.Then execute the following commands in the root of the repositoryconda env create -f conda-env.yml
conda activate routes-env
poetry installtheroute_distancespackage is now installed in editable mode.UsageThe tool will install thecluster_aizynth_outputthat is used
to calculate distances and clusters for AiZynthFinder outputcluster_aizynth_output --files finder_output1.hdf5 finder_output2.hdf5 --output finder_distances.hdf5 --nclusters 0 --model tedThis will perform TED calculations and add a columndistance_matrixwith the distances and columncluster_labelswith the cluster labels for each route to the output file.An ML model for fast predictions can be found here:https://zenodo.org/record/4925903.This can be used with thecluster_aizynth_outputtoolcluster_aizynth_output --files finder_output1.hdf5 finder_output2.hdf5 --output finder_distances.hdf5 --nclusters 0 --model chembl_10k_route_distance_model.ckptFor further details, please consult thedocumentation.DevelopmentTestingTests uses thepytestpackage, and is installed bypoetryRun the tests using:pytest -vDocumentation generationThe documentation is generated by Sphinx from hand-written tutorials and docstringsThe HTML documentation can be generated byinvoke build-docsContributingWe welcome contributions, in the form of issues or pull requests.If you have a question or want to report a bug, please submit an issue.To contribute with code to the project, follow these steps:Fork this repository.Create a branch:git checkout -b <branch_name>.Make your changes and commit them:git commit -m '<commit_message>'Push to the remote branch:git pushCreate the pull request.Please useblackpackage for formatting, and followpep8style guide.ContributorsSamuel GenhedenThe contributors have limited time for support questions, but please do not hesitate to submit an issue (see above).LicenseThe software is licensed under the MIT license (see LICENSE file), and is free and provided as-is.ReferencesGenheden S, Engkvist O, Bjerrum E (2021) Clustering of synthetic routes using tree edit distance. J. Chem. Inf. Model. 61:3899–3907https://doi.org/10.1021/acs.jcim.1c00232Genheden S, Engkvist O, Bjerrum E (2022) Fast prediction of distances between synthetic routes with deep learning. Mach. Learn. Sci. Technol. 3:015018https://doi.org/10.1088/2632-2153/ac4a91
Package: routedsl
Python eDSL for your Web RoutespipinstallroutedslCompose everything in one placeroutes=Routes()(GET/'users'/('user_id',User,"User identifier")|HEADERS|Headers|RETURNS|JSON[User]|HANDLER|get_user_info|GUARDS|(Headers.content_type|IS|'application/json')|DOCS|"""Get a user profile in JSON format""")(POST/'users'/('user_id',User)|HEADERS|Headers|PAYLOAD|JSON[User]|RETURNS|OK[JSON[bool]]|HANDLER|update_user_info)or define pieces separately, then assemble your routing map:DefaultHeaders=HEADERS|HeadersDefaultHandler=HANDLER|default_handlerDefaultEndpoint=GET/DefaultHeaders|DefaultHandlerroutes=Routes()|DefaultEndpointUse nesting under common prefixroutes=(routes/'users'/('user_id',User))(POST/'edit'|HEADERS|Headers|RETURNS|JSON[User]|HANDLER|update_user_info)Read more inOfficial Documentation.
Package: route-gym
Route-GymAn openai gym that allows agent to solve shortest and longest route problems.These simples are simple for humans, and can be computed easily by hand using Dijkstra's algorithm
and its variants like A* (computation time permitting). As we work towards AGI, it is of my opinion that our complicated general-purpose
algorithms should be asked to solve these simple problems. If convergence is slow, or if the supposedly
"general" algorithm can't solve it easily,
it is safe to say that that algorithm should be reworked.Quickstartenv = ShortestRouteEnv(nx.frucht_graph(), 0, 5, random_weights=(1,10))
env.render()    # optionnal
done = False
# you might want to give the adjacency matrix to the policy
policy = ?
rew = 0
position = origin
while not done:
    action = policy.predict(position)
    position, reward, done, _ = env.step(action)
    end.render()    # optionnal
    rew += reward
print("Final reward:", rew)
print("Dijkstra's reward:", env.graph.dijkstra_rew)What is provided in this gym?The environment:The two environments are based netonOpenAI'sgym.The environment can be called usingroutegym.env.ShortestRouteEnvor the equivalent for the longest route version.The environments have arenderfunction you can use to display the environment's state. In it, the blue path on the
graph's arcs represents Dijkstra's path. This only works forShortestRouteEnv.The environments receive anetworkxgraph, an origin, a goal, and random weight
boundaries (if need be) as part of their constructor.You can also set themake_horizonflag toTrueto transform the graph
into a finite-horizon problem. Be warned that this should only be used on smaller graphs: this generates a tree out
of all the possible paths the agent can take fromorigintogoaland merges them into a single graph. Needless to say,
the big O of this thing is enormous! This flag should only be used for toy examples.The Graph classThe environments use a custom graph class as a backend. A typical user should not need to interact with this class.But this class does calculate the Dijkstra solution for the problem. If you want to compare your algorithm's performance
to Dijkstra's, you can useenv.graph.dijkstra_pathto get Dijkstra's path, orenv.graph.dijkstra_rewto get Dijkstra's reward.The validate scriptThis is an internal test, but it is provided as a courtesy to the users. You can get inspiration from that script, either
as a tutorial on how to use this package, or as a way to generate many environments, etc.You can view it inroutegym.validate.py.
Package: route-halo
IntroductionHalo is an open-source OSM (OpenStreetMap) route optimization engine. Built on FastAPI, this RESTful backend provides efficient route calculation and data processing. Leveraging SQLAlchemy for database management and Redis for fast data access, the project maximizes performance.Key FeaturesRoute Optimization: Utilizes OSM data to provide accurate route optimization.High-Performance Backend: Developed with FastAPI for fast and efficient service.Data Management: Supports structured database management with SQLAlchemy.Caching Mechanism: Enhances repetitive data request processing speeds using Redis.Technology StackFastAPI: A modern, fast web framework for easy API development.SQLAlchemy: Offers powerful SQL toolkit and ORM (Object-Relational Mapping).Redis: A high-performance key-value store used for data caching.OpenStreetMap: Provides map data necessary for route optimization, free to use.Installation and Executiongitclonehttps://github.com/yourusername/halo.gitcdhalo
docker-composeup-dExample ERDhttps://www.erdcloud.com/p/f5MEA63DBzZb7cCJ9
Package: routelog
routelog is a flexible execution-based log processing program and Domain
Specific Language. routelog takes a rules file in the following format:/pattern/    command $1 $2And operates on one or more log files, executingcommand $1 $2for all
lines matching the regular expression/pattern/substituting the first and
second items in the log line for$1and$2respectively. A rules file
with the following directive:/ERROR/      echo "$*" | mail -s "Error executing ${3%:} on $2 at $1" error@example.comWould process a log entry like:2012-12-07T12:06:11-05:00 server1 program_name: ERROR fooand send an email toerror@example.comwith the subject:Error executing program_name on server1 at 2012-12-07T12:06:11-05:00'and the body:2012-12-07T12:06:11-05:00 server1 program_name: ERROR fooRules files are processed by the routelog program:routelog mail-errors.rules /var/log/*.logThe routelog program acts as a filter, passing all log lines to stdout, which
is useful for doing additional processing in a single pipeline:routelog mail-errors.rules /var/log/*.log | bzip2 > todays-logs.`date +%s`.bz2For more on rules files, seeman 5 routelog, for more on routelog seeman 1 routelog.InstallingThe routelog project lives ongithub, and is available viapip.Installing v0.1 From Pipsudo pip install routelog==0.1Installing v0.1 From Sourcewget https://github.com/axialmarket/routelog/archive/routelog-0.1.tar.gz | tar vzxf -
cd routelog-0.1
sudo python setup.py installUsageroutelog [-h|--help] [-c|--comments] [-n|--no-output] rules_file [ log_file [...]]Optional Arguments-h, –helpPrint an extended usage to stdout and exit.-c, –commentsTreat comments in log lines (anything following a ‘ #’) as arguments, rather
than ignoring them.-n, –no-outputSuppress the (default) behavior of printing each log line to stdout.More documentation is available via for the routelog program
(man 1 routelog) and routelog rules file formats (man 5 routelog)
after install.Licenseroutelog is made available for use under a 3-clause BSD license (see:
LICENSE.txt in the package).AuthorsMatthew Story (matt.story@axial.net)
Package: route-logger-fastapi-middleware
FastAPI Route LoggerUsagefromtypingimportUnionfromfastapiimportFastAPIfromroute_logger_middlewareimportGlobalLoggerMiddlewarefromroute_logger_middleware.backends.mqtt_backendimportMQTTBackendapp=FastAPI()backend=MQTTBackend(hostname="localhost",topic="logs")app.add_middleware(GlobalLoggerMiddleware,backend=backend,module_name="my-awesome-app")@app.get("/")defread_root():return{"Hello":"World"}@app.get("/items/{item_id}")defread_item(item_id:int,q:Union[str,None]=None):return{"item_id":item_id,"q":q}
Package: routely
RoutelyTravis build Python 3.6, 3.7, 3.8.IntroCommon operations and transformations on routes represented by a 2D line in xy spaceRoute is designed to provide many of the common route operations and transformations to make route processing simpler and quicker.A route is represented by a series of point coordinates on a two dimensional x-y plane. Z-axis data can be specified as well, however the primary focus of these common transformations are based on the x-y plane data with z-axis data being transformed accordingly.The primary focus is on x-y plane data because z-axis data does not have to represent a path through three dimensional space, rather z-data can represent additonal layers of route data that correspond to the x-y path.For example, a runner may be tracking pace or heartrate, a car will have changes in speed, etc. Therefore, transformations are primarily concerned with the x-y route taken.InstallationpipinstallroutelyQuick startTo begin with, let’s define a path that comprises two lists of x and y points that together form the coordinates of the line.# x and y coordinates of a path.x=[-5,5,15,25,20,0]y=[0,10,40,15,5,20]To make use of Routely, we can pass these lists of x and y points to Routely’s Route class.fromroutelyimportRouter=Route(x,y)# Plot x vs yr.plotroute()You can add z-axis data too, which should be passed as a dictionary. This enables you to have one or more z-axis datasets.# Add a few z-axis datasetsz1=[0,1,2,3,4,5]z2=[0,1,2,3,2,0]# z-axis data must be passed as a dictionaryz_data={'foo':z1,'bar':z2}r=Route(x,y,z=z_data)# Plot z-axis data# Note that z-axis data is plotted against the distance along the router.plot_z()Using the Route object, you can now quickly and easily get key properties of the route data such as:# Get the bounding box and center coordinates of the router.bbox()((-5,0),(25,40))r.center()(10.0,20.0)# The absolute width, height and centerof the router.width()30r.height()40
Package: routemap
As basemap is no longer maintained and almost impossible to install, this project
now uses Cartopy.Generates a nice looking map of a route from various sources. Here is an
example.Requires python >= 3.5Requires proj, libgeos and tkinter to be installed. On Debian:sudo apt install proj-bin libproj-dev libgeos-dev cython python3-tkIf running headless on a server, then python3-tk is not needed.Use pip to install the following packages:pip install numpy
pip install shapely --no-binary shapely
pip install matplotlib
pip install cartopyFinally install routemap.:pip3 install routemapUsageroutemap [-h] [-t TITLE] [-o OUTPUT] [-c CURRENT] [-cl CURRENT_LABEL] [-d] [-st STARTTAG] [-et ENDTAG] [-q QUALITY] [--dpi DPI] [--paper PAPER] [--version]        filepositional arguments:file Input file. rtx or bvs files accepted.
     Also accepts a url that returns a json formatted list of positions.
     e.g.
    {
        "positions": [
            "2019-09-17 00:00:01,41.37,2.187",
            "2019-09-17 01:00:02,41.37,2.187",
            "2019-09-17 02:00:02,41.37,2.187",
            "2019-09-17 03:00:01,41.37,2.187",
            "2019-09-17 04:00:02,41.37,2.187",
            "2019-09-17 05:00:02,41.37,2.187",
            "2019-09-17 06:00:01,41.37,2.187",
            "2019-09-17 07:00:02,41.37,2.187",
            "2019-09-17 08:00:02,41.37,2.187"
        ]
    }optional arguments:-h, --help            show this help message and exit
-t TITLE, --title TITLE
                     A custom title for the chart if the generated one is crap
-o OUTPUT, --output OUTPUT
                     Output file. Defaults to current directory
-c CURRENT, --current CURRENT
                    Indicate current position.
                    Pass the position with the option as a string representing the position or a url. eg:-
                    -c "52 23.5N 36 18.1W"
                    or
                    -c http://some.url.com/positions

-cl CURRENT_LABEL, --current_label CURRENT_LABEL
                    A label for the current position
 -d, --display      Display image in window. Defaults to no image displayed

 -st STARTTAG, --starttag STARTTAG
                    A custom tag for the first position

 -et ENDTAG, --endtag ENDTAG
                    A custom tag for the last position

 -q QUALITY, --quality QUALITY
                    The quality of the rendered map, defaults to 'i':-
                      c = crude,
                      l = low,
                      i = intermediate,
                      h = high,
                      f = full.
                    Be warned, anything higher than -i takes a long time to render

 --dpi DPI          The DPI of the saved map, defaults to 600 (pretty big)
 --paper PAPER
                    Size of paper saved map is intended to be printed on.
                    Accepts standard sizes such as a4, a3, letter etc.
                    Default is a3

 --version          Print the version and exit
Package: routemaster-prometheus
Usage, in your Routemaster configuration file:plugins:logging:-class:routemaster_prometheus.logger:PrometheusLoggerkwargs:path:/metricsThis package is based on the official Python Promeutheus bindings in``prometheus_client`<https://pypi.org/project/prometheus_client/>`_. In order
for that package to operate in a multithreaded program such as Routemaster,
the environment variableprometheus_multiproc_dirmust be set to a writeable
directory for temporary files. It does not need to be backed up as nothing
is persisted between application launches.This is already done for you in thethread/routemasterDocker image
provided, but when deploying in a custom way you may wish to change this
directory.