Saravanan666/pypi-org huggingface dataset:
Package: pyNNRW
pyNNRWpyNNRW: A Python library for NNRW (neural network with random weights).Basic functions:Implements 2 fundamental NNRW flavors, i.e., ELM and RVFL.Performance comparison with main machine learning models, e.g., SVM, decision tree, MLP.NNRW-based ensembles (in progress).PublicationSpectroscopic Profiling-based Geographic Herb Identification by Neural Network with Random Weights [J]. Spectrochimica Acta Part A: Molecular and Biomolecular Spectroscopy, 2022, doi: 10.1016/j.saa.2022.121348Installationpip install pyNNRWHow to useDownload the sample dataset from the /data folder.
There are two data files: 1. 7044X_RAMAN.csv 2. 7143X_UV.csv.The two files are the Raman and UV (ultra-violet) spectroscopic profiling data of herb samples from 4 different regions.Use the following sample code to use the package:<1> Use low-level classes, e.g., ELM, RVFL. The following code trains and tests an ELM model.# ===============================
# Import library
# ===============================
# import the library
from pyNNRW import elm, rvfl

# ===============================
# Load dataset
# ===============================
df = pd.read_csv('7044X_RAMAN.csv')
X = np.array(df.iloc[:,1:])
y = np.array(df.iloc[:,0]) # 1st col is the label
n_classes = len(set(y))
x_train, x_test, t_train, t_test = train_test_split(X, y, test_size=0.2)
t_train = to_categorical(t_train, n_classes).astype(np.float32)
t_test = to_categorical(t_test, n_classes).astype(np.float32)
# print(x_train.shape, x_test.shape, t_train.shape, t_test.shape)

# ===============================
# set ELM parameters
# ===============================
n_hidden_nodes = L #x_train.shape[1]
loss = 'mean_squared_error' # 'mean_absolute_error'
activation = 'sigmoid' # 'identity'

# ===============================
# Instantiate ELM
# ===============================
model = elm.ELM( # or rvfl.RVFL
    n_input_nodes = x_train.shape[1],
    n_hidden_nodes = n_hidden_nodes,
    n_output_nodes = n_classes,
    loss = loss,
    activation=activation,
    name='elm'
)

# ===============================
# Training
# ===============================
    
train_loss, train_acc, train_precision, train_recall = model.evaluate(x_train, t_train, metrics=['loss', 'accuracy', 'precision', 'recall'])

# ===============================
# Validation
# ===============================
val_loss, val_acc, val_precision, val_recall = model.evaluate(x_test, t_test, metrics=['loss', 'accuracy', 'precision', 'recall'])<2> You may also use high-level APIs, as follows.from pyNNRW import nnrw

# train and test an ELM model
train_acc, val_acc, t = nnrw.ELMClf(X, y, L = 20, verbose = False) # L is hidden layer nodes

# train and test a RVFL model
train_acc, val_acc, t = nnrw.RVFLClf(X, y, L = 20, verbose = False) # L is hidden layer nodes

