Saravanan666/pypi-org huggingface dataset:
Package: rpkg
IntroductionThis is the rpkg project, which mostly is a python library for dealing with
rpm packaging in a git source control.  pyrpkg is the base library that sites
can subclass to create useful tools.rpkg works with Python 2.7, 3.6, 3.9, 3.10 and 3.11.LicenseUnless otherwise specified, all files are licensed under GPLv2+.InstallationInstall from distribution packagesrpkg is available in Fedora and EPEL repositories. It can be installed with
package manager command. There is Python 3 package for Fedora and EPEL8;
and Python 2 package in EPEL7.Install in a Fedora system:sudo dnf install python3-rpkgInstall in EPEL7:sudo yum install python2-rpkgInstall in EPEL8:sudo dnf install python3-rpkgInstall in a Python virtual environmentBoth Python 2 and 3 packages are published in PyPI. Install rpkg in a Python 3
virtual environment in these steps:python3 -m venv .env
source .env/bin/activate
pip install rpkg rpm-py-installerYou are free to create a virtual environment with option--system-site-packages.Please note that, rpkg depends on some other utilities to build packages. These
packages are required to be installed as well.mock: for local mockbuild.rpm-build:  for local RPM build, which provides the command linerpm.rpmlint: check SPEC.copr-cli: for building package inFedora Copr.module-build-service: for building modules.ContributionYou are welcome to write patches to fix or improve rpkg. All code should work
with Python 2.7, and 3. Before you create a PR to propose your changes,
make sureSign-off commitMake sure to sign-off your commits bygit commit-s. This serves as a
confirmation that you have the right to submit your changes. SeeDeveloper
Certificate of Originfor details.Run TestsBefore make a pull request, ensure local changes pass all test cases.Before run tests, install these packages:sudo dnf install python27 python36 python39 git make gcc rpm-build \
rpm-devel libcurl-devel krb5-devel openssl-devel python3-develTo run tests simply,make test.By default, targettestruns tests with all supported Python versions.
However, if you look intoMakefile, there is still a targettoxthat
allows developer to run tests with test environments one by one.LinksDocumentation:https://docs.pagure.org/rpkgUpstream GIT:https://pagure.io/rpkgIssue tracker:https://pagure.io/rpkg/issues
Package: rpki-as0-bogons
rpki-as0-bogonsSLURM file generator for bogons with AS0 as origin.This script generates a JSON file compatible withRFC8416to be used for a local validator.The script takes bogon files from theTeam Cymru Bogon Referenceor builds a list of all the networks not assigned according to the officialNRO Delegated Statisticsfile, and turns them into a SLURM file.  All the networks are added to the SLURM file with origin: AS0 and with a default MaxPrefix of 32 for IPv4 and 128 for IPv6.Once loaded in a validator, this file will suggest the validating software to create "fake" ROAs for these networks.  If your network performs origin validation and applies "Invalid: Reject" policies, any BGP announcement of these networks coming from your peers or upstreams should be discarded.InstallationYou can find the software on PyPi, so you can install it easily via pip.# pip3 install rpki-as0-bogonsUsageusage:rpki-as0-bogons[-h][-fDEST_FILE][-P](-N|-C)AscripttogenerateaSLURMfileforallbogonswithoriginAS0

optionalarguments:-h,--helpshowthishelpmessageandexit-fDEST_FILEFiletobecreatedwithalltheSLURMcontent(defaultis/usr/local/etc/slurm.json)-PIncludethelistofIXPLANsfromPeeringDB.WhilesomeofthemalreadyhaveAS0ROAs,notallofthemdo.OverlappingROAsarefine,soitwillbeokaytogeneratethemanyway-NUsetheNROdelegatedstats-CUsetheTeamCymru'sbogonslist

