Saravanan666/pypi-org huggingface dataset:
Package: nr.appfire
nr.appfireAppfire is a toolkit that provides utilities for quickly building configurable microservices.Componentsnr.appfire.tasksThis package provides an easy-to-use framework for managing background tasks in a Python application.Exampleimportdataclassesfromnr.appfire.tasksimportRunnable,Task,DefaultExecutor@dataclasses.dataclassclassLooper(Runnable[None]):loops:intdefrun(self,task:Task[None])->None:foriinrange(self.loops):print(i)ifnottask.sleep(1):print('Bye, bye')breakexecutor=DefaultExecutor('MyApp')executor.execute(Looper(10))executor.idlejoin()Copyright © 2021 Niklas Rosenstein
Package: nrarfcn
5G NR-ARFCN calculatornrarfcn: a 5G NR-ARFCN calculator, as a Python package.This is a Python package that calculates the frequency for a given NR-ARFCN, the NR-ARFCN for a given frequency, and related NR band information, according to 3GPPRel-17.It follows3GPP TS 38.104v17.6.0: "5G; NR; Base Station (BS) radio transmission and reception".Documentationnrarfcnis documented on:nrarfcn.rtfd.io.InstallationpipinstallnrarfcnUsage>>>importnrarfcnasnr>>>nr.get_frequency(620000)3300.0>>>nr.get_nrarfcn(27500.0)2070832>>>nr.get_bands_by_frequency(1850.0)['n2','n3','n25']>>>nr.get_bands_by_nrarfcn(2564083)['n263']>>>nr.get_duplex_mode('n71')'FDD'>>>nr.get_nrarfcn_range('n25',direction='ul')(370000,383000)>>>nr.get_frequency_range('n100',direction='dl')(919.4,925)>>>nr.get_frequency_by_gscn(2156)862.85>>>nr.get_gscn_by_frequency(4405.440)8475>>>nr.get_gscn_range('n92')(3584,3787)ContributingEvery contribution is welcome. Make any requests, raise any issues, create pull requests, or directly contact me ongithub.com/blevic/nrarfcn. I'll be happy to help.AuthorBy the way, hi there! I'm Breno. Follow me on github:@blevic.LicenseThis software is licensed under theMIT license.
Package: nr.caching
Note: This package is in the dangerous land of0.x.yversions and may be subject to breaking
changes with minor version increments.nr.cachingA simple key-value API with implementations for local JSON and SQLite3 storage backends and a JSON convenience layer.Quickstartfromnr.caching.stores.sqliteimportSqliteStorefromnr.caching.adapters.jsonimporthash_args,JsonCacheFactorycaching_backend=SqliteStore('.cache.db')cache_factory=JsonCacheFactory(caching_backend,default_exp=60)data=cache_factory.namespace('my-namespace').loading(f'expensive_function_{hash_args(parameters)}',lambda:expensive_function(*parameters))Copyright © 2021 Niklas Rosenstein
Package: nrc-adams-py
Class for Python Interaction with NRC Adams API.https://www.nrc.gov/site-help/developers/wba-api-developer-guide.pdfAdams.nrc.gov contains hundreds of thousands of full-text documents that the NRC has released since November 1, 1999, and several hundred new documents are added each day.The following document libraries at adams.nrc.gov are available to the APIs:*Public Library. Contains all image and text documents that the NRC has made public since November 1, 1999—over 800,000 full-text documents, and over 60,000 packages (virtual containers of related documents). This collection includes publicly available regulatory guides, NUREG-series reports, inspection reports, Commission documents, correspondence, and other regulatory and technical documents written by NRC staff, contractors, and licensees. The Public Library is available through both the Content Search API and the Advanced Search API.*Legacy Public Library. Contains over 1.9 million bibliographic records (some with abstracts and full text) that the NRC made public before November 1999. The Legacy Public Library is available only through the Advanced Search API.Data will change over the co urse of the day as the NRC issues new documents. For this reason counts may vary and may age quickly, depending on site activity and time.Search result sets for all APIs in this guide are limited to 1,000 results. If more than 1,0000 documents match the search criteria, then the following will occur:*only the first 1,000 matches will be returned,*the . . . field in the result set will be set to LocalizedMessage{key='search.documents.limit.exceed.message', params=[1000]} and*the . . .field in the result set will be set to 1000.
Package: nr.cliparser
nr.cliparser– Extensible CLI parser.Work in progressExampleimportnr.cliparserparser=nr.cliparser.Parser()parser.argument('-h',nargs=0,help='Show this help.')parser.argument('script',nargs='?',help='A script to run.')parser.argument('argv',nargs='...',help='Arguments for the script.')install=parser.subparser('--install',help='Install a packge.')install.argument('ref',nargs='?',multiple=True,help='A package reference.')install.argument('-e',metavar='ref',help='A package reference to install editable.',multiple=True)install.argument('-g',nargs=0,help='Install globally.')install.argument('-r',nargs=0,help='Install into root.')args=parser.parse()ifargs['h']:parser.print_help()exit()print(args)$ python3 example.py -h
usage: example -h  [script] ... --install [ [ref] -e <ref> -g  -r ] 

