Saravanan666/pypi-org huggingface dataset:
Package: nueramic-mathml
Nueramic MathMLNueramic-mathml is a library for visualizing and logging the steps of optimization algorithms in machine learning. The project uses torch for calculations and plotly for visualization.pipinstallnueramic-mathmlQuick tourOptimizationYou can minimize the functions and see a detailed description of each step. After minimizing, you have a history with complete logs.
Also available multidimensional optimisation.deff(x):returnx**3-x**2-x# Minimum at x = 1bounds=(0,3)one_optimize.golden_section_search(f,bounds,epsilon=0.01,verbose=True)[0]Iteration:0|point=1.500|f(point)=-0.375Iteration:1|point=0.927|f(point)=-0.990Iteration:2|point=1.281|f(point)=-0.820Iteration:3|point=1.062|f(point)=-0.992Iteration:4|point=0.927|f(point)=-0.990Iteration:5|point=1.011|f(point)=-1.000Iteration:6|point=0.959|f(point)=-0.997Iteration:7|point=0.991|f(point)=-1.000Iteration:8|point=1.011|f(point)=-1.000Iteration:9|point=0.998|f(point)=-1.000Iteration:10|point=1.006|f(point)=-1.000Searchingfinished.Successfully.code01.0059846881033916ModelsYou can use our models for classification and regressionfromnueramic_mathml.mlimportLogisticRegressionRBFfromsklearn.datasetsimportmake_moonsx,y=make_moons(10_000,noise=.1,random_state=84)x,y=torch.tensor(x),torch.tensor(y)logistic_model_rbf=LogisticRegressionRBF(x[:1000]).fit(x,y,show_epoch=10)Epoch:1|CrossEntropyLoss:0.71496Epoch:12|CrossEntropyLoss:0.35328Epoch:23|CrossEntropyLoss:0.27769Epoch:34|CrossEntropyLoss:0.22395Epoch:45|CrossEntropyLoss:0.19266Epoch:56|CrossEntropyLoss:0.16695Epoch:67|CrossEntropyLoss:0.14686Epoch:78|CrossEntropyLoss:0.13051Epoch:89|CrossEntropyLoss:0.11724Epoch:100|CrossEntropyLoss:0.10629logistic_model_rbf.metrics_tab(x,y){'auc_roc':0.9974513817072977,'f1':0.9700730618209839,'precision':0.9709476828575134,'recall':0.9692000150680542}VisualizationsYou can create beautiful animations of optimization algorithms and
regression/classification models.gen_classification_plot(x,y,model,threshold=0.5,epsilon=0.001)
Package: nufeb-tools
DescriptionPython-based tools and utilities for NUFEB simulationsGetting StartedInstall via pip:pip install nufeb-toolsGenerate NUFEB simulations from the CLI:nufeb-seedRemove old runs:nufeb-cleanGet data from a simulation for analysisfromnufeb_toolsimportutilsx=utils.get_data(test=True)Plot the overall growthfromnufeb_toolsimportplotimportmatplotlib.pyplotaspltf,ax=plt.subplots()plot.overall_growth(x.biomass,ax=ax)Plot colonies based on initial seed cellsfromnufeb_toolsimportutils,plotimportmatplotlib.pyplotaspltx=utils.get_data(directory=r'E:\sucrose\runs\Run_50_50_1.00e+00_1_2022-01-11_48525')f,ax=plt.subplots()plot.colony(x,25900,colors,ax=ax)plt.show()
Package: nuggan
NugganA library for creating informed ids. Nuggan ids aim to provide the
following properties.The id knows the type of entity it is identifying.The authenticity of an id can be established just by looking at the id
value. That is to say that anugganuser can determine whether an id given
to them is one they previously generated.The alphabetical ordering of a list of ids is relatively equivalent to
their chronological ordering.UsageUsenugganto generate ids that encode information about the entity being
identified.importnuggannuggan.create_id('user')# user-005dd1c485-7367ea24-e668-4944-9de0-723112eb1089-e8d26af99684When given an id it can be parsed to identify what it applies to.my_id='user-005dd1c485-7367ea24-e668-4944-9de0-723112eb1089-e8d26af99684'nuggan.parse_id(my_id)# {#   'prefix': 'user',#   'hex_time': '005dd1c485',#   'prefixed_id': 'user-005dd1c485-7367ea24-e668-4944-9de0-723112eb1089',#   'base_id': '7367ea24-e668-4944-9de0-723112eb1089',#   'checksum': 'e8d26af99684'# }Ids have checksums associated with them to allow corrupted ids to be
identified.bad_id='user-005dd1c485-44cc2faf-look-this-aint-rightdfd965a-4a6e8fc57d86'nuggan.is_valid_id(bad_id)# FalseA salt can be configured to give some amount of confidence that a given
id originated from a specific source.maker=nuggan.IdMaker(salt='an-arbitrary-salt-value')salted_id=maker.create_id('user')# user-005dd1c5b4-e4d94f47-cae0-4f16-a0d8-a953c9bd7209-d93cd221c394normal_id=nuggan.create_id('user')# user-005dd1c5d8-fd007e41-833f-4c00-8aa9-a26314142845-895de953856bmaker.is_valid_id(salted_id)# Truemaker.is_valid_id(normal_id)# False
Package: nu-gpa
# nu_gpaA command line package to calculate GPA of semester results specially for professional courses like CSE, ECE, BBA etc. offered by National University, Bangladesh.—## Installation
The packagenu_gpacan be installed via pip :pip install nu_gpa—## Usagenu_gpais a command line package.Here, letter grades and grade points are considered as,Letter grade | Grade point |—– | —– |A+ | 4.00 |A | 3.75 |A- | 3.50 |B+ | 3.25 |B | 3.00 |B- | 2.75 |C+ | 2.50 |C | 2.25 |D | 2.00 |F | 0.00 |For example, assume that one has 3 subjects in a semester.
The credits of the subjects are 3, 3.5, 2.5.
And he has obtained grade A, A+, B in the subjects respectively.
Then to calculate his GPA in that semester, command on terminal:nu_gpa -n 3 -g A A+ B -c 3 3.5 2.5To get help on usage:nu_gpa –help—## ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.—## Author & Licensenu_gpais written and maintained by [ Md. Shahedul Islam Shahed ](https://www.linkedin.com/in/shahed777/“shahed.shd777@gmail.com” ).
It is licensed under an [ MIT license ](https://choosealicense.com/licenses/mit/).—## Resources
* [ Github ](https://github.com/shahed-shd/nu_gpa)
Package: nugraph
NuGraph: a Graph Neural Network (GNN) for neutrino physics event reconstructionThis repository contains a GNN architecture for reconstructing particle interactions in neutrino physics detector environments. Its primary function is the classification of detector hit particle type through semantic segmentation, with additional secondary functions such as background hit rejection, event classification, clustering and vertex reconstruction.InstallationThis repository can be installed in Python viapip, although using Anaconda to install dependencies is strongly recommended. Detailed instructions on how to easily install all necessary dependencies are availablehere.Once dependencies are installed, you can simply clone this repository and installing it viapip– if you intend to carry out any development on the code, installing in editable mode is recommended:git clone git@github.com:exatrkx/NuGraph
pip install --no-deps -e ./NuGraphTraining a modelYou can train the model using a processed graph dataset as input by executing thetrain.pyscript in thescriptssubdirectory. This script accepts many arguments to configure your training – for a complete summary of all available arguments, you can simply runscripts/train.py --helpAs an example, to train the network for semantic segmentation on the Heimdall cluster, one might runscripts/train.py --data-path /raid/uboone/NuGraph2/NG2-paper.gnn.h5 \
                 --logdir /raid/$USER/logs --name default --version semantic-filter \
                 --semantic --filterThis command would start a network training using the requested input dataset, training with the semantic head enabled, and writing network parameters and metrics to the directory/raid/$USER/logs/default/semantic-filter.Training on SLURM clustersIf you're working on a cluster that uses the SLURM batch submission system, such as the Wilson cluster at Fermilab, then you'll need to submit training via a batch script instead. An example batch scripttrain_batch.shis included in thescriptssubdirectory. If you're training on the Wilson cluster, you can submit a training job by runningsbatch scripts/train_batch.sh <args>where<args>are the same argument you'd pass if you were executing the training script locally.If you're training on a SLURM environment other than the Wilson cluster, you'll need to edit the SLURM directives in the script appropriately for the cluster you're working on before submitting.Metric loggingIn the above example, training outputs including logging metrics would be written to a subdirectory of/raid/$USER/logs. We can use the Tensorboard interface to visualise these metrics and track the network's training progress. You can start Tensorboard using the following command:tensorboard --port XXXX --bind_all --logdir /raid/$USER/logs --samples_per_plugin 'images=200'In the above example, you should replaceXXXXwith a unique port number of your choosing. Provided you're forwarding that port when working over SSH, you can then access the interface in a local browser atlocalhost:XXXX.
Package: nuheat
Python NuHeatA Python 3 library that allows control of connectedNuHeat Signatureradiant floor thermostats.This uses the web-based NuHeat API, so it requires an external internet connectionThe API in use is not an officially published API, so it could change without noticePlease contribute!Installation$pipinstallnuheatUsagefromnuheatimportNuHeat# Initalize an API session with your login credentialsapi=NuHeat("email@example.com","your-secure-password")api.authenticate()# Fetch a thermostat by serial number / ID. This can be found on the NuHeat website by selecting# your thermostat and noting the Thermostat IDthermostat=api.get_thermostat("12345")# Get the current temperature of the thermostatthermostat.fahrenheitthermostat.celsius# Get the current target temperature of the thermostatthermostat.target_fahrenheitthermostat.target_celsius# Get the minimum and maximum temperatures supported by the thermostatthermostat.min_fahrenheitthermostat.max_fahrenheitthermostat.min_celsiusthermostat.max_celsius# Get the current mode of the thermostatthermostat.schedule_mode# The possible schedule modes are one of the following 3 integers:# 1. Run the schedule programmed into the thermostat# 2. Temporarily hold a target temperature until the next scheduled event# 3. Permanently hold a target temperature until the mode is manually changed# Get other propertiesthermostat.heatingthermostat.onlinethermostat.serial_number# Set a new temperature and permanently hold# Note: Any pre-programmed thermostat schedules will be ignored until you resume the schedule or# change the mode.thermostat.set_target_fahrenheit(72)# If you prefer celsius...thermostat.set_target_celsius(22)# You can also do this via the convenience property settersthermostat.target_fahrenheit=72# or with celsiusthermostat.target_celsius=22# To resume the schedule programmed into the thermostatthermostat.resume_schedule()# Which is effectively the same as explicitly changing the mode like sothermostat.schedule_mode=1# To set a new target temperature with an explicit schedule modethermostat.set_target_fahrenheit(72,mode=2)# If you prefer celsius, you can use that toothermostat.set_target_celsius(22,mode=2)# Set a target temperature until a specified datetime# Note: A timezone aware datetime should be passed in, otherwise UTC will be assumedfromdatetimeimportdatetime,timedelta,timezonehold_time=datetime.now()+timedelta(hours=4)thermostat.set_target_fahrenheit(69,mode=2,hold_time=hold_time)ContributingPull requests are always welcome!Running locally with Docker# Build and run the docker container:$dockerbuild-tpython-nuheat.
$dockerrun-it--rm-v$(pwd):/python-nuheatpython-nuheat# To run the interactive shell:$ipython# To run tests:$pytest
Package: nuio
nuio is an attempt to add a standardized
and easy-to-use user input/output interface for python.The goal is to provide a set of classes withprint-alike-operatingmethods
and a few other methods for markup & co to deal with user input/output.FeaturesCurrently nuio is able to eal with POSIX Terminals.
The corresponding classes are innuio.input.terminalandnio.output.terminal.Philosopynuio tries to keep stuff as simple as possible,
but it requires python3.5.1+ language features.Any blocking user-input is done using async features, this
will become handy in future.PlansThe following features should be added:curses based I/Oan AJAX based I/O systemnon-POSIX terminalsfancy frames for BlockOutputExampleThis is a simple example for nuio:#!/usr/bin/python3

from nuio.input.terminal import POSIXTerminalInput
from nuio.output.terminal import TerminalOutput, ESCAPES, TerminalBlockOutput
import asyncio, shutil


async def main():
        width, height = shutil.get_terminal_size()

        # an output device
        out = TerminalBlockOutput(height - 10, width)
        out.print("This is a test")

        # input devices require an output device to handle prompts.
        inp = POSIXTerminalInput(out)

        data = await inp.input_int(prompt = "enter an integer > ")

        # You are able to use a bunch of ANSI escape sequences.
        # Usually you should use nuio.output.terminal.colors instead,
        # this will be compatible with other output devices.

        out.print_colored(ESCAPES["underline"], "you entered:", data)

        data = await inp.input_int(prompt = "enter an integer [4-100] > ",
                        range = range(4, 100))
        out.print_colored(ESCAPES["fg_red"], "you entered:", data)

        data = await inp.input_float(prompt = "enter an float [4-100] > ",
                        range = range(4, 100))
        out.print_colored(ESCAPES["bg_cyan"] + ESCAPES["fg_black"], "you entered:", data)



# Usually you should make the input async,
# but to simplify this the complete main function is async.
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.close()
Package: nuitkabs
NuitkaBSNuitka build systemWhy? What the reason of this project?OK, we already havenuitka, and it works. It allows to build any python file
as executable or module.But reality is...The most usual case in production is microservice monolith. It means the code
base has many entry points. When you build single executable or single module,
you are doing 95% of work twice or more. If you ready to wait forever until
build complete, it's OK, but i'm notSome libraries with C-extensions and fallback python code work incorrect. It's
much easier to exclude these libraries from buildModules? Yes, but...Yes, nuitka allow to split application code by modules. And since this moment
you have to write large number build commands -- one command for each module.
If you decided to split anything into separated module -- you have to rewrite
all commands again, adding--nofollow-import-to=my_new_module. If you added
any module, you have to rewrite all these commands again. And again...СonclusionNuitkaBS helps you to create really large number of build commands via simple to
read, undarstand and editYAMLconfigInstallingpip install -U nuitkabsPre-requirementsYou should know nuitka generate C-files and then compile it viagccorclang. So, you have to install compiler (gcc or clang), python development
headers. It will be good if you installccacheUsageNuitkaBS is really thin wrapper over Nuitka. The first thing you have to createnuitkabs.yamlfile in root of your project. The most keys you see inYAMLconfig you can find in nuitka documentation. Example:modules:
  models:
  views:
  starlette_app:
  ubjson:
    include-module:
      - ubjson.encoder
  starlette:
    include-module:
      - starlette.applications
      - starlette.endpoints

# =========

executables:
  my_script:
  my_daemon:

# =========

generic:
  output-dir: ../build/
  lto:
  remove-output:
  warn-unusual-code:
  follow-imports:
  plugin-enable:
    - pylint-warnings
  nofollow-import-to:
    - sqlalchemy
    - pandas
    - ujson
    - orjson
    - greenletJust compare keys and nuitka help page. They are the same.Compile external libraryJust look the example. Findubjsonandstarlettemodules. Yes, there are
external librariesSome tricksList or single itemThere is no difference between single item and item list:generic:
  output-dir: 
    - ../build/If you have nothing to say, don't sayIf you have to enumerate your modules, but you have nothing to put as value --
just let value emptymodules:
  models:
  views:
  starlette_app:[0.0.2]Fix project description[0.0.1]Initial commit
Package: nuitka-setuptools
Extension to setuptools to run your package through nuitka to produce compiled, faster, obfuscated binary modules.Nuitka [http://nuitka.net/pages/overview.html] is a python compiler with full language support and CPython compatibility.It’s fully compatible with Python 2.6, 2.7, 3.2, 3.3, 3.4, 3.5, and 3.6.You feed it your Python app, it does a lot of clever things, and spits out an executable or extension module.This module provides some hooks to add to your python packages setup.py to automatically run some/all of your code
through nuitka when building a binary dist. This will typically be done withpython setup.py bdist_wheelto
create a wheel for distribution.With nuitka-setuptools this wheel can be devoid of pure python and only contain compiled code which is not only faster
(quote: Nuitka is more than 2 times faster than CPython) but has a relatively high level of code security.Basic Usage: setup.py:import sys
from setuptools import setup

# Get the long description from the README file
with open(path.join(path.dirname(__file__), 'README.rst'), 'r') as f:
    long_description = f.read()

packages = ['mod', 'pkg']

if any('bdist' in arg for arg in sys.argv):
    from nuitka_setuptools import Nuitka, Compile

    build_settings = dict(
        # Compile module
        cmdclass={'build_ext': Nuitka},
        ext_modules=Compile(packages),
    )
else:
    build_settings = {}


setup(
    name='nuitka_setuptools',
    py_modules=['nuitka_setuptools'],
    description='Extension to setuptools to run your package through nuitka to '
                'produce compiled, faster, obfuscated binary modules.',
    long_description=long_description,
    author='Andrew Leech',
    author_email='andrew@alelec.net',
    url='https://gitlab.com/alelec/nuitka-setuptools',
    use_scm_version=True,
    include_package_data=True,
    install_requires=['setuptools_scm'],
    setup_requires=['setuptools_scm'],
    cmdclass={'build_ext': Nuitka},
    ext_modules=Compile(['nuitka_setuptools']),
    **build_settings
)
Package: nujson
nujson: The UltraJSON Fork That Support Numpy SerializationInspired byPandas' ujsonHow to installExampleWhy make such a package and what is modifiedHow to installPython version: Python2.7, Python3.5+Using pip:pipinstallnujsonClone and install:# git clonegitclonehttps://github.com/caiyunapp/ultrajson# Don't use `python setup.py install`# NumPy will install automaticallypipinstall-e.If get error like this:ERROR: Could not find a version that satisfies the requirement numpy>=1.16.4 (from nujson) (from versions: 1.9.3)
ERROR: No matching distribution found for numpy>=1.16.4 (from nujson)Try this:pipuninstallnumpy
pipinstallnumpy==1.16.4
pipinstallnujsonExample>>>importnumpyasnp>>>importnujsonasujson>>>a={"a":np.int64(100)}>>>ujson.dumps(a)'{"a":100}'>>>a["b"]=np.float64(10.9)>>>ujson.dumps(a)'{"a":100,"b":10.9}'>>>a["c"]=np.str_("12")>>>ujson.dumps(a)'{"a":100,"b":10.9,"c":"12"}'>>>a["d"]=np.array(list(range(10)))>>>ujson.dumps(a)'{"a":100,"b":10.9,"c":"12","d":[0,1,2,3,4,5,6,7,8,9]}'>>>a["e"]=np.repeat(3.9,4)>>>ujson.dumps(a)'{"a":100,"b":10.9,"c":"12","d":[0,1,2,3,4,5,6,7,8,9],"e":[3.9,3.9,3.9,3.9]}'Why make such a package and what is modifiedOn Python3, some data types of NumPy is not serializable. Here is some references we searched:python - Why are some numpy datatypes JSON serializable and others not? - Stack OverflowMaximum recursion level reached in Python 3 - Issue #221 - esnme/ultrajsonIssue 24313: json fails to serialise numpy.int64 - Python trackerOne solution is type conversion like:int(numpy.int64)andnumpy.array.tolist().
But it's not good for performance. After searching Internet, find a no longer maintained projectKomnomnomnom/ultrajsonrecommond to usePandas' ujson.We tried but found Pandas is to heavy for our projects. So we decide to build our own light weight fork. Currentltly, the esn's ujson master branch has some problems we need to solve, and themasterbranch is based on thethe v1.35 ujson.The main point is convert NumPy data type in C, with calling NumPy's header.Commit 187bd15has the most changes we made to support NumPy, andCommit afedc42fix a build issue on macOS caused by Clang.
Package: nuka
Because ops can dev.nuka is a provisioning tool focused on performance. It massively uses Asyncio and SSH.
It is compatible with docker vagrant and apache-libcloud.Full documentation is available athttp://doc.bearstech.com/nukaQuickstartInstall nuka (SeeInstallationfor detailled steps):$ pip install "nuka[full]"Then start a script:#!/usr/bin/env python3.5
import nuka
from nuka.hosts import DockerContainer
from nuka.tasks import (shell, file)

# setup a docker container using the default image
host = DockerContainer('mycontainer')


async def do_something(host):

    # we just echoing something using the shell.command task
    await shell.command(['echo', 'it works'], host=host)

    # if no host is provided, then a var named `host` is searched
    # from the stack. Mean that this will works to
    await shell.command(['echo', 'it works too'])


async def do_something_else(host):

    # log /etc/resolv.conf content
    res = await file.cat('/etc/resolv.conf')
    host.log.info(res.content)


# those coroutines will run in parallell
nuka.run(
    do_something(host),
    do_something_else(host),
)Run it using:$ chmod +x your_file.py
$ ./your_file.py -vThe first run will be slow because we have to pull the docker image.
The next run will take approximately 1s.Get some help:$ ./your_file.py -hLook at the generated gantt of your deployement:$ firefox .nuka/reports/your_file_gantt.htmlYou’ll get a dynamic report like this screenshot:
Package: nuke
NukeCommand line tool for nuking a directory 💥.InstallationInstallingnukeis intended to be super easy. The only dependency is a supported Python interpreter. You can getnukeviapip:$pipinstallnukenukeis supported for Python 3.7+.UsageThe most common usage ofnukeis when you wish to recreate a build directory for a build program such as CMake.To usenuke, you just callnukefrom the command line and specify the directory you wish to nuke:$nukepath/to/directoryIf you are already in the directory you wish to nuke, you don't need to exit the directory. Callingnukewithout any arguments will nuke the current directory:$nuke# same as "nuke ."Since nuking is a dangerous operation and you don't want to inadvertently delete something important,nukealways asks you to confirm the nuking of a directory. If you wish to override this since you know what you are doing or you wish to usenukein a shell script, you can pass in the-yflag:$nuke-y/path/to/dir/You can also specify a.nukeignorefile inside the directory to be nuked. This works similar to the.gitignorefile. Every file that matches a pattern in the.nukeignoreis ignored and spared from a gruesome fate of its eligible siblings.For example:*.pywill result in all.pyfiles not being nuked.Suppose you just want to see what files will be nuked without actually deleting them, you can then runnuke -l /path/to/dir, and this will print out the directory tree of all the files that will be nuked.