Saravanan666/pypi-org huggingface dataset:
Package: nr.pylang.ast
Note: This package is in the dangerous land of0.x.yversions and may be subject to breaking
changes with minor version increments.nr.pylang.astThis package provides tools for processing the AST as generated by the Pythonastmodule.Module:dynamic_evalThis module provides an AST rewriter that takes and Read/Write operations on
global variables and rewrites them to retrieve the variable by a function
instead. Non-global variables are left untouched.Example:importosfromosimportpathparent_dir=path.dirname(__file__)defmain():filename=path.join(parent_dir,'foo.py')print(filename)Will be converted to:importos;__dict__['os']=osfromosimportpath;__dict__['path']=path__dict__['parent_dir']=__dict__['path'].dirname(__dict__['__file__'])defmain():filename=__dict__['path'].join(__dict__['parent_dir'],'foo.py')__dict__['print'](filename)Copyright © 2020 Niklas Rosenstein
Package: nr.pylang.utils
Note: This package is in the dangerous land of0.x.yversions and may be subject to breaking
changes with minor version increments.nr.pylang.utilsUtilities for Python constructs (class and function definitions, exception
handling, modules and type annotations).Note:typingis an optional dependency and is thus not listed in the
requirements for this package.Copyright © 2020 Niklas Rosenstein
Package: nr-pypackage
# About
This project is about creating standardized python projects. We provide standard templates for multiple types of python projects. It is intended to be replicate most features from [ansrivas/protemplates](https://github.com/ansrivas/protemplates) and this project was created using that library.The scope of this project is as follows:It is only for Python projects and packages.We provided options to create entire python packages including:
* Source code templates
* Test templates
* Envrionment creation and managementWe provide options to create modules and submodules based on popular libraries including:
* Flask
* Flask-blueprints
* Flask-database integrationCurrent Features Include:Easy pip installation with a cliCreating a python package: Simple supportCreating a python package: Flask supportCreating a python package: Flask with Blueprints supportThis repository is Python 3 compatible only.## Current Stable Version` 0.3.0 `## Installation
### pip` pip installnr-pypackage==0.3.0--user--upgrade`### Development Installation
* Clone the project.
* Install in Anaconda3 environment
* This command creates a python environment and then activates it.` $ make recreate_pyenv && chmod +xactivate-env.sh&& .activate-env.sh`* Now install the application in editable mode and you are ready to start development` $ pip install-e. `## Test
To run the tests:` make test `## Usage
After installing via Pip, run the following command and follow the instructions.`nr-pypackage-cli`## License
MIT
Package: nr.python.environment
nr.python.environmentUtilities to work with Python environments.APIfunctionnr.python.environment.distributions.get_distributions(): Dict[str, Distribution]Returns all distributions that can be found in the current Python environment. This can be useful to build a dependency
graph or to collect the license of all packages used.CLIpython -m nr.python.environment.distributionsProduce a CSV or JSON list of all distributions in the current Python environment. It can be used for
example to get an overview of the different types of licenses for the Python packages installed in an environment:$ python -m nr.python.environment.distributions  | jq .license_name -r | sort | uniq
Package: nrql-cli
An interactive command line interface for querying New Relic Insights event data.AboutThe New Relic Insights query API is a REST API for querying Insights
event data. After you supply a standard NRQL query via HTTPS request,
the query API returns a JSON response for parsing.To use the API, you need a query key. You can have multiple query keys,
and any query key can be used to initiate any Insights API query. If you
have multiple systems querying Insights or different data destinations,
New Relic recommends you use multiple query keys to enhance data
security.To create a new query key:Go toinsights.newrelic.com>
Manage data > API keys.Select the plus icon next to the Query keys heading.Enter a short description of the key.Select Save your notes.You will also need make note of your New Relic Account ID. To find the
account ID for your New Relic account:Sign in torpm.newrelic.com.In the URL bar, copy the number after the /accounts/ portion of the
URL:https://rpm.newrelic.com/accounts/ACCOUNT_ID/Installationnrql-cli is available on the Python Package Index (PyPI) athttps://pypi.python.org/pypi/nrql-cliYou can install nrql-cli using pip.pip install nrql-cliExport yourQuery API
keyandAccount
IDas environment variables:exportNR_API_KEY='YOUR_API_KEY'exportNR_ACCOUNT_ID='YOUR_ACCOUNT_ID'Then, run:nrqlThis command will start the program and you can start querying your
data!Alternatively, you can run in Docker. You will need to update theDockerfilewith your API key and account id and then run:dockerbuild-fDockerfile-tnrql-cli.dockerrun--rm-itnrql-cliUsageusage: nrql [-h] [--region {EU,US}] [--env ENV] [--verbose]

optional arguments:
  -h, --help            show this help message and exit
  --region {EU,US}, --r {EU,US}
                        Pass this flag to set your region (EU or US) By
                        default the region is set to US.
  --env ENV, --e ENV    Environment handler.
  --verbose, --v        Pass this flag if you want the whole response.Managing multiple accountsIf you wish to easily switch between your New Relic accounts, you can
use the--envswitch:nrql--envPRODBy default, the program looks for the environment variablesNR_API_KEYandNR_ACCOUNT_KEY.If theenvargument is not none, then the program appends the
environment string toNR_API_KEY. For example:NR_API_KEY_PRODWhen naming your environment variables, ensure to follow this naming
convention.SupportPlease note that this is offered for use as-is without warranty. You are
free to use and modify as needed. It has been created for use with New
Relic, but is not a supported product of New Relic
Package: nr.refreshable
nr.refreshableProvides theRefreshableclass. A refreshable is a thread-safe container for a value that changes
over time. Refreshables can be subscribed to, to be notified when they are updated, and mapped to
compute new values and cache them as the parent gets updated.Examplefromnr.refreshableimportRefreshableroot=Refreshable(42)child=root.map(lambdan:n+10)assertchild.get()==52root.update(100)assertchild.get()==110Copyright © 2021 Niklas Rosenstein
Package: nrresqml
NR ResQmlThis Python package converts a Delft 3D output file on NetCDF4 format to a ResQml databaseThe package supports accessing Delft 3D files on the file system or via an OpenDAP serverOutput generated by this package is an .epc file (zip archive) representing the data objects of the ResQml database and an .h5 file containing all relevant data. When running the module, the path to a valid and empty output directory must be provided (any missing directories will be created).Launching the package from the command line can be done as follows:python -m nrresqml /path/to/delft3d.nc /path/to/output/directoryThe input path may also be a url to a .nc file on an OpenDAP server.
Package: nrslib
nrslibThis library is a modular, end-to-end pipeline for news recommender systems.Quick StartMain TechnologiesFamilarity with the follow tools are recommended to use this library.PyTorch Lightning- a lightweight PyTorch wrapper for high-performance AI research. Think of it as a framework for organizing your PyTorch code.Hydra- a framework for elegantly configuring complex applications. The key feature is the ability to dynamically create a hierarchical configuration by composition and override it through config files and the command line.TorchMetrics- a collection of 80+ PyTorch metrics implementations and an easy-to-use API to create custom metrics.Lightning-Hydra-Template- A clean and scalable template to kickstart your deep learning project.Running a modelImport the libraryimportnrslibExport default configsnrslib.export_default_config(“~/configs”)Choose and edit configs in the open console dialog and start training afterwardsnrslib.start_train(“~/configs”,[“experiment=naml.yaml”])To test a model, runnrslib.start_test(“~/configs”,[“experiment=naml.yaml”])To extend a model or datamodule inherit itfromnrslib.src.models.namlimportNAMLclassImprovedNAML(NAML):Then adjust the configurations to use the new class_target_:path.to.class.ImprovedNAML
Package: nr-stream
nr-streamThis package provides utilities for writing functional-style code in Python. The package originally contained only
theStreamclass, hence the name, but since we've adopted the terminology for letting usstreamlinelarge chunks
of our code.APIOptional objectsRepresents an optional value, i.e. one that either has a valid value or isNone. The class is useful to
chain modifications and have them execute based on whether a value is available or not.Exampleimportosfromnr.streamimportOptionalopt=Optional(os.getenv("SOMEVAR"))value=opt.or_else_get(lambda:do_something_else())value=opt.or_else_raise(lambda:Exception("SOMEVAR not set"))opt=opt.map(lambdavalue:value+" another value")len(opt.stream().count())# 0 or 1Refreshable objectsA Refreshable is a container for a value that can be updated and inform listeners. A chained operations on a
refreshable will be replayed if the parent refreshable is updated. This is eager evaluation, not lazy evaluation
and allows performant calls to.get()without going through a lazy chain of operations each time.UnlikeOptionalorStream, theRefreshableknows no "empty" state.This class is often useful to pass configuration data around in your application. It allows making modifications
to the configuration and have it automatically propagate throughout the application.Examplefromnr.streamimportRefreshableroot=Refreshable[int|None](None)child=root.map(lambdav:42ifvisNoneelsev)print(root.get())# Noneprint(child.get())# 42root.update(10)print(root.get())# 10print(child.get())# 10Stream objectsThe Stream class wraps an iterable and allows you to build a chain of modifiers on top of it. This often
greatly simplifies consecutive operations on an iterable object and its items.Examplefromnr.streamimportStreamvalues=[3,6,4,7,1,2,5]assertlist(Stream(values).chunks(values,3,fill=0).map(sum))==[13,10,5]Important: Stream objects always immediately convert the object passed to an iterator. This means
that you cannot branch stream objects, as both forks will share the same initial iterator.Supplier objectsThe Supplier class allows you to lazily evaluate the retrieval of a value, as well as chain modifications
on top of it and even trace the lineage of these modifications. It provides convenience methods such as.map(),.once(),.get_or_raise(). Unlike anOptional, a supplier will treatNoneas a valid value
and instead separately track the state of "no value".Trying to read a value from an empty supplier raises aSupplier.Emptyexception. Note that suppliersalwaysevaluate lazily, unlikeOptional.Examplefromnr.streamimportSuppliersup=Supplier.of(42)sup=sup.map(lambdavalue:print(value))assertsup.get()==None# prints: 42assertsup.get()==None# prints: 42Supplier.void().get()# raises Supplier.Empty
Package: nr.sumtype
Note: This package is in the dangerous land of0.x.yversions and may be subject to breaking
changes with minor version increments.Note: Thenr.sumtypemodule is no longer developed.nr.sumtypeSumtypes in Python.Examplefromnr.sumtypeimportConstructor,SumtypeclassStatus(Sumtype):Idle=Constructor()Loading=Constructor(['progress'])Succeeded=Constructor()Error=Constructor(['message'])print(Status.Loading(progress=0.0))Copyright © 2020 Niklas Rosenstein
Package: nrsur-catalog
NRSurrogate catalogThis repository contains the Python package source code for the NRSurrogate Catalog API. This is a catalog of posterior samples associated with the paper "Analysis of GWTC-3 with fully precessing numerical relativity surrogate models". Install the package withpip install nrsur_catalogThis package will allow users to download catalog data from the command line, load results, and make plots from within Python.  Please visit theNRSurCat websitefor more information.
Package: nrtest
nrtestnrtestis an end-to-end regression testing framework, designed for scientific software that perform numerical calculations.Featuresnrtestaims to simplify your workflow:JSON files describe the software under test and the tests themselvesresult files are stored in a portable benchmark directorybenchmarks are compared by iterating through tests and their resultscustom comparisons can easily be added through extensionsBasic UsageAs an example usage, we consider testingTOPAS. This is a Monte Carlo tool for particle simulation, designed for medical physics research. Of course, such a tool must be rigorously validated against experimental data. But it is also useful to frequently run shorter tests, checking for regressions by comparing results to a previous version.First, we describe the software under test in a configuration file calledapps/topas-2.0.3.json. Note thatsetup_scriptdefines the environment needed to run the software.{"name":"topas","version":"2.0.3","setup_script":"/path/to/topas-2.0.3/setup.sh","exe":"topas"}We then describe the test in second configuration file calledtests/Scoring_01.json. In doing so, we define the command-line arguments presented to the executable and the input files needed for the test to run. Finally, we also specify the expected output files, and declare how they should be compared to a benchmark. Here we usetopas binned, which is a custom comparison routine, though some comparison routines are bundled with nrtest. It is also easy to add your own.{"name":"Scoring_01","version":"1.0","description":"Basic test shooting a 6cm diameter proton beam into a water phantom.","args":["Scoring_01.txt"],"input_files":["Scoring_01.txt","GlobalParameters.txt"],"output_files":{"Dose.csv":"topas binned"}}To execute the test, we tellnrtestwhere to find the configuration files and where to output the benchmark. Note thatnrtestwill searchtests/for tests, though we could have specifiedtests/Scoring_01.json.$nrtestexecuteapps/topas-2.0.3.jsontests/-obenchmarks/2.0.3INFO:Found1testsScoring_01:passINFO:FinishedTo compare to a previous benchmark:$nrtestcomparebenchmarks/2.0.3benchmarks/2.0.2Scoring_01:passINFO:FinishedMore advanced usage is detailed in thedocumentation.History0.2.5 (2021-08-10)Add ability to skip tests based onminimum_app_versionconfig0.2.4 (2019-09-11)Fix sporadic failures on Windows when deleting temporary files0.2.3 (2018-02-09)Add ability to write comparison results to JSON file0.2.0 (2016-02-21)Add extensions for compare functions0.1.0 (2016-02-21)First release on PyPI.
Package: nrtk
Natural Robustness Toolkit (NRTK)DescriptionThenrtkpackage is an open source toolkit for evaluating the natural robustness of computer vision
algorithms to various perturbations, including sensor-specific changes to camera focal length, aperture
diameter, etc. Functionality is provided throughStrategyandAdapterpatterns to allow for modular integration
into systems and applications.InstallationThe following steps assume the source tree has been acquired locally.Install the current version via pip:pipinstallnrtkAlternatively, you can also usePoetry:poetryinstallSeehere for more installation documentation.Getting StartedWe provide a number of examples based on Jupyter notebooks in the./examples/directory to show usage
of thenrtkpackage in a number of different contexts.DocumentationDocumentation snapshots for releases as well as the latest master are hosted onReadTheDocs.The sphinx-based documentation may also be built locally for the most
up-to-date reference:# Install dependenciespoetryinstall# Navigate to the documentation root.cddocs# Build the docs.poetryrunmakehtml# Open in your favorite browser!firefox_build/html/index.htmlContributingWe follow the general guidelines outlined in theJATIC Software Development Plan.We use the Git Flow branching strategy.Seedocs/release_process.rstfor detailed release information.SeeCONTRIBUTING.mdfor additional contributing information.LicenseApache 2.0POC: Brian Hu @brian.huDPOC: Brandon RichardWebster @b.richardwebster
Package: nr.types
nr.typesnr.typesis a Python library aiming to provide a broad set of common tools
for developing Python applications.This library is published toPyPIandConda-forge. It is compatible with
CPython 2.7 and 3.4+.Table of Contentsnr.types.abc– Alias forcollections.abcorcollections.nr.types.collections– Additional container data structures.nr.types.generic– Write classes with type parameters.nr.types.interface– Programming against interfaces in Python,
inspired by Zope.nr.types.meta– Useful metaclasses.nr.types.persist– SimplePersistableclass which is useful in
quick scripts that need to cache some data.nr.types.proxy– Eager and lazy object proxies.nr.types.singletons– Provides singletons likeNotSet.nr.types.stream– Streaming iterators in Python.nr.types.struct– Data-model description library.nr.types.sumtype– Allows you to create sumtypes in Python.nr.types.utils– More generic utilities.nr.types.utils.classdef– Helpers for writing class definitions.nr.types.utils.funcdef– Helper for writing functions.nr.types.utils.function– Utilities for function objects.nr.types.utils.logging– Currently only provides aDeferredMessageclass.nr.types.utils.module– Utilities for module objects.nr.types.utils.typing– Utilities for objects from thetypingmodule.Installationpip install nr.typesRun Testspip install -e .[test]
pytest --cov=./src/nrCopyright © Niklas Rosenstein 2019
Package: nr.utils.git
Note: This package is in the dangerous land of0.x.yversions and may be subject to breaking
changes with minor version increments.nr.utils.gitA simple wrapper around the Git CLI.Examplefromnr.utils.gitimportGitrepo=Git().clone('/Volumes/git/linux','https://github.com/torvalds/linux')assertrepo.get_current_branch_name()=='master'print(repo.rev_parse('HEAD'))Copyright © 2020 Niklas Rosenstein
Package: nr.utils.io
Note: This package is in the dangerous land of0.x.yversions and may be subject to breaking
changes with minor version increments.nr.utils.ioCollection of IO utilties.Contentsnr.utils.io.readersEncodedStreamReader: A readable file-like object that wraps aTextIOobject and converts
it to a binary stream encoded with the specifiedencoding(or the default system encoding).Copyright © 2020 Niklas Rosenstein
Package: nr.utils.ponyorm
Note: This package is in the dangerous land of0.x.yversions and may be subject to breaking
changes with minor version increments.nr.utils.ponyormUtilities forPony ORM.Composable databasesApplications with plugin interfaces may choose to allow the use of a common
database, accessed via the same Pony ORM database object. Thenr.utils.ponyorm.appdbprovides classes to allow just that.Example:fromnr.utils.ponyorm.appdbimportAppDatabase,Optional,Requiredappdb=AppDatabase(__name__)classPerson(appdb.Entity):name=Required(str)# etc. etc.Then from the application startup logic:frompony.ormimportDatabasedb=Database()forappdbinload_all_application_databases():# ominous functionsappdb.bind_to(db)db.generate_mapping(create_tables=True)Common convertersProvides common converter implementations that are not built into Pony ORM.
All converters can be registered viaAppDatabase.register_converter(converter_cls)or withnr.utils.ponyorm.converters.register_converter(db, converter_cls).Available converters areEnumConverterUtility functionsget_db(entity)get_one(entity_cls, kwargs)get_or_create(entity_cls, get, set=None)upsert(entity_cls, get, set=None, mutate=True)Copyright © 2020 Niklas Rosenstein
Package: nr.utils.re
Note: This package is in the dangerous land of0.x.yversions and may be subject to breaking
changes with minor version increments.nr.utils.reThis module provides some utility functions for applying regular expressions.Contentsmatch_all(expr, string): Matchesexprfrom the start ofstringand expects that it can be
matched throughout. If it fails to consume the full string, aMatchAllErrorwill be raised.
(Note that this exception class is also accessible asmatch_all.Error).Copyright © 2020 Niklas Rosenstein
Package: nrv
This is a repository to version NRV – network resource vocabulary.pip install nrvUsageimport nrv

nrv.list_versions()

nrv.get_version('v1')

nrv.validate('example.com/Person::v1/system:person')Developmentpip install pytest

py.testCreate a PR to suggested new version, name it as new file, withv$,
where$is a natural number.
Package: nrv-py
NRVPython librairy for Peripheral Nervous System stimulation modelingNRV (or NeuRon Virtualizer) is a pythonic framework to enable fast and user friendly simulations of the Peripheral Nervous System. Axons models are simulated with theNEURONsoftware, and extracellular fields are computed either from analytic equations such as point source approximation or with a more detailed description of the nerve and electrode geometry and Finite Elements Method, either usingCOMSOL(additional commercial licence requiered) or theFENICS project. All computations are performed with the quasistatic approximation of the Maxwell equations, no ephaptic coupling. Stimulation waveform can be of random shapes, and any kinds of electrode can be combined to model complex stimulation strategies.NRV has been optimized for large population of axons, from generating correct population following a specific diameter repartition, through automatic placement to computation and post-processing of the axons activity when a stimulus is applied. Parallel computation, interface with NEURON and COMSOL and FENICS is automatically handled by NRV. For a detailed description and full help on installation, basic usage and API documentation, please visit ouNRV readthedocs page.NRV has been developped by contributors from the CELL research group at the Laboratory ETIS (UMR CNRS 8051), ENSEA - CY Cergy Paris University, until june 2023 and is now developped and maintained by the Bioelectronics group of laboratory IMS (UMR CNRS 5218), INP Bordeaux, U. Bordeaux.