Saravanan666/pypi-org huggingface dataset:
Package: nbswave
nbswaveA Python package to render note block songs to a variety of audio formats.Overviewnbswave is a Python package aimed at rendering note block songs fromOpen Note Block Studioto audio tracks. Supports many common audio formats, both for loading custom sounds as well as exporting tracks.SetupThe package can be installed withpip.$pipinstallnbswaveIn order to use the package,FFmpegmust be available:Download precompiled binaries forffmpegandffprobehere.Add the destination folder to yourPATH, or, alternatively, place both executables in the root folder of the project.Usagefromnbswaveimport*render_audio("song.nbs","output.mp3")The output format will be detected automatically based on the file extension. You can still specify it explicitly if you'd like:fromnbswaveimport*render_audio("song.nbs","output",format='wav')Compatibility with audio formats depends on your FFmpeg configuration.Custom instrumentsIn order to render songs with custom instruments, you have a few options:Copy the sounds manually to thesoundsfolderPass the path to a folder (or ZIP file) containing custom sounds:frompathlibimportPathnbs_sounds_folder=Path.home()/"Minecraft Note Block Studio"/"Data"/"Sounds"render_audio("song.nbs","output.mp3",custom_sound_path=nbs_sounds_folder)If any sound file used in the song is not found in that location, aMissingInstrumentExceptionwill be raised. This behavior can be suppressed with the following argument:render_audio("song.nbs","output.mp3",ignore_missing_instruments=True)Advanced usageFor more advanced use cases where you might need more control over the export process, it's possible to use theSongRendererclass. This will allow you to load custom instruments from multiple sources, as well as query which instruments are still missing:fromnbswaveimport*renderer=SongRenderer("song.nbs")renderer.load_instruments(nbs_sounds_folder)renderer.load_instruments("some_more_instruments.zip")renderer.missing_instruments()renderer.mix_song()ContributingContributions are welcome! Make sure to open an issue discussing the problem or feature suggestion before creating a pull request.This project usespoetryfor managing dependencies. Make sure to install it, and run:$poetryinstallThis project follows theblackcode style. Import statements are sorted withisort.$poetryrunisortnbswave
$poetryrunblacknbswave
$poetryrunblack--checknbswaveLicense -MIT
Package: nbtag
nbtagSet cell tags in a Jupyter notebook from a special comment.Why use this extension?Many tools in the Jupyter ecosystem (ex.nbmake,nbstripout) use cell tags to configure
their behavior.However, some frontends to Jupyter (ex.ein) can't modify tags.This server extension watches for a special comment in the content of the cell
and sets tags correspondingly.How to use# %tags: keep_output, another_tagprint("Hello World!")A cell containing the text above will be given the tagskeep_output,another_tagon saving.Installpip install nbtagIf you usepipx, make sure to injectnbtaginto the Jupyter package's
environment.Enablejupyter serverextension enable nbtagjupyter serverextension listCompatibilityOnly works withjupyter server, not withjupyter notebook, but I think you
should be usingjupyter server+nbclassicinstead ofjupyter notebookanyway?
Package: nbtemplater
nbtemplaterA utility to convert a templateJupyternotebook into separate
solution and task versions based on simple directives.# this converts template.ipynb to template_solution.ipynb and template_task.ipynbnbtemplatertemplate.ipynbIn addition to being able to convert a single file,nbtemplater.pycan also be
used to (recursively) convert all notebook files in a given directory like:# this converts all .ipynb files in notebook-folders/nbtemplaternotebook-folders/# this recursively converts all .ipynb files in notebook-folders/# so e.g. notebook-folders/bar/template.ipynbnbtemplater-rnotebook-folders/InstallationFor easy installation, you can installnbtemplaterdirectlyhere from PyPI. So you can
install it using:pipinstallnbtemplaterManual installationIf you prefer not to install frompipyou can get the source code atthe GitHub repository, where
you can also find arequirements.txtfile, listing all dependencies.Sample conversionIf the following text is included in any part or cell of the template notebook, it is
split up into the appropriate versions:Template# This is some basic content%%IF_SOL%%
any text before the next directive is
only going to be visible in the solution
version of this notebook
%%ELSE%%
this**optional**section is going to be copied
into the task version
%%END%%Solution# This is some basic contentany text before the next directive is
only going to be visible in the solution
version of this notebookTask# This is some basic contentthis**optional**section is going to be copied
into the task versionHelp textUsage: nbtemplater [OPTIONS] [PATHS]...

  Convert PATHS.

  PATHS is a list of directories or notebook files to convert to solution
  and task files.