# Conduct a performance test for ELM at varied L hyper-parameters (1~60). Each iteration is averaged on 20 rounds.
train_accs, val_accs, ts = nnrw.PerformenceTests(ELMClf, X, y, Ls = list(range(1, 60)), N = 20)New function in v0.2.0We added Kernel-NNRW, which provides a series of kernels combined with NNRW.
Package: pyNNST
ï»¿Index of non-stationarityObtaining non-stationary index for time-series.Installing this packageUsepipto install it by:$pipinstallpyNNSTSimple examplesHere is a simple example on how to use the code:# Import packagesimportpyNNSTimportnumpyasnp# Define a sample signal xT=20# Time length of xfs=400# Sampling frequency of xdt=1/fs# Time between discreete signal valuesx=np.random.rand(T*fs)# Signaltime=np.linspace(0,T-dt,T*fs)# Time vectorstd=np.std(x,ddof=1)# Standard deviation of xmean=np.mean(x)# Mean value of x# Class initializationexample=pyNNST.nnst(x,nperseg=100,noverlap=0,confidence=95)# Compute the run test for non-stationarityexample.idns()outcome=example.get_outcome()# Get the results of the test as a stringindex=example.get_index()# Get the index of non-stationaritylimits=example.get_limits()# Get the limits outside of which the signal is non-stationaryReference:Non-stationarity index in vibration fatigue: Theoretical and experimental research; L. Capponi, M. Cesnik, J. Slavic, F. Cianetti, M. Boltezar; International Journal of Fatigue 104, 221-230https://www.sciencedirect.com/science/article/abs/pii/S014211231730316X
Package: pynntp
pynntpPython NNTP library.This package includes advanced NNTP features, including, compressed headers.The most important (useful) feature of this package over other nntp libaries is
the ablity to use generators to produce data. This allows for streaming download
of large responses to say an XOVER command (which can produce gigabytes of data)
and allows you to process the data at the same time is is being received.
Meaning that memory use is minimal (even for the largest responses) and that
cycles aren't being wasted waiting on a blocking read (even in a single threaded
application)Example>>> import nntp
>>> nntp_client = nntp.NNTPClient('usenet-host.com', 443, 'user', 'password', use_ssl=True)
>>> nntp_client.date()
datetime.datetime(2013, 10, 19, 6, 11, 41, tzinfo=_tzgmt())
>>> nntp_client.xfeature_compress_gzip()
True
>>> nntp_client.date()
datetime.datetime(2013, 10, 19, 6, 13, 3, tzinfo=_tzgmt())Supported CommandsNNTP commands that are currently supported include:CAPABILITIESMODE READERQUITDATEHELPNEWGROUPSNEWNEWSLIST ACTIVELIST ACTIVE.TIMESLIST NEWSGROUPSLIST OVERVIEW.FMTLIST EXTENSIONSGROUPNEXTLASTARTICLEHEADBODYPOSTXHDRXZHDRXOVERXZVERXPATXFEATURE COMPRESS GZIPPOST
Package: pynocchio
Based on:amazing paper“Automatic Rigging and Animation of 3D Characters,” SIGGRAPH 2007Pinocchio C++ library sources (github repository)Supported platforms:WindowsLinuxOSX (in progress)PrerequisitesOn Unix (Linux, OS X)A compiler with C++11 supportCMake >= 2.8.12On WindowsVisual Studio 2015 (required for all Python versions, see notes below)CMake >= 3.1InstallationInstallpynocchiowith pip:pip install pynocchioExamplesWe provide some basic examples on how to usepynocchioin Python in theexamplesdirectory.
Package: pynocle
OverviewPynocle is a python module and API for the generation of software metrics.
It aims to be as dead simple to use as possible.  Simply create a
pynocle.Monocle object, and call generate_all to generate all supported
metrics!  In the future, there will be much more configuration available.Currently supported metrics include:cyclomatic complexitylines of code (source, comment, blank, total)test coveragedependency graphingcoupling measurementmodule rankingIn the future, additional metrics will be supported.  For more information
about what metrics mean what, see the Description of Metrics section below.Usagepynocle is meant to be used as a simple API from your own python code.
Simply import pynocle, create a Monocle instance, and
the generate_all method.  That’s it!To generate coverage, you can pass a parameterless function (like nose.run)
into pynocle.run_with_coverage.  Pass any coverage.coverage instance
into Monocle.coverdata in order to generate coverage reports.The internal API’s are more complex and flexible and we’ll be working
on exposing that configuration as time goes by.There is no commandline support, though commandline support for pynocle
and its individual modules may be added later.DependenciesPython 2.6 or higherThe docutils module.For coverage support, requires the coverage module:http://pypi.python.org/pypi/coverageFor dependency graph generation support, requires GraphViz’s
free software:http://www.graphviz.org/For page ranking algorithm, requires numpy.InstallationRun setup.py to install pynocle and python dependencies.Make sure you have GraphViz’s ‘dot’ in your application path to use
dependency graph visualization features.  This will be configurable
in the future.SupportPlease emailrob.galanakis@gmail.comif you have any questions,
bugs, or want to help!Fork the Hg repository athttp://code.google.com/p/pynocle/My personal site is athttp://www.robg3d.comLicense and ContributionsPynocle is released under the MIT license.Copyright 2011 Robert Galanakis,rob.galanakis@gmail.com.I owe a huge thanks to Patrick Smacchia and the NDepend (www.ndepend.com)
team.  NDepend, is a fantastic code
analysis tool for .NET, and I owe a large number of the ideas and metrics
to them.This project uses a few pieces of code originally developed in pygenie,
which measured cyclomatic complexity only. Most of the code has been
stripped out and only a few classes remain. There is no functional
homepage for the source so I can’t link anywhere.Description of MetricsA generated metrics report will have more information about software metrics,
and links for additional info.See the example output for more info, available here:http://pynocle.googlecode.com/hg/examples/exampleoutput/index.htmlYou can look at any good static analysis tool and wikipedia to get
overviews of various code metrics:http://www.ndepend.com/Metrics.aspxhttp://www.aivosto.com/project/help/pm-index.html
Package: pynodered
AboutMake your python functions available in Node-RED using a simple decorator.pynodered is a server communicating with Node-RED to make available your python functions as blocks in Node-RED. pynodered reads modules and python files containing functions decorated with ‘node_red’, register them as blocks in Node-RED. pynodred then handles communications between Node-RED (in javascript) to run your function whenever the block receives a message.Quick StartRequires python>=3.5$pipinstallpynodered#Installnodedependencies$npminstallfollow-redirectsurlquerystringExamplesA simple example to lowercase the payload of the messages:frompynoderedimportnode_red@node_red(category="pyfuncs")deflower_case(node,msg):msg['payload']=str(msg['payload']).lower()returnmsgPut this snippet is in a file “example.py”, run the pynodered server with:$pynoderedexample.pyand in another console:$node-redIn Node-RED, you now have a new category “pyfuncs” with a function lower_case. It can be used in a flow as any other blocks:It is possible to add block properties (constant arguments provided by the user in Node-RED) by defining a property in the decorator:frompynoderedimportnode_red,NodeProperty@node_red(category="pyfuncs",properties=dict(number=NodeProperty("Number",value="1")))defrepeat(node,msg):msg['payload']=msg['payload']*int(node.number.value)returnmsgDon’t forget to restart the pynodered server everytime your python files change. Node-RED also needs to be restarted but only when the function name or properties change or a new function is added. Refreshing the browser is then necessary.By default pynodered exports the functions in the Node-RED package ‘pynodered’ and the category ‘default’. The category name can be changed with the decorator optional argument. For the package name and information, the python module containing the functions can declare a ‘package’ dictonary like this:package={"name":"FFT filters","version":"0.01","description":"Nodes written in Python for signal processing",}Warningpynodered is not ready for production use yet. On a multi-user computer, be aware that pynodered server will respond to anyone request and will execute code under the account that launched the server. NODE-Red has a similar issue (https://nodered.org/docs/security)LicenseCopyright (C) 2019 Ghislain PicardFree software: GNU General Public License v3This package is a rewrite and extension of the code intially written by Tomaž Šolc for sigfox-toolboxhttps://github.com/sensorlab/sigfox-toolbox/tree/master/node-red-python.
Copyright (2017) SensorLab, Jožef Stefan Institutehttp://sensorlab.ijs.siand licensed under GPL version 3
Package: pynodo
Pynodo -- manage your Zenodo depositionsPython wrapper for Zenodo REST API for working with Zenodo depositions and files.InstallationpipinstallpynodoUsageZenodoaccess token with write scope is necessary to access depositions and files.
Separate token is neccessary forzenodo sandboxenvironment.
Sandbox can be switched by settingsandbox=Truewhen initiatingpynodoinstance.Depositions can be accessed usingpynodo.Depositionsclass.Files in a deposition can be accessed usingpynodo.DepositionFilesclass.Depositions.createandDepositionFiles.filesreturn namedtuple and list of namedtuples, respectively.
Other functions return either json response or status code (delete).Actions (e.g. publish, new version, edit) are not implemented.Working with Depositionspynodo allows listing, creating, retrieving, updating and deleting of depostions.Create zenodo (sandbox) instanceimportpynodoimportoszen=pynodo.Depositions(access_token=os.environ["ZENODO_SANDBOX_PAT"],sandbox=True)List user depositionsdepos=zen.list(params={"size":50})Create a new deposition with some metadatadata={"metadata":{"title":"My first upload","upload_type":"poster","description":"This is my first upload","creators":[{"name":"Päll, Taavi","affiliation":"UT"}],}}new_depo=zen.create(data=data)Retrieve deposition inforet_depo=zen.retrieve(deposition=new_depo.id)Update deposition metadataupdates={"metadata":{"title":"Modified upload","upload_type":"dataset","description":"This is updated upload","creators":[{"name":"Päll, Taavi","affiliation":"UT"},{"name":"Sus, Scrofa","affiliation":"Mets"},],}}updated_depo=zen.update(deposition=new_depo.id,data=updates)Delete deposition (status code 204 shows success)zen.delete(new_depo.id)Working with DepositionFilespynodo allows listing, uploading, downloading and deleting of files in a deposition.Create zenodo (sandbox) instanceimportpynodoimportoszen=pynodo.Depositions(access_token=os.environ["ZENODO_SANDBOX_PAT"],sandbox=True)Create new depositionnew_depo=zen.create()Retrive depositionret_depo=zen.retrieve(deposition=new_depo.id)Create new instance for listing fileszen_files=pynodo.DepositionFiles(deposition=new_depo.id,access_token=os.environ["ZENODO_SANDBOX_PAT"],sandbox=True,)Upload file (second argument with new file name is optional)zen_files.upload("tests/upload.txt","uploaded_file.txt")List files in depositionfiles=zen_files.filesDownload file from deposition (second argument with download folder is optional)zen_files.download("uploaded_file.txt","tmp")Delete file (status code 204 shows success)zen_files.delete("uploaded_file.txt")
Package: pynof
PyNOFCitationFormally read as Python-Natural-Orbital-Functionals, PyNOF is based on the originalDoNOFsoftware written in Fortran by Prof. Mario Piris, but it takes advantage of the Python capabilities such as optimizers, vectorization via numpy and gpu compatibility via cupy.InstallationWe recommend to perform the installation inside anAnacondaenviroment:conda create -y -n pynof
conda activate pynofPyNOF usesPsi4for integrals, so it is necessary to install it first:conda install -y psi4 -c conda-forge/label/libint_dev -c conda-forgethen, you can simply install PyNOF using pippip install -y pynof[Optional] Integrals transformations can benefit from a GPU. If available, just installcupyconda install -y -c conda-forge cupyExampleA pynof input has the following parts:Import pynofA declaration of the molecule geometryA parameter objectThe calculation instructionimport pynof

