Saravanan666/pypi-org huggingface dataset:
Package: ndjson-testrunner
ExportsJSONTestRunner, aunittestTestRunnerclass that outputsndjson. One JSON record per test result:{"type":"success"|"expected_failure"|"failure"|"error"|"unexpected_success"|"skip","id":"module.TestClass.test_function","desc":null|"First line of test function docstring","msg":null|"Exception traceback or reason for skipping"}To be used for test result storage or interprocess communication.UsageUse it programmatically:>>> import unittest
>>> from ndjson_testrunner import JSONTestRunner
>>> unittest.main("test_module_name", testRunner=JSONTestRunner)or from the command line:python-mndjson_testrunnertest_module_nameCheck out e.g. howIRKernel’s usagelooks.
Package: ndjsonTosvg
Author: Stephen ThompsonndjsonTosvg is a utility to convert data from Google’sQuickdrawdataset to scalable vector
graphics format. The input data should be in Google’s simplified ndjson format.ndjsonTosvg is part of theSciKit-Surgerysoftware project, developed at theWellcome EPSRC Centre for Interventional and Surgical Sciences, part ofUniversity College London (UCL).ndjsonTosvg supports Python 3.x.UsagendjsonTosvg --filein FILEIN -n NUMBEROFSAMPLESFor more usage runndjsonTosvg --helpPlease explore the project structure, and implement your own functionality.DevelopingCloningYou can clone the repository using the following command:git clone https://github.com/thompson318/ndjsonTosvgRunning testsPytest is used for running unit tests:pip install pytest
python -m pytestLintingThis code conforms to the PEP8 standard. Pylint can be used to analyse the code:pip install pylint
pylint --rcfile=tests/pylintrc ndjsontosvgInstallingYou can pip install directly from the repository as follows:pip install git+https://github.com/thompson318/ndjsonTosvgContributingPlease see thecontributing guidelines.Useful linksSource code repositoryDocumentationLicensing and copyrightCopyright 2020 University College London.
ndjsonTosvg is released under the BSD-3 license. Please see thelicense filefor details.AcknowledgementsSupported byWellcomeandEPSRC.
Package: ndk
Nagios Development KitNDK is a software development framework for defining Nagios Object in code and deploy it to your Nagios.Use the NDK to define your resources you want monitor to.Quick StartExamplefromndk.stackimportStackfromndk.objects.commandimportEmailfromndk.objects.hostimportHostfromndk.objects.timeperiodimportTwentyFourSevenstack=Stack('StackTesting')_24x7=TwentyFourSeven(stack)email=Email(stack)host=Host(stack,host_name='foo',check_period=self.tp,notification_period=self.tp)print(stack.synth())Testingpytest
Package: ndlearn
Network-Dictionary-LearningLearning from and reconstructing networks using MCMC motif sampling and Nonnegative Matrix FactorizationInstallationTo install the Network Dictionary Learning package, run this command in your terminal:$pipinstallndlearnThis is the preferred method to install Network Dictionary Learning. If you don't havepipinstalled, theseinstallation instructionscan guide you through the process.UsageOur package lies on the backbone of the NNetwork class (seehttps://github.com/HanbaekLyu/NNetwork).>>>fromndlimportWtd_NNetwork>>>G=Wtd_NNetwork()>>>G.load_add_edges_wtd("example.txt",use_genfromtxt=True,delimiter=",")Learning a Dictionary>>>fromndlimportNetDictLearner>>>NDL=NetDictLearner(G=G,n_components=25,k=21)>>>NDL.train_dict()>>>W=NDL.get_dictionary()Display and save the learned dictionary:>>>NDL.display_dict(path="example_dict.npy")Replace the dictionary with a pre-trained dictionary and/or replace the network:>>>NDL.set_dict(W)>>>NDL.set_network(G)Reconstructing a Network>>>G_recons=NDL.reconstruct(recons_iter=10000)The NetDictLearner class provices the base code to perform network dictionary learning and network reconstruction, but we also provide a series of helper fuctions to use alongside the NetDictLearner class to assist on performing tasks related to Network Dictionary Learning and evaluate performance.Measure Accuracy of Reconstruction (Jaccard)>>>fromndlimportutils>>>utils.recons_accuracy(G,G_recons)0.92475345Network Denoising ApplicationTo add positive corruption (overlaying edges) or negative corruption (deleting edges) from a networks:>>>len(G.edges())1000>>>G_add=utils.corrupt(G,p=0.1,noise_type="ER")>>>G_remove_10=utils.corrupt(G,p=0.1,noise_type="negative")>>>len(G_remove_10.edges())900To measure the AUC of network denoising with positive (or negative) noise:>>>G_corrupt=utils.corrupt(G,p=0.1,noise_type="ER")>>>NDL_corrupt=NetDictLearner(G=G_corrupt)>>>NDL_corrupt.train_dict()>>>G_corrupt_recons=NDL_corrupt.reconstruct(recons_iter=10000)>>>utils.auc(original=G,corrupt=G_corrupt,corrupt_recons=G_corrupt_recons,type="positive")0.864578
Package: ndlib
NDlib - Network Diffusion LibraryNDlib provides implementations of several spreading and opinion dynamics models.The project documentation can be found onReadTheDocs.If you useNDlibas support to your research consider citing:G. Rossetti, L. Milli, S. Rinzivillo, A. Sirbu, D. Pedreschi, F. Giannotti.NDlib: a Python Library to Model and Analyze Diffusion Processes Over Complex Networks.Journal of Data Science and Analytics. 2017.DOI:0.1007/s41060-017-0086-6(pre-print available onarXiv)G. Rossetti, L. Milli, S. Rinzivillo, A. Sirbu, D. Pedreschi, F. Giannotti.
"NDlib: Studying Network Diffusion Dynamics",
IEEE International Conference on Data Science and Advanced Analytics, DSAA. 2017.Promo VideoInstallationTo install the library just download (or clone) the current project and copy the ndlib folder in the root of your application.Alternatively use pip:sudopipinstallndlibDocumentation, Tutorials and Online EnvironmentsFor examples, tutorials and a complete reference visit the project documentation website onReadTheDocs.If you would like to testNDlibfunctionalities withouth installing anything on your machine consider using the preconfigured Jupyter Hub instances offered bySoBigData++.Jupyter Notebook TutorialInterested in an extensive tutorial on NDlib? Check out the official Jupyter Notebooks!NDlib OverviewNDlib-RestCollaborate with us!NDlibis an active project, any contribution is welcome!If you like to include your model in NDlib (as well as inNDlib-REST) feel free to fork the project, open an issue and contact us.How to contribute to this project?Contributing is good, doing it correctly is better! Check out ourrules, issue a properpull request/bug report/feature request.Do you want to be part of the NDlib community to discuss enhancements, desiderata, bug fix? Join us onSlack!We are a welcoming community... just follow theCode of Conduct.
Package: nd-line
nd_lineInterpolate points on an n-dimensional line by euclidean arc length.Installationpip install nd_lineMethodsln.interp(dist): returns a point dist length along the arc of the lineln.interp_rat(ratio): ratio should be a value between 0 and 1, returns a value ratio*length along the lineln.splineify(samples): generates a new line from a spline approximation, occurs in place, use samples to specify how many points will be sampled from the splines to generate the new lineAttributesln.points: the points of the lineln.length: the length of the lineln.type: linear if not spline approximated, spline otherwiseExamplefromnd_line.nd_lineimportnd_lineimportnumpyasnpln=nd_line(np.array([[0,0,0],[1,1,1],[2,2,2]]))interpolated_point=ln.interp(1.5)line_length=ln.lengthhalfway_point=ln.interp_rat(0.5)NotesCurrently points must be sampled one at a time, future version will allow interpolation of a list of distances along the line
Package: ndmap
ndmap, 2022-2023Higher order partial derivatives computation with respect to one or several tensor-like variables.
Taylor series function approximation (derivative table and series function representation).
Parametric fixed point computation.Install & build$ pip install git+https://github.com/i-a-morozov/ndmap.git@mainor$ pip install ndmap -UDocumentationhttps://i-a-morozov.github.io/ndmap/Derivative (composable jacobian)Compute higher order function (partial) derivatives.>>>fromndmap.derivativeimportderivative>>>deffn(x):...return1+x+x**2+x**3+x**4+x**5...>>>importtorch>>>x=torch.tensor(0.0)>>>derivative(5,fn,x)[tensor(1.),tensor(1.),tensor(2.),tensor(6.),tensor(24.),tensor(120.)]>>>fromndmap.derivativeimportderivative>>>deffn(x):...x1,x2=x...returnx1**2+x1*x2+x2**2...>>>importtorch>>>x=torch.tensor([0.0,0.0])>>>derivative(2,fn,x,intermediate=False)tensor([[2.,1.],[1.,2.]])>>>fromndmap.derivativeimportderivative>>>deffn(x,y):...x1,x2=x...returnx1**2*(1+y)+x2**2*(1-y)...>>>importtorch>>>x=torch.tensor([0.0,0.0])>>>y=torch.tensor(0.0)>>>derivative((2,1),fn,x,y)[[tensor(0.),tensor(0.)],[tensor([0.,0.]),tensor([0.,0.])],[tensor([[2.,0.],[0.,2.]]),tensor([[2.,0.],[0.,-2.]])]]Derivative (gradient)Compute higher order function (partial) derivatives.>>>fromndmap.gradientimportseries>>>deffn(x):...return1+x+x**2+x**3+x**4+x**5...>>>importtorch>>>x=torch.tensor([0.0])>>>series((5,),fn,x,retain=False,series=False){(0,):tensor([1.]),(1,):tensor([1.]),(2,):tensor([2.]),(3,):tensor([6.]),(4,):tensor([24.]),(5,):tensor([120.])}>>>fromndmap.gradientimportseries>>>deffn(x):...x1,x2=x...returnx1**2+x1*x2+x2**2...>>>importtorch>>>x=torch.tensor([0.0,0.0])>>>series((2,),fn,x,intermediate=False,retain=False,series=False){(2,0):tensor(2.),(1,1):tensor(1.),(0,2):tensor(2.)}>>>fromndmap.gradientimportseries>>>deffn(x,y):...x1,x2=x...y1,=y...returnx1**2*(1+y1)+x2**2*(1-y1)...>>>importtorch>>>x=torch.tensor([0.0,0.0])>>>y=torch.tensor([0.0])>>>series((2,1),fn,x,y,retain=False,series=False){(0,0,0):tensor(0.),(0,0,1):tensor(0.),(1,0,0):tensor(0.),(0,1,0):tensor(0.),(1,0,1):tensor(0.),(0,1,1):tensor(-0.),(2,0,0):tensor(2.),(1,1,0):tensor(0.),(0,2,0):tensor(2.),(2,0,1):tensor(2.),(1,1,1):tensor(0.),(0,2,1):tensor(-2.)}Desription>>>importndmap>>>ndmap.__about__AnimationsStable and unstable invariant manifolds approximationCollision of fixed pointsReduce real part of a hyperbolic fixed point
Package: ndmath
ndmathndmath is a Python library for N-dimensional complex step and finite step differentiation, and Newton's method.InstallationUse the package managerpipto install ndmath.pipinstallndmathExamplesCalculating the Jacobian at a point:importndmathndmath.complexGrad(lambdax:x[0]**2+x[1],[1,2])# returns array([2., 1.])ndmath.finiteGrad(lambdax:x[0]**2+x[1],[1,2],10**-7)# returns array([2.0000001, 1.])Using the root-finding Newton's method:deffunc(x):return[(x[1]-3)**2+x[0]-5,2*x[1]+x[0]**3]deffprime(x):returnndmath.complexGrad(func,x)x0=[0,0]#initial estimatendmath.nDimNewton(func,x0,fprime)# returns array([-1.02890183,  0.54461778])DependenciesNumPyContributingPull requests are welcome. Feel free to open an issue first to discuss what you would like to change.LicenseMITReferencesMartins, J. R. R. A., Sturdza, P., and Alonso, J. J., 2003, "The Complex-Step Derivative Approximation," ACM Trans. Math. Software, 29(3), pp. 245–262.
Package: nd-mlp-mixer
nd-mlp-mixer | TensorFlowpip install nd-mlp-mixerBased onMLP-Mixer[1], but with variants generalized to n-dimensions.See a basic n-dimensional mixer example innd-examples.ipynb.Original MLP-MixerTo use the model as described in the paper:fromnd_mlp_mixerimportMLPMixer# S/32, from table 1mlp_mixer=MLPMixer(num_classes=1000,num_blocks=8,patch_size=32,hidden_dim=512,tokens_mlp_dim=256,channels_mlp_dim=2048)Or a more reasonable size model, on MNIST:importtensorflowastffromtensorflow.kerasimportdatasets,layersfromnd_mlp_mixerimportMLPMixer# Load data(train_images,train_labels),(test_images,test_labels)=datasets.mnist.load_data()train_images,test_images=train_images/255.0,test_images/255.0train_images,test_images=train_images.astype("float32"),test_images.astype("float32")height,width=train_images.shape[-2:]num_classes=10# Prepare the model (add channel dimension to images)inputs=layers.Input(shape=(height,width))h=layers.Reshape([28,28,1])(inputs)mlp_mixer=MLPMixer(num_classes=10,num_blocks=2,patch_size=4,hidden_dim=28,tokens_mlp_dim=28,channels_mlp_dim=28)(h)model=tf.keras.Model(inputs=inputs,outputs=mlp_mixer)print(model.summary())# Trainmodel.compile(optimizer='adam',loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True),metrics=['accuracy'])history=model.fit(train_images,train_labels,batch_size=64,epochs=10,validation_data=(test_images,test_labels),verbose=2)[1] MLP-Mixer paper:https://arxiv.org/abs/2105.01601@misc{tolstikhin2021mlpmixer,
      title={MLP-Mixer: An all-MLP Architecture for Vision}, 
      author={Ilya Tolstikhin and Neil Houlsby and Alexander Kolesnikov and Lucas Beyer and Xiaohua Zhai and Thomas Unterthiner and Jessica Yung and Daniel Keysers and Jakob Uszkoreit and Mario Lucic and Alexey Dosovitskiy},
      year={2021},
      eprint={2105.01601},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}
