Saravanan666/pypi-org huggingface dataset:
Package: npmap
np-mapA simple tool for calculating object detection map .Usage:fromnpmapimportConfusionMatrixmatrix=ConfusionMatrix(num_classes=80)# coco 80 classes# cleanup firstmatrix.clean()for(pred,gt)in(preds,gts):# for loop for every images# pred format x0, y0, x1, y1, scores, labels# gt format x0, y0, x1, y1, labels# if there is no gt or pred, please set pred=None or gt=Nonematrix.add(pred,gt)# calculate map, map50, etc.res=matrix.calculate()# print mapprint(res['map'])# print map50print(res['map50'])# print marprint(res['mean_recall'])# print mpprint(res['mean_precision'])...# so on
Package: npm-audit-checkmk
NPM Audit Interpreter and Check MK output generatorThis program takes the output of anpm audit --jsonrun and interprets it.
The parameters given define the thresholds to be used, and the output is written to the given directory for check mk local checks.Requirements:An npm installation with thenpm auditcommand available.>npm_audit_checkmk-ftests/example.json-s'frontend_vulnerabilities'<<<local>>>
Pfrontend_vulnerabilitiesINFO=0|LOW=7;20|MODERATE=2;10;20|HIGH=55;1;3|CRITICAL=2;0;0See`npmaudit`formoredetails.Usagepushd/path/to/your/project
npmaudit--json|npmauditcheckmk-o/var/lib/check_mk_agent/spool/90000_npm_audit.txtpopd
Package: npm-calmarendian-date
Calmarendian DateWhat is It?npm_calmarendian_dateis a Python package that provides aCalmarendianDateclass for theCalendar of Loreleiin the same way the Python Standard Library provides adateclass for the Gregorian Calendar.The Calendar of LoreleiThe planet ofCalmarenditakes, from the perspective of an observer from Earth, seven years to orbit its star. TheCalendar of Lorelei, which divides this orbital period into seven seasons of fifty weeks of seven days (plus a few days added on to keep everything lined up) is what Calmarendians use to keep track of time.Where to Get ItThe source code is hosted on GitHub at:https://github.com/natashamoorfield/npm_calmarendian_dateInstallationBinary installers for the latest released version are available at thePython
Package Index (PyPI).We strongly recommend installing our packages in a virtual environment rather than cluttering up your system's Python installation with all this junk.pipinstallnpm-calmarendian-dateDo not install any versions prior to 0.3.0; they are broken. If you already have an earlier version installed, upgrade using:pipinstall--upgradenpm-calmarendian-dateUsageThis simple example:fromnpm_calmarendian_dateimportCalmarendianDated=CalmarendianDate.from_date_string('777-7-07-7')print(d.colloquial_date())will output:Sunday, Week 7 of Onset 777Full documentation awaited.Requirementsnpm_calmarendian_datehas been tested with Python 3.8, 3.9 and 3.10.It has no other dependencies.
Package: npm-cockpit
NPM-COCKPITA user-friendly application for JavaScript developers to visualize the dependency tree of NPM packages and NodeJS applications.Allows to get statistical info about application dependencies tree state. Provides an interface for filtering and viewing information through convenient tables and diagrams.FeaturesVisual representation of the entire dependency tree of a project. With ability to look all the paths for a specific package. Dependency tree can be visualized as a tree or directed network chartDetailed information about each package, including version, description, and related links.Identify potential issues such as outdated, deprecated or vulnerable packages.AND MUCH MORE!RequirementsGeneralTerminal or command prompt accessTarget application folder should contain node_modules folder with installed dependencies and package.jsonNode.js and NPM installedAs NPM packagepythonorpython3command should be availableUsageCommand paramspath- a path to project folder with package.json and node_modules insideport- available local port to serve the app (default8080)PIPpip install npm-cockpitnpm-cockpit [path] [port]NPM globally installednpm install --global npm-cockpitnpm-cockpit [path] [port]NPXnpx npm-cockpit [path] [port]NPM dependency in packagenpm install npm-cockpitand add the run script in the package json with proper paramsDevelopmentgit clone https://github.com/b0000ring/npm-cockpit.gitcd npm-cockpitnode index.js [path] [port]orpython __main__.py [path] [port]
Package: npmdownloader
Download packages from NPM for private npm servers such as verdaccio and sinopiaPython 3.5+ onlyInstallationInstall using pip:$pipinstallnpmdownloaderUsageDownloading using the CLI:$python-mnpmdownloader-f[PACKAGE_FILE_LIST]-o[DOWNLOAD_DIR]-c[NUM_OF_WORKER_PROCESSES]Downloading a package using code:fromnpmdownloaderimportNpmPackageDownloaderdownloader=NpmPackageDownloader('out_dir')# Download a package and its depedencies as tarballs# if a package tarball already exists, the download will be skippeddownloader.download('react',version='15.4.1')Downloading multiple packages using code:fromnpmdownloaderimportMultiPackageDownloaderdownloader=MultiPackageDownloader('packages_list.txt','out_dir',workers_count=4)
Package: npmenv
npmenvA wrapper for npm that stores node_modules outside of project and provides easy access to them.npmenvis a Python module inspired bypipenvin that it stores packages outside of projects (in an OS-specific dir) to avoid cluttering projects. It also has aruncommand that putsnode_modules/.bininPATHbefore running the given command. If youinstall nodein a project then it will have the added benefit of using that node version to run your code and third-party scripts. You can then lock down your node version per-project and upgrade them individually when desired.Install:pip install npmenvSupports:All platforms (Linux, MacOS, Windows)Requires:Python 3.6+PyPI package|SourceHow it worksAside fromenv-...commands, npmenv hands over tonpm. But before handing over, it symlinks yourpackage.jsonand/orpackage-lock.jsoninto the virtual environment and runs npm in that environment. You can access anynode_modulesfiles via the path returned bynpmenv env-location, which will stay the same even if the environment is removed and recreated (though not if your project path changes).Note:npmenv does not handle any other files generated by npm (such as shrinkwrap), though more features may be added in future.CLI usagenpmenv 0.2.0

