Saravanan666/pypi-org huggingface dataset:
Package: nbtutor
NbtutorVisualize Python code execution (line-by-line) inJupyter Notebookcells. Inspired byOnline Python TutorInstallNote: installing directly off this repo won't work, as we don't ship the built JavaScript and CSS assets.
See more aboutdevelopingbelow.pippipinstallnbtutor
jupyternbextensioninstall--overwrite--pynbtutor
jupyternbextensionenable--pynbtutorcondacondainstall-cconda-forgenbtutor
jupyternbextensioninstall--overwrite--pynbtutor
jupyternbextensionenable--pynbtutorUsage (Jupyter Notebook)First load thenbtutorIPython kernel extension at top of the Notebook by executing the following magic in aCodeCell:%load_extnbtutorThen to visualize the execute of code in aCodeCelladd the following magic to the top of theCodeCelland execute it again:%%nbtutorOptional ArgumentsThere are also optional arguments that can be used with the cell magic:Reset the IPython user namespace%%nbtutor-r/--resetSuppress the confirmation message from-r/--reset%%nbtutor-r/--reset-f/--forceSpecify the maximum frame depth to visualize (default: 3)%%nbtutor-d/--depthNSpecify the maximum number of elements to visualize for "sequence"
type objects (default: 5)%%nbtutor--max_sizeSStep through all frames (including frames from other cells and other
global scopes altogether)%%nbtutor--step_allNotesIf you find a problem please feel free to submit aGitHub IssueDevelopPlease see theDEVELOPMENT.mdfile
Package: nbu-exchange-rates
Official Repo:https://github.com/lesykbiceps/nbu-exchange-ratesWelcome! Using this library you can collect exchange rates and reproduce this information in various forms. You can do various manipulations with the obtained data:Save the data in json or csv formatGet graphs of how the exchange rate of a particular currency has changedGet the selected exchange rateThose who have access to data
have great opportunitiesLibrariesIt uses the following libraries:LibraryLinkRequestshttps://pypi.org/project/requests/Matplotlibhttps://pypi.org/project/matplotlib/Why you need them?Requestsfor requests to exchange ratesmatplotlibto draw a graphAdditional infoAlso you should havepython3-tkinstalled or any of the matplotlib supported GUI backends
For example on Linux:sudoapt-getinstallpython3-tkQuick Install / Usagepipinstallnbu_exchange_ratesimportjsonimportcsvfromdatetimeimportdatetimefromnbu_exchange_ratesimportget_exchange_rates,format_time,to_json,to_csv,get_diagramdefmain():exchange_rates=get_exchange_rates(datetime(day=19,month=4,year=2022),datetime(day=23,month=4,year=2022),currency='Євро')to_json(exchange_rates)to_csv(exchange_rates)get_diagram(exchange_rates)# Output:# Євро:31.6216 (19.04.2022)# Євро:31.5792 (20.04.2022)# Євро:31.6787 (21.04.2022)# Євро:31.8264 (22.04.2022)Available currenciesUSD | Долар СШАEUR | ЄвроPLN | ЗлотийGBP | Фунт стерлінгівTRY | Турецька ліраCAD | Канадський доларfor more currencies follow this linkhttps://bank.gov.ua/NBUStatService/v1/statdirectory/exchange?date=20220402&jsonLicenseData are taken from the link:https://bank.gov.ua/NBUStatService/v1/statdirectory/exchange?date=20220402&jsonMITFree Software, Hell Yeah!
Package: nbuild
Navy BuildA modern project-as-code specification, build, testing, and report generation library.nbuildis a library providing the following capabilities:Describe a software project from artifacts (source or binary redistributables) to artifacts (usually programs as.exefiles)Using these descriptions of the project test and report the following:CorrectnessCompletenessFinally using the software project description and the tests, produce a formal documentation
describing how to use each tested capability.This directory holds thenbuild/source directory as well as anexamples/directory showing
how one might usenbuildto generate reports about projects.Example ProcessesProcess 01A tester uses thenbuildlibrary to writereview_proj01.py,
which is a formal description of the project deliverables and what the deliverables must do.A contractor submits a project as source code on a USB drive. The code resides in a folder "proj01".The tester runspython review_proj01.pyand their browser opens to the following report:Process 02A tester uses thenbuildlibrary to writereview_nasa_worldwind.py,
which is a formal description of apublic mapping library written by NASA.The tester runspython review_nasa_worldwind.pyand their browser opens to the following report:Process 03A tester uses thenbuildlibrary to describe a physical process for testing
a new artillery loading mechanism inreview_artillery_loading.py. This requires a person to perform the tests
andnbuildwill issue instructions textually. The person doing
the test will respond to simple "yes or no" questions.The tester runspython review_artillery_loading.pyand follows the instructions given.
When completed a report like the following will be generated:PlansSelf-service HTTP server (upload.exefiles, get reports back)Workflow flowchart generation from project definitionRecord runtimePredict runtimeSupport Maven builds (java)Support Gradle builds (java)Support DotNet builds (C#)Support partial automation (eg move seamlessly from an automated step to a manual step + vice versa)Project HygieneYou will needpylintinstalled to run code analysis below.You will needpylintinstalled to run code analysis below.One-liners for dependencies:python-mpipinstall--userpylint
python-mpipinstall--userpdoc3Code QualityRunpython do_quality_checks.pyto check thenbuildlibrary code quality.Pass your favorite editor (subl3for Sublime 3,ideafor the IntelliJ IDE)
to the command to have it open at the first line that failed the linter:pythondo_quality_checks.py# or if you have subl3 installed:pythondo_quality_checks.pyedit-withsubl3# for IntelliJ customers:pythondo_quality_checks.pyedit-withidea.exeCode DocumentationThe code is annotated with docstrings, so most python documentation generators
will produce something useful. We usepdocfor our
own copies of documentation, which places.htmlfiles under a./html/directory.python-mpdoc--htmlnbuild# one-liner to open ./html/nbuild/index.html for documentationpython-mpdoc--html--forcenbuild&&xdg-open./html/nbuild/index.htmlCode licenseSeelicense.txtfor details, it contains a copy of theMIT license.
Package: nbutils
Copyright (c) 2019 Jérémie DECOCK (www.jdhp.org)Web site:http://www.jdhp.org/software_en.html#nbutilsOnline documentation:http://nbutils.readthedocs.orgSource code:https://github.com/jeremiedecock/python-nbutilsIssue tracker:https://github.com/jeremiedecock/python-nbutils/issuesnbutils on PyPI:https://pypi.python.org/pypi/nbutilsDescriptionPython notebook utilsNote:This project is still in beta stage, so the API is not finalized yet.DependenciesPython >= 3.0InstallationGnu/LinuxYou can install, upgrade, uninstall nbutils with these commands (in a
terminal):pip install --pre nbutils
pip install --upgrade nbutils
pip uninstall nbutilsOr, if you have downloaded the nbutils source code:python3 setup.py installWindowsYou can install, upgrade, uninstall nbutils with these commands (in acommand prompt):py -m pip install --pre nbutils
py -m pip install --upgrade nbutils
py -m pip uninstall nbutilsOr, if you have downloaded the nbutils source code:py setup.py installMacOSXYou can install, upgrade, uninstall nbutils with these commands (in a
terminal):pip install --pre nbutils
pip install --upgrade nbutils
pip uninstall nbutilsOr, if you have downloaded the nbutils source code:python3 setup.py installDocumentationOnline documentation:http://nbutils.readthedocs.orgAPI documentation:http://nbutils.readthedocs.org/en/latest/api.htmlExample usageTODOBug reportsTo search for bugs or report them, please use the nbutils Bug Tracker at:https://github.com/jeremiedecock/python-nbutils/issuesLicenseThis project is provided under the terms and conditions of theMIT License.
Package: nbv
nbvRead-only Jupyter Notebook viewing usingnbconvert.Invokingnbv notebook.ipynbconverts the notebook to HTML[^1] and opens this HTML file in the default web browser.You can get a similar result with justnbconvert notebook.ipynb --to html --post serveNote that this (andnbv) doesn't require a full Jupyter installation (e.g. JupyterLab) in order to run.
Butnbvhas additional benefits[^2]:doesn't pollute the notebook location with HTML (unlike the above)no server, just open the HTML file in browsersimple CLI, exposing only a few nbconvert optionsNote: currently requiresjupyter-nbconvertavailable on PATH[^3]. Maybe later will update to use thenbconvertlibrary directly instead.[^1]: Inside the OS temporary directory by default.
[^2]: Also I wanted to tryTyper.
[^3]: Since apipxinstall ofnbvdoesn't give this, I have removednbconvertfrom the dependencies for now.
Package: nbverbose
Verbose nbdev (nbverbose)An add-on to nbdev that allows for explicit parameter documentationInstallpip install nbverboseHow to useThis library acts as an in-place replacement fornbdev'sshow_docfunctionality, and extends it to allow for documentation of the inputs. It is also built on top of thedocmentsfunctionality inside of fastcore:docsEverything else with nbdev runs fine, and you should use normal nbdev conventions, however instead of doingfrom nbdev.showdoc import *, you should dofrom nbverbose.showdoc import *.An example of what will happen can be found belowFirst we import the library:fromnbverbose.showdocimport*The history saving thread hit an unexpected error (DatabaseError('database disk image is malformed')).History will not be written to the database.Next we'll write a very basic function, that has a new way to document the inputs.Rather than needing to have a very long doc string, your code can follow this declaration format. Spacing etc is not needed, just each parameter must be on a new line:defaddition(a:int,# The first number to be addedb:(int,float)=2,# The second number to be added):"Adds two numbers together"returna+bAs you can see, the documentation format isnamefollowed by  thetype(as normal), but in a single-line comment afterwards you put a quick affiliated documentation string for it.When you call theshow_docordocfunctions, wrapping aroundaddition, it will look something like so:addition[source]addition(a:int,b:(<class 'int'>, <class 'float'>)=2)Adds two numbers togetherParameters:a:<class 'int'>The first number to be addedb:(<class 'int'>, <class 'float'>),optionalThe second number to be addedWe can see that our types are properly formatted. This even works in cases such asUnionorList:fromtypingimportUniondefaddition(a:int,# The first number to be addedb:Union[int,float]=2.,# The second number to be added):"Adds two numbers together"returna+baddition[source]addition(a:int,b:Union[int,float]=2.0)Adds two numbers togetherParameters:a:<class 'int'>The first number to be addedb:typing.Union[int, float],optionalThe second number to be addedAny functions that normally don't follow this format can still work as well:defaddition(a:int,b:Union[int,float],):"Adds two numbers together"returna+baddition[source]addition(a:int,b:Union[int,float])Adds two numbers togetherParameters:a:<class 'int'>b:typing.Union[int, float]defaddition(a:int,b:Union[int,float]):"Adds two numbers together"returna+baddition[source]addition(a:int,b:Union[int,float])Adds two numbers togetherParameters:a:<class 'int'>b:typing.Union[int, float]{% include note.html content='The[source]button on these examples will not point to something existing. This is due to the fact thatadditionis not part of our library. This will work fine for anything done with yournbdev-built library.' %}
Package: nbviewer-gui
Jupyter Notebook ViewerThis is a utility which lets you preview Jupyter notebooks faster on your Linux machine, with a double click.Requires no internet and is faster.InstallationUsepip install nbviewer-guito install the package, and you can call the command line utility from the terminal bynbviewer-gui notebook.ipynbYou can also use thenotebook.desktopunder thenbviewerguidirectory and create a desktop application, so that you can launch the script by double clicking the *.ipynb file.
Package: nbvv
Volume Viewer Jupyter Notebook ExtensionEmbeds the Allen Institute web-based 3d viewer in Jupyter notebooksDescriptionMost 3D viewers are far too heavyweight to use for quick visualization tasks when experimenting with tractably-sized (analyzing, checking, ...) 3D volumetric datasets. nbvv is a multichannel volume viewer for interactive data exploration in jupyter. This is a jupyter widget that provides volumetric rendering given a multiple channel zstack as a numpy array.Envisioned user group is anyone who wants a robust and quick way to interactively interrogate volumetric data as part of their workflows; domain which motivated development is multi-channel volumetric light/fluorescence microscopy datasets. The viewer is optimized for volume data that has finer xy resolution than z resolution.InstallationTo install from source:
You will need to make sure nodejs and npm are installed on your system.
One way to do this is usingnvm, for example:nvm install 14.17.0
nvm use 14.17.0Make sure you have jupyterlab, jupyter notebook and nbextensions installed (not necessary in every environment):pip install jupyter_contrib_nbextensions && jupyter contrib nbextension install --userInstall nbvv in one of these ways:Option 1: Install from PyPipip install nbvv
jupyter nbextension install --py nbvv --sys-prefix
jupyter nbextension enable nbvv --py --sys-prefixOption 2: Runbuild.shfrom this repoOption 3: Step-by-step, from source:pip install -e .
jupyter nbextension install --py --overwrite --symlink --sys-prefix nbvv
jupyter nbextension enable --py --sys-prefix nbvv
jupyter labextension develop . --overwriteDocumentationExtended documentation is not available yet. When completed it will be made available at:allen-cell-animated.github.io/nbvv.Quick Starttry the demo notebook:jupyter notebook examples/demo.ipynbor likewise with jupyterlab:jupyter lab examples/demo.ipynbIn a Jupyter notebook, load or create volume data in a numpy array.
The data should be of shape (Z,Y,X) or (C,Z,Y,X) for multi-channel data.
Display the numpy data usingimport nbvv
nbvv.volshow(mynumpydata, spacing=(1.0, 1.0, 4.0), channel_names=my_list_of_channel_name_strings)volshowalso provides an optionalviewer_heightparameter if you want to make the viewer larger in the notebook. Default is 500 and values should be specified in CSS pixels.DevelopmentSeeCONTRIBUTING.mdfor information related to developing the code.
Package: nbwavedrom
nbwavedromA simple package to add wavedrom (http://wavedrom.com) timing diagrams into a jupyter notebook.Example:https://github.com/witchard/nbwavedrom/blob/master/examples/example.ipynb.To get started simplypip install nbwavedromorpip install git+git://github.com/witchard/nbwavedrom.gitfor the development version. Then take a look at the example notebook within jupyter notebook.The waveforms are rendered using the wavedrom-cli. Installation instructions can be found here:https://github.com/wavedrom/cli/.
Package: nbxmpp
Welcome to python-nbxmpppython-nbxmppis a Python library that provides a way for Python applications to use the XMPP network. This library was initially a fork ofxmpppy.Runtime RequirementsPython(>=3.10)PyGObject(>=3.42.0)GLib(>=2.66.0)libsoup3precis-i18n(>=1.0.0)packagingidnaOptional Runtime Requirementspython-gssapiGSSAPI authenticationBuild Requirementssetuptools(>=65.0.0)FeaturesList ofsupported XEPsSetupRun the following:pip install .orpip install .[gssapi]to also install the optional dependencygssapi.UsageTo use python-nbxmpp,import nbxmppin your application.To see an example check outnbxmpp-client
Package: nbxmpp-client
nbxmpp-clientA small GTK test client to test various ways to connect to a server.[[TOC]]Installation$ pip install nbxmpp-clientWhile developing, you can use:$ pip install -e .Usage$ nbcRuntime RequirementsGtk4(>=4.8.0)GtkSourceView5(>=5.6.0)libadwaita(>=1.2)Python(>=3.10)nbxmpp(>=4.0.0)Build Requirementssetuptools(>=65.0.0)
Package: nbycomp-pybrctl
PybrctlPybrctl is a pure Python library for managing bridges. It is a lightwight wrapper for the linux brctl command, included in the bridge-utils package.
It requires Python, Linux, and the bridge-utils package.It was written by Ido Nahshon at Jan 2015, and it was released under the GPL license.This version is compatible with Python 3.Example UsageThis example shows how to set up a new bridge and remove it:from pybrctl import pybrctl

brctl = pybrctl.BridgeController()

b = brctl.addbr("br0")
b.addif("eth0")
b.addif("eth1")
b.setmaxageing(0)

brctl.delbr("br0")SourceLatest version on github:https://github.com/udragon/pybrctlFeel free to contribute. ;)
Package: nc
🎨nc: Named colors in Python 🎨--The modulenccollects named colors in Python.There are two ways to usenc.The simple way is as an intuitive and forgiving interface to a
collection of over 2000 named colors, put together from almost 20 color
palettes scraped from the Internet.In the simplest use, it's a collection of about 1700 colors, some
scraped from the Wikipedia (which includes some very strange colors),
with a neat API.For more precise use, color collections can be put together from schemes
built intonc(currentlyhtml,juce,pwg,wikipedia,x11),
or from custom color schemes created by the user.There is also a collection ofcolor swatchesfor the default
color collection.Examplesimport nc

for c in nc.red, nc.light_green, nc.DarkGrey, nc['PUCE']:
    print(c, '=', *c)

# Prints:
#   Red = 255 0 0
#   Light green = 144 238 144
#   Dark grey = 85 85 85
#   Puce = 204 136 153

# Colors have red, green, blue or r, g, b components
assert nc.yellow.red == nc.yellow.r == 0
assert nc.yellow.green == nc.yellow.g == 255
assert nc.yellow.blue == nc.yellow.b == 255

# Lots of ways to reach colors
assert nc.black == nc(0, 0, 0) == nc('0, 0, 0') == nc('(0, 0, 0)') == nc(0)

# ``nc`` looks like a dict
assert nc.red == nc['red'] == nc['RED']
for name, color in nc.items():
    print(name, '=', *color)

# Prints:
#   Absolute Zero = 0 72 186
#   Acid green = 176 191 26
#   Aero = 124 185 232
#   ... many more

# closest() function

from random import randrange
for i in range(8):
    c1 = randrange(256), randrange(256), randrange(256)
    c2 = nc.closest(c1)
    print(c1, 'is closest to', c2, *c2)

# Prints:
#   (193, 207, 185) is closest to Honeydew 3 = 193 205 193
#   (181, 162, 188) is closest to Lilac = 200 162 200
#   (122, 110, 250) is closest to Slate blue 1 = 131 111 255
#   (56, 218, 180) is closest to Turquoise = 64 224 208API Documentation
Package: nc2gj
IntroductionConversion of the ecfas nc coastal TWL time-series to geojson format, with the addition of the trigger threshold for coastal flood warning. It therefore requires that the ecfas workflow and trigger have been run first such. If this is not the case, a dummy threshold is introduced (-9999).Conda dependenciesgeopandas==0.10.2usageSpecify the following mandatory arguments:-o : Output directory where the daily regional netcdf time-series forecasts are saved.Optional arguments:-r  : Region, matching the 6 Copernicus Marine Service regional domains. Defaults to all ['NWS','IBI','MED','BAL','BS','ARC']-t <%Y%m%d_%H%M%S>: Bulleting date for the forecast data. Default: Forecast update time of execution dayExample usage:nc2geojson -o <outputdir> [-r <region>] -t [<%Y%m%d_%H%M%S>]Output: output written to folder '/geojson/' under the outputdir ('o'). The outputs are geojson files (*.geojson). The name of the file is kept the same as the the original netcdf filenames, just the extension changes.
Package: ncaadb
ncaadbNcaadb is a Python package created for the handling of DB save files from EA Sports NCAA games.InstallationNcaadb is published to PyPI and is available usingpipor any other Python package manager.pip install ncaadbUsageThe data from a DB file is loaded into aFileby opening a file stream and sending it into theread_dbfunction.importncaadbwithopen("saves/USR-DATA","rb")asf:db_data=ncaadb.read_db(f)The contents of a table can then be accessed using the indexer operator,[], and the table's name as the index. This will return the tabular data as apandas.DataFrame. The tabular data can be set using the same method.player_data=db_data["PLAY"]modified_player_data=player_data.replace(0,1)db_data["PLAY"]=modified_player_data
Package: ncache
Nano cacheA simple and lightweight dictionary-based persistent cache for storing python objects.Installation:pip install ncacheUsage:fromncacheimportCachecache=Cache('my.cache')cache.load_cache()values=[]try:_hash=cache.get_hash('key')val=cache.get_value(_hash)# raise NoCacheValue exception if not foundvalues+=[val]print('Value got from cache:',values)except:# if not in cache then add itval={'value'}cache.set_value(_hash,val)values+=[val]print('Value added:',values)cache.save_cache()
Package: ncafs
NCAFSNeighborhood Component Analysis Feature SelectionNCAFS is a non-parametric algorithm based on k-nearest neighbors (kNN), which learns a feature weighting
vector by minimizing the expected leave-one-out error with a regularization term. NCA was originally
proposed in [1], which inspired the feature selection method for classification presented in [2]. It was
then extended to regression problems as well [3].NCAFS is a Python package that implements the NCA feature selection method, for both classification and
regression problems.Instalationpip install ncafsGetting startedClassificationfromncafsimportNCAFSCfromsklearnimportdatasetsX,y=datasets.make_classification(n_samples=1000,n_classes=5,n_features=20,n_informative=100,n_redundant=0,n_repeated=0,flip_y=0.1,class_sep=0.5,shuffle=False,random_state=0)fs_clf=NCAFSC()fs_clf.fit(X,y)w=fs_clf.weights_RegressionfromncafsimportNCAFSRfromsklearnimportdatasetsX,y,coef=datasets.make_regression(n_samples=1000,n_features=100,n_informative=20,bias=0,noise=1e-3,coef=True,shuffle=False,random_state=0)fs_reg=NCAFSR()fs_reg.fit(X,y)w=fs_reg.weights_ReferencesGoldberger, J., Hinton, G., Roweis, S., Salakhutdinov, R. (2005). Neighbourhood Components Analysis. Advances in Neural Information Processing Systems. 17, 513-520.Yang, W., Wang, K., & Zuo, W. (2012). Neighborhood component feature selection for high-dimensional data. J. Comput., 7(1), 161-168.Amankwaa-Kyeremeh, B., Greet, C., Zanin, M., Skinner, W. and Asamoah, R. K., (2020), Selecting key
predictor parameters for regression analysis using modified Neighbourhood Component Analysis (NCA)
Algorithm. Proceedings of 6th UMaT Biennial International Mining and Mineral Conference, Tarkwa, Ghana,
pp. 320-325.
Package: ncal
2-Way Sync for Notion and Google CalendarCurrently reworking the documentation.Install withpip install ncal. This will install thencalcommand.ConfigurationConfiguration is via toml, command line flags, or environment variables (including via a .env file).Configuration is via toml, command line flags, or environment variables (including via a .env file). Reading throughconfig.pywill give a lot of useful information on options. Runncal --helpto get more info on the cli command.Key dependenciesNotion API Python SDKhttps://github.com/googleapis/google-api-python-clientArrowfor datetime handlingDev:https://github.com/HypothesisWorks/hypothesishttps://github.com/python/mypy
Package: ncalc
This module provides classes that can be used to evaluate math expression contained in string.
Most common class is Ncalc. It allows you evaluate expression contains variables ‘x’, ‘y’ and most common
functions such as sin, cos, tg, log2, log10, exp, mod, exp and factorial.
Furthermore you can build your own ‘calculator’ with your own operator precedences
(don’t know why it can be need), functions and variables.
To build The Calculator see at Ncalc definition and do it like it:
1. Define new class inherited from Matheval:class Ncalc(Matheval):Using __init__ set up given math expression and context namely dictionary of variables and functions:def __init__(self, mexp):
super().__init__(mexp, {
‘x’: 1,
‘y’: 1,
‘factorial’: Ncalc.__factorial,
})Wrap functions as ‘staticmethod’ or functions of module:@staticmethod
def __log10(a):
return math.log10(a)That’s it. :)Using:
>>> from ncalc.eval import Ncalc
>>> e = Ncalc(‘2*factorial(5)’)
>>> e.eval()
240
>>> e.expression = ‘1+mod(5, 2)+sin(0)’
>>> e.eval()
2.0P.S. This version can work wrong cause I didn’t test it as it’s necessary.