Saravanan666/pypi-org huggingface dataset:
Package: notebook-doc
Notebook-docNotebook-doc is a Python package that can create documentation for functions in Databricks notebooks.It can generate documentation from the docstrings of functions.It will generate documentation as HTML documents, which can be displayed inside Databricks notebooks.UsageThe package can be used as follows to generate documentation:Install the package (using PyPi - coming soon)Import the documentation generator function as follows:fromnotebook_docimportrender_documentationMake sure that you have executed all cells that contain function definitions.Executerender_documentationfunction and provide the globals() dictionary to generate documentation as a HTML script.Example (in Databricks)DatabricksdisplayHTMLfunction can be directly used to display the HTML document returned by therender_documentationfunction.fromnotebook_docimportrender_documentationdisplayHTML(render_documentation(globals(),module_name='Dummy Module'))Example (in other notebooks)HTML output fromrender_documentationfunction can be written on a local HTML file so that documentation can be displayed as a HTML file.fromnotebook_docimportrender_documentationhtml_output=render_documentation(globals(),module_name='Dummy Module')withopen('dummy_doc.html','w')asf:f.write(html_output)
Package: notebook-environments
notebook-environmentsManage python virtual environments on the working notebook server.InstallationIt is recommended to use this package together withvirtualenvandvirtualenvwrapperto work with python virtual environments more suitable. Make sure the installedpythoninterpreters work without errors on the current operating system. To install this package as a standalone application with the command-line interface you are to run the following command:sudosh-c"$(curlhttps://raw.githubusercontent.com/vladpunko/notebook-environments/master/install.sh)"Use the package managerpipto install notebook-environments without the command-line interface:python3-mpipinstallnotebook-environmentsYou can also install this python package on your working machine (works for unix-like operating systems) from source code to/usr/local/binas the standard system location for user's programs (this location can be changed at the user's discretion):# Step -- 1.gitclone--depth=1--branch=masterhttps://github.com/vladpunko/notebook-environments.git# Step -- 2.cd./notebook-environments/# Step -- 3.sudoinstall-m755n.sh/usr/local/bin/n# Step -- 4.sudoinstall-m755notebook_environments.py/usr/local/bin/notebook-environmentsBasic usageUsing this program allows you to run one instance ofnotebookserver on your working machine and add different python virtual environments as needed.
It protects you from the trouble of installing notebook packages in a new environment and running multiple servers.# Step -- 1.nohupjupyternotebook>/tmp/notebook.log2>&1&# Step -- 2.python3-mvenv.venv&&source./.venv/bin/activate&&notebook-environments--add# Step -- 3.notebook-environments--showContributingPull requests are welcome.
Please open an issue first to discuss what should be changed.Please make sure to update tests as appropriate.# Step -- 1.python3-mvenv.venv&&source./.venv/bin/activate&&pipinstallpre-committox# Step -- 2.pre-commitinstall--config.githooks.yml# Step -- 3.tox&&tox-elintLicenseMIT
Package: notebookflow
➤ nbsafetyAboutnbsafetyadds a layer of protection to computational notebooks by solving thestale dependency problemwhen executing cells out-of-order. Here's an
example in action:When the first cell is rerun, the second cell now contains a reference to an
updatedfand is suggested for re-execution with a turquoise highlight. The
third cell contains a reference to a staley--yis stale due to its
dependency on an old value off. As such, the third cell is marked as unsafe
for re-execution with a red highlight.  Once the second cell is rerun, it is
now suggested to re-execute the third cell in order to refresh its stale
output.nbsafetyaccomplishes its magic using a combination of a runtime tracer (to
build the implicit dependency graph) and a static checker (to provide warnings
before running a cell), both of which are deeply aware of Python's data model.
In particular,nbsafetyrequiresminimal to no changesin user
behavior, opting to get out of the way unless absolutely necessary and letting
you use notebooks the way you prefer.InstallpipinstallnbsafetyInterfaceThe kernel ships with an extension that highlights cells with live references
to stale symbols using red UI elements. It furthermore uses turquoise highlights
for cells with live references to updated symbols, as well as for cells that
resolve staleness.RunningTo run annbsafetykernel in Jupyter, select "Python 3 (nbsafety)" from the
list of notebook types in Jupyter's "New" dropdown dialogue. For JupyterLab,
similarly select "Python 3 (nbsafety)" from the list of available kernels in
the Launcher tab.Jupyter Notebook Entrypoint:Jupyter Lab Entrypoint:UninstallpipuninstallnbsafetyLicenseCode in this project licensed under theBSD-3-Clause License.➤ ContributorsStephen MackeRay GongShreya Shankar
Package: notebook-httpdbg
notebook-httpdbgnotebook-httpdbgis a notebook extension to trace the HTTP requests.installationpip install notebook-httpdbgusageload the extension in the notebook%load_ext notebook_httpdbgtrace the HTTP requests for a cell%%httpdbgconfiguration%%httpdbg --header 500 --body 10000You can choose the number of character to print for each request.exampleIn [1]: %load_ext notebook_httpdbgIn [2]: import requestsIn [3]: %%httpdbg
        _ = requests.get("https://www.example.com")Out [3]: - [httpdbg] 1 requests in 0.48 seconds
             - 200 GET https://www.example.com/
                 + request
                 - reponse
                    Content-Encoding: gzip
                    Accept-Ranges: bytes
                    Age: 428224
                    Cache-Control: max-age=604800
                    Content-Type: text/html; charset=UTF-8
                    Date: Sun, 05 Nov 2023 08:21:08 GMT
                    Etag: "3143526347+gzip"
                    Expires: Sun, 12 Nov 2023 08:21:08 GMT
                    Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT
                    Server: ECS (bsb/27DC)
                    Vary: Accept-Encoding
                    X-Cache: HIT
                    Content-Length: 648

                    <!doctype html>
                    <html>
                    <head>
                        <title>Example Domain</title>

                        <meta charset="utf-8" />
                        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
                        <meta name="viewport" content="width=device-width, initial-scale=1" />
                        <style type="text/css">documentationhttps://httpdbg.readthedocs.io/en/latest/notebook/
