Saravanan666/pypi-org huggingface dataset:
Package: nsms
NyarukaSMSNyarumaSMS aims to provide a quick start for a basic python based SMS app using the tools Nyaruka uses to build its systems.  This includes setting up rapidsms, rapidsms-httprouter, smartmin and our parsing and localization libraries.Getting StartedTo get started, follow these steps:% virtualenv env
% source env/bin/activate
% pip install nsms
% start-nsms [project-name]
% pip install -r pip-requires.txt
% cd [project-name]
% python manage.py syncdb
% python manage.py migrate
% python manage.py runserverSample ApplicationNSMS comes with a simple SMS application to track the mileage on vehicles.  The SMS format for the application is as follows.Registering CarsEach user of the system much register the car they are using, they do so by sending:car [license plate]This register a car to the phone.  From now on all mileage reports will be associated with the car with the passed in license plate.  The license plate must be 8 characters.Adding Mileage ReportsOnce a user has registered their car, they can report mileage by sending the message:miles [mileage (integer)]This records a new mileage report for the car associated with this connection.  If the connetion has not registered a car then this will be an error.Best PracticesThis application aims to demonstrate the following best practices:Comprehensive unit coverage.  We aim for 100% unit test coverage of our apps, and so should you.  This app shows you how easily that can be doneDRY. We use Smartmin to allow us to add a lot of functionality without adding much codeLanguage Templates.  We let our customers edit the translations for all our messages through a web UI, including using standard Django templates for formatting.Tolerant Parsing.  Though still a work in progress, our rapidsms_parser module provides an easy way to programmatically parse SMS messages and give good error messaging in the process.User Management.  We provide our customers with basic user management, using groups and SmartMin permissions to easily manage these.
Package: nsnet2-denoiser
Noise Suppression Net 2 (NSNet2) baseline inference scriptAs a baseline for ICASSP 2021 Deep Noise Suppression challenge, we will use the recently developed SE method based on Recurrent Neural Network (RNN). For ease of reference, we will call this method as Noise Suppression Net 2 (NSNet 2). More details about this method can be found inhere.Installationpip install nsnet2-denoiserUsage:From the NSNet2-baseline directory, run run_nsnet2.py with the following required arguments:-i "Specify the path to noisy speech files that you want to enhance"-o "Specify the path to a directory where you want to store the enhanced clips"-fs "Sampling rate of the input audio. (48000/16000)"python -m nsnet2_denoiser.denoise -i audio/Use default values for the rest. Run to enhance the clips.Pythonfromnsnet2_denoiserimportNSnet2Enhancerenhancer=NSnet2Enhancer(fs=48000)# numpyimportsoundfileassfsigIn,fs=sf.read("audio.wav")outSig=enhancer(sigIn,fs)# pcm_16lefrompydubimportAudioSegmentaudioIn=AudioSegment.from_wav("audio.wav")audioOut=enhancer.pcm_16le(audioIn.raw_data)Attribution:Pretrained modelNSNet2byMicrosoftis licensed underCC BY 4.0Citation:The baseline NSNet noise suppression:@misc{braun2020data,title={Data augmentation and loss normalization for deep noise suppression},author={Sebastian Braun and Ivan Tashev},year={2020},eprint={2008.06412},archivePrefix={arXiv},primaryClass={eess.AS}}
Package: nso-applet-api
NSO-Applet-APIAn API library and documentation for the NSO Applet on the Nintendo Switch.This library implements various endpoints from the NSO Webapplet, with the intention of completely covering all endpoints and documenting them.See the documentation hereYou can download this library fromPyPIby running the following in your Python environment:python-mpipinstallnso-applet-apiThis project is a work-in-progress and is currently unfinished!
Package: nso-bridge
Nintendo Switch Online API BridgeNintendo Switch Online API bridge (for Nintendo Switch Online API wrapper)What is it?Nintendo Switch Online API Bridge is a simple wrapper. It allows you to easily access the API and get the data you need.Installationpipinstallnso-bridgepipinstallgit+https://github.com/zeroday0619/Nintendo_Switch_Online_API_Bridge.gitExample CodeGetSelfGet information of My Nintendo Switch Account.importjsonimportkeyringfromnso_bridge.nsaimportNintendoSwitchAccountfromnso_bridge.nsoimportNintendoSwitchOnlineAPIimportlogginglogging.basicConfig(level=logging.DEBUG,format='%(asctime)s-%(levelname)s-%(message)s')app=NintendoSwitchAccount()# override the nso_app_versionapp.nso_app_version=app.get_nso_app_version()session_token=keyring.get_password("nso-bridge","session_token")nso_res=NintendoSwitchOnlineAPI(nso_app_version=app.nso_app_version,session_token=session_token,)nso_res.sync_login()print(json.dumps(nso_res.getCurrentUser(),indent=4,ensure_ascii=False))GetFriendsGet information of friends registered to Nintendo Switch account.importjsonimportkeyringfromnso_bridge.nsaimportNintendoSwitchAccountfromnso_bridge.nsoimportNintendoSwitchOnlineAPIimportlogginglogging.basicConfig(level=logging.DEBUG,format='%(asctime)s-%(levelname)s-%(message)s')app=NintendoSwitchAccount()# override the nso_app_versionapp.nso_app_version=app.get_nso_app_version()session_token=keyring.get_password("nso-bridge","session_token")nso_res=NintendoSwitchOnlineAPI(nso_app_version=app.nso_app_version,session_token=session_token,)nso_res.sync_login()print(json.dumps(nso_res.getFriends(),indent=4,ensure_ascii=False))
Package: nso-jsonrpc-requester
BRANCHSTATUSmasterdevelopnso_jsonrpc_requesterThis is a library to interact with the JSON-RPC of a Cisco Network
Services Orchestrator server.This is not a 100% complete library it contains what I use most.THIS IS NOT MEANT TO BE PRODUCTION READY SO TEST WHAT YOU WANT TO USE IT FORLibrary in Other LanguagesPython 3GoI try to keep the functionality the same between both, because I use
both.Go InstallInstall newest codegogetgithub.com/btr1975/nsojsonrpcrequestergoInstall specific version examplegogetgithub.com/btr1975/nsojsonrpcrequestergo@v1.0.0Python Install SourceIn your requirements.txt for newest codegit+https://github.com/btr1975/nso_jsonrpc_requester.git@master#egg=nso_jsonrpc_requesterIn your requirements.txt for specific versiongit+https://github.com/btr1975/nso_jsonrpc_requester.git@1.0.3#egg=nso_jsonrpc_requesterPython Install pippip install nso-jsonrpc-requester
Package: nso-live-status
nso_live_statusThis library is an example on how you can retrieve raw cli with Cisco NSO and parse the result with pyats/genie parser.this code only works with cli based NEDsInstallationpip install nso-live-statusUsageIn an NSO Action let's say you want to check the version of your devices.In the python code of the package you will use it like this :importncsfromnso_live_statusimportrun_live_statusfromdistutils.versionimportLooseVersionfromncs.dpimportActionCHECK_OK="OK"CHECK_NOK="NOK"CHECK_ERROR="ERROR"classCheckVersion(Action):@Action.actiondefcb_action(self,uinfo,name,kp,input,output,trans):self.log.info(f"Action CheckVersion , device :{input.device}target version :{input.target_version}")command="show version"root=ncs.maagic.get_root(trans)show_version=run_live_status(root,input.device,command)target_version=LooseVersion(input.target_version)ifshow_version.has_structured_output:current_version=LooseVersion(show_version.structured_output["software_version"])ifcurrent_version==target_version:output.check_status=CHECK_OKoutput.check_message=f"[check_version] Current version of the device{current_version}match the target version{target_version}"else:output.check_status=CHECK_NOKoutput.check_message=f"[check_version] Current version of the device{current_version}doesn't match the target version{target_version}"else:output.check_status=CHECK_ERRORoutput.check_message=f"[check_version] ERROR unable to retrieve structured output from{input.device}with the command{command}"run_live_status will populate and return this dataclass :@dataclass()classCommandResult:has_error:bool=Falseraw_cli:str=""structured_output:str=""@propertydefhas_structured_output(self):try:iflen(self.structured_output)>0:returnTrueelse:returnFalseexceptTypeError:returnFalseIf a pyats parser is found for the cli command you will find a dict instructured_outputCommands supported :https://pubhub.devnetcloud.com/media/genie-feature-browser/docs/#/parsersOS platform and model supported :https://pubhub.devnetcloud.com/media/unicon/docs/user_guide/supported_platforms.html#/LicenseThis project is licensed to you under the terms of theCisco Sample Code License.
Package: nsone
This SDK is deprecated in favor ofns1-pythonand should not be used for new projects. The code in this repository provides
just a thin wrapper for the new SDK to allow easier migration.Migration to the new SDKThe new SDK provides equivalent functionality. To migrate a project to the new
SDK:Update your project dependencies to usens1-pythoninstead ofnsone.Replace use ofnsonenamespace withns1.Replace use ofnsone.NSONEwithns1.NS1.
Package: nso-oc
NSO NED device configuration to OpenConfigThis python package will read in a json configuration for a device and translate to OpenConfigUsageDecide whether pulling configuration from NSO or reading from file and set the appropriate envarsFor NSOexport NSO_URL="http://x.x.x.x:8080"
export NSO_USERNAME=admin
export NSO_PASSWORD=admin
export NSO_DEVICE=router1
export DEVICE_OS=xe
export TEST=False   <- if True, the generated OC configuration is sent back to NSO
export ACL_USE_EXISTING_SEQ=False   <- if True, existing ACL sequence numbers will be used. Could cause remark errorsFor a file (to be used if you've previously pulled the NSO configuration)export NSO_NED_FILE="./device_configurations/$device_name/$device_name.json"
export DEVICE_OS=xeExecute scriptpython3 main.pyThe below files will be placed in a new directory names "output_data"device_name.json = the full configuration is pulled from NSOdevice_name_notes.txt = notes resulting from converting NSO config to OpenConfigdevice_name_openconfig.json = New OpenConfig configdevice_name_remaining.json = Remaining configuration from NSOIdeally device_name_openconfig.json + device_name_remaining.json = device_name.json
Package: nso-restconf
nso_restconfA wrapper of requests for managing the RestCONF API of NSOThis is an adaptation from Lisa Roach's PyRESTCONF code :https://github.com/lisroach/PyRESTCONFInstallationpip install nso-restconfUsageFor example, we retrieve the NED ids in a json structure :fromnso_restconf.restconfimportRestConfnso_api=RestConf(address="http://127.0.0.1",port=8080,username="admin",password="admin")res_ned_id=nso_api.get("tailf-ncs:devices/ned-ids/ned-id",content=None)print(res_ned_id.json()){'tailf-ncs:ned-id':[{'id':'tailf-ncs-ned:lsa-netconf'},{'id':'tailf-ncs-ned:netconf'},{'id':'tailf-ncs-ned:snmp'},{'id':'cisco-ios-cli-6.72:cisco-ios-cli-6.72','module':[{'name':'ietf-interfaces','revision':'2014-05-08','namespace':'urn:ietf:params:xml:ns:yang:ietf-interfaces'},...MethodsSupported methods are GET,POST,PUT,PATCH,DELETE.
There is others custom methods like action(), a wrapper of POST used to launch a NSO action.
See the RestConf object source code for supported methods at :https://github.com/rtrjl/nso_restconf/blob/master/nso_restconf/restconf.pyLicenseThis project is licensed to you under the terms of theCisco Sample Code License.
Package: nsot_sync
The goal ofnsot_syncis to translate from a driver (local computer
networks or another vendor’s IPAM) to native NSoT resources.It has been written to make adding extra drivers easy, based on a simple
contract.For Quickstart and other documentation,check out the docs.TODOWrite testsWrite out driver contractDriver ContractUnfinished, reminder list for writing the real contract outEvery resource must contain an ‘attributes’ key, even if empty dict
Package: nsp
Neural Network Signal Processingnsp is a Python package for extracting and visualizing activation patterns of PyTorch neural networks. It canextract the computational graph of a neural network as a directed graph.extract the activation pattern generated by an input of a neural network.compute the Fourier transform of an activation pattern (signal) in a neural network (directed graph) based on[1]and[2].visualize activation patterns and their Fourier coefficients.Visualization of the activation patternVisualization of the Fourier coefficientsDependenciesInstallation requirespytorch,networkx, andnumpy. Some functions will usescipyand/ormatplotlib.InstallationUse the package managerpipto install nsp.pipinstallnspUsageGet your network astorch.nn.Moduleand a valid input.importnspimporttorchimporttorch.nnasnnclassNetwork(nn.Module):def__init__(self):super(Network,self).__init__()self.conv1=nn.Conv2d(in_channels=1,out_channels=2,kernel_size=2)self.conv2=nn.Conv2d(in_channels=2,out_channels=8,kernel_size=2)self.fc1=nn.Linear(1*4*8,8)defforward(self,x):x=torch.sigmoid(self.conv1(x))x=torch.sigmoid(self.conv2(x))x=x.view(-1,1*4*8)x=self.fc1(x)returnxnetwork=Networks()image=torch.tensor([[[[-6,-1,-2,5],[-3,-6,5,4],[2,5,-6,3],[5,0,1,-6]]]],dtype=torch.float)Extract the activation pattern.activations=nsp.Activations(network,image)Extract the graph of your neural network.NNGraphextendsnetworkx.DiGraph.graph=nsp.NNGraph(activations)Transform the activation pattern into its spectrum.spectrum=graph.transform(activations)Visualize the activation pattern and the spectrum. Pick your favoritecmap_stylefrommatplotlib colormaps.nsp.Visualizer.visualize_pattern(activations,pdf_filepath='activations.pdf',scale='layernorm',cmap_style='viridis')nsp.Visualizer.visualize_pattern(spectrum,pdf_filepath='spectrum.pdf',scale='layernorm',cmap_style='viridis')Visualization of the activation patternVisualization of the spectrumFor more details check out thetutorialsand read thedocumentation.LicenseMITDeveloped by Felipa Schwarz (c) 2021References[1]
Markus Püschel, Bastian Seifert, and Chris Wendler. Discrete signal processing on meet/join lattices. IEEE Transactions on Signal Processing, 2021.[2]
Bastian Seifert, Chris Wendler and Markus Püschel. A Causal Shift and Fourier Transform for Directed Acyclic Graphs. Submitted for publication, 2021.
Package: nspb
Progress BarThis is a simple terminal progress bar for python,no libraries required.Usagefromnspb.pbimportProgressBarpb=ProgressBar(size=100,length=100,prefix='',suffix='',decimals=1,fill='â–ˆ',infos=False,printEnd="\r",file=sys.stdout)# With full paramspb=ProgressBar(size=100,length=100)# Simplest declarationforiinrange(100+1):pb.update(i)# The value of update can be any int value, for example it can be the downloaded size of a file
Package: nspektr
nspektr is a distribution package dependency inspector.It combines functionality fromimportlib.metadataandpackagingto provide routines to resolve and validate dependencies for a package
or entry point.Highlights:resolvetakes a requirement and returns a distribution satisfying
that requirement (disregarding dependencies).find_dependenciestakes a metadata.Distribution and generates all
dependencies transitively as installed in the environment, avoiding
loops.missingtakes an entry point and identifies all unsatisfied
dependencies for that entry point.
Package: nspfile
NSP audio file format is primarily used for KayPENTAX Computerized Speech Lab (CSL).Pythonnspfilepackage implementsscipy.io.wavfilecompatible functions for .nsp sound file format.InstallpipinstallnspfileUseimportnspfilefs,x=nspfile.read('myvoice.nsp')TODOsTest multichannel readAdd a writer functionReferencehttp://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/CSL/CSL.html
Package: nspider
OverviewNSpider (NymphSpider) is a light multi-process web crawling and web scraping framework, used to
crawl websites and extract resource files from their pages. It can be used for
resources downloading and data collection.Check the NSpider homepage athttps://github.com/Nymphxyz/nspiderfor more information,RequirementsPython 3.6+Works on Linux(not sure), Windows, macOS(not sure)InstallThe quick way:pip install nspiderDocumentationCheck details athttps://github.com/Nymphxyz/nspider
Package: nsplist
nsplistnsplist is a package that provides a parser for the NeXTSTEP plist
text-based format. A common usage is parsing iTunes In App Purchase
receipts to be able to reject them early, without having to make a
request to the iTunes API.This is distinct from the Apple plist format, which has more
supported types and serialises to XML or binary.Examples:>>> import nsplist
>>> print nsplist.loads('{"x" = "1"; "y" = "2";}')
{u'x': u'1', u'y': u'2'}
Package: ns-poet
ns-poetManage Poetry packages in a monorepoFeatures:Generate Poetry package manifestsRun a command in all packagesTable of Contents:InstallationGuideDevelopmentInstallationns-poet requires Python 3.6 or above.pipinstallns-poet# orpoetryaddns-poetGuideDevelopmentTo develop ns-poet, install dependencies and enable the pre-commit hook:pipinstallpre-commitpoetry
poetryinstall
pre-commitinstall-tpre-commit-tpre-pushTo run tests:poetryrunpytest
Package: nspyre
nspyre(n)etworked (s)cientific (py)thon (r)esearch (e)nvironmentSeehttps://nspyre.readthedocs.io/.What is nspyre?nspyre is a Python package for conducting scientific experiments. It provides
a set of tools to allow for control of instrumentation, data collection,
real-time plotting, as well as GUI generation. Anyone in the research or
industrial spaces using computer-controlled equipment and collecting data can
potentially benefit from using nspyre to run their experiments.The hardware being controlled can be connected either locally on the machine
running the experimental logic, or on a remote machine, which can be accessed
in a simple, pythonic fashion. This allows for the easy integration of shared
instrumentation in a research environment. Data collection is also
networked, and allows for real-time viewing locally, or from a remote machine.
nspyre provides a set of tools for quickly generating a Qt-based GUI for
control and data viewing.If you use nspyre for an experiment, we would really appreciate it if youciteit in your publication!
Package: nspyre-drivers
DriversThis is a set of Python drivers for lab instrumentation. These drivers are
associated withnspyre, but are
also suitable for general usage. Unless otherwise specified, drivers are
provided under the terms of the MIT license.Installationpipinstallnspyre-driversCertain drivers require extra dependencies. Those dependencies can be installed
by specifying a tag during the install. E.g. to install the DLI pdu driver
dependencies, use:pipinstallnspyre-drivers[dli_pdu]A full listing of the tags is below.beaglebone
dli_pdu
oceanoptics
ximea
zaberFor some USB drivers on Linux, you need to grant user access to the drivers in
order for VISA to detect them:
You should find the udev rules file in the same folder as the driver, then, e.g.:sudocpsrc/drivers/thorlabs/cld1010/99-thorlabs-cld1010.rules/etc/udev/rules.d/Create a user group for the usb device access:sudogroupaddusbtmcAdd any relevant users to the group:usermod-aGusbtmc<myuser>Reboot for the changes to take effect.UsageAfter installation, you can use drivers with, e.g.:fromnspyre_drivers.rohde_schwarz.hmp4040.hmp4040importHMP4040withHMP4040('TCPIP::192.168.0.10::5025::SOCKET')aspower_supply:# set the power supply channel 1 to 5Vpower_supply.set_voltage(1,5.0)See the source for all of the available drivers and the import paths.Other DriversIn order to minimize reinventing the wheel, below is a list of other sources of
python instrument drivers. Please contribute if you find other useful sources!pycoboltContributingIf you want to contribute driver code, please submit it as apull request. This project usespoetry. If your driver requires specific
dependencies beyond those currently in use in the project, you should include
them in the pyproject.toml file as extras. See the poetry documentation for
specifics on how to declare these dependencies.
Package: nsq2arangodb
nsq2arangodbNSQ is a realtime distributed messaging platform and ArangoDB is a multi-model database. While NSQ is data agnostic, it
is for sure possible to transport JSON. This package implements insertion of NSQ message bodies into an ArangoDB.Installationpipinstallnsq2arangodbUsageSuccessfully tested withpyArango==2.0.1andpynsq==0.9.1.$pythonnsq2arangodb/nsq2arangodb.py--help
usage:nsq2arangodb.py[-h][--debug][--arangodb-urlARANGODB_URL][--arangodb-databaseARANGODB_DATABASE][--arangodb-usernameARANGODB_USERNAME][--arangodb-passwordARANGODB_PASSWORD][--nsq-addressNSQ_ADDRESS][--nsq-portNSQ_PORT][--nsq-channel-nameNSQ_CHANNEL_NAME]NSQ_TOPICARANGODB_COLLECTION

positionalarguments:NSQ_TOPICARANGODB_COLLECTION

optionalarguments:-h,--helpshowthishelpmessageandexit--debug--arangodb-urlARANGODB_URL--arangodb-databaseARANGODB_DATABASE--arangodb-usernameARANGODB_USERNAME--arangodb-passwordARANGODB_PASSWORD--nsq-addressNSQ_ADDRESS--nsq-portNSQ_PORT--nsq-channel-nameNSQ_CHANNEL_NAMEMost command line switches can also be set via corresponding environment variables.Command Line Examplesaliasn2a="./path/to/nsq2arangodb.py"exportARANGODB_URL="https://avocado.example.com/"exportARANGODB_USERNAME="your-username"exportARANGODB_PASSWORD="your-password"exportARANGODB_DATABASE="your-database"n2ansq-topicarangodb-collection
n2a--channelcustom-channel-nameother-topicother-collectionCode Examples#!/usr/bin/env python3# -*- coding: utf-8 -*-importloggingimportnsq2arangodbasn2an2a.Nsq2ArangoDB(logging.getLogger(),n2a.ArangoDBConfig(url='https://avocado.example.com/',username='your-username',password='your-password',database='your-database',collection='your-collection',),n2a.NsqConfig(address='127.0.0.1',port=4150,topic='your-topic',channel='nsq2arangodb'))LimitationsNo concurrency (but in-flight support)JSON decoding errors are just logged as exceptions and not re-queued, potential solution here is to push them to
another configurable queueDevelopmentpipinstall-rrequirements.txt
Package: nsq2kafka
Reads from NSQ, Publishes to KafkaInstallationpip install nsq2kafkaExamplesBasic examplensq2kafka --nsq-topic=test --nsq-nsqd-tcp-addresses=localhost:4150Realistic examplensq2kafka --nsq-topic=json_clicks \
          --nsq-lookupd-http-addresses=lookupd1.example.com:4161,lookupd2.example.com:4161 \
          --nsq-max-in-flight=5000 \
          --nsq-channel=nsq2Kafka \
          --kafka-bootstrap-servers=kafka1.example.com:9092,kafka2.exampkel.com:9092 \
          --kafka-topic=click_stream_json \
          --kafka-message-key=user_id