Version0.3.1You have to specify if you want to use the Team Cymru lists (-C) or the NRO delegated stats (-N). For bogons only, use the Team Cymru lists, but if you want to include any network that's not assigned or allocated at the moment, it's better to use the NRO file.Using it with a validatorRoutinatorYou should start routinator with the-xswitch, providing the path to the file (the file is saved by the tool into/usr/local/etc/slurm.json)RIPE NCC Validator 3You can use curl to supply the file to the validator:/usr/local/bin/curl-XPOST-F"file=@slurm.json"localhost:8080/api/slurm/uploadForthUse the--slurmoption when running the software.RecommendationsSince the bogon files are updated daily, a daily run via cron is suggested for this tool.
Package: rpkimancer-aspa
rpkimancer-aspaAnrpkimancerplug-in providing
the ability to read and write example ASPA objects.Installationpython-mpipinstallrpkimancer-aspaUsageObject creation and inspection is provided by therpkincantCLI tool.Seerpkincant --helpfor usage information.For usage as a library, see therpkimancer docs.ContributingAfter making changes to the ASN.1 module source, executemake asn1to update
the patched version in python distribution tree.To setup a development environment with the required test dependencies:python3-mvenv.venv
..venv/bin/activate
pipinstall-rpackaging/requirements-dev.txt
Package: rpkimancer-doa
draft-spaghetti-sidrops-rpki-doaRPKI Discard Origin Authorization. A mechanism to confirm whether a resource
holder authorized a specific tuple of (peer AS, origin AS, prefix, prefixlength
and BGP community) to signal a request to discard traffic.Work in progress repository for Internet-Draft draft-spaghetti-sidrops-rpki-doaUsageDraft documentsThe source files for the Internet-Draft documents are:draft-spaghetti-sidrops-rpki-doa.xmlRpkiDiscardOriginAuthorization-2021.asnTo regenerate the text and HTML versions after making changes, run:makedraftsObject prototypingAnrpkimancerplug-in is also
available, providing the ability to read and write example DOA objects.To install (in the root of your checkout):python3-mpipinstallrpkimancer-doaObject creation and inspection is provided by therpkincantCLI tool.Seerpkincant --helpfor usage information.After making changes to the ASN.1 module source, executemake asn1to update
the patched version in python distribution tree.To setup a development environment with the required test dependencies:python3-mvenv.venv
..venv/bin/activate
python3-mpipinstall-rpackaging/requirements-dev.txt
Package: rpkimancer-sig
draft-ietf-sidrops-rpki-rscWork in progress repository for Internet-Draft draft-ietf-sidrops-rpki-rscUsageDraft documentsThe source files for the Internet-Draft documents are:draft-ietf-sidrops-rpki-rsc.xmlRpkiSignedChecklist-2021.asnTo regenerate the text and HTML versions after making changes, run:makedraftsObject prototypingAnrpkimancerplug-in is also
available, providing the ability to read and write example checklist objects.To install (in the root of your checkout):pipinstall.Object creation and inspection is provided by therpkincantCLI tool.Seerpkincant --helpfor usage information.After making changes to the ASN.1 module source, executemake asn1to update
the patched version in python distribution tree.To setup a development environment with the required test dependencies:python3-mvenv.venv
..venv/bin/activate
pipinstall-rpackaging/requirements-dev.txt
Package: rpki-ov-checker
RPKI Origin Validation CheckerRpki-ov-checkeris a small tool to show what prefixes with what AS Origins
are impacted by theRFC 6811Origin
Validation procedure.The purpose is to quickly identify the operational impact of the various RPKI
validation states.Installationpip3 install git+https://github.com/job/rpki-ov-checkerExample use caseHere we extract routes from an IOS XR device and process them to figure out
which customers we should contact to help them repair their RPKI ROAs or BGP
announcements.# obtain a list of all customer prefixes
$ ssh r02.amstnl02.nl.bb.gin.ntt.net 'show bgp ipv4 uni community 2914:370 | include /' \
    | grep -v /32 | grep -v \( > customers-v4
$ dos2unix customers-v4

# obtain whole BGP RIB
$ ssh r02.amstnl02.nl.bb 'show bgp ipv4 uni | include /' \
    | grep -v /32 | grep -v \( > rib-v4
$ dos2unix rib-v4

# cook the output a bit, screen scraping sucks... I weep gently
$ sed 's/^...//' customers-v4 \
    | awk '{ print $1 }' \
    | egrep "^[0-9]" > customer_prefixes
$ sed 's/^...//;s/ .$//;s/{.*//' rib-v4 \
    | awk '{ print $1 " " $NF }' \
    | egrep "^[0-9]" > full_rib 

# run the checker and filter out customers
$ rpki-ov-checker full_rib | fgrep -f customer_prefixes | grep invalid | sort -R | head
invalid_covered_by_notfound 123.101.0.0/21 4809 covering route: 123.101.0.0/16 4134
invalid_covered_by_valid 46.3.74.0/24 134121 covering route: 46.3.0.0/16 207636
invalid_unreachable 83.231.209.0/24 3949
invalid_unreachable 124.30.247.0/24 9583
invalid_covered_by_valid 125.21.232.0/24 9730 covering route: 125.21.0.0/16 9498
invalid_unreachable 120.29.92.0/24 17639
invalid_unreachable 31.40.164.0/24 200872
invalid_covered_by_notfound 45.12.139.0/24 40676 covering route: 45.12.136.0/22 35913
invalid_covered_by_valid 122.160.178.0/24 24560 covering route: 122.160.0.0/16 24560
invalid_covered_by_valid 61.90.251.0/24 21734 covering route: 61.90.192.0/18 7470invalid_unreachablethe RIB entry is invalid, and no alternativevalidornotfoundroute exists to that set of destination IP addresses. These entries
are the problematic ones.invalid_covered_by_validthe RIB entry is invalid, but covered by avalidroute. The IP addresses covered by the route will remain reachable.invalid_covered_by_notfoundthe RIB entry is invalid, but covered by a
less specific route which isnotfound.CopyrightCopyright (c) 2020 Job Snijdersjob@ntt.net
Package: rpki-vrp-checker
[![Build Status](https://travis-ci.org/job/rpki-vrp-checker.svg?branch=master)](https://travis-ci.org/job/rpki-vrp-checker)
[![Requirements Status](https://requires.io/github/job/rpki-vrp-checker/requirements.svg?branch=master)](https://requires.io/github/job/rpki-vrp-checker/requirements/?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/job/rpki-vrp-checker/badge.svg?branch=master)](https://coveralls.io/github/job/rpki-vrp-checker?branch=master)RPKI VRP CheckerTherpki-vrp-checkerutility takes a set of VRPs (in JSON format)
and applies a number of tests to the VRP set to assess whether
the set conforms to the Network Operator’s expectations.FeaturesCanary checking (assert whether expected ROAs are part of the VRP set)…Usage` $ pip3 installrpki-vrp-checker$rpki-vrp-checker-i./export.json-ccanaries.yaml-bblessed-vrp-set.json$ `PurposeThere are various types of human error, operational failures, or attack
scenarios related to RPKI pipeline operations imaginable. This utility is
intended to be a verification tool between an internal ROA administration and
the RPKI data as published on the Internet.Comparing “ROAs that are expected to exist” with Validated ROA Payloads as
observed from RPKI data can help in cases such as:Resource holder has ARIN IP prefixes, and ARIN CA has [encoding issues](https://www.arin.net/announcements/20200813/)Compromise of RIR systems (sudden appareance of ROAs covering an operator’s resources under the wrong Trust Anchor)Fat fingering during ROA creation process (too many or too little ROAs were actually created compared to the internal administration)
Package: rpl
rplA search/replace utility.rpl replaces strings with new strings in multiple text files. See the man
page rpl(1) for more information. Install rpl usingpip install rpl.rpl is distributed under the terms of the GNU General Public License; either
version 3 of the License, or (at your option), any later version. See the
file COPYING for more details.usage: rpl [-h] [--version] [--encoding ENCODING] [-i] [-m] [-w] [-b] [-q]
           [-v] [-s] [-e] [-F] [--files] [-x GLOB] [-R] [-p] [-f] [-d]
           OLD-TEXT NEW-TEXT [FILE ...]

Search and replace text in files.

positional arguments:
  OLD-TEXT
  NEW-TEXT
  FILE                  `-' or no FILE argument means standard input

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --encoding ENCODING   specify character set encoding
  -i, --ignore-case     search case-insensitively
  -m, --match-case      ignore case when searching, but try to match case of
                        replacement to case of original, either capitalized,
                        all upper-case, or mixed
  -w, --whole-words     whole words (OLD-TEXT matches on word boundaries only)
  -b, --backup          rename original FILE to FILE~ before replacing
  -q, --quiet           quiet mode
  -v, --verbose         verbose mode
  -s, --dry-run         simulation mode
  -e, --escape          expand escapes in OLD-TEXT and NEW-TEXT [deprecated]
  -F, --fixed-strings   treat OLD-TEXT and NEW-TEXT as fixed strings, not
                        regular expressions
  --files               OLD-TEXT and NEW-TEXT are file names to read patterns
                        from
  -x GLOB, --glob GLOB  modify only files matching the given glob (may be
                        given more than once)
  -R, --recursive       search recursively
  -p, --prompt          prompt before modifying each file
  -f, --force           ignore errors when trying to preserve attributes
  -d, --keep-times      keep the modification times on modified files
Package: rplanpy
rplanpySet of python utilities to work with the RPLAN dataset from
"Data-driven Interior Plan Generation for Residential Buildings" paper.DataThis package works with the RPLAN image dataset, which consists of more than 80k floorplan
images of real residential buildings, and can be obtained from the followinglinkExamplesFloorplan image to relation graphCheck an example converting a floorplan to a relation graph with node and edge attibutes increate_graph.py.Truein an edge means there is a door in the connection between two rooms.CitationIf you use this work please cite the original paper which collected the data.@article{wu2019data,
  title={Data-driven interior plan generation for residential buildings},
  author={Wu, Wenming and Fu, Xiao-Ming and Tang, Rui and Wang, Yuhan and Qi, Yu-Hao and Liu, Ligang},
  journal={ACM Transactions on Graphics (TOG)},
  volume={38},
  number={6},
  pages={1--12},
  year={2019},
  publisher={ACM New York, NY, USA}
}
Package: rplot
NAMErplot - stream-based real-time scientific data plotterSYNOPSISrplot [-vcW] [-h n[,n...]] [-m #] [-g unit] [-w range] [-F fps]DESCRIPTIONThis manual page documentsrplot, a stream-based real-time
scientific data plotter written in Python.rplotreads a stream
of data, which is a series of lines, each of which contains one or
more numeric values.rplotinterprets those numbers in the stream
and display a two-dimensional plot for multiple data series
on-the-fly.rplotis a handy tool for visualizing a large amount of scientific
data, which are typically generated from, for instance, an instance of
running computer simulation program.rplotcontinuously read lines from the standard input.  The format
of the input stream is a simple white-space-separated numeric values.
Each field must be a valid string interpretable by Python'sfloat()function.  Every field may be optionally prefixed by a
label, which is automatically parsed and removed byrplot.One notable features ofrplotis that it supports both the GUI and
the CUI mode; i.e., visualization on graphic terminals based on PyGame
(built on SDL library) and visualization on text terminals based on
Curses library.  If you prefer to watch the fine details of scientific
data, runningrplotin the GUI mode is suitable.  On the other
hand, if you prefer to quickly grasp the dynamics of scientific data,
runningrplotin the CUI mode is a better choice since the CUI
mode runs ultra-fast.During the visualization, you can tweak the output ofrplot.  The
current version ofrplotsupports the following commands.0 -- 9Turn on and off the selected data series (e.g., pressing 0 toggles
the display of the first data series).Ctrl-aRewind to the beginning of the input stream.Ctrl-eDisplay all available data stream, which have been already parsed
from the standard input.Ctrl-f, Ctrl-bChange the range of the display window.  Both Ctrl-f and Ctrl-b
enlarge the current window of the display, but the direction of
enlargement is different.fFill all the time series in different colors.q, ESCTerminate therplotprogram.OPTIONSTBDINSTALLATION$pip3installrplotAVAILABILITYThe latest version ofrplotis available at PyPI
(https://pypi.org/project/rplot/) .AUTHORHiroyuki Ohsaki <ohsaki[atmark]lsnl.jp>
Package: rplus-constants-module
Rplus constant moduleTo install requirements to virtual environmentmakepipActivate virtualenvpoetryenvuse$(whichpython)Install dependenciesmakeinstallUpdate dependenciesmakeupdateTo build packagemakebuildTo publish packagemakepublishRegister private url MNCpoetryconfigrepositories.mnc${privateUrl}setting username and password for publishingpoetryconfighttp-basic.mnc${username}${password}
Package: rply
Welcome to RPLY! A pure Python parser generator, that also works with RPython.
It is a more-or-less direct port of David Beazley’s awesome PLY, with a new
public API, and RPython support.You can find the documentationonline.Basic API:fromrplyimportParserGenerator,LexerGeneratorfromrply.tokenimportBaseBoxlg=LexerGenerator()# Add takes a rule name, and a regular expression that defines the rule.lg.add("PLUS",r"\+")lg.add("MINUS",r"-")lg.add("NUMBER",r"\d+")lg.ignore(r"\s+")# This is a list of the token names. precedence is an optional list of# tuples which specifies order of operation for avoiding ambiguity.# precedence must be one of "left", "right", "nonassoc".# cache_id is an optional string which specifies an ID to use for# caching. It should *always* be safe to use caching,# RPly will automatically detect when your grammar is# changed and refresh the cache for you.pg=ParserGenerator(["NUMBER","PLUS","MINUS"],precedence=[("left",['PLUS','MINUS'])],cache_id="myparser")@pg.production("main : expr")defmain(p):# p is a list, of each of the pieces on the right hand side of the# grammar rulereturnp[0]@pg.production("expr : expr PLUS expr")@pg.production("expr : expr MINUS expr")defexpr_op(p):lhs=p[0].getint()rhs=p[2].getint()ifp[1].gettokentype()=="PLUS":returnBoxInt(lhs+rhs)elifp[1].gettokentype()=="MINUS":returnBoxInt(lhs-rhs)else:raiseAssertionError("This is impossible, abort the time machine!")@pg.production("expr : NUMBER")defexpr_num(p):returnBoxInt(int(p[0].getstr()))lexer=lg.build()parser=pg.build()classBoxInt(BaseBox):def__init__(self,value):self.value=valuedefgetint(self):returnself.valueThen you can do:parser.parse(lexer.lex("1 + 3 - 2+12-32"))You can also substitute your own lexer. A lexer is an object with anext()method that returns either the next token in sequence, orNoneif the token
stream has been exhausted.Why do we have the boxes?In RPython, like other statically typed languages, a variable must have a
specific type, we take advantage of polymorphism to keep values in a box so
that everything is statically typed. You can write whatever boxes you need for
your project.If you don’t intend to use your parser from RPython, and just want a cool pure
Python parser you can ignore all the box stuff and just return whatever you
like from each production method.Error handlingBy default, when a parsing error is encountered, anrply.ParsingErroris
raised, it has a methodgetsourcepos(), which returns anrply.token.SourcePositionobject.You may also provide an error handler, which, at the moment, must raise an
exception. It receives theTokenobject that the parser errored on.pg=ParserGenerator(...)@pg.errordeferror_handler(token):raiseValueError("Ran into a%swhere it wasn't expected"%token.gettokentype())Python compatibilityRPly is tested and known to work under Python 2.7, 3.4+, and PyPy. It is
also valid RPython for PyPy checkouts from6c642ae7a0eaonwards.LinksSource code and issue trackerPyPI releasesTalk at PyCon US 2013: So you want to write an interpreter?
Package: rpm
rpm-shimPython RPM shim module for use in virtalenvs.PurposeRPM Python bindings are tied to system RPM installation and are not available as a Python package (on PyPI or elsewhere). This shim module makes it possible to import and use the bindings in a virtualenv.There is no point installing this shim module on a bare system, outside of a virtualenv. It should still work, but there is no benefit. If you want to do that anyway, pay attention not to overwrite installed RPM Python bindings.ExampleHere is a scenario of how this module enables usage of RPM Python bindings in a newly created virtualenv. First commands are run on a host system.# make sure RPM Python bindings are installed and functional$rpm-qpython3-rpm
python3-rpm-4.18.0-1.fc37.x86_64

$piplist
PackageVersion
-----------------
rpm4.18.0

$python-c"import rpm; print(rpm.__version__)"4.18.0# let's create a virtualenv$python-mvenvenv
$sourceenv/bin/activate# the bindings are not accessible there(env)$python-c"import rpm; print(rpm.__version__)"Traceback(mostrecentcalllast):File"<string>",line1,in<module>
ModuleNotFoundError:Nomodulenamed'rpm'# install the shim module from PyPI(env)$pipinstallrpm
...
Successfullyinstalledrpm-0.1.0# now we can import the bindings(env)$python-c"import rpm; print(rpm.__version__)"4.18.0
Package: rpmdeplint
rpmdeplintRpmdeplint is a tool to find errors in RPM packages in the context of their
dependency graph.RequirementsPython 3.9External DependenciesIn order to run the tool, the following pre-requisites need to be installed:rpmlibrepolibsolvFor development and tests:sphinxrpmfluffDocumentationhttps://fedora-ci.github.io/rpmdeplintRPM buildshttps://copr.fedorainfracloud.org/coprs/g/osci/rpmdeplint
Package: rpmdyn
rpmdynAlternative dynamic RPM bindings for Python.rpmdynOverviewUsageLicenseOverviewrpmdynprovides an alternative means of using therpmlibrary from Python
via dynamic binding (FFI).This project is intended to support testing Python code based on therpmlibrary in CI or development environments where installing official bindings is
too much of a hassle. You may find it useful if you have triedrpm-py-installerand ran into problems with it.⚠️Major caveat⚠️: the provided RPM bindings arefar from complete!
Bindings have been implemented "on demand" to fit the author's needs.Here's a comparison between a few different ways of accessing RPM Python
bindings to help you understand if this project may be of use to you:OS packagerpmdynrpm-py-installerpip-installable from PyPI?❌✅✅Usable in virtualenv?❌¹✅✅Supports multiple Python versions?❌²✅✅No compilers/headers needed?✅✅❌³Secure supply chain?✅✅❌⁴Complete bindings?✅❌⁵✅Only usable if you enable system site-packages, which is generally unacceptable.While there are no hard and fast rules around what kinds of packages a Linux distribution
provides, it is common for a distribution to choose one primary supported Python version
and only provide libraries for that version.rpm-py-installerworks by compiling RPM bindings and thus needs a compiler.rpm-py-installerdownloads RPM sources insecurely with no validation of checksums
or signatures. This is an issue if you only want to use known versions of all dependencies,
and will not work at all in a firewalled setup (e.g. which only allows access to an internal
PyPI registry).rpmdynimplements only a small subset of RPM bindings, as bindings need to be implemented
manually. The set of available bindings reflects the needs ofrpmdyncontributors.UsageInstallrpmdynand it will automatically be used by default:if real (native) RPM bindings are available, thenimport rpmwill use those.otherwise,import rpmwill userpmdyn.This is achieved via a PTH hook. If you wish to disable this behavior,
set theRPMDYN_HOOKenvironment variable to0.LicenseThis program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.