Saravanan666/pypi-org huggingface dataset:
Package: nneve
NNEVE is a collection of neural network based solutions to physics based
problems. As for now only network for quantum oscillator approximation is fully
implemented. Hopefully soon will arrive neural network for solving
Navier-Stokes equation based on limited number of measurement points..InstallationThis project is uploaded to PyPI asnneve, therefore can be installed with
following commandpipinstallnneveAt least Python 3.7 is required.Quick exampleTo view quantum oscillator approximation for states 1 to 7 you can load
precalculated weights and acquire model object with following snippet:frommatplotlibimportpyplotaspltfromnneve.quantum_oscillator.examplesimportdefault_qo_network# acquire network object with precalculated weights# for quantum oscillator state 1 (base)network=default_qo_network(state=1)network.plot_solution()plt.plot()To manually run learning cycle check out"How to run QONetwork learning cycle"in Quantum Oscillator section of docs.DocumentationOnline documentation is available atargmaster.github.io/NNEVE/To build docs locally runtox -e docs
Package: nnext
AboutThe NNext Python Client.NNext is a⚡ blazingly fast🔍 nearest-neighbors vector search engineInstallation|Quick Start|DocumentationInstallationTo install the pynnext client, activate a virtual environment, and install via pip:Supported Python VersionsPython>=3.7,<3.11Mac/Linuxpipinstallvirtualenv
virtualenv<your-env>source<your-env>/bin/activate
<your-env>/bin/pipinstallnnextWindowspipinstallvirtualenv
virtualenv<your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exeinstallnnextQuick StartIn order start interacting with NNext, you need to obtain a client
herehttps://console.nnext.ai/.Here's a quick example showcasing how you can create an index, insert vectors/documents and search among them via NNext.Let's begin by installing the Connecting to NNext.SELECTimages.uid,images.name,images.vector<->'VECTOR(0.19, 0.81, 0.75, 0.11)'::vectorASdistFROMnnext-public-data.images.laionORDERBYdistLIMIT100importnnextnnclient=nnext.NNextClient(api_key="NNEXT_API_KEY")# Perform a query.QUERY="""SELECT images.uid, images.name,images.vector <-> 'VECTOR(0.19, 0.81, 0.75, 0.11)'::vector AS distFROM nnext-public-data.images.laionORDER BYdistLIMIT 100;"""query_job=nnclient.query(QUERY)# API requestrows=query_job.result()# Waits for query to finishforrowinrows:print(row.name)DocumentationMore documentation is available here herehttps://nnext.ai/docs.:
Package: nnf
nnfis a Python package for creating and manipulating logical sentences
written in thenegation normal form(NNF).NNF sentences make statements about any number of variables. Here's an example:>>>fromnnfimportVar>>>a,b=Var('a'),Var('b')>>>sentence=(a&b)|(a&~b)>>>sentenceOr({And({a, b}), And({a, ~b})})This sentence says that either a is true and b is true, or a is true and b
is false.You can do a number of things with such a sentence. For example, you can ask
whether a particular set of values for the variables makes the sentence true:>>>sentence.satisfied_by({'a':True,'b':False})True>>>sentence.satisfied_by({'a':False,'b':False})FalseYou can also fill in a value for some of the variables:>>>sentence.condition({'b':True})Or({And({a, true}), And({a, false})})And then reduce the sentence:>>>_.simplify()aThis package takes much of its data model and terminology fromA Knowledge Compilation Map.Complete documentation can be found atreadthedocs.InstallingAt least Python 3.4 is required.RecommendedInstall with support for a variety of SAT solvers.pipinstallnnf[pysat]VanillapipinstallnnfSerializationA parser and serializer for theDIMACS sat formatare
implemented innnf.dimacs, with a standardload/loads/dump/dumpsinterface.DSHARP interoperabilityDSHARPis a program that compiles CNF
sentences to (s)d-DNNF sentences. Thennf.dsharpmodule contains tools for
parsing its output format and for invoking the compiler.Algebraic Model Countingnnf.amchas a basic implementation ofAlgebraic Model Counting.Command line interfaceSome functionality is available through a command line tool,pynnf, including a
(slow) SAT solver and a sentence visualizer. For more information, seethe documentation.Creditspython-nnfup to version 0.2.1 was created byJan Verbeekunder mentorship ofRonald de Haanat theUniversity of Amsterdam. It was the subject of an
undergraduate thesis,Developing a Python Package for Reasoning with NNF Sentences.
Package: nnfe
nnfeNearest Neighbor Feature ExtractionFree software: MIT licenseDocumentation:https://nnfe.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.2.0 (2024-02-12)Update main tool ui0.1.0 (2024-02-08)First release on PyPI.
Package: nnfigs
Copyright (c) 2017 Jérémie DECOCK (www.jdhp.org)Web site:http://www.jdhp.org/software_en.html#nnfigsOnline documentation:http://nnfigs.readthedocs.orgSource code:https://github.com/jeremiedecock/neural-network-figuresIssue tracker:https://github.com/jeremiedecock/neural-network-figures/issuesnnfigs on PyPI:https://pypi.python.org/pypi/nnfigsDescriptionDraw neural network figures with MatplotlibNote:This project is still in beta stage, so the API is not finalized yet.DependenciesPython >= 3.0InstallationGnu/LinuxYou can install, upgrade, uninstall Neural Network Figures with these commands (in a
terminal):pip install --pre nnfigs
pip install --upgrade nnfigs
pip uninstall nnfigsOr, if you have downloaded the Neural Network Figures source code:python3 setup.py installWindowsYou can install, upgrade, uninstall Neural Network Figures with these commands (in acommand prompt):py -m pip install --pre nnfigs
py -m pip install --upgrade nnfigs
py -m pip uninstall nnfigsOr, if you have downloaded the Neural Network Figures source code:py setup.py installMacOSXYou can install, upgrade, uninstall Neural Network Figures with these commands (in a
terminal):pip install --pre nnfigs
pip install --upgrade nnfigs
pip uninstall nnfigsOr, if you have downloaded the Neural Network Figures source code:python3 setup.py installDocumentationOnline documentation:http://nnfigs.readthedocs.orgAPI documentation:http://nnfigs.readthedocs.org/en/latest/api.htmlExample usageTODOBug reportsTo search for bugs or report them, please use the Neural Network Figures Bug Tracker at:https://github.com/jeremiedecock/neural-network-figures/issuesLicenseThis project is provided under the terms and conditions of theMIT License.
Package: nn-for-dummies
NN Framework For DummiesA simple neural network framework that use similar interface to TensorFlow#colab linkhttps://colab.research.google.com/drive/1uXPiYy5kjNvUR31bzw_IrnX4zRJ6G3Wx?usp=sharingInstallation$ pip install nn-for-dummiesUsagemodel = nn.Model(
    nn.Layer(size=(4,5), activation='Relu'),
    nn.Layer(size=(5,3), activation='Relu'),
    nn.Layer(size=(3,10), activation='sigmoid'),
    nn.Layer(size=(10,6), activation='ReLU'),
    nn.Layer(size=(6,1), activation='ReLU')
)