-h                 Show this help.                                    
[script]           A script to run.                                   
...                Arguments for the script.                          8-
--install [ ... ]  Install a packge.                                  
  [ref]            A package reference.                               
  -e <ref>         A package reference to install editable.           
  -g               Install globally.                                  
  -r               Install into root.                                 

$ python3 example.py --install -e scope@package  
{'install': {'e': ['scope@package'], 'ref': [], 'g': False, 'r': False}, 'h': False, 'script': None, 'argv': []}Changesv0.1.1 (2018-09-20)Fix Python 2 compatibilityv0.1.0 (2018-09-20)Initial release
Package: nr.collections
Note: This package is in the dangerous land of0.x.yversions and may be subject to breaking
changes with minor version increments.nr.collectionsProvides a bunch of useful collection types.ChainDict: Chain multiple mappings. Mutations affect the first mapping only.HashDict: Dictionary that uses a custom hash function for its internal keys.LambdaDict: Represent a getter function as a mapping.OrderedDict: Implementation of an ordered dictionary for Python <= 3.6OrderedSet: Implementation of an ordered set.persistable: Dict/List types with aload()andsave()functionCopyright © 2020 Niklas Rosenstein
Package: nr-common
# nr-common[![Build Status](https://travis-ci.org/nitred/nr-common.svg?branch=master)](https://travis-ci.org/nitred/nr-common)Common python functionalities aimed to be at least compatible with Python3.#### Current Stable Version```0.1.7```#### Dependency InstallationThis package is expected to contain common utility function covering a wide range of topics such as file system, web development, data science etc. This package is expected to be used with virtually any sized project. It may be unwise for this package to install all the dependencies in case the user wants to use this package for a small subset of the functionalities. Therefore this package does not install all the dependencies it requires and expects the user to install the dependencies manually wherever necessary.Some dependencies that are not included but expects the user to install when necessary are:* Flask* Flask-SQLAlchemy* opencv-python* numpy* PillowAll the missing dependencies can be installed using:```pip install -r requirements_missing.txt```# Installation### pip```pip install nr-common```### Development Installation* Clone the project.* Install in Anaconda3 environment```$ conda env create --force -f dev_environment.yml$ source activate nr-common$ pip install -e .```# TestTo run the tests:```make test```# Examples```$ python examples/simple.py```# LicenseMIT
Package: nr.config
Note: This package is in the dangerous land of0.x.yversions and may be subject to breaking
changes with minor version increments.nr.configThenr.configpackage helps with configuration file processing and dynamic reloading tasks.
It can serve as a generic library or give you a fast and easy framework.QuickstartThenr.config.process_config()function is the main function for processing config data. It
expects the data to process as well as a number of processor plugins that will run over config.
A common pattern is to use aconfsection to hydrate variables for the remainder of the
configuration.fromnr.configimportprocess_configfromnr.config.pluginsimportVarsimportyamlwithopen('var/conf/runtime.yaml')asfp:data=yaml.safe_load(fp)config=process_config(data['runtime'],Vars({'conf':data['conf']}))This particular example allows the use of references in theruntimeblock.conf:value:42runtime:answer:'{{conf.value}}'Service applications may want to reload the configuration file whenever it changes. For this
purpose thenr.configmodule provides theConfigReloadTaskthat uses thewatchdogmodule
to observe file changes and reload the config when the file changes. Errors that occur during
the reload are automatically logged and the last valid configuration will be returned.fromnr.config.reloaderimportConfigReloadTaskfromnr.proxyimportProxyreload_task=ConfigReloadTask('var/conf/runtime.yaml',load_config_from_file)reload_task.reload_callback(callback)reload_task.start()config=Proxy(reload_task.get)Copyright © 2020 Niklas Rosenstein
Package: nrcpy
NrcpyNrcpy is a Python package for working with NRC devices. It provides a convenient interface to connect to an NRC device, send commands, and retrieve information from the device.ðŸ”¥ InstallationYou can installnrcpyusing pip:pipinstallnrcpyðŸª§ UsageHere is an example of how to use nrcpy to connect to an NRC device and control the relays:fromnrcpyimportNrcDevice# Configure the deviceip='192.168.1.200'port=23username='admin'password='admin'# Create an instance of NrcDevicenrc=NrcDevice((ip,port,username,password))# Open connectionnrc.connect()# Loginifnrc.login():# Control the relaysnrc.relayContact(1,500)nrc.relayContact(2,1000)nrc.relayOff(1)nrc.relayOn(2)# Get relays statusrelays_status=nrc.getRelaysValues()relay_1_status=nrc.getRelayValue(1)relay_2_status=nrc.getRelayValue(2)print(f'Relays Status (hex):{relays_status}')print(f'Relay 1 Status:{relay_1_status}')print(f'Relay 2 Status:{relay_2_status}')else:print('Error in login')# Close connectionnrc.disconnect()
Package: nr-crucible
CrucibleThis library was created by the News & Review for The Crucible.  This set of tools currently consists of one command - a calendar command to convert CSV data of Crucible course schedules into an InDesign compatible, docx styled listing.  Perhaps there will be more to come one day.Installation and Usagepip install nr-crucible