mol = pynof.molecule("""
0 1
  O  0.0000   0.000   0.116
  H  0.0000   0.749  -0.453
  H  0.0000  -0.749  -0.453
""")

p = pynof.param(mol,"cc-pvdz")
p.autozeros()

p.ipnof=8

p.RI = True
#p.gpu = True

E,C,gamma,fmiug0 = pynof.compute_energy(mol,p,hfidr=True)If everything worked, the job may be executed bypython -u test_energy.pyNote.The first run may be slightly slow due to jit precompilation.For developmentFirst, clone PyNOF from github and change to the project directorygit clone https://github.com/felipelewyee/PyNOF.git
cd PyNOFIn the PyNOF folder, execute the following codeconda create -y -n pynof
conda activate pynof
conda install -y psi4 -c conda-forge/label/libint_dev -c conda-forge
conda install -y -c conda-forge cupy # Optional
pip install build
python -m build && cd dist && pip install pynof*.whl && cd ..AuthorsThe PyNOF code has been built by Juan Felipe Huan Lew Yee, Lizeth Franco Nolasco and Iván Alejandro Rivera under supervision of Jorge Martín del Campo Ramírez and Mario Piris.
Package: pynolh
This library allows to generate Nearly Orthogonal Latin Hypercubes (NOLH) according to
Cioppa (2007) and De Rainville et al. (2012) and reference therein.InstallationClone the repository$ git clone http://github.com/fmder/pynolh.gitand from the cloned directory type$ python setup.py installPyNOLH requires Numpy.UsageThe library contains a single generator and a function to retrieve the necessary parameters
from a desired dimensionality. To generate a 6 dimension NOLH from the indentity permutation:import pynolh