# import and preprocess data
x,label = Data.get_data("data_banknote_authentication.csv")
x = Data.normalize(x)
X_train, X_test, label_train, label_test = Data.split_data(x,label)

# Train the model
model.fit(X_train,label_train,'SGD','MSE',alpha = 0.0001,epoch = 15,graph_on = True)

# evaluate the model
[accuracy,f1_score,confusion_matrix] = model.evaluate(X_test,label_test,metric = ['accuracy','f1 score','confusion matrix'])
print(f"accuracy: {accuracy}")
print(f"f1_score: {f1_score}")
print("confusion matrix:\n",confusion_matrix)

model.save()
Package: nnfpy
NNFPYWelcome to a project I have been working on for a while and have decided to make this a public packageThis package is used to create neural networks with 'ease'AimThe aim of this program is not to just make neural networks quicker to make but easier to understand, the learning gap for a lot of stuff in programmingcanbe massive, and this package (and hopefully more) should helpWe hope to do this with indepth tutorials (eventually when most of the errors are fixed) and non cryptic error messages that you spend hours seaching stackoverflow for the solution, just to find you accidently had a variable containing a string rather than a integerExampleIt compresses a whole neural network down to this:net = onednet.create([denselayer("relu", 2, 64), denselayer("relu", 64, 2), endlayer("softmax"), timesloss(0.00001)])

data = net.runnet(0.1, 50000, X, y, storedata(), momentum=momentum(0.5), printevery=1000, batchsize=100)