# To see command line options
$ crucible -h

# To generate a calendar from a CSV file
$ crucible calendar -i infile.csv -o outfile.docxHistory1.0.0 (2022-01-16)First release on PyPI.
Package: nrc-scrape
Set of modules to scrape Event Reports from the NRC.gov website.TestspytestUsageDownload all event reports into yearly csv files at .\data\ :pythonbulk_downloader--start_year2004--end_year2020--threads16Or go one by one:# import a Session that has correct properties to keep a connnectionfromnrc_scrapeimportsession# generate single event notification report eventurl3='https://www.nrc.gov/reading-rm/doc-collections/event-status/event/2019/20190612en.html'h=EventNotificationReport.from_url(url3,session)# get event notification urls from 2019 to 2020er_urls=generate_nrc_event_report_urls(2019,2020)fromrandomimportsampleurls=sample(list(extract_nested_values(er_urls)),10)sl=logging.getLogger('success_log')el=logging.getLogger('error_log')fl=logging.getLogger('fof_log')# get a subsample of the urls, and log attempts to requestenrs,errors,fofs=fetch_enrs(urls,session)# convert an event to dataframedf=enrs[0].events[0].to_dataframe()# event notification report to dataframeenr_df=enrs[1].to_dataframe()# event notification reports to dataframeenrs_df=pd.concat([enr.to_dataframe()forenrinenrs])#dump to csvenrs_df.to_csv('enrs.csv')
Package: nrdash
New Relic Dashboard BuilderNew Relic Dashboard Builder is a command-line tool for configuring New Relic dashboards using simple, human-readable YAML files. With New Relic Dashboard Builder, definitions for New Relic dashboards can be kept in version control to support tracking change history for dashboards. Definitions for NRQL queries and widgets can be consolidated into a single canonical location to be shared across multiple dashboards, enabling easier maintenance of a large number of dashboards and widgets.UsageInstall with pip, note that New Relic Dashboard Builder only works with Python 3.6 or higherpipinstallnrdashCreate your dashboard definitions in a YAML filedashboards:sample-dashboard:title:Sample Dashboardwidgets:-widget:query:title:Transactions by Response Statusnrql:SELECT COUNT(*) FROM Transaction WHERE transactionType = 'Web' FACET response.statusvisualization:facet_bar_chartrow:1column:1width:3height:2Run the New Relic Dashboard Builder tool to create or update your New Relic dashboards based on the YAML definition file.nrdash--api-key<YOUR_ADMIN_API_KEY>--account-id<YOUR_ACCOUNT_ID><DASHBOARD_DEFINITION_YAML_FILE>DocumentationSee thedocumentation sitefor complete documentation.
Package: nr.databind.core
Note: This package is in the dangerous land of0.x.yversions and may be subject to breaking
changes with minor version increments.This package is superseded bydatabind.core.nr.databind.coreThenr.databind.corepackage provides a framework for binding structured data to typed objects
as well as the (de-) serialization of that data from/to other formats.See also:nr.databind.json.Examplefromnr.databind.coreimportField,StructclassPerson(Struct):name=Field(str,prominent=True)age=Field(int)address=Field(int,default=None)print(Person('John Wick',48,'Wicked St.'))# Person(name='John Wick')Copyright © 2020 Niklas Rosenstein
Package: nr.databind.json
Note: This package is in the dangerous land of0.x.yversions and may be subject to breaking
changes with minor version increments.This package is superseded bydatabind.core.nr.databind.jsonThenr.databind.jsonpackage implements (de-) serializers for nested payloads that usually
result from loading JSON-formatted data.See alsonr.databind.core.Examplefromnr.databind.coreimportField,Struct,ObjectMapperfromnr.databind.jsonimportJsonModuleclassPerson(Struct):name=Field(str,prominent=True)age=Field(int)address=Field(str,default=None)mapper=ObjectMapper(JsonModule())print(mapper.deserialize({'name':'John Wick','age':48,'address':'Wicked St.'}))# Person(name='John Wick')Copyright © 2020 Niklas Rosenstein
Package: nr.databind.rest
Note: This package is in the dangerous land of0.x.yversions and may be subject to breaking
changes with minor version increments.This package is superseded byastra.http.nr.databind.restThis module can be used to define a REST API interface using Python 3
annotations andnr.databindobject mapping features.TodoDynamic and static code generation for REST clientsExampleResources are created by defining anInterfacesubclass and decorating its
methods with the@Routedecorator. The subclass can then be used to
automatically generate client code and to implement a server based on the
same interface.frommy.service.api.typesimportMyRequest,MyResponsefromnr.databind.restimportRoute,RouteParamfromnr.interfaceimportInterfaceclassMyResource(Interface):@Route('GET /my-endpoint/{parameter_a}')defmy_get_endpoint(self,parameter_a:str,parameter_b:RouteParam.Query(int))->MyResponse:...@Route('POST /my-endpoint/{parameter_a}')defmy_post_endpoint(self,parameter_a:str,body:MyRequest)->MyResponse:...The resource is then implemented like this:frommy.service.api.resourcesimportMyResourcefrommy.service.api.typesimportMyResponsefromnr.interfaceimportimplements@implements(MyResource)classMyResourceImpl:defmy_get_endpoint(self,parameter_a,parameter_b):# ...returnMyResponse(...)defmy_post_endpoint(self,parameter_a,body):# ...returnMyResponse(...)Resources can then be bound to a server framework using one of the available
bind mechanisms (currently only Flask is available).fromflaskimportFlaskfrommy.service.api.resources_implimportMyResourceImplfromnr.databind.restimportMimeTypeMapperfromnr.databind.rest.flaskimportbind_resourceapp=Flask(__name__)mapper=MimeTypeMapper.json()bind_resource(app,'/my-resource',MyResourceImpl(),mapper=mapper)Copyright © 2020 Niklas Rosenstein
Package: nrde
dashboard-exporterA Python client to export a New Relic dashboard PDF or image programmatically.InstallationThis is available on the Python Package Index (PyPI). You can install using pip.virtualenv env
source env/bin/activate
pip install nrdeTo install the development version, run:pip install https://github.com/AnthonyBloomer/dashboard-exporter/archive/dev.zipUsageThe first step is export your Personal API Key as an environment variable.export NEW_RELIC_PERSONAL_API_KEY = "YOUR_API_KEY"If you have an EU based account, you will also need to export theNEW_RELIC_REGIONenvironment variable:export NEW_RELIC_REGION = "EU"Then pass the GUID of a given Dashboard to theexporterfunction to download a snapshot of your dashboard. You can get the GUID by pressing theinfobutton in your dashboard.importosimporttimefromdashboard_exporterimportexporterimportmimetypesoutput=exporter(guid="The New Relic Dashboard GUID",file_type="PDF",)content_type=output.headers["content-type"]extension=mimetypes.guess_extension(content_type)output_directory=os.getcwd()filename=int(time.time())of="%s/%s%s"%(output_directory,filename,extension)withopen(of,"wb")asf:f.write(output.content)f.close()
Package: nr-documents-records
nr-common-metadataDisclaimer: The library is part of the Czech National Repository, and therefore the README is written in Czech.
General libraries extendingInvenioare concentrated under theOarepo
namespace.InstalaceNejedná se o samostatně funkční knihovnu, proto potřebuje běžící Invenio a závislosti Oarepo.
Knihovna se instaluje klasicky přes pippipinstalltechlib-nr-common-metadataPro testování a/nebo samostané fungování knihovny je nutné instalovat tests z extras.pipinstall-e.[tests]ÚčelKnihovna obsahuje obecný metadatový model Národního repozitáře (Marshmallow, JSON schema a Elastisearch mapping).
Všechny tyto části lze
"podědit" v dalších metadatových modelech.Knihovna není samostatný model pro "generic" věci - ten je v nr-generic.
Package: nr-documents-records-model-builder
nr-common-metadataDisclaimer: The library is part of the Czech National Repository, and therefore the README is written in Czech.
General libraries extendingInvenioare concentrated under theOarepo
namespace.InstalaceNejedná se o samostatně funkční knihovnu, proto potřebuje běžící Invenio a závislosti Oarepo.
Knihovna se instaluje klasicky přes pippipinstalltechlib-nr-common-metadataPro testování a/nebo samostané fungování knihovny je nutné instalovat tests z extras.pipinstall-e.[tests]ÚčelKnihovna obsahuje obecný metadatový model Národního repozitáře (Marshmallow, JSON schema a Elastisearch mapping).
Všechny tyto části lze
"podědit" v dalších metadatových modelech.Knihovna není samostatný model pro "generic" věci - ten je v nr-generic.
Package: nr.dotconfig
dotconfigA single configuration file for.bash_profileand.gitconfig.$ pipx install nr.dotconfig
$ dotconfig dotconfig.yaml -u
Writing /home/me/.bash_profile
Writing /home/me/.gitconfigExampleMy own dotconfig can be foundhere.
An further example below shows how another config file can be taken as a basis for another (eg. to add work related settings on top
of a personal configuration).base: https://git.niklasrosenstein.com/NiklasRosenstein/dotconfig-files/raw/branch/master/dotconfig.yaml
profile:
  blocks:
    work-functions: |
      function do-all-my-work() {
        # it's a secret
      }