dim = 6
m, q, r = pynolh.params(dim)
conf = range(q)
remove = range(dim - r, dim)
nolh = pynolh.nolh(conf, remove)The NOLH returned is a numpy array with one row being one sample.You can also produce a NOLH from a random permutation configuration vector and remove random columns:import pynolh
import random

dim = 6
m, q, r = pynolh.params(dim)
conf = random.sample(range(q), q)
remove = random.sample(range(q), r)
nolh = pynolh.nolh(conf, remove)Thenolh()function accepts configurations with either numbers in [0 q-1] or [1 q].import pynolh

dim = 6
m, q, r = pynolh.params(dim)
conf = range(1, q + 1)
remove = range(dim - r + 1, dim + 1)
nolh = pynolh.nolh(conf, remove)Some prebuilt configurations are given within the library. TheCONFmodule attribute is a dictionary with the dimension as key and a configuration, columns to remove pair as value.import pynolh

conf, remove = pynolh.CONF[6]
nolh = pynolh.nolh(conf, remove)The configurations for dimensions 2 to 7 are from Cioppa (2007) and 8 to 29 are from De Rainville et al. 2012.Configuration RepositorySee theQuasi Random Sequences Repositoryfor more configurations.ReferencesCioppa, T. M., & Lucas, T. W. (2007). Efficient nearly orthogonal and space-filling Latin hypercubes.Technometrics, 49(1).De Rainville, F.-M., Gagné, C., Teytaud, O., & Laurendeau, D. (2012). Evolutionary optimization of low-discrepancy sequences.ACM Transactions on Modeling and Computer Simulation (TOMACS), 22(2), 9.
Package: pynolist
Pynlist Python module:It is a module that allows simple and basic tasks related to lists to be performed in an efficient manner using built-in methodsInstallation:'''pip install pynlist'''How to use:1. emax and omax:These methods take in a list and return a single value (The maximum even or odd number in the list respectively.)x.emax(my_list)
print(x)2. emin and omin:These methods take in a list and return a single value (The minimum even or odd number in the list respectively.)x.emin(my_list)
print(x)3. esum and osum:These methods take in a list and return a single value(The sum of all the even or odd numbers in the list respectively.)x.esum(my_list)
print(x)4. prime_search:This method takes in a list and and returns the prime numbers(if any) in a list format.x.prime_search(my_list)
print(x)5. duplicate_search:This method takes in a list and and returns the duplicates (numbers or strings,if any) in a list format.x.duplicate_search(my_list)
print(x)6. quick_list:This method takes in two arguments and returns a list generated at random based off the given arguments.x.quicklist(length=int,max_number=int)
print(x)License:Copyright (c) 2020 Subhodip Sinha ChoudhuryRead LICENSE for more details.
Package: pynom
PyNomA simple library to eat exceptions, until enough of a given exception type has been raised. The name has the word 'Nom' in it because it can sometimes sound like a person eating.Installationpip install pynomSimple Usage Examplefrom pynom import PyNom
pn = PyNom([ValueError], 5)
while True:
    # This block will raise after 5 (so on the 6th) ValueErrors.
    #  It will raise an Exception containing tracebacks, exceptions, approx timestamps for each ValueError
    # If a non-ValueError is raised, it will be immediately raised (and not eaten)
    with pn:
        do_something()Advanced Usage Examplefrom pynom import PyNom