outs = net.predwithout(X, y)Just to basically describe what has happened in these lines of code:The first line has created a network with one input layer taking two input values a hidden layer of 64 neurons and an output layer of 2 outputThe second line has run the network a 50000 timesThe third line shows the predictions and the average costInstallingTo install excecute the following commandpip install nnfpy
Package: nn-freshdesk-client
nn-freshdesk-clientThis is the Python SDK for the Freshdesk API. It allows you to interact with the Freshdesk API using Python.InstallationYou can install the package from PyPi using pip:pipinstallnn-freshdesk-clientUsageAfter installation, you can import the package in your Python scripts as follows:fromfreshdeskclientimportAPIInitialize the APITo initialize the API, you need your Freshdesk domain and API key:api = API(domain='your_domain', api_key='your_api_key')List all ticketsTo list all tickets, you can use the list_all method of the Tickets API:tickets=api.tickets.list_all()You can also list all tickets updated between two dates, you can use the list_all_between_dates method of the Tickets API:tickets=api.tickets.list_all(updated_since="2000-01-01T00:00:00",updated_until="2000-01-02T00:00:00")List all conversations for a ticketTo list all conversations for a ticket, you also need the ticket ID:conversations = api.conversations.list_all(ticket_id='your_ticket_id')Example usage of paramsYou can use kwargs to pass query parameters to the freshdesk API.
For example:tickets=api.tickets.list_all(updated_since='2000-01-01T00:00:00Z')Please refer to theFreshdesk API documentationfor more details on the available endpoints and their parameters.
Package: nngame
typora-root-url:https://github.com/zhangfeibao/pygame-for-chinese-children/tree/main/imagespygame simple wraperA lite,simple package for game makeing based on pygame.more:https://github.com/zhangfeibao/pygame-for-chinese-children安装pipinstallnngameHello World1.导入模块importnngame.easygameasgame2.创建窗口game.创建窗口("Hello World",800,600)3.创建字体和文本框字体1=game.创建字体()文本框1=game.创建文本框(字体1,"Hello World")4.循环(检测各种按键，鼠标，定时器等事件,刷新界面)whileTrue:game.检测事件()game.窗口填充颜色(255,255,255)game.添加文本框到窗口(文本框1,200,200)game.刷新画面()现在如果运行程序，应该能看到一个简单的窗口，显示Hello World文本但是，你会发现，我们无法关闭这个窗口，那是因为我们还没有编写代码对这个用户点击关闭按钮的动作做出响应。在主循环之前添加如下代码：def用户点击了关闭按钮():game.退出()game.添加退出事件处理函数(用户点击了关闭按钮)现在应该可以正常关闭窗口了完整代码importnngame.easygameasgamegame.创建窗口("Hello World",800,600)字体1=game.创建字体()文本框1=game.创建文本框(字体1,"Hello World")def用户点击了关闭按钮():game.退出()game.添加退出事件处理函数(用户点击了关闭按钮)whileTrue:game.检测事件()game.窗口填充颜色(255,255,255)game.添加文本框到窗口(文本框1,200,200)game.刷新画面()
Package: nn-helper
nn-helperAbout The ProjectThis project is a wrapper for Pytorch neural networks (NNs) to obfuscate functionalities that are always used during training and testing of NNs. Such as loggers, training loops, and saving of NNs.(back to top)Built WithThese are the libraries and frameworks with which the library is constructed:PythonPytorch(back to top)Getting Started LocallyThis section explains how to set-up the repository locally from this repository. Note that this explanation is compatible for a MacOS / Linux environment.PrerequisitesHave at least Python 3.8 installed on your local machine.Make sure to havemakeinstalled. Else, you can copy paste commands from the Makefile into your terminal.InstallationClone the repo and cd into itgitclonehttps://gitlab.com/markdeblaauw/nn-helper.gitCreate a Python virtual environmentmakevirtual_env
.venv/bin/activateInstall the development Python packagemakeinstall_dev_package(back to top)UsageYou can find the following example of using the library in theexamplesfolder:importmathimportmodels.linear_regressionaslinear_modelimporttorchimportnn_helperfromnn_helper.callbacks.verbose_loggerimportVerboseLoggerdefrun_model():# Create Tensors to hold input and outputs.x=torch.linspace(-math.pi,math.pi,2000)y=torch.sin(x)p=torch.tensor([1,2,3])xx=x.unsqueeze(-1).pow(p)# Only 1 sample. Hence, batch size of 1.data_loader=torch.utils.data.DataLoader(dataset=linear_model.Dataset(x=xx,y=y),batch_size=1)loss_fn=torch.nn.MSELoss()model=linear_model.LinearRegression()optimizer=torch.optim.Adam(params=model.parameters(),lr=1e-2)# Train the model with 10 epochs and use# Verbose Logger to put metrics to terminal.nn_helper.fit(model=model,data_loader=data_loader,epochs=10,loss_fn=loss_fn,optimizer=optimizer,callbacks=[VerboseLogger()],)TestingYou can run unit tests locally as follows:maketestsA coverage report can be generated with the intention of 100% coverage:makecoverage_report(back to top)RoadmapThe library is not complete yet. Certain features, such as metric computation, testing and many callbacks, are not implemented yet. These will be implemented in due time.(back to top)
Package: nnie
NNIE Python InterfacePython remote interface for Huawei HiSilicon's NNIE NPUs.IntroductionThis repo provides interface for using NNIE's wk models
remotely with thennie_transfer_serverauthored by me
running on the Hi3516/Hi3519 platforms.UsageBuild thennie_transfer_serverfollowing
the instructions and run it on the remote board.Install the NNIE python interface by executingpip3 install nnieMake sure your device can reach your HiSilicon board through network.Sample codes are provided below:importcv2fromnnie.nnieimportNNIEnet=NNIE(file='path/to/your/model.wk',ipaddr='192.168.31.20',port=7777)image=cv2.imread("path/to/your/image.jpg")network_input_width=320network_input_height=240image=cv2.resize(image,(network_input_width,network_input_height))result=net(data=image)# You may change 'data' into other names accordingresult=net(image=image)# to the name of your model's input layer
Package: nnieqat
nnieqat-pytorchThis is a quantize aware training package for  Neural Network Inference Engine(NNIE) on pytorch, it uses hisilicon quantization library to quantize module's weight and input data as fake fp32 format. To train model which is more friendly to NNIE, just import nnieqat and replace torch.nn default modules with corresponding one.Table of ContentsInstallationUsageCode ExamplesResultsTodoReferenceInstallationSupported Platforms: LinuxAccelerators and GPUs: NVIDIA GPUs via CUDA driver 10.Dependencies:python >= 3.5, < 4llvmlite >= 0.31.0pytorch >= 1.0numba >= 0.42.0numpy >= 1.18.1Install nnieqat via pypi:
$ pip install nnieqatUsageReplace default module with NNIE quantization optimized one. include:torch.nn.modules.conv -> nnieqat.modules.convtorch.nn.modules.linear -> nnieqat.modules.lineartorch.nn.modules.pooling -> nnieqat.modules.poolingfromnnieqat.modulesimportconvert_layers......model=convert_layers(model)print(model)# Quantized layers have "Quantized" prefix....Freeze bn after a few epochs of trainingfromnnieqat.gpu.quantizeimportfreeze_bn......ifepoch>2:net.apply(freeze_bn)...Unquantize weight before update itfromnnieqat.gpu.quantizeimportunquant_weight......net.apply(unquant_weight)optimizer.step()...Dump weight quantized modelfromnnieqat.gpu.quantizeimportquant_weight,unquant_weight......net.apply(quant_weight)save_checkpoint(...)net.apply(unquant_weight)...Code ExamplesCifar10 quantization aware training example(add nnieqat intopytorch_cifar10_tutorial)python test/test_cifar10.pyImageNet quantization finetuning example(add nnieqat intopytorh_imagenet_main.py)python test/test_imagenet.py  --pretrained  path_to_imagenet_datasetResultsImageNetpython test/test_imagenet.py /data/imgnet/ --arch squeezenet1_1  --lr 0.001 --pretrained --epoch 10   # nnie_lr_e-3_ft
python pytorh_imagenet_main.py /data/imgnet/ --arch squeezenet1_1  --lr 0.0001 --pretrained --epoch 10  # lr_e-4_ft
python test/test_imagenet.py /data/imgnet/ --arch squeezenet1_1  --lr 0.0001 --pretrained --epoch 10  # nnie_lr_e-4_ftfinetune result：trt_fp32trt_int8nnietorchvision0.569920.564240.56026nnie_lr_e-3_ft0.566000.563280.56612lr_e-4_ft0.578840.575020.57542nnie_lr_e-4_ft0.578340.575240.57730TodoMultiple GPU training support.Other platforms and accelerators support.Generate quantized model directly.ReferenceHiSVP 量化库使用指南Quantizing deep convolutional networks for efficient inference: A whitepaper8-bit Inference with TensorRTDistilling the Knowledge in a Neural Network
Package: nn-info
This is a package covering nearest neighbor (nn) based estimators for measures of information theory:
entropy, Kullback-Leibler divergence and mutual information.
Application is on continous variables that can be multidimensional.The package includes ideas of several publications (see code), including our contribution:
A Bayesian nearest neighbor mutual information estimator (BannMI). BannMI is designed for
application on phsophoproteomic data to analyse potential protein-protein interactions.
Package: nnio
Please refer to theproject's documentation.What is itnniois a light-weight python package for easily running neural networks.It supports running models on CPU as well as some of the edge devices:Google USB AcceleratorIntel Compute StickIntel integrated GPUsFor each device there exists an own library and a model format. We wrap all those in a single well-defined python package.Look at this simple example:importnnio# Create model and put it on a Google Coral Edge TPU devicemodel=nnio.EdgeTPUModel(model_path='path/to/model_quant_edgetpu.tflite',device='TPU',)# Create preprocessorpreproc=nnio.Preprocessing(resize=(224,224),batch_dimension=True,)# Preprocess your numpy imageimage=preproc(image_rgb)# Make predictionclass_scores=model(image)nniowas developed for theFast Sense Xmicrocomputer.
It hassix neural accelerators, which are all supported by nnio:3 xGoogle Coral Edge TPU2 xIntel VPUan integrated Intel GPUMore usage examplescan be found in thedocumentation.
Package: nnkit
NNKit: A Python framework for creating dynamic neural networksNNKit is a framework for creating and training neural network models, based on dynamic computation graphs.
Seethis postfor more info on how the framework works.Dependencies:numpy.Installation:You canpip install nnkit, in which case Numpy will also be installed.
Otherwise you can download the source and manually install numpy if necessary.Modules:The following is a list of modules, nodes and optimizers, along with the framework
version in which they were added.activation:ReLU (1.0)LReLU (1.0)Sigmoid (1.0)Tanh (1.0)Softmax (1.0)arithmetic:Multiply (1.0)Add (1.0)loss:L1 (1.0)L2 (1.0)Cross Entropy (1.0)Huber (1.4.0)normalization:Batch Normalization (1.0)regularization:L2 (1.0)Dropout (1.0)optimization:Gradient descent / momentum (1.0)Adam / RMSProp (1.0)
Package: nnkrxx
nnkrxxOverviewThis is the tool through which we can check whether the given url is vulnerable to CVE-2023-29489CVE-2023-29489CVE-2023-29489 is a reflected cross-site scripting (XSS) vulnerability found in cPanel, a web hosting control panel software that is widely deployed across the internet. This vulnerability can be exploited without any authentication, and it is exploitable regardless of whether or not the cPanel management ports are exposed externally. This means that websites managed by cPanel on ports 80 and 443 are also vulnerable to the XSS attack.The XSS vulnerability is due to the lack of sanitization of the message_html variable in the Cpanel::Server::Handlers::Httpd::ErrorPage module. This vulnerability can be exploited by sending a request to any of the cPanel management ports (2080, 2082, 2083, 2086) with a specially crafted URL that contains a malicious script. When the cPanel server responds to the request, it will include the malicious script in the response, which will then be executed by the user's web browser.The impact of this vulnerability is that an attacker can execute arbitrary JavaScript code in the user's browser, potentially leading to the hijacking of a legitimate user's cPanel session. Once an attacker has gained access to a cPanel session, they can upload a web shell and gain command execution on the server.The vulnerability has been assigned a CVSS v3 score of 6.1, indicating that it is a medium-severity vulnerability. The probability of exploitation activity in the next 30 days is estimated to be 0.23%, and the EPSS score is around 61%.The vulnerability has been fixed in cPanel versions 11.102.0.31, 11.106.0.18, 11.108.0.13, and 11.109.9999.116. Users of cPanel are advised to upgrade to one of these versions to mitigate the vulnerability. Additionally, users can enable cPanel's auto-update functionality to ensure that their installation is always up-to-date with the latest security patches.Requirementspythonpip installations:pip install BeautifulSoup4pip install shodanpip install pystyleUsagennkrxxrun this in your terminal and after running the tool it will automatically ask you to enter the url which you want to redirect to and also the url file list which contains the list of all the urls which we will look for the vulnerability
Package: nnkurlparser
NNKURLPARSEROverviewThe urlparser script takes a list of URLs as input,parses them and generates a list of unique endpoint URLs by removing path components from each original URL.
This is the tool which is used as a Bugbounty automation tool for splitting endpoints from recon data.
It is used to parser the url according to our desire so we can have a detailed and proper implementation of our attacks for Bugbounty.PrerequisitesPython installed on our systemInstallationThe Installation can be proceeded further by the following command in the terminal:
1.Install pip package:pip install nnkurlparserUsing in programsfrom nnkurlparser import read_urls, main

input_filename = "input.txt"
output_filename = "output.txt"

urls = read_urls(input_filename, output_filename)
print("Parsed URLs:", urls)

# You can also call the main function if needed
# main()
#Remember to replace "input.txt" and "output.txt" with the actual file names you want to use.Tool DescriptionThis tools is used to automate the url parser procedure and as a result of which we prioritize and execute the bug bounty process and look for the bugs in a more systematic way!