env-list            List all currently existing environments
env-location        Output path to env for current dir (may not exist yet)
env-modules [name]  List items in node_modules (recursive if package name given)
env-run cmd [args]  Run command with env's bin dir in start of PATH
env-rm [env_id]     Remove the env for current dir (or env with given id)
env-cleanup         Remove envs for projects that no longer exist
*any npm command*Module APIclass NpmenvException(builtins.Exception)
    Exception for npmenv-related issues

env_cleanup() -> List[Tuple[str, pathlib.Path, str]]
    Remove envs for projects that no longer exist (no package or lock file)

env_list() -> List[Tuple[str, pathlib.Path, Union[str, NoneType]]]
    Return list of tuples (env id, project dir, issue with project existance)

env_location(proj_dir:Union[pathlib.Path, str]=None) -> pathlib.Path
    Return env dir path for given project dir (may/may not exist yet)

env_npm(args:str='', proj_dir:Union[pathlib.Path, str]=None) -> subprocess.CompletedProcess
    Execute npm with given args in env dir of given project dir

env_rm(identifier:Union[pathlib.Path, str]=None) -> pathlib.Path
    Remove the env for given project dir or env id (defaults to CWD)

env_run(args:str, proj_dir:Union[pathlib.Path, str]=None, run_kwargs:Any={}) -> subprocess.CompletedProcess
    Run a command with node_modules/.bin at start of PATH environment variableVersion history0.2.0           Added run_kwargs arg to env_run