gitconfig:
  user:
    email: my-work-mail@work.com
    signingkey: WORKSIGNINKEYID
  Profile.user: '{{base.gitconfig.user}}'Copyright 2020 © Niklas Rosenstein
Package: nre-dtd
nre-dtdA tool for downloading data from the National Rail Enquiries' data feed.This code is licensed under the WTFPL or the CC0 (at your discretion), but its output is not. Any NRE data included in the output of this program is subject to theseterms and conditions.Useful linksDTDon the Open Rail Data WikiFares and Associated Data Feed Interface Specificationby the Rail Delivery GroupNational Routeing Guide Data Feed Specificationby the Rail Delivery GroupTimetable Information Data Feed Interface Specificationby the Rail Delivery GroupHow to use the National Routeing Guideby the Rail Delivery Group (not HTTPS)The National Routeing Guide in detailby the Rail Delivery Group (not HTTPS)Get startedGet an accountRegister for an account on theNational Rail Data Portal.Subscribe to the Fares, Routeing and Timetable feed.Use the toolFrom PyPIRunpython3 -m pip install nre-dtd.From sourceRunpython3 -m pip install poetryif you have not got Poetry.Runpoetry initto set up the environment.Runpoetry shellto enter the environment.Or, prependpoetry run --to every command.ExamplesGet usage instructionsnre-dtd--helpDownload everythingnre-dtd--fares<filename>.zip--routeing<filename>.zip--timetable<filename>.zipThis will ask you for a password. The downloaded files are zipped.Supply the username and password on the command linenre-dtd--usernamesarah@example.com--password"correct-horse-battery-staple"<...>
Package: nrefocus
Numerically (auto)refocus complex wave fields, such as those acquired using
quantitative phase imaging techniques in modern microscopy.DocumentationThe documentation is available is available atnrefocus.readthedocs.io.InstallationInstall from the Python package index (theFFTWextra enables fast
Fourer transforms withPyFFTW):pip install nrefocus[FFTW]or clone the repository and run:pip install -e .[FFTW]TestingTesting is done with pytest:pip install pytest
pytest tests
Package: nrelpy
nrelpySimple API to interact with the National Renewable Energy Laboratory's Annual Technology BaselineFeatures and Datasetsnrelpycurrently enables access to the following datasets:Annual Technology BaselineTransportation (2020)Electricity (2019 - 2022)GIS Renewable Energy Potential (state-level resolution)InstallingThis package may be installed fromPyPIwithpip install nrelpyUsingThe motivation for this API is to relieve researchers of the need to carry datasets
in their repositories. Therefore, the most basic function ofnrelpyreturns a
dataset as a pandas dataframe. This basic usage is shown below.ATBimportnrelpy.atbasATByear=2022database='electricity'df=ATB.as_dataframe(year=year,database=database)Renewable Potentialimportnrelpy.re_potentialasREPdf=REP.as_dataframe()TestingFrom the top-levelnrelpydirectory, runpytest.You can also check the testing coverage withpytest--cov-config=.coveragerc--cov=nrelpy
coveragehtmlcoverage htmlcreates a nicely formatted html page with
the entire coverage report. Simply open thehtmlcov/index.htmlfile in your browser.ContributingContributors should clone the repository and install an editable installation.gitclonehttps://github.com/samgdotson/nrelpy.gitcdnrelpy

pipinstall-e.All pull requests must include appropriate, passing, tests.Issues and feature requests are welcome.