Options:
  -r, --recurse           Whether to recursively go through folders  [default:
                          False]

  -f, --force             Whether to overwrite an already existing file
                          [default: False]

  -q, --quiet             Disable output during conversion  [default: False]
  -p, --pattern TEXT      The pattern to search for in folders  [default:
                          *.ipynb]

  --solution-suffix TEXT  The file suffix to be used for the generated
                          solution file  [default: solution]

  --task-suffix TEXT      The file suffix to be used for the generated task
                          file  [default: student]

  --start-solution TEXT   The start of a solution block  [default: %%IF_SOL%%]
  --else-task TEXT        The start of the optional task block  [default:
                          %%ELSE%%]

  --end-if TEXT           The end of a solution/task if block  [default:
                          %%FI%%]

  -h, --help              Show this message and exit.
Package: nbterm
nbtermLets you view, edit and execute Jupyter Notebooks in the terminal.InstallUsing pip:pip install nbtermUsing conda:mamba install nbterm -c conda-forgeYou will also need a kernel, e.g.ipykernelorxeus-pythonfor Python,xeus-clingfor C++.UsageOpen an interactive notebook:$ nbterm my_notebook.ipynbRun a notebook in batch mode:$ nbterm --run my_notebook.ipynbKey bindingsThere are two modes: edit mode, and command mode.enter: enter the edit mode, allowing to type into the cell.esc: exit the edit mode and enter the command mode.In command mode:up: select cell above.down: select cell below.ctrl-up: move cell above.ctrl-down: move cell below.a: insert cell above.b: insert cell below.x: cut the cell.c: copy the cell.ctrl-v: paste cell above.v: paste cell below.o: set as code cell.r: set as raw cell.m: set as Markdown cell.l: clear cell outputs.ctrl-e: run cell.ctrl-r: run cell and select below.ctrl-s: save.ctrl-q: exit.ctrl-h: show help.
Package: nbtester
Test Utility for Jupyter Notebook file.LoaderJupyter Notebook File (test.ipynb):...
"cells": [
 {
  "cell_type": "code",
  "execution_count": null,
  "metadata": {
   "collapsed": true
  },
  "outputs": [],
  "source": ["num = 8"]
 }
],
...importunittestfromnbtester.loaderimportload_cellsclassTest(TestCase):deftest_it(self):d={}load_cells(d,"test.ipynb")self.assertEqual(d['num'],8)Supported Magic Commands% run child.ipynb%% ...
Package: nbtex
nbTeXA light-weight pythonic wrapper around LaTeX specifically to python-like interface to write mathemical latex in Jupyter Notebooks.NOTE:Only Jupyter Notebooks are supported. Tests done in notebooks tooMotivationA lot of us in data science extensively use notebooks and sometimes have to write some latex in markdown. Most of us are not familiar with LaTeX. Therefore instead of going on a hunt for LaTeX on the internet, you can use this library for writing LaTeX in a pythonic manner.NOTE:We only support Math LaTeX because Jupyter Notebook users normally do other stuff in normal markdown and not in LaTeX.FeaturesYou can create latex for:+: Adding-: Subtraction*: Multiplicationpow: Exponents^: Exponents (another way)/: Fractions|: Space in generated latex(): Function calling with arbitrary args<,>,<=,>=: Ordering operators==,!=: Equal and Not Equal~: Inversion of the topmost operator in the expression (eg: ~(x*y) will give LaTeX for division/fraction)MatricesDifferentiationPartial DifferentiationIntegrationIntegration over partialsSummationProductVector notationUsageThe usage is best presented by examplesLook at thedocs
Package: nbthread_spark
Spark multithread in IPython Notebooks.It’s now simple to execute Spark Structured Streaming in Jupyter NotebooksInstallpipinstallnbthread_spark--process-dependency-linksUsageShow Spark Buttons for stop and UI:fromnbthread_spark.sparkimportSparkRunnerspark=SparkRunner.builder.getOrCreate()# same as original SparkSession## you will see buttons ;)Given a Socket Stream:TCP_IP="localhost"TCP_PORT=9005frompyspark.sql.functionsimportfrom_jsonfrompyspark.sqlimportSparkSessionfrompyspark.sql.typesimportStructField,StructType,IntegerTypeschema=StructType([StructField("bip",IntegerType(),True),StructField("is_on",IntegerType(),True)])spark=SparkSession\.builder\.appName("IOTStreamApp")\.getOrCreate()iot_stream=spark\.readStream\.format("socket")\.option("host",TCP_IP)\.option("port",TCP_PORT)\.load()iot_expanded=iot_stream.withColumn('value_json',from_json('value',schema)).drop('value').select('value_json.*')query=iot_expanded\.writeStream\.outputMode("update")\.format("memory")\.queryName("iot_table")\.start()You can run queries using this:fromnbthread_spark.streamimportStreamRunnerrunner=StreamRunner(query)runner.controls()## you will see buttons ;)runner.start()# start without controlsrunner.status()# show stream statusrunner.stop()# stop streaming and threadFor Stream Manager you can control lot of streams in a easy way:fromnbthread_spark.managerimportStreamManagersm=StreamManager()sm.append(runner)sm.append(runner1)sm.append(runner2)sm.all_controls()## you will see all buttons from streams ;)sm.start_all()# start all streamssm.stop_all()# stop all streamsSpecial ThanksHerethe list of students that contribute with this module.
Package: nb-thumb
nb-thumbInstallpipinstallnb_thumbQuickstartShow A thumbnailfromnb_thumbimportnb2thumbnb2thumb(nb_path='test_nbs/geom_col.ipynb',label='two_variable_bar_plot',size=(200,200))Show A GalleryThis will show a gallery of plots from notebooks.fromnb_thumbimportgalleryUse output: asisWhen usingnb_thumb.galleryyou should always set the Quarto
directive#|output: asisso that the markdown is rendered correctly
in quarto.Seeraw
outputfor more information.plots=\[dict(nb_path='test_nbs/geom_col.ipynb',label='two_variable_bar_plot'),dict(nb_path='test_nbs/PlotnineAnimation.ipynb',label='spiral'),dict(nb_path='test_nbs/geom_density.ipynb',label='density_curve'),dict(nb_path='test_nbs/geom_map.ipynb',label='map'),dict(nb_path='test_nbs/geom_segment.ipynb',label='ranges'),dict(nb_path='test_nbs/geom_segment.ipynb',label='rank')]#|output: asisprint(gallery(plots))UsageFor more information and examples, seethe
docs.
Package: nbtk
NBTK(Nebula Toolkit)Nebula Toolkit provides services for developers and contributors of the Nebula platform. The toolkit includes defining
parameters and metrics of a model, generating model configuration file.InstallingInstall nbtk(Nebula Toolkit) from PyPI viapip install nbtkContributingWe happily welcome contributions to Nebula Toolkit. Please see ourcontribution guide <CONTRIBUTING.rst>_ to learn more about contributing to Nebula Toolkit.
Package: nbtof
nbtofThis module is used to transfer .ipynb file to .py function.Table of contentsnbtofIntoroductionInstallationDocumantationTagsExamples and Recomended UsageSetting ParametersBatch processingIntoroductionBy writing the#@~marks in notebook files, you can transfer notebook file to py file with the function which perform the same process as notebook.For example, in the case that you want to transfershort_sample.ipynbto function,short_sample.ipynb#@parama=1b=1c=a+b#@returncyou can take functionalized py fileoutput.py.importnbtofnbtof.nbtof_generate(output_py_file='output.py',notebook_file='short_sample.ipynb',)output.pydefshort_sample(a,b):c=a+breturncInstallationThe latest nbtof can be installed from PyPI:pip install nbtofDocumantationTagsTagDescription#@param関数の引数になります. 代入した数値は無視されます.#@default関数の引数になります. 代入した数値が既定値として設定されます.#@args関数の可変長引数 *argsになります. 代入した数値は無視されます.#@kwargs関数の可変長引数 **kwargsになります. 代入した数値は無視されます.#@return関数の戻り値になります.#@ignoreセル内の内容は無視されます.#@help関数内の docstring になります.Examples and Recomended UsageSetting ParametersBatch processing複数のnotebook, 関数をまとめて1つの py fileに出力する場合は引数のnotebook_fileにnotebookのfilenameもしくはfilepathをリストにして渡す.
Package: nb_tokenizer
author:
Lars G Johnsen
organization:
Nasjonalbiblioteket
date:
juni 2014Tokenisator for ngramleser (evt. parsing).Tokenisatorens oppgave er å danne token eller ord fra en sekvens med tegn.
I utgangspunktet fungerer skilletegn og mellomrom som ordgrenser,
men det er unntak, se listen nedenfor. Skilletegn danner som oftest egne token,
men spesielt punktum og komma brukes på flere måter, noe det må tas høyde for.Noen ord (token) har bestanddeler i form av skilletegn, som forkortelser, tall,
i tillegg kan ordene selv være bundet sammen med bindestrek:p-pille (bindestrek)
3.3 (punktum i seksjonsnummerering)
etc. (forkortelser)
10 000 (token over mellomrom)
3,14 (desimaltall med komma)
co2 (bokstaver og tall i kjemiske formler)
co2-forurensning (bokstaver tall pluss bindestrek)
17. (ordenstall som i 17. mai)
P. A. Munch (punktum i initialer)
... tre eller flere  punktum
Når punktum følger tall vil tokenisatoren la punktum tilhøre tallet
med mindre punktumet følges av mellomrom og stor bokstav.Punktum tilhører alle forkortelser som tar punktum uavhenging av kontekst.
Den kan imidlertid gjøres følsom for påfølgende stor bokstav,
men det er altså ikke gjort her.
Punktum tillates inne i ord og deler ikke opp ord med punktum i seg.Alle skilletegn ellers utgjør egne token, bortsett fra § som kan sekvensieres,
så § og §§ vil være egne tokener;
de benyttes en hel del i lovtekster for entall og flertall.Tall skrevet med mellomrom blir ett token om de er på formen xx xxx, altså 1
eller 3 siffer etterfulgt av grupper på tre siffer skilt med ett mellomrom.
Så 3 1995 vil være to tokener, mens 3 995 blir ett token,
4000 398 blir igjen to token. (Mulig det er endret)Tall som følger etter § (adskilt med maks ett mellomrom)
vil aldri tiltrekke seg punktum.Øvrige tegn som ikke passer inn med mønstrene over behandles som separate token.
Package: nbtoolbelt
nbtoolbelt- Tools to Work with Jupyter Notebooksvalidate: validate notebookshead: show head or tail of notebooksdump: dump notebook info and source on terminalstats: summarize notebooks with statisticsview: view notebook, including all embedded images, LaTeX, and HTML in a browsercat: concatenate multiple notebooksclean: clean notebooks by removing specified elementsrun: execute notebooks, with pre/post cleaningsplit: split notebooks into MarkDown, code, and rawpunch: punch holes into notebooks and fill them (for creating exercises)Available as library functions and as configurable command-line scripts.InstallationpipinstallnbtoolbeltDocumentationDocumentation is available onRead the Docs.On the command line,
you can use the options-hor--help.UsageOn the command line:nbtb[-h][options]tool[options]nb.ipynb...As library: see documentationTestingpipinstallnbtoolbelt[test]nbtoolbeltcomes with a set of automatic test cases forpytest.DevelopingSome useful commands, and where to run them:Innbtoolbelt/docs/,clean build directory:make cleancreate html documentation tree:make htmlcreate pdf documentation:make latexpdfdetermine size of documentation:wc `find . -name '*.rst'`Innbtoolbelt/test/,run all test cases:pytest .Innbtoolbelt/,test package configuration:python setup.py check -r -screate source distribution and wheel:python setup.py sdist bdist_wheelInnbtoolbelt/dist/create digital signature:gpg --detach-sign -a ...upload to PyPI:twine upload ...Innbtoolbelt/src/,determine size of code:wc `find . -name '*.py'`Steps to add a feature:Add issue.Design interface.Add (failing) test cases innbtoolbelt/test/.Add documentation innbtoolbelt/docs/.Implement feature innbtoolbelt/src/nbtoolbelt/.Updatenbtoolbelt/src/nbtoolbelt/_version.py.UpdateCHANGELOG.rst.Commit and push changes.Close issue, indicating commit hash.LicenseCopyright (c) 2017 - Eindhoven University of Technology, The NetherlandsThis software is made available under the terms of theMIT License.ResourcesPython: Python 3JupyterJupyter notebook formatDocumentationIncludes a format validator based on JSON schemas, such asnbformat.v4.schema.jsonJSON Schema./jq:
a lightweight and flexible command-line JSON processorPython 3 Patterns, Recipes and Idioms
Package: nbtransom
This is a Python 3 library to read/write cells programmatically inJupyter notebookswhich anticipates upcomingcollaborativefeatures in Jupyter.We use this atO’Reilly Mediafor
notebooks used to manage machine learning pipelines.
That is to say,machines and people collaborate on documents,
implementing a “human-in-the-loop” design pattern:people adjust hyperparameters for the ML pipelinesmachines write structured “logs” during ML modeling/evaluationpeople runjupyter notebookvia SSH tunnel for remote accessFor more info about use cases for this library andactive learningin general, see theJupyterCon 2017talkHumans in the loopExample UsageThe following script generates a Jupyter notebook in thetest.ipynbfile, then runs it:python test.py
jupyter notebookThen launch thetest.ipynbnotebook and from theCellsmenu
selectRun Allto view results.NB: whenever you use theput_df()function to store data as aPandas dataframebe sure to includeimport pandas as pdat some earlier point in
the notebook.Dependencies and InstallationThis code has dependencies on:nbformatpandasTo install fromPyPi:pip install nbtransomTo install from this Git repo:git clone https://github.com/ceteri/nbtransom.git
cd nbtransom
pip install -r requirements.txtKudos@htmartin@esztiorm@fperez@odewahn
Package: nbtschematic
nbtschematicA simplenbtlibSchema for reading or
writing Schematic files forMCEditand other world editors.InstallationPython 3.8 or higher is required. You should probably create a newvirtual environmentbefore you
install. Once you have activated your virtual environment, runpip3installnbtschematicExamplesTo load an existing MCEdit or other schematic file from disk, run:fromnbtschematicimportSchematicFilesf=SchematicFile.load('tests/test_schematic/simple.schematic')print("The block at Y=%d, Z=%d, X=%dhas block ID%d"%(2,3,0,sf.blocks[2,3,0]))To generate a schematic file in python, run:fromnbtschematicimportSchematicFilesf=SchematicFile(shape=(10,8,4))assertsf.blocks.shape==(10,8,4)sf.blocks[2,3,0]=42sf.save('example.schematic')The size of the schematic should be defined at construction time. Resizing it
will clear the blocks and block data.Other fields of interest include:data: Block data for each and every blockentities: Everything that is not a blockblockentities: Extended metadata for blocksFurther ReadingFor more information about the underlying objects, seenbtlib's excellentexamplespage.License -MIT
Package: nbt-structure-utils
NBT Structure UtilsA python library to create and edit NBT structure files for Minecraft.This has been tested with Minecraft Java, version 1.19.3.FeaturesCreate, read, and edit NBT structure files.Methods inspired by Minecraft's fill, setblock, and clone commands.Edit the state, inventory, and NBT data of blocks.Special classes to help fill Cuboids and draw straight lines.Basic UsageSee class docstrings for finer details and lists of methods.Minecraft NBT StructureThis library creates .nbt files that can be placed in minecraft worlds. with a Structure Block or structure command.See the minecraft wiki for details on each:Structure Blockstructure CommandEdit blocksBasic Example: create a 5x5x5 cube of stone and save to file:fromnbt_structure_utilsimportNBTStructure,Vector,Cuboid,BlockDatanbtstructure=NBTStructure()c1,c2=Vector(0,0,0),Vector(4,4,4)nbtstructure.fill(Cuboid(c1,c2),BlockData("stone"))nbtstructure.get_nbt().write_file(filename="path/to/output/hollow_box.nbt")Read and EditYou can load and edit NBT structures created by this library or by Minecraft. All or part of a structure can also be cloned into other structures.Example: Load from disk and mirror the structure to be upside down:fromnbt_structure_utilsimportNBTStructure,Vectornbtstructure=NBTStructure("path/to/existing_structure.nbt")nbtstructure.reflect(Vector(None,0,None))nbtstructure.get_nbt().write_file(filename="path/to/output/structure_flipped.nbt")Edit inventoriesCreate an Inventory and save it to desired blocks.Example: Create a dropper with an enchanted wooden sword in the 5th slot:fromnbt_structure_utilsimportNBTStructure,Vector,BlockData,Inventory,Enchantmentstructure=NBTStructure()inv_block_info=BlockData("dropper",[("facing","up")])enchants=[Enchantment("sweeping",3)]inv=Inventory([ItemStack("wooden_sword",1,4,0,enchants,None)])structure.set_block(Vector(0,0,0),inv_block_info,inv,None)nbtstructure.get_nbt().write_file(filename="path/to/output/sword_dropper.nbt")
Package: nbtty
NB TTYWeb :globe_with_meridians: terminal :computer: for jupyter notebooks :notebook:.Today many cloud services provide jupyter notebooks as a service to users, e.g. Google colab, Kaggle Kernel, Microsoft Azure Notebooks ... These services are great, easy to use, people do not have to install jupyter, CUDA, or GPU driver themselves. However without access to the shell, my data science workflow is quite inefficient because I use commandline heavily.So I create this little tool.  It starts a web shell (gotty) locally and exposes the shell to the ngrok. Then you can use the in  the browser, gotty is pretty powerful and the user experience is very similar to the real terminal.UsageInstall nbtty inside a jupyter notebook like other Python packages:！pip install nbttyStart the web tty, it will print the url of the web shell when service is ready:fromnbttyimportTTYTTY().start()ScreenshotsAcknowledgmentsngrokgotty
Package: nbtui
NBTuiAn interactive viewer for Jupyter notebooks from the command line.It should work for any terminal, but you will only be able to view
plots when using Kitty, or any terminal that implements the Kitty
graphics protocol.This is a work in progress, and things may break. Bug reports and general
constructive criticism about implementation details are welcome.Installpipinstallnbtuinbtui{NOTEBOOK}.ipynbOr, you can directly pull this folder from master (this is recommended, since there are most likely still going to be some issues):python -m nbtui {NOTEBOOK}.ipynbFeaturesVim-style keybindings for scrolling and movementRegex searchingView images and plotsAutomatic file-change detection and refresh (somewhat experimental)UsageMovement and scrolling is based on vim keybindings - j to scroll down,
k to scroll up, C-D to scroll down by 15 lines, C-U to scroll up
by 15 lines.
Press g and G to go to the beginning and end of the notebook,
respectively, press / to start searching, and press q to close.NOTE: currently, displaying images is done in a quite inefficient way.
I plan to update this logic soon to take advantage
of new features from the Kitty graphics protocol, once Kitty version 0.19.3
has been out for a little while longer.In the meantime, prefer using C-D and C-U to scrolling when many images
are on the screen, to avoid large slowdowns.Planned featuresFor obvious reasons, rich output formats like HTML, PDF, Javascript, videos,
audio, and hyperlinks are not planned to be implemented.Support other display data formatsPlot backends besides just pngLatex in markdown cellsLinking of images (JPEG, SVG)Progress barsBetter handling of multiple outputs for a single cell. We should show
these things in a single large output cell instead of breaking it up.Better configurability. Users should be able to configure things like themes
for syntax highlighting, padding, etc.Fix slow scrolling with images by utilizing Kitty placement idsFolding