0.1.2           Added env-modules command
0.0.2           Improved typing support (no functional changes)
0.0.1           Improved documentation (no functional changes)
0.0.0           Version 0.0.0
Package: np-mlp
MLP projectSimple and light-weight implementation of a Multi-Layer Perceptron library using only NumpyCode exampleThe following lines showcase the use of this library to run a simple train-predict taskInstantiate a new empty modelfrommodelsimportBasicMLPmodel=BasicMLP()Add layersOnly first layer needs input_dim specified. Rest of layers will infer from layer that feeds into themfromlayersimportDensefromactivationsimportSigmoid,Relun_features=10model.add(Dense(units=32,activation=Relu(),input_dim=n_features))model.add(Dense(units=64,activation=Relu()))model.add(Dense(units=8,activation=Relu()))model.add(Dense(units=1,activation=Sigmoid()))Compile modelThis is simply to mimic the behavior ofKeraslibrary. All this does is initialize the layersmodel.compile()Train a quantile modelfromlossesimportQuantileparams={"learning_rate":0.001,"n_epoch":100,"print_rate":10}loss=Quantile(0.5)model.train(loss,train_data=[X,y],params=params)Train using train funciton#### Train a quantile modelfromtrainimportModelTrainparams={"n_epoch":1000}trainer=ModelTrain(params)loss=Quantile(0.5)trainer.train(model,loss=loss,train_data=[X,y])Save and load a modelmodel.save("model.json")mlp=BasicMLP()mlp.load("model.json")Train parameters:n_epoch: number of epochs (default: 10)batch_size: batch size (default: 128)n_stopping_rounds: N of consecutive epochs without improvement for early-stopping (default: 10)learning_rate:1,  # learning rate (default: 0)reg_lambda:  # regularization factor for gradients (default: 0)verbose: flag to plot train  results (default: True)print_rate: print train results every print_rate epochs (default: 5)early_stopping: flag to use early-stopping (default: False)AuthorsGonzalo Franco-GithubLicenseThis project is licensed under the GNU  linse- see theLICENSE.mdfile for detailsCollaboratingHere's a list of ideas to be inplemented in the future. If you are interested in collaborateing, feel free to pick any of these! If there is anything else that you would like to contribute with, please open anissueSave train log: save train log along with the modelAuto-save best train when using cross-validation: store best train iterationKeep trainlog: when model train is stopped by hand, train log resets2D Conv layer: add a 2D convolutional layer3D Conv layeradd a 3D convolutional layerFlatten layer: add a flatten layer to turn convolutional into denseConcat layer: add concat layer so convolutionals and denses can be combinedAutograd: implement autograd libraryLogging: add possibility to pass a logger to train task
Package: npmnuke
# npmnuke 💥> A simple script to remove all node_modules folders in a directory## DescriptionMy PC had a lot of old web projects that I didn’t use anymore, but they were taking up a lot of space. Manually deleting all the node_modules folders was a pain, so I wrote this script to do it for me.By defaul script will ignore folders that start with a dot (.git, .vscode, etc.) and folders that contain a .npmnukeignore file. You can also specify your own ignore file with the–ignore-fileoption or modify.nmpnukeignorein your home directory.## Future plans[x] Add new UI usinghttps://github.com/Textualize/textual[ ] Somehow make it detect monorepos and combine search results for them[ ] Add last modified date to search results[ ] Add option to open search results in file manager## Installation`bash pip install npmnuke `## Usage`bash npmnuke [directory] (options) `## Options–dry-run- Show which folders would be deleted without actually deleting them–ignore-file- Path to the ignore file, by default .npmnukeignore in home directory is used–disable-ignore- Do not use the .npmnukeignore file when scanning for node_modules folders.–ignore-dot [true | false]- Ignore dot folders (.vscode/ .git/ etc.), by default True–verbose- Show verbose output–help- Show help
Package: npm-package-validator
This python package allows you to validate npm package names.
It is a python implementation of the officialnpm/validate-npm-package-namepackage for javascript.$pipinstallnpm_package_validatorCLI Usage$npm_package_validatormy-packageProgrammatic usageValidate an npm package name like this:importnpm_package_validator# Fails! Uppercase is not allowed for new packagesassertnpm_package_validator.valid_new_package('MY-package')However, upper case once has been allowed and you can also validate old, existing packages:assertnpm_package_validator.valid_old_package('MY-package')# Succeeds!When using the CLI, you can use the--oldflag.If you want to know whats wrong with a name, use:fromnpm_package_validator.validateimportvalidate_packageerrors,warnings=validate_package('MY-package')print("Errors:%s"%", ".join(errors))print("Warnings:%s"%", ".join(warnings))A valid new package name must have neithererrorsnorwarnings.
Existing packages can havewarnings,
as the npm validation rules have become stricter over time.CreditsThis package is a port from the officialnpm/validate-npm-package-nameDevelopmentFor detailed instructions seeCONTRIBUTING.TestsYou can run tests with$invoketest$invoketest--min-coverage=90# Fail when code coverage is below 90%$invoketype-check# Run mypy type checksLinting and formattingLint and format the code with$invokeformat$invokelintAll of this happens when you runinvokepre-commit.NoteThis project is still in the alpha stage and should not be considered production ready.
Package: npm-registry-time-machine
NPM registry time machineProxy for limiting the release dates of packages.UsageRun proxy:npm-registry-time-machine--port3000--registryhttps://registry.npmjs.org--timeout120--max-date2022-02-02Set proxy as registry:npmconfigsetregistryhttp://127.0.0.1:3000Now all packages with a release date exceeding the maximum date are hidden for npm.How it worksThis tool is a proxy between npm and the registry. The proxy receives requests from npm and sends them to the registry. Information about packages with a release date exceeding the maximum date is removed from the response. After that, the response is returned to npm. Therefore, npm uses only those packages that were released no later than the maximum date.
Package: npmworkon
npmworkonQuick script to handle nodeenv outside of the virtualenv wrapper.If you want it in the same virtualenv wrapper,nodeenv -pis what you want and you don't need npmworkon.Installationpip install npmworkonThe npm virtualenv will be created in the home directory.npmvirtualenvs. For now, this value is hardcoded.UsageCreate a Python virtualenv➜ mkvirtualenv py_venv
[...]Install npmworkon(py_venv) ➜ pip install npmworkon
[...]Create a npm virtualenv(py_venv) ➜ $(npmworkon node_venv)List npm virtualenv(node_venv) (py_venv) ➜ npmworkon
node_venvDesactivate npm virtualenv(node_venv) (py_venv) ➜ deactivate_nodeRemove npm virtualenv(py_venv) ➜ npmworkon --rm node_venv