pn = PyNom([ValueError], 5, throw_up_action=lambda ex: print(ex))
while True:
    # On the 6th value error will call the given throw_up_action
    #  a CombinedException will be passed to the throw_up_action.
    with pn:
        do_something()Seehttps://csm10495.github.io/pynom/for full API documentation.LicenseMIT License
Package: pynomer
pynomer.. image::https://img.shields.io/pypi/v/pynomer.svg:target:https://pypi.python.org/pypi/pynomer:alt: Latest PyPI versionpynomer <https://github.com/nleguillarme/pynomer>_ is a simple python wrapper fornomer <https://github.com/globalbioticinteractions/nomer>_.
Nomer is a stand-alone java application which maps identifiers and names to taxonomic names and ontological terms.InstallationMake sure you installed the latest version of nomer, or use the Docker image instead.::$ pip install pynomerUsageAs a command-line tool::pynomer --help
Usage: pynomer [OPTIONS] COMMAND [ARGS]...Options:
  --help  Show this message and exit.

Commands:
  append              Append term match to row using id and name columns...
  clean               Cleans term matcher cache.
  input-schema        Show input schema in JSON.
  matchers            Lists supported matcher and (optionally) their...
  output-schema       Show output schema.
  properties          Lists configuration properties.
  replace             Replace exact term matches in row.
  validate-term       Validate terms.
  validate-term-link  Validate term links.
  version             Show Version.As a python module::>>> from pynomer import *