Package: ndn4sid
ndn4sidA first implementation of ndn4sid.InstallationRun the following command to install:pip install ndn4sidUsageThe source folder contains a directory with examples.TestingIn order to run the tests, install the package with the [dev] option.
This is done via the commandpip install "nd4sid[dev]"To test the current version of the code on your machine, you can runpytestTo do a full test of the code usetoxtoxSteps to update the codeUpdate the manifest file to include all files in de final projectcheck-manifest --updateCompile the latest version of the codepython setup.py bdist_wheel sdistUpload the code to Pypi, make sure to update the build number.twine upload --skip-existing dist/*
Package: ndn-storage
This python library providesdifferent storage APIsforNamed Data Networking (NDN) applications. At first,
it was thought that onlyndn-python-repowould need such API; but with the ever-growing NDN applications such
as variations of NDN repositories (repo, nr-archway, hydra, etc), NDN sync protocols (svs, psync, etc), and more; it is imperative that
an API is provided.The Named Data Networking Storage Library is implemented using and simply adds topython-ndn, nicknamedndn-python-storageobtained by the pip libraryndn-storage.The implementation is on ourgithub-repo.There is no documentation at this moment. However, as more storage solutions are added, a documentation will be formed.To install, please use the pip libraryndn-storage. To import, use ndn.storage like you would with ndn.encoding.
Package: ndn-svs
This python library implements theStateVectorSync(SVS)protocolto synchronise states between multiple clients over NDN fordistributed realtime applications.The Named Data Networking (NDN) StateVectorSync Protocol implementation usingpython-ndnandndn-storagenicknamedndn-python-svsobtained by the pip libraryndn-svs.The implementation is on ourgithub-repo.There aretwo branches:enhanced: main branch, specification with added enhancements (found in the docs)traditional: original StateVectorSync protocol specificationPlease see ourdocumentation.
Package: ndnt
ndntThe tool that helps you inspect indents of your files.InstallationYou can install it via:pipinstallndntUsageTo get list of all available options run one of following:ndnt-h
ndnt--helpBasicHere is how you can inspect indentation of all current directory
programming files:ndntBy defaultndntsearches for files of any programming languages.
It includes many popular languages, but if your language doesn't supported
please, create issue.If you want to inspect specific file or directory you can do it like this:>ndntsetup.py3.43|setup.py

>ndnt.5.64|cronjobs/cronjobs.py0|extension/popup.js5.99|extension/colors.js9.24|extension/content.js0.67|frontend/babel.config.js3.6|frontend/vue.config.js5.16|frontend/src/index/App.vue0.52|frontend/src/index/main.js5.24|frontend/src/index/views/Home.vue4.65|frontend/src/index/views/Favorites.vue6.84|frontend/src/login/App.vue0.2|frontend/src/login/main.js0|gunicorn.conf.py4.99|app.py8.21|jobs/jobs.py
-------------5.95|TotalMany pathsYou can inspect more than one path at the same time:>ndntndnt/paths.pytests/test_paths.py5.76|ndnt/paths.py4.97|tests/test_paths.pyNdnt can accept output from other commands,
likefdorrg:>fdpaths|xargsndnt5.76|ndnt/paths.py4.97|tests/test_paths.pyExact extensionIf you want to get information about files with specific extension
you can use-e(or--extension) option:ndnt-e.pyIgnoredBy defaultndntreads .gitignore file but you can disable it
with--no-gitignoreflag, for example:ndnt-e.py--no-gitignore
Package: ndocker
# ndocker## Intoduction: docker network configration for UTEOrigin:Docker container network configration is a repetitive job in our daily work.
We run many contaniers on a server, and configure several interfaces for each container. When container restarted, all networks are lost.so we need a tool to get things done, that’all.## Get startedFor centos` yum-yinstallepel-releaseyum-yinstallpython-pippip install ndocker `
Package: ndop-downloader
NDOP Downloader is an application for downloading of records of species
occurence from official database of the Nature Conservation Agency of
the Czech RepublicNálezová databáze ochrany přírody AOPK ČR. This package only provides access
to the data, please visit the official databse site for additional
information about the data, the database, license terms and reference
rules.To use the database, it isnecessarytocreate an accountin the AOPK (ISOP)
information system.Download data (.csv, .shp) from NDOP based on input parametres. Unlike
the offical web filter, its possible to input polygon layer (EPSG:5514)
for search in area and amount of results is not limited. Login can be
stored in configuration file.ndop.cfg.This package is a part of NDOP Downloader QGIS plugin. Whole project is
maintained onGitHubChangelog0.1.8 - fixed bug: header and first line missing in table download (issue #33)
Package: ndp
Data reduction for neutron depth profiling measurementsWhat is in this git:src/ndp/reduce.py - Reduces neutron depth profiling data from a single sample according to a schema.json filesrc/ndp/schema.py - Creates the schema.json file used to control the flow of data processing in Reduce.pysrc/ndp/example_files/config.json - instrument configuration file in JSON format, read by Reduce.pysrc/ndp/jupyter/ndpReduce.ipynb - Jupyter notebook interface for reducing ndp data with Reduce.pysrc/ndp/jupyter/schema.ipynb - Jupyter notebook interface for creating schema filesTo install:Install Python>=3.9 via anaconda.com (recommended) or python.org(optional) Create an environment for ndp within Anaconda or using virtualenvOpen the Anaconda prompt or your favorite command line emulator and run:$pipinstallndpTo run this code:Navigate in the terminal to your working directory and run$python-mndp.get_notebooksStart a jupyter server from this directory$jupyter-labModify schema.ipynb to have all of the info specific to your data setsRun schema.ipynb to create your schema fileModify ndpReduce.ipynb to load your new schema fileModify ndpReduce.ipynb to reflect the directory where you are keeping Reduce.pyRun all the cellsAdjust the plots to your preferences
Package: ndp-app-migration
Usage and Installationpip3 install ndp-app-migration==0.5

from ndp_migration.objects_migration import migration_data_objects

migration_data_objects(folder_path,key_decrypt,api_url,jar_file_name,option_for_backup,target_host,target_user_id,target_password,con_name,pipe_name,object_type)

migration_data_objects(source_email_address, source_password, folder_path, source_api_url, option_for_backup,target_api_url, ,target_user_id,target_password,con_name,pipe_name,object_type)
Package: ndp-app-versioncontrol
Usage and Installationpip3 install ndp-app-versioncontrol==1.9

from ndp_versioncontrol.generate_backup_sql import object_versioncontrol

object_versioncontrol(folder_path,user_email,user_password,api_url,backup_or_restore,data_object_type,data_object_container_name,data_object_name)
Package: ndpatch
NDPatchis the package for extracting arbitrary regions from an N-dimensional numpy array assuming it mirrored infinitely.InstallationThe easiest way to install the latest version is by using pip:$ pip install ndpatchYou may also use Git to clone the repository and install it manually:$ git clone https://github.com/ashkarin/ndpatch.git
$ cd ndpatch
$ python setup.py installUsageTo take a patch from the array:importnumpyasnpimportndpatcharray=np.arange(25).reshape((5,5))index=(1,2)shape=(3,3)patch=ndpatch.get_ndpatch(array,shape,index)# patch =# [[ 7,  8,  9],#  [12, 13, 14],#  [17, 18, 19]]To take get a random patch index:importnumpyasnpimportndpatcharray_shape=(5,5)index=ndpatch.get_random_patch_index(array_shape)To extract random patches from the array:importnumpyasnpimportndpatchnpatches=10patch_shape=(3,3)array=np.arange(100).reshape((10,10))patches=[ndpatch.get_random_ndpatch(array,patch_shape)for_inrange(npatches)]To split the 3D array on set of overlapping 3D patches and rebuild it back:importnumpyasnpimportndpatcharray=np.arange(0,125).reshape((5,5,5))patch_shape=(4,3,3)overlap=2indices=ndpatch.get_patches_indices(array.shape,patch_shape,overlap)patches=[ndpatch.get_ndpatch(array,patch_shape,index)forindexinindices]reconstructed=ndpatch.reconstruct_from_patches(patches,indices,array.shape,default_value=0)# Validateequal=(reconstructed==array)assert(np.all(equal))
Package: ndpretty
ndprettyYour little helper to display numpy ndarrays in a pretty table in Jupyter notebooks.Jupyter notebooks are a great way to develop.ndprettymakes it even better for people who use numpy by providing nice formatting ofndarrays.Installpip install ndprettyHow to useimportndprettyimportnumpyasnpDisplay an ndarray usingndarray_html():ndpretty.ndarray_html(np.random.rand(3,4))If you want allnp.ndarrays andtorch.Tensors to be automatically formatted like this, load the default configuration:ndpretty.default()After this line has been exectued, all cell outputs that arenp.ndarrayortorch.Tensorare automatically formatted by ndpretty.a=np.random.rand(10,5)a10×5 float64 ndarrayIt works with all numpy dtypes, multi-dimensional arrays and PyTorch tensors.Find more usage exampleshere.Why?Look at thealternatives.AuthorPatrick Deutschmann (patrick@deutschmann.xyz)
Package: ndpulsecount
Copyright (c) 2020 RorySpeirsPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.Description: # ndpulsegenThe computer based software to communicate with the Narwhal Devices Pulse CounterPlatform: UNKNOWN
Requires-Python: >=3.8