(py_venv) ➜ npmworkon
# node_venv is gone :)
Package: npnd
npndNumpy n-dimensional ops (scatter, gather, one-hot, etc)WARNING: This repo is in development. It was automatically generated withmkpylib. If you're reading this message, it means that I use this repo for my own purposes right now. It might not do anything at all; the default functionality isprint('TODO').If you really want to try it out, feel free. I recommend reading through thetestsand commit history to see if it does what you need, orask mefor status updates.Stay tuned!Installpip3 install -U npndOr develop locally:git clone https://github.com/shawwn/npnd ~/npnd
cd ~/npnd
python3 setup.py developUsageimportnpndprint('TODO')LicenseMIT. SeeLICENSEfile.ContactA library byShawn Presser. If you found it useful, please considerjoining my patreon!My Twitter DMs are always open; you shouldsend me one! It's the best way to reach me, and I'm always happy to hear from you.Twitter:@theshawwnPatreon:https://www.patreon.com/shawwnHN:sillysaurusxWebsite:shawwn.com
Package: npnet
Simple Neural NetworksThis is a repo for building a simple Neural Net based only onNumpy.The usage is similar toPytorch.
There are only limited codes involved to be functional.
Unlike those popular but complex packages such as Tensorflow and Pytorch,
you can dig into my source codes smoothly.The main purpose of this repo is for you
to understand the code rather than implementation.
So please feel free to read the codes.Simple usageBuild a network with a python class and train it.importnpnetclassNet(npnet.Module):def__init__(self):super().__init__()self.l1=npnet.layers.Dense(n_in=1,n_out=10,activation=npnet.act.tanh)self.out=npnet.layers.Dense(10,1)defforward(self,x):x=self.l1(x)o=self.out(x)returnoThe training procedure starts by defining an optimizer and loss.net=Net()opt=npnet.optim.Adam(net.params,lr=0.1)loss_fn=npnet.losses.MSE()for_inrange(1000):o=net.forward(x)loss=loss_fn(o,y)net.backward(loss)opt.step()DemoA naked and step-by-stepnetworkwithout using my module.Train regressorTrain classifierTrain CNNSave and restore a trained netInstallpip install npnetDownload or forkDownloadlinkFork this repo:$ git clone https://github.com/MorvanZhou/npnet.gitResults
Package: np-nwb
np_nwbTools for quickly generating.nwbfiles from non-standard Mindscope Neuropixels experiments.Generating an.nwbfile will entail:inputting a path to a folder of raw data from a single experiment (session_folder)creating an instance ofpynwb.NWBFileand writing to disk (nwb_file)passingnwb_file+session_folder, to variousmodulesthat add nwb componentseach module should:accept or load an instance ofpynwb.NWBFilefromnwb_filerecognize the type of experiment contained insession_folderprocess raw data insession_folderaccordinglyappend tables to thepynwb.NWBFileinstanceoptionally write to diskreturn thepynwb.NWBFileinstanceEach module should therefore provide a function implementing the followingappend()interface:importloggingimportpathlibimporttempfilefromtypingimportOptionalimportnp_toolsimportpynwblogger=logging.getLogger(__name__)defappend(session_folder:str|pathlib.Path,nwb_file:str|pathlib.Path|pynwb.NWBFile,output_file:Optional[str|pathlib.Path]=None,)->pynwb.NWBFile:"""Append one or more new components to an `.nwb` file.- callable from within a Python process, by accepting & returning instances of `pynwb.NWBFile`- callable from the command line, in which case all three input arguments are required, with `nwb_file` specified as a path"""session_folder=pathlib.Path(session_folder)# ... process session_folderifnotisinstance(nwb_file,pynwb.NWBFile):nwb_file=np_tools.load_nwb(nwb_file)# ... append new components to nwb_fileifoutput_fileisnotNone:np_tools.save_nwb(nwb_file,output_file)returnnwb_file
Package: npP2NVM
NumPy Persistence to Non-Volatile MemoryThis library will help you persist numpy array structures into NVM devices.Internally, it usespynvmand buffers --which are
natively supported bynumpy.Installationpip install npp2nvmRequirementsA NVM device, such as Intel(R) Optane(TM) DC Persistent Memory modules.Python 3.xnumpy arrays to be stored.UsageTwo environment variables are used for configuring the storage:NPP2NVM_SIZEwhich specifies the size (in MiB) that will be assigned to
persistenceNPP2NVM_PATHwhich specifies the file path that will be used for persistence.
Note that this file should be located into aStorage Class Memorydevice, which will
allowpynvmto leverage its characteristics --keep in mind thatpynvmare bindings of thePMDKlibraries.Exampleimportnumpyasnpimportnpp2nvma=np.random.random([256,256])a=npp2nvm.np_persist(a)print(a.shape)# > (256, 256)LimitationsStorage and retrieval of data structures (outside the application lifecycle)
are not implemented in this library (yet?). You can implement your own
mechanism and/or propose a PR. It will be appreciated!
Package: nppc
Nagios Plug-in Process ControllerNPPC, Nagios Plug-in Process Controller, is a set of scripts and configuration
files that let you periodically runsNagiosPlug-in parallel usingsystemdandsystemd.timer. Results can be posted via HTTPS to aNSCAwebserver.NPPC consists of:A wrapper aroundNagiosPlug-in that controls the output, exit status and
time-outs to have it safely run by asystemd.timerA script, systemd.service script and configuration file that creates thesystemd.timerfiles.A script,systemd.timerand configuration file that sends periodically
output toNSCAwebFree software:https://opensource.org/licenses/ISCDocumentation:https://nppc.readthedocs.io.GitHub:https://github.com/maartenq/nppcPyPi:https://pypi.python.org/pypi/nppcTravis CI:https://travis-ci.org/maartenq/nppcCodecov:https://codecov.io/github/maartenq/nppcFeaturesParallel execution ofNagiosPlug-ins.Termination ofNagiosPlug-ins if maximum time exceeds.Posts check results external commands.Command definition in YAML or text format.Configuration in YAML.Simple modular implementation.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.ReferencesHistory0.1.0 (2018-03-10)Project setup withaudreyr/cookiecutter-pypackageproject template.
Package: nppes
nppesPackage to interface with the Center for Medicare and Medicaid's (CMS) National Plan and Provider Enumeration System (NPPES).To Install$ pip install nppesSearchTo search the NPPES API, simply search via your terminal.$ search_nppes_api --first_name James --last_name MooreTo search the NPPES API and put results into a DataFrame:from nppes import nppes_df