Package: notebooklog
notebooklog (WIP)TODOs: Configuring this templateCreate a Netlify site for your repository, then turn off automatic builds in Netlify settings.Add these CI secrets:PYPI_API_TOKEN,NETLIFY_AUTH_TOKEN(Netlify user settings - personal access tokens),DEV_NETLIFY_SITE_ID,PROD_NETLIFY_SITE_ID(API ID from Netlify site settings)Set up Codecov at TODOOverviewInstallationpipinstallnotebooklogUsageDevelopmentSubmit PRs againstdevelopbranch, then make a release pull request tomaster.# Optional: set up a pyenv virtualenvpyenvvirtualenv3.9notebooklog-3.9echo"notebooklog-3.9">.python-version
pyenvversion# Install requirementspipinstall--upgradepipwheel
pipinstall-rrequirements_dev.txt# Install local packagepipinstall-e.# Install pre-commitpre-commitinstall# Run testsmaketest# Run lintmakelint# bump version before submitting a PR against master (all master commits are deployed)bump2versionpatch# possible: major / minor / patch# also ensure CHANGELOG.md updatedChangelog0.0.1First release on PyPI.
Package: notebookmanipulation-pkg-ALPHA
Jupyter Notebook ManipulationVarious functions for manipulating and performing maintenance on Jupyter notebooks. Built and released by Callysto.Crawl directories with multiple notebooks and check cell contents for the following:ReadabilityDead links & image attributionsCallysto Banner and notebook template adheranceIndexing of notebooksTagging of cells that may cause issues when migrating to Jupyterlab** THIS PACKAGE IS STILL UNDER EARLY DEVELOPMENT.**
If you would like to raise and issue, please do so here:https://github.com/lisancao/notebook-manipulation
Package: notebook-mapper
# notebook_mapper## Jupyter Notebooks + Windows Server mapped drives toolkitA toolkit for those who are developing reusable python modules on a mapped drives to be used with Jupyter Notebook.notebook_mapper helps to share your Python modules with coworkers or just develop your code a secure company drive.Under construction stay tuned for more.# TO DO LIST:
—
- [ ] Add versioneer[https://github.com/warner/python-versioneer]
- [ ] Add function that injects AutoMapper code to ~/.ipython/profile_default/startup
Package: notebook-parameterizer
A tool to generate parameterized Jupyter Notebooks. This tool is similar to that of Papermill, but acts as a compliment
to parameterize a Notebook not based on a preset cell that contains the parameters, but allows for parameterization
throughout a Notebook without having to specify so.Instead thenotebook_parameterizeruses a parameters YAML file to define which variables should be set to what value.
With these preset variables in the parameters file, thenotebook_parameterizersearches every cell for variable assignments
that match the given key in the parameters file.UsageAn example of how to use thenotebook_parameterizercan be seen below:$ notebook_parameterizer -h
Usage: notebook_parameterizer [OPTIONS] NOTEBOOK_PATH PARAMETERS_PATH

Options:
-o, --output_notebook_path TEXT
                                Path to the parameterized output notebook
-e, --expand_env_values         Should ENV_ prefixed parameter values be
                                expanded to their matching OS environment
                                variable value

-h, --help                      Show this message and exit.The NOTEBOOK_PATH is the path to the Notebook that should be parameterized.The PARAMETERS_PATH is the path to the YAML file that contains the variables that should be parameterized.For instance, given the following Notebook inexample/notebooks/hello_world.ipynb.We can paramterize the Notebook with theexample/parameters/hello_world.ymlparameters file:num: 1000
div_by: 4This is achived by executing the following command:$ notebook_parameterizer example/notebooks/hello_world.ipynb \
 example/parameters/hello_world.yml \
 -o new_hello_world.ipynbAfter applying thenotebook_parameterizer, the generatednew_hello_world.ipynbNotebook has the following content.
Package: notebookplus
➤ nbsafetyAboutnbsafetyadds a layer of protection to computational notebooks by solving thestale dependency problemwhen executing cells out-of-order. Here's an
example in action:When the first cell is rerun, the second cell now contains a reference to an
updatedfand is suggested for re-execution with a turquoise highlight. The
third cell contains a reference to a staley--yis stale due to its
dependency on an old value off. As such, the third cell is marked as unsafe
for re-execution with a red highlight.  Once the second cell is rerun, it is
now suggested to re-execute the third cell in order to refresh its stale
output.nbsafetyaccomplishes its magic using a combination of a runtime tracer (to
build the implicit dependency graph) and a static checker (to provide warnings
before running a cell), both of which are deeply aware of Python's data model.
In particular,nbsafetyrequiresminimal to no changesin user
behavior, opting to get out of the way unless absolutely necessary and letting
you use notebooks the way you prefer.InstallpipinstallnbsafetyInterfaceThe kernel ships with an extension that highlights cells with live references
to stale symbols using red UI elements. It furthermore uses turquoise highlights
for cells with live references to updated symbols, as well as for cells that
resolve staleness.RunningTo run annbsafetykernel in Jupyter, select "Python 3 (nbsafety)" from the
list of notebook types in Jupyter's "New" dropdown dialogue. For JupyterLab,
similarly select "Python 3 (nbsafety)" from the list of available kernels in
the Launcher tab.Jupyter Notebook Entrypoint:Jupyter Lab Entrypoint:UninstallpipuninstallnbsafetyLicenseCode in this project licensed under theBSD-3-Clause License.➤ ContributorsStephen MackeRay GongShreya Shankar
Package: notebook-prototyping
Notebook prototypingThis repo makes prototyping via notebooks easier, by providing a way to strip them of experimental function calls.
In this manner, jupyter notebooks can be used to write, check, experiment, etc. with code while writing it while taking away the hassle of pasting all definitions into a new file.With this you can:import notebooks directlystrip notebooks to their bare class and function definitions.Usagepip install notebook-prototypingimporting the entire notebook contentsWhile developing it might be useful to import notebooks contents into other notebooks. This can be done via a pseudo import. currently the check for recursion is based on a heuristic trace stack depthRunning this makes objects that would be created in the secondary notebook available in a new notebook or script, but it should be noted that these existin a separate process. as such it is strongly recommended to use convert_to_module + a normal import statement wherever possible insteadfrom notebook_import import import_notebook
import os

te = import_notebook('third_example', path=os.path.join('nested', 'directory'))
# alt import calls
# te = import_notebook('third_example.ipynb', path=os.path.join('nested', 'directory'))
# te = import_notebook(os.path.join('nested', 'directory', 'third_example'))
# te = import_notebook('nested.directory.third_example.ipynb')


te.foobar()conversion to .py filesIt is recommended to do the conversion on a per-notebook basisUsing the notebook name:from notebook_import import convert_to_module
convert_to_module("example", overwrite=True)importing different notebooks contents cleanly, without their instantiated objects:from notebook_import import convert_to_module
convert_to_module("second_example", overwrite=True)
import second_example as se
print(se.bar())Like importing notebooks, converting can also be done with notebooks in nested directories:from notebook_import import convert_to_module
convert_to_module("third_example", overwrite=True, path=os.path.join("nested", "directory"))
import nested.directory.third_example as te
te.foobar()If you just to copy/paste something at the end of the notebook to convert them if they sucesfully finish running this can be done by also using ipynb(using ipynbname):from notebook_import import convert_to_module
import ipynbname
nb_fname = ipynbname.name()
convert_to_module(nb_fname, True)TodosCurrently the check for recursion is based on a heuristic trace stack depth, find a better wayMake it apypi packageadd classifiers
Package: notebooksend
Notebook Send JupyterLab ExtensionJupyterLab extension that sends user data to a backendRequirementsJupyterLab >= 3.1.0InstallTo install the extension, execute:pipinstallnotebooksendUninstallTo remove the extension, execute:pipuninstallnotebooksendContributingDevelopment installNote: You will need NodeJS to build the extension package.Thejlpmcommand is JupyterLab's pinned version ofyarnthat is installed with JupyterLab. You may useyarnornpmin lieu ofjlpmbelow.# Clone the repo to your local environment# Change directory to the notebooksend directory# Install package in development modepipinstall-e"."# Link your development version of the extension with JupyterLabjupyterlabextensiondevelop.--overwrite# Rebuild extension Typescript source after making changesjlpmbuildYou can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.# Watch the source directory in one terminal, automatically rebuilding when neededjlpmwatch# Run JupyterLab in another terminaljupyterlabWith the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).By default, thejlpm buildcommand generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:jupyterlabbuild--minimize=FalseDevelopment uninstallpipuninstallnotebooksendIn development mode, you will also need to remove the symlink created byjupyter labextension developcommand. To find its location, you can runjupyter labextension listto figure out where thelabextensionsfolder is located. Then you can remove the symlink namednotebooksendwithin that folder.Testing the extensionFrontend testsThis extension is usingJestfor JavaScript code testing.To execute them, execute:jlpm
jlpmtestIntegration testsThis extension usesPlaywrightfor the integration tests (aka user level tests).
More precisely, the JupyterLab helperGalatais used to handle testing the extension in JupyterLab.More information are provided within theui-testsREADME.Packaging the extensionSeeRELEASE
Package: notebook_setup
notebook_setupTools to setup and configure jupyter notebooks (ipynb files) with line and cell magicInstallfromnotebook_setupimportnotebook_setup,notebook_config_plotly_renderingUsageNotebook setupnotebook_setup(autoreload=True,background_transparent=True)autoreload=True➜ runs this line magic:%load_ext autoreload
%autoreload 2background_transparent=True➜ runs this cell magic:%%html
<style>
.cell-output-ipywidget-background {background-color: transparent !important;}
.jp-OutputArea-output {background-color: transparent;}
</style>Configure the behavior of Plotly figures in Jupyter notebooksnotebook_config_plotly_rendering(force_small_file=True,global_renderer="svg",)Only figures withfig.show()are effected by this configuration.force_small_file=True➜ Plotly figures are not saved inside the notebookglobal_renderer: str ="available options" ➜ Specifies render format, has only effect ifforce_small_file=FalseConfiguration examplesDevelop notebooksminimal file size, saves large notebooks very quickly:notebook_config_plotly_rendering(force_small_file=True,global_renderer="svg",)Export as html or push to GitHubsmall file size, vector or raster images depending on selected renderernotebook_config_plotly_rendering(force_small_file=False,global_renderer="svg",)Archive notebooks on disklarge file size, stores interactive figures, uses default renderernotebook_config_plotly_rendering(force_small_file=False,global_renderer=None,)Configure individual figuresindependent of setting ofglobal_rendererfig.show(renderer="browser")Hint:"browser"opens a figure in your web browser, you have bigger window compared to a notebook cell
Package: notebook-shim
Notebook ShimThis project provides a way for JupyterLab and other frontends to switch toJupyter Serverfor their Python Web application backend.Basic UsageInstall from PyPI:pip install notebook_shimThis will automatically enable the extension in Jupyter Server.UsageThis project also includes an API for shimming traits that moved fromNotebookAppin toServerAppin Jupyter Server. This can be used by applications that subclassedNotebookAppto leverage the Python server backend of Jupyter Notebooks. Such extensions shouldnowswitch toExtensionAppAPI in Jupyter Server and addNotebookConfigShimMixinin their inheritance list to properly handle moved traits.For example, an application class that previously looked like:fromnotebook.notebookappimportNotebookAppclassMyApplication(NotebookApp):should switch to look something like:fromjupyter_server.extension.applicationimportExtensionAppfromnotebook_shim.shimimportNotebookConfigShimMixinclassMyApplication(NotebookConfigShimMixin,ExtensionApp):
Package: notebook-splitter
Jupyter Notebook SplitterThis tool splits a Jupyter Notebook into Sub-Notebooks depending on cell metadata. It converts aMasterNotebook into aTeacherNotebook and aStudentNotebook; or into aSlidesNotebook, aTasksNotebook, and aSolutionsNotebook.InstallationAlthough the Notebook Splitter is only a single file it can be installed viapippipinstallnotebook-splitterUsageOverviewTL;DR: Seenotebook-splitter --help.Addcell metadatato your Jupyter Notebook: Add anexercisekey (default, can be changed) to the metadata (JSON); give it values (tags) on which to create Sub-Notebooks{"exercise":"task"}// another cell{"exercise":"solution"}Use--keepand--removeflags of the Notebook Splitter to keep and remove cells with accordingtags; export it to the respective Notebook:notebook-splitterinput.ipynb--keeptask--removesolution-otasks.ipynb
notebook-splitterinput.ipynb--keepsolution--removetask-osolutions.ipynb
notebook-splitterinput.ipynb--removetask--removesolution-oslides.ipynbExamples in ActionSee theexamplesdirectory in this repository.OptionsRepeated Parameters:--keepand--removeparameters on the command line of the script can be given multiple times:--keep task --keep onlytask --remove solutionRemoveAll: As a special parameter value,--remove allwill removeallcells except those for which a--keepvalue is specified (--keep allis the default)Stdin/Stdout: If no output file is given with-o/--output, the resulting Notebook will be printed tostdout; if no input file as a parameter is given, the input Notebook will be read fromstdin(good for Linux-like daisy-chaining of tools)ChangeBasekey: In the above example, the cell meta data key of discrimination isexercisewhich is the default. With--basekey, this can be changed.LimitationsThe values to the--keepand--removeparameters create sets of values to keep and remove. One could implement this tool probably quite cleverly with set operations (with the added complication of the--remove all). If you can, feel free to file a merge request!