>>> version()
('nomer version', '0.1.21')With DockerBuild image from source:
::git clone https://github.com/nleguillarme/pynomer.git
cd pynomer
docker build -t pynomer:latest .Run commands in the container:
::docker run -v$PWD/.nomer:/.nomer pynomer:latest pynomer append "\tHomo sapiens" -e -o json|:warning:| When running pynomer append and replace commands in Docker, you have to use the -e option !As a client-server appBuild server image from source:
::docker build -f Dockerfile.server -t pynomer-server:latest https://github.com/nleguillarme/pynomer.gitRun pynomer server:
::docker run --rm -v$PWD/nomer:/nomer -p9090:9090 pynomer-server:latestCreate the client:
::>>> from pynomer.client import NomerClient
>>> client = NomerClient(base_url="http://localhost:9090/")
>>> client.version()
'0.1.21'LicenseLicense: MITAuthorspynomerwas written bynleguillarme <nicolas.leguillarme@univ-grenoble-alpes.fr>_.
Package: pynometrics
pynometrics packagepynometricss is a package for performing econometric modeling and diagnostic task.InstallationUse the package managerpipto install pynometricspipinstallpynometricsUsageimportpynometricsasecContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: py-nomics-client
Nomics REST APIwrapperNomics REST API Doc:https://nomics.com/docs/Installpipinstallpy-nomics-clientUsagefromnomicsimportNomicsn=Nomics(key="<your-key-here>")n.get_market(base="BTC",quote="USD")Testingvirtualenvvenvsource./venv/bin/activate
pipinstall-rdev_requirements.txt
deactivatesource./venv/bin/activate
pytest
Package: pynomie
# nomiepyA minimal python library for accessing Nomie data stored in CouchDB.## Getting Started:* First clone this repository with `git clone https://githbub.com/huberf/nomiepy`* To setup your trackers, you will need to open the `setup.py` file and fill inthe URL for you CouchDB instance as well as the username you have. No passwordis required. Make sure to include the port in your URL.* After setting up that file, run `python setup.py`. The `trackernames.json` file should be located inyour clone directory. Check it out and make sure all your trackers are locatedthere.* Congratulations, you are now ready to start querying your Nomie data ondemand.## Basic Operations* To get a list of every single event you tracked, the `eventList` function ishere to help. After creating an instance of the Nomie class as done in the`setup.py` file, you can query all trackers by simply calling this function.(e.g. `alLEvents = nomie.eventList()`)* This will include the names of the trackers, so you can easily use a for loopto check for everytime you did a specific action as well as view the time ithappened.More operations and functionality will be added as I find the time. If you haveideas or want to contribute feel free to open a PR or an issue.