df = nppes_df(first_name='James', last_name='Moore')Optional arguments include:numberenumeration_typetaxonomy_descriptionfirst_namelast_nameorganization_nameaddress_purposecitystatepostal_codelimitDevelopmentTo run all tests:$ nox
Package: npplus
See complete documentation athttp://npplus.readthedocs.io.HighlightsA high performance piecewise polynomial class PwPoly supporting more
methods than the scipy PPoly class, including a root finder and
arithmetic operations.Simplified spline and polyline interpolating and fitting functions
fully integrated with PwPoly, using just the solve_banded lapack
function instead of fitpack.Simplified interfaces for linear and non-linear least squares fitting.A function decorator to replace the clumsy numpy.piecewise function.Array building functions which broadcast their arguments before
concatenating them.Finite difference axis methods supplementing the existing diff
and cumsum functions.Elementwise minimum and maximum functions taking any number of arguments.Ensure presence of matplotlib 2.0 colormaps viridis, etc., and provide
an interface for using the qualitative colorbrewer color sets for line
color cycles.Provide a simple presentation-quality matplotlib style.Provide wrappers for pyplot functions like plot that return unwanted
objects, making them better for interactive use.Provide a module you can import from PYTHONSTARTUP similar to pylab,
which fills interactive namespace with numpy and npplus, as well as
turning on the pyplot interactive plotting mode.