Saravanan666/pypi-org huggingface dataset:
Package: npg-init
========npg-init========Generates a project directory for a base Python projectDownload and Install====================1. Use pip::pip install npg_init2. Download source code and install::git clone https://github.com/KuanHulio/new-package-generator.gitcd new-package-generatorpython setup.py installUsage=====Simply go anyway where you want your project and run npg-init
Package: np-gui
npGUIThis package implements Graphical User Interfaces from a NumPy user
perspective: every image corresponds to an ndarray.The main goal of this package is to provide a
simple way (given certain background and tastes) to buildprototypesof graphical user interfaces.
In particular, we do not claim for computational performance.Main featuresThe core class is
ClickableImage whose instances' attributes are:a dictionary of parameter values,a callable that returns an image of fixed shape,regions in that shape defined as boolean images of the same shapeand their corresponding callbacks.When calling the use method of an instance,
the dictionary is passed to the callable, that uses (some of) its values
as arguments and outputs an image which is displayed in a window.Upon clicking on the distinguished regions, their callbacks are called
and alter the parameter values. The image is then refreshed from this
input.When closing the window, the use method returns the dictionary with
its altered values; whence the interaction with the user.These objects can be stacked vertically and horizontally to compose more
complex ones. A certain number of subclasses are proposed as basic
building blocks. The stacked blocks may have parameter keywords in common,
which allows for interactions between them.InstallationThis package can be installed with pip as follows.$ pip install np_guiTo avoiddependency hell,
you might consider installing this package in a virtual environment.Alternatively, you can check the pyproject.toml file to see if this package is
compatible with your setup ; which is likely.DocumentationA detailed documentation of this package is available onGitHub Pages--- as a website.It is also available in pdf formathere.DemoSome demonstration scripts are provided on theGitHub repository.These are:./demo/puzzles/puzzles.pyPreview of the puzzles.py demo../demo/clock/clock.pyPreview of the clock.py demo.Further developments of the projectThis package could benefit from several enhancements, among other things:develop additional specialized subclasses of ClickableImage,include keyboard interactions,lighten its memory usage.Feel free to open the discussion through issues and pull requests on theGitHub repository.Feedback is also welcome by e-mail or by giving the project a star.
Package: nphelper
This package contains some convenient helper function for numpy.  Nothing
fancy, but quite useful.
It works with python 2.7, 3.4, and 3.5.InstallSimply install viapip:pip install nphelpernphelperonly depends onnumpy.Usage / FeaturesCreate block arrays (in matlabs’s[A A; B B]spirit):>>>fromnphelperimportblock>>>A=np.array([[1,2,3]])>>>B=np.array([[2,3,4]])>>>C=np.ones((2,6))>>>block([[A,B],[C]])array([[1,2,3,2,3,4],[[1,1,1,1,1,1],[[1,1,1,1,1,1]])Compute the cartesian product (similar toitertools.product):>>>fromnphelperimportcartesian_product>>>cartesian_product([[1,2],[3,4]])array([[1,3],[1,4],[2,3],[2,4]])Easily multiply many arrays without the cubersomedotsyntax. It’s also
much faster than dot because it selects the fastest evaluation order.
(This is part of numpy 1.10.0.)>>>fromnphelperimportmulti_dot>>>A=np.random.random((10000,100))>>>B=np.random.random((100,1000))>>>C=np.random.random((1000,5))>>>D=np.random.random((5,333))>>># Sick of this?>>>np.dot(np.dot(np.dot(A,B),C),D)# doctest: +SKIP>>># Or this?>>>A.dot(B).dot(C).dot(D)# doctest: +SKIP>>># Use multi_dot>>>multi_dot([A,B,C,D])# doctest: +SKIPTODO along, maxalong, minalong, sumalong, meanalong, stdalong, varalongDevRun the testsRuntoxto run the tests for python 2.7, 3.4, and 3.5:toxYou might have to install addiotional dependencies to run the tests:- ``py.test``,
- ``nose``,
- ``python2.7-dev``,
- ``python3.4-dev``, and
- ``python3.5-dev``.Build the Docscd doc
make htmlYou might have to install addiotional dependencies:pip install sphinx sphinx_rtd_theme
Package: nphusl
HUSL color space conversionA color space conversion library that works with numpy. Seehttp://husl-colors.orgto learn about the HUSL color space.Features1. Fast conversion to RGB from HUSL and vice versa. Convert a 1080p image to
HUSL in less than a second.
2. Seamless performance improvements withNumExpr,Cython, andOpenMP(whichever’s available).
3. Flexiblenumpyarrays as inputs and outputs. Plays nicely withOpenCV,MoviePy, etc.Installationvirtualenv env -p python3source env/bin/activatepip install numpy(optional)pip install Cython(or NumExpr, but Cython is preferred)pip install git+https://github.com/TadLeonard/husl-numpy.gitBasic usageto_rgb(hsl)Convert HUSL array to RGB integer arrayto_husl(rgb)Convert RGB integer array or grayscale float array to HUSLarrayto_hue(rgb)Convert RGB integer array or grayscale float array to array ofhue valuesMoreSeehttps://github.com/TadLeonard/husl-numpyfor complete documentation.
Package: np-iafp
NÃšMEROS PRIMOSEste paquete contiene una funciÃ³n de Python que, al pasarle un nÃºmero como argumento, devuelve todos los nÃºmeros
primos que contiene.
MIT LicenseCopyright (c) 2021 Nacho FontalPermission 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 theSoftware 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.
Package: npica
DescriptionA Python implementation of the nonparametric decomposition described in:Norman-Haignere SV, Kanwisher NG, McDermott JH (2015). Distinct cortical pathways for music and speech revealed by hypothesis-free voxel decomposition. Neuron.Also seethe repository for the original implementation.. From the README there:The algorithm iteratively rotates the top K principal components of the data matrix, X, to maximize a measure of non-Gaussianity ('negentropy'). This procedure is closely related to standard algorithms for independent component analysis, but unlike standard algorithms does not depend on assumptions about the type of non-Gaussian distribution being identified. Because negentropy is estimated with a histogram, the algorithm tends to work well with a large number of data points (~10,000). The run-time of the algorithm increases substantially as the number of components is increased because the optimization is performed via a brute-force search over all pairs of components (run-time is thus proportional nchoosek(K,2) where K is the number of components).Usageimportnumpyasnp# Create synthetic dataM=100# number of featuresN=10000# number of measuresK=3# number of componentsR_true=np.random.rand(M,K)W_true=np.random.exponential(scale=1,size=(K,N))X=R_true@W_true+.01*np.random.normal(M,N)fromnpicaimportICAN_RANDOM_INITS=10RAND_SEED=1ica=ICA(K=K,N_RANDOM_INITS=N_RANDOM_INITS,RAND_SEED=RAND_SEED)ica.fit(X)print(ica.sources)
Package: np-image-buffer
NumPy image circular bufferA NumPy circular buffer for fast image storing and indexing. The project inherits the concepts from Eric Wieser’s original ring buffer (https://github.com/eric-wieser/numpy_ringbuffer) and Dennis van Gils’ DvG_RingBuffer (https://github.com/Dennis-van-Gils/python-dvg-ringbuffer)CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2022-07-22)First release on PyPI.
Package: npindex
SummaryProvide an intuitive way to make ndarray indexing variable like this:from npindex import npidx

green_idx = npidx[:, :, 1]

# assume that im1 and im2 are numpy ndarray
# that were return values of OpenCV's cv2.imread() function.
green_of_im1 = im1[green_idx]
green_of_im2 = im2[green_idx]This is allnpindexdoes.UsageThe signagure of npindex.npidxnpidx(d1, d2=None, d3=None, /)Only positional argument is permitted. And 1, 2, 3 dimentional ndarrays are only supported.Each arguments are treated as a slice object when arguments are passed in the form of slicing notation:npidx[1:2, 3:4, 5:6]
# => (slice(1, 2, None), slice(3, 4, None), slice(5, 6, None))Or, treated as an integer when arguments are passed just as an integer:npidx[1, 2, 3] # => (1, 2, 3)What is the point of that?
OK, I’ll show you it in the next section.How to use effectivelyWe can access to items of ndarray by passing one or more slice objects inside its square brackets like this:import numpy as np
from npindex import npidx

a = np.arange(10) # a => array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
i = npidx[1:5] # i => slice(1, 5, None)
a[i] # => array([1, 2, 3, 4])

a2 = a.reshape(2, 5) # a => array([[0, 1, 2, 3, 4], [5, 6, 7, 8, 9]])
i2 = npidx[:, 2:4] # i2 => (slice(None, None, None), slice(2, 4, None))
a2[i2] # => array([[2, 3], [7, 8]])And it is also possible to access just one value from ndarray:import numpy as np
from npindex import npidx

a = np.arange(10) # a => array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
i = npidx[1] # i => 1
a[i] # => 1

a2 = a.reshape(2, 5) # a => array([[0, 1, 2, 3, 4], [5, 6, 7, 8, 9]])
i2 = npidx[0, 4] # (0, 4)
a2[i2] # => 4When we want to access values from two or more ndarray object, npidx is useful.:import numpy as np
from npindex import npidx

range = npidx[100:300, 150:250, :]
small_im1 = im1[range]
small_im2 = im2[range]InstallLinux, Windows, macOS:pip install npindex
Package: npio
### IntroductionThis is a NanoPi boards based GPIO manipulation package written on C with Python3 wrapper with some improvements and installable from PyPI package. In this package tryed an attempt to maximize the preservation of API compatibility with original package*WiringNP*.### APT#### Common requirementssudo apt update
sudo apt install python3-dev### PyPI#### Installationsudo pip3 install npio### GIT#### Downloadgit clone [https://github.com/leftradio/npio]#### Installationcd npio
python3 setup.py buils sdist bdist
sudo python3 setup.py installFor correct work after installing copy yours board*sys_info*to*/etc/sys_info*path.
Package: npkPy
npkPyThe npkPy package module is an unpacking tool for MikroTiks custom NPK container format. The tool is capable
to display the content of any NPK package and to export all container."NPK stands for MikroTik RouterOS upgrade package"and since there is no solid unpacking tool for the format available, I want to share my approach of it.
The format, in general, is used by MikroTik to install and update the software on MikroTiks routerOs systems.NPK packages can be found here:MikroTik ArchiveThe code covers the ability to modify the container payload. Yet, this ability won't be available for cli.
Please be aware, that you can't create or modifyvalidpackagessince they are signed.All recent packages are signed with EC-KCDSA signature, 
and there's no way to create a valid npk file unless you know a secret key.Installationpip install npkPyUsage$ npkPy is an unpacking tool for MikroTiks custom NPK container format

optional arguments:
  -h, --help            show this help message and exit

input:
  --files FILES         Select one or more files to process
  --srcFolder SRCFOLDER
                        Process all NPK files found recursively in given source folder.
  --glob GLOB           Simple glob. Filter files from --srcFolder which match the given string.

output:
  --dstFolder DSTFOLDER
                        Extract container into given folder

actions:
  --showContainer       List all container from selected NPK files
  --exportAll           Export all container from selected NPK files
  --exportSquashFs      Export all SquashFs container from selected NPK files
  --exportZlib          Export all Zlib compressed container from selected NPK filesCommon understanding: A file represents an NPK package with multiple containers.
Each container 'contains' payloads like descriptions, SquashFs images or Zlib compressed data.Other unpacking toolsIf npkPy does not work for you, check out older approaches of NPK unpacking tools:mikrotik-npknpk-tools
Package: npline
NP LINEA helper package to send a LINE notification message to your teamPrerequisitesPlease use thisguideto create your tokenInstallationpip install nplineExamplefromnplineimportLINEif__name__=="__main__":my_token='hLZXJLmW3vClwGhRxjsayoOKmLe1MYkPoM50yegFwWp'line=LINE(token_id=my_token,instance_id=1)line.send_msg('Hello World!')
Package: nplinker
Badgesfair-software.eurecommendations(1/5) code repository(2/5) license(3/5) community registry(4/5) citation(5/5) checklistComing soonhow FAIR isOther best practicesDocumentationBuild & TestStatic analysisCoverageCitation data consistencyDownloadsNatural Products Linker (NPLinker)NPLinker aims to address the significant bottleneck that exists in the realization of the potential of genome-led metabolite discovery, namely the slow manual matching of predicted biosynthetic gene clusters (BGCs) with metabolites produced during bacterial culture; linking phenotype to genotype.NPLinker implements a new data-centric approach to alleviate this linking problem by searching for patterns of strain presence and absence between groups of similar spectra (molecular families; MF) and groups of similar BGCs (gene cluster families; GCF). Searches can be performed using a number of available analysis methods employed in isolation or together.Currently available analysis methods (scoring methods):Metcalf(standardised): seeHjörleifsson Eldjárn G, et al. (2021),Doroghazi JR, et al. (2014), and thedemo.Rosetta: seeHjörleifsson Eldjárn G, et al. (2021)andSoldatou S, et al. (2021).NPClassScore: see the preprintLouwen JJR, et al. (2022), and thedemo.Setup and usageNPLinker is a Python package, you can install it as following:# create a new virtual environment
python -m venv env
source env/bin/activate

# install nplinker package
pip install nplinker

# install nplinker non-pypi dependencies and databases
install-nplinker-depsDue to hardware requirements of some non-pypi dependecies:NPLinker can only be installed onLinuxandMacOS (Intel chip)MacOS(Apple Silicon, M1/M2 chip)user should execute the install commands in aRosseta-enabled terminal.ForWindowsusers, please use ourdocker image.See the example inJupyter notebookfor a guided introduction to the NPLinker API which shows how to load and examine a dataset. Other notebooks are present showcasing other scoring methods, like forNPClassScore.If you want to visualize and manipulate NPLinker predictions, checkNPLinker Webappfor more info.ContributingIf you want to contribute to the development of nplinker, have a look at thecontribution guidelinesandREADME for developers.
Package: nplocate
Locate Nano ParticlesWhat is thisnplocateis a custom script I wrote to locate very tiny particles from a confocal image. These images often suffered from extreme influences of thePSF, even after very detailed and completed deconvolution procedures.To squeeze a bit more information out of these highly distorted data, I wrote this code to effectly "fit" the entire 3D image. This is done in a quite sloopy way. For a perfect fit, please take a look at the very well craftedperiproject.The ideaThis is not a fully functional particle tracking package liketrackpyorcolloidsorperi. Instead, think ofnplocateas an extension of current tracking packages.The logic behind the code is quite simple. The arguments are,It iseasyto findsomeparticles, even in a highly distorted image.If we know the locations of some particles ({r}), we can measure their average shape (S).With {r} andS, we can simulate a "fake image"We can find previously unfound particles in the difference between the real image and fake image.The more particles we have, the merrier.Installing the codeThe simplest way ispip install nplocateYou can also download this repository, and use the following command to install the codepip install .Using the codeThere are some notebooks in the folderexamplethat introduced how to use this package, along withtrackpy.Cite the codeJust tell people you used trackpy
Package: np-logging
np_loggingFor use on internal Allen Institute networkQuick startFollow the conventions for using theloggingmodule in the standard library:in a script or main module,np_loggingadds console & file handlers and exit messages to the root logger:importnp_logginglogger=np_logging.getLogger()or, in a package or project with multiple modules, all logged messages are propagated to the root logger:importnp_logginglogger=np_logging.getLogger(__name__)# logger.level = logging.NOTSET = 0then log messages as usual:logger.info('test message')logger.warning('test message')No further setup is required, and importingloggingfrom the standard library isn't necessary.To send a message to the Mindscope log-server, usenp_logging.web()and supply a project name, which will
appear in thechannelfield on the server:project_name='spike_sorting'np_logging.web(project_name).info('test message')the web log can be viewed athttp://eng-mindscope:8080For customization, usenp_logging.setup()to supply a logging config dict that specifies
loggers and their handlers & formatters, and np_logging will add extra functionality such as exit messages/emails.logging configs should be specified according to the python logginglibrary dict schemalogging configs on theeng-mindscopeZooKeeper server can also be used directly to setup
logging by supplying their path tonp_logging.setup():np_logging.setup('/projects/np_workflows/defaults/logging')Seenp_configfor further info on using ZooKeeper
for configs.Other input arguments tonp_logging.setup():project_name(default: current working directory name)sets thechanneldisplayed on the log serveremail_address(default:None)if one or more addresses are supplied, an email is sent at program exit reporting the
elapsed time and cause of termination. If an exception was raised, the
traceback is included.log_at_exit(default:True)IfTrue, a message is logged when the program terminates, reporting total
elapsed time.email_at_exit(default:False, orTrueifemail_addressis notNone)IfTrue, an email is sent when the program terminates.Iflogging.ERROR, the email is only sent if the program terminates via an exception.
Package: npls
nplsnpls- this module is a Python library for the N-PLS1 regression with L2-regularization.InstallationInstall the current version withPyPI:pipinstallnplsOr from Github:pipinstallhttps://github.com/89605502155/N-PLS/main.zipUsageYou can fit your own regression model. n_components - is a number of components of SVD decomposition and a is a parameter of L2-regularization. X_train - is a 3d-array. y_train -is a vector.fromnplsimportnplsmodel=npls(n_components=4,a=0.09)model.fit(X_train,y_train)#components of svd-decompositionw_i=model.w_iw_k=model.w_k#predicty_predicted=model.predict(X_test)ExampleYou can use this library with Scikit-learn library. For example, we can use GridSearchCV.If you installed a module from PyPi, you should to import it like this:from npls import nplsIf from GitHub or source:from npls import nplsfromnplsimportnplsfromsklearn.metricsimportmean_squared_errorfromsklearn.metricsimportr2_score,make_scorerimportsklearnfromsklearn.model_selectionimportGridSearchCVnpls1=npls()#you can use many error metricsscoring={'mse':make_scorer(mean_squared_error),'r2':'r2'}parametrsNames={'n_components':[4],'a':np.logspace(-25,25,num=51)}gridCought=GridSearchCV(npls1,parametrsNames,cv=5,scoring=scoring,refit='r2',return_train_score=True)gridCought.fit(X_train,y_train)#errorsr2_p=gridCought.score(X_test.copy(),y_test.copy())mse_cv=gridCought.cv_results_["mean_test_mse"]mse_c=gridCought.cv_results_["mean_train_mse"]r2_cv=gridCought.cv_results_["mean_test_r2"]r2_c=gridCought.cv_results_["mean_train_r2"]
Package: npm-analyser
Overviewnpm_analyser is a Python library to monitor an npm package!Package Installerpip install npm-analyser==1.0.0Usagefrom npm_analyser import npm_analyser
'''
  package_name -> string npm package name.
'''
package_details = npm_analyser(package_name)

print(package_details.package_name)
print(package_details.version)
print(package_details.weekly_downloads)
print(package_details.license)
print(package_details.last_published)
print(package_details.get_dev_dependencies)UtilitiesNameDescriptionpackage_nameReturns the npm package name!versionReturns the npm package version!last_publishedReturns the npm package last published date!total_versionsReturns the total versions of npm package!number_of_dependentsReturns the total number of dependents of the npm package!get_dev_dependenciesReturns the dev-dependencies of the npm package!weekly_downloadsReturns the weekly downloads of the npm package!licenseReturns the license of the npm package!unpacked_sizeReturns the unpacked size of the npm package!total_filesReturns the total files of the npm package!RequirementsTherequirements.txtfile has details of all Python libraries for this package, and can be installed usingpip install -r requirements.txtOrganization├── src
│   ├── npm_analyser
          ├── init             <- init
          ├── npm_analyser     <- package source code for npm analyser
├── setup.py             <- setup file 
├── LICENSE              <- LICENSE
├── README.md            <- README
├── CONTRIBUTING.md      <- contribution
├── test.py              <- test cases for unit testing
├── requirements.txt     <- requirements file for reproducing the code packageLicenseMITContributionsFor steps on code contribution, please seeCONTRIBUTING.
Package: npm-analyser-withrepo
Overviewnpm_analyser is a Python library to monitor an npm package!Package Installerpip install npm-analyser==1.0.0Usagefrom npm_analyser import npm_analyser
'''
  package_name -> string npm package name.
'''
package_details = npm_analyser(package_name)

print(package_details.package_name)
print(package_details.version)
print(package_details.weekly_downloads)
print(package_details.license)
print(package_details.last_published)
print(package_details.get_dev_dependencies)UtilitiesNameDescriptionpackage_nameReturns the npm package name!versionReturns the npm package version!last_publishedReturns the npm package last published date!total_versionsReturns the total versions of npm package!number_of_dependentsReturns the total number of dependents of the npm package!get_dev_dependenciesReturns the dev-dependencies of the npm package!weekly_downloadsReturns the weekly downloads of the npm package!licenseReturns the license of the npm package!unpacked_sizeReturns the unpacked size of the npm package!total_filesReturns the total files of the npm package!RequirementsTherequirements.txtfile has details of all Python libraries for this package, and can be installed usingpip install -r requirements.txtOrganization├── src
│   ├── npm_analyser
          ├── init             <- init
          ├── npm_analyser     <- package source code for npm analyser
├── setup.py             <- setup file 
├── LICENSE              <- LICENSE
├── README.md            <- README
├── CONTRIBUTING.md      <- contribution
├── test.py              <- test cases for unit testing
├── requirements.txt     <- requirements file for reproducing the code packageLicenseMITContributionsFor steps on code contribution, please seeCONTRIBUTING.