Saravanan666/pypi-org huggingface dataset:
Package: ipyvtklink
ipyvtklinkAn ipywidget for vtkRenderWindow(formerlyipyvtk-simple)This is an early prototype of creating a Jupyter interface to VTK. This toolkit
is a proof of concept and a more polished tool will be available asipyvtkin the future.The code here was implemented from the work done byAndras Lassounder an MIT License (seethe source).The goal is to enable this widget to work with any server sidevtkRenderWindowThis render window could be fromVTK Python,ParaView, orPyVista.Please note thatvtkis not listed as a requirement for this package to
simplify its installation in virtual environments where VTK may be built from
source or bundled with ParaView and we do not want to install the wheels from
PyPI.InstallationFor use with PyVista, simply install withpiporconda:pip install ipyvtklinkorconda install -c conda-forge ipyvtklinkRun in DockerA Docker image is prebuilt and hosted in the ipyvtklink repository's packages.To run in Docker:docker pull ghcr.io/kitware/ipyvtklink:latest
docker run -p 8888:8888 ghcr.io/kitware/ipyvtklink:latestand open thevtk.ipynbnotebook.Additionally, this can be used with ParaView. An example is given inparaview.ipynbwhich can be run via:docker pull ghcr.io/kitware/ipyvtklink-paraview:latest
docker run -p 8878:8878 ghcr.io/kitware/ipyvtklink-paraview:latestExamplesYou may have to build jupyter lab extensions for this to work in Lab. This is
known to work well in Notebook.PyVistaPyVista has fully implemented downstream support foripyvtklink. SeePyVista's DocumentationSee thepyvista.ipynbfor an original proof of concept.Python VTKThe widget here can be used with VTK. Here is a minimal example showing how
to pass anyvtkRenderWindowto theViewInteractiveWidget:importvtkfromipyvtklink.viewerimportViewInteractiveWidget# Create some datacylinder=vtk.vtkCylinderSource()cylinder.SetResolution(8)mapper=vtk.vtkPolyDataMapper()mapper.SetInputConnection(cylinder.GetOutputPort())actor=vtk.vtkActor()actor.SetMapper(mapper)# Set up render windowren=vtk.vtkRenderer()ren_win=vtk.vtkRenderWindow()ren_win.SetOffScreenRendering(1)ren_win.SetSize(600,600)ren_win.AddRenderer(ren)iren=vtk.vtkRenderWindowInteractor()iren.SetRenderWindow(ren_win)style=vtk.vtkInteractorStyleTrackballCamera()iren.SetInteractorStyle(style)# Add actor to sceneren.AddActor(actor)ren.ResetCamera()# DisplayViewInteractiveWidget(ren_win)ParaView PythonSee instructions above for running ParaView in a Docker container.importparaview.simpleaspvsfromipyvtklink.viewerimportViewInteractiveWidget# Create data on the pipelinewavelet=pvs.Wavelet()contour=pvs.Contour(Input=wavelet)contour.ContourBy=['POINTS','RTData']contour.Isosurfaces=[63,143,170,197,276]# Set the data as visiblepvs.Show(contour)# Fetch the view and render the sceneview=pvs.GetActiveView()pvs.Render(view)# Fetch the RenderWindowren_win=view.GetClientSideObject().GetRenderWindow()# Display the RenderWindow with the widgetViewInteractiveWidget(ren_win)
Package: ipyvtk-simple
ipyvtk_simpleAn ipywidget for vtkRenderWindowThis is an early prototype of creating a Jupyter interface to VTK. This toolkit
is a proof of concept and a more polished tool will be available asipyvtkin the future.The code here was implemented from the work done byAndras Lassounder an MIT License (seethe source).The goal is to enable this widget to work with any server sidevtkRenderWindowThis render window could be fromVTK Python,ParaView, orPyVista.Please note thatvtkis not listed as a requirement for this package to
simplify its installation in virtual environments where VTK may be built from
source or bundled with ParaView and we do not want to install the wheels from
PyPI.Run in DockerTo build and run in Docker:docker build -t ipyvtk_simple .
docker run -p 8878:8878 ipyvtk_simple jupyter lab --port=8878 --no-browser --ip=0.0.0.0 --allow-rootand open thepyvista.ipynbnotebook.Additionally, this can be used with ParaView. An example is given inparaview.ipynbwhich can be run via:docker build -t ipyvtk_pv -f paraview.dockerfile .
docker run -p 8877:8877 ipyvtk_pv jupyter lab --port=8877 --no-browser --ip=0.0.0.0 --allow-rootand open theparaview.ipynbnotebook.ExamplesYou may have to build jupyter lab extensions for this to work in Lab. This is
known to work well in Notebook.PyVistaPyVista is working to implement this ina pull request.
See thepyvista.ipynbfor a proof of concept.Python VTKThe widget here can be used with VTK. Here is a minimal example showing how
to pass anyvtkRenderWindowto theViewInteractiveWidget:importvtkfromipyvtk_simple.viewerimportViewInteractiveWidget# Create some datacylinder=vtk.vtkCylinderSource()cylinder.SetResolution(8)mapper=vtk.vtkPolyDataMapper()mapper.SetInputConnection(cylinder.GetOutputPort())actor=vtk.vtkActor()actor.SetMapper(mapper)# Set up render windowren=vtk.vtkRenderer()ren_win=vtk.vtkRenderWindow()ren_win.SetOffScreenRendering(1)ren_win.SetSize(600,600)ren_win.AddRenderer(ren)iren=vtk.vtkRenderWindowInteractor()iren.SetRenderWindow(ren_win)style=vtk.vtkInteractorStyleTrackballCamera()iren.SetInteractorStyle(style)# Add actor to sceneren.AddActor(actor)ren.ResetCamera()# DisplayViewInteractiveWidget(ren_win)ParaView PythonSee instructions above for running ParaView in a Docker container.importparaview.simpleaspvsfromipyvtk_simple.viewerimportViewInteractiveWidget# Create data on the pipelinewavelet=pvs.Wavelet()contour=pvs.Contour(Input=wavelet)contour.ContourBy=['POINTS','RTData']contour.Isosurfaces=[63,143,170,197,276]# Set the data as visiblepvs.Show(contour)# Fetch the view and render the sceneview=pvs.GetActiveView()pvs.Render(view)# Fetch the RenderWindowren_win=view.GetClientSideObject().GetRenderWindow()# Display the RenderWindow with the widgetViewInteractiveWidget(ren_win)
Package: ipyvuetable
ipyvuetableFast and customizable table widget for the Jupyter ecosystem build onipyvuetifyandPolars.ipyvuetable can sort, filter, edit largepolars.LazyFramein a paginated way.
You can easily customize you table widget, add actions, hide columns, add special visualisation for some columns and benefit from all the ipyvuetify customizationfromipyvuetableimportEditingTable,Tableimportpolarsaspldf=(pl.LazyFrame({'id':range(6),'name':['Tom','Joseph','Krish','John','Alice','Bod'],'birthday':['01-03-1995','27-01-1999','24-07-1977','27-12-1970','17-07-2005','19-09-2001'],'score':[3.5,4.0,7.5,1.0,6.5,8.2],'bool':[True,True,False,True,False,True]}).with_columns(pl.col('birthday').str.strptime(pl.Datetime,"%d-%m-%Y")))name_custom_repr=pl.LazyFrame({'name':['Tom','Joseph','Krish','John','Alice','Bod'],'name__repr':['Tom - 🐬','Joseph - 🐟','Krish - 🐠 ','John - 🦐','Alice - 🦞','Bob - 🐌']})EditingTable(df=df,title='My table',show_actions=True,show_filters=True,columns_to_hide=['id'],# all ipyvuetify optionsshow_select=True,columns_repr={'name':name_custom_repr})InstallationInstall the latest ipyvuetable version with:pipinstallipyvuetableBenefit from keyboard events with:pipinstallipyvuetable[ipyevents]
Package: ipyvuetify-app
Table of ContentsShort Overview.Examples how your app can look likeA few more examples how header navigation worksInstallation via pip:How to use itHow to write a RouterSimple Router exampleFull VuaApp signatureVuaApp object descriptionUseful Attributes:Useful Methods:LinksProject local LinksContactsLicenseShort Overview.ipyvuetify_app is a python package (py>=3.7) with a simple template for writing ipyvuetify applicationExamples how your app can look likeApplication from the box supports theme switcher and navigation over different content by menus on topA few more examples how header navigation worksInstallation via pip:pipinstallipyvuetify_appHow to use itTo create an application by the given template you need to create a routing classThat will be in charge of what to show in the main application sectionFor every selected menu item -> subitemThen you just give the router toipyvuetify_app.VueApp(…)and it does all the magic for youfromipyvuetify_appimportVueAppfromipyvuetify_appimportVueAppRoutervue_app_router_example=VueAppRouter()VueApp(vue_app_router_example)How to write a RouterEvery router should satisfy 2 conditions:1) It has methodget_main_content(self, item, subitem)which should return page’s main content2) It has attributeself.dict_list_subitems_by_itemwith all subitems for every menu itemSimple Router exampleclassVueAppRouter():def__init__(self):self.dict_list_subitems_by_item={}foriteminrange(5):list_subitems=[str(subitem)forsubiteminrange(item,5+item)]self.dict_list_subitems_by_item[str(item)]=list_subitemsdefget_main_content(self,item,subitem):returnf"{item}->{subitem}"Full VuaApp signatureVueApp(vue_app_router,list_vw_fab_app_bar_left=None,list_vw_fab_app_bar_right=None,list_footer_vw_children=None,)Arguments:list_vw_fab_app_bar_left:List with ipyvuetify fab icon buttons to put on the left side of Application Header Barlist_vw_fab_app_bar_right:List with ipyvuetify fab icon buttons to put on the right side of Application Header Barlist_footer_vw_children:List with ipyvuetify widgets to put in the footerIf empty then footer is not shown at allVuaApp object descriptionVuaApp is a child of v.App so it has all the parent methods and attributesUseful Attributes:self.vw_appbar:v.AppBar(app=True, …) - Application top barself.vw_navigation_drawer:v.NavigationDrawer(app=True, …) - Navigation Drawer at the left sideself.vw_app_main:v.Content() - Main section of the applicationself.vw_footer:v.Footer(app=True, …) - Footer of the applicationUseful Methods:self.update_app_routing():When router items were updated please call this method to update application menusLinksPYPIGitHubProject local LinksCHANGELOG.CONTRIBUTING.ContactsEmail:stas.prokopiev@gmail.comvk.comFacebookLicenseThis project is licensed under the MIT License.
Package: ipywalrus
IPyWalrusIPyWalrus is a simple IPython (Jupyter) extension which enables you to use the walrus
operator (PEP 572 - Assignment Expressions):=for usual assignments in IPython or Jupyter.This part of the PEP:There are a few places where assignment expressions are not allowed, in order to avoid ambiguities or user confusion:

Unparenthesized assignment expressions are prohibited at the top level of an expression statement. Example:

y := f(x)  # INVALID
(y := f(x))  # Valid, though not recommended

This rule is included to simplify the choice for the user between an assignment statement and an assignment expression -- there is no syntactic position where both are valid.is completely valid but my IPython sessions of Jupyter notebooks are full of cells like this one:and because it does not work in pure PythonI've prepared a small extension which makes it work:UsageInstall the extension from pip or download the ipywalrus.py and put it somewhere inPYTHONPATH:# pip install ipywalrusand load it in IPython or Jupyter%load_ext ipywalrusIf you want to enable this extension permamently, create a default profile (if you don't have one already)ipython profile createand then add ipywalrus to the list of extensions in~/.ipython/profile_default/ipython_config.py.LicenseMIT
Package: ipywardley
ipywardleyBringing Wardley Map magic to Jupyter notebooksIntroductionThis plugin makes it easy to generateWardley MapsusingJupyter Notebooks.It supports a subset of the syntax defined by theOnline Wardley Mapsservice. This simple language can be use to specify the map via the%%wardleycell magic.Try it out!Run onorInstallationFirst,install Jupyter. Then before running it, installipywardley. e.g. if you are using pip:pip install ipywardleyThen, run Jupyter:jupyter-labUsageOpen up a new Python 3 notebook, and use this command to enable the module:%load_ext ipywardleyNow you can use the%%wardleydirective and create maps.See this example notebook for a detailed example of how to do this.ScreenshotTo DoSupport more ofthe OWM syntax and features(?=maybe?):evolution Novel->Emerging->Good->Bestandevolution Xoffering thedifferent sets of x-axis labels.y-axis Value Chain->Invisible->Visibleory-axis noneto make 'Visibility' axis optional.evolveannotation&annotations?note?marketnodes?pipelinenodes?nodeinertia?+<>links to indicate flow.+>links to indicate flow.+<links to indicate flow.Hot Water+'$0.10'>Kettleflow labels?build,buy,outsourcenode augmentation?submapand related syntax?pioneer,settler,townplannerareas/boxes?Add 'Uncharted' and 'Industrialised' labelsSupport rendering from a file, via e.g.%wardley file=example.owm style=plainMake it easier to download the SVG/rendered version?DevelopmentClone this directory.Set up avirtualenvand activate it.Modify the code.Runflit installRunjupyter-laband test your changes.Repeat 3-5ad infinitum.Turn your changes into a pull request.Making a ReleaseAs perhttps://flit.pypa.io/en/stable/Update version in\_\_init\_\_.pyCommit, tag, push.flit publishChange Log0.0.7:Switch fromplt.grid(visibility=True, ...)toplt.grid(visible=True, ...).0.0.6:Added support for the bluelines +<> within Wardley Maps code.Updated to support additional characters within nodes and evolve code linesDefault to 'wardley' style if no style provided.Draw evolve lines within the map.Add the red evolve nodes to the map.0.0.5:Updated the 'b' parameter to 'visibility' as 'b' now depreciated.
Package: ipywebcam
ipywebcamA Custom Jupyter Widget Library for Web Camera using WebRTCInstallationYou can install usingpip:pipinstallipywebcamIf you are using Jupyter Notebook 5.2 or earlier, you may also need to enable
the nbextension:jupyternbextensionenable--py[--sys-prefix|--user|--system]ipywebcamDevelopment InstallationCreate a dev environment:condacreate-nipywebcam-dev-cconda-forgenodejsyarnpythonjupyterlab
condaactivateipywebcam-devInstall the python. This will also build the TS package.pipinstall-e".[test, examples]"When developing your extensions, you need to manually enable your extensions with the
notebook / lab frontend. For lab, this is done by the command:jupyter labextension develop --overwrite .
yarn run buildFor classic notebook, you need to run:jupyter nbextension install --sys-prefix --symlink --overwrite --py ipywebcam
jupyter nbextension enable --sys-prefix --py ipywebcamNote that the--symlinkflag doesn't work on Windows, so you will here have to run
theinstallcommand every time that you rebuild your extension. For certain installations
you might also need another flag instead of--sys-prefix, but we won't cover the meaning
of those flags here.How to see your changesTypescript:If you use JupyterLab to develop then you 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 widget.# Watch the source directory in one terminal, automatically rebuilding when neededyarnrunwatch# Run JupyterLab in another terminaljupyterlabAfter a change wait for the build to finish and then refresh your browser and the changes should take effect.Python:If you make a change to the python code then you will need to restart the notebook kernel to have it take effect.Updating the versionTo update the version, install tbump and use it to bump the version.
By default it will also create a tag.pipinstalltbump
tbump<new-version>
Package: ipywebgl
ipywebglA WebGL2 widget for Jupyter LabIntroductionThis module is exposing a part of the WebGL2 context.  Is is assumed that you are familiar with the concepts and commands.
You can find more information about it here :https://webgl2fundamentals.org/There is some major differences still :All the WebGL2 commands are called on the GLViewer instead of a gl context.All the API is written insnake_caseinstead ofcamelCase, so for examplegl.drawArrays(...)in JavaScript becomeswidget.draw_arrays(...)in PythonMasks parameters are replaced by positional attribute, so for examplegl.clear(gl.DEPTH_BUFFER_BIT | gl.COLOR_BUFFER_BIT);in JavaScript becomeswidget.clear(depth_buffer_bit=True, color_buffer_bit=True)in PythonEnums are replaced by strings, so for examplegl.bufferData(gl.ARRAY_BUFFER, data, gl.DYNAMIC_DRAW);in JavaScript becomeswidget.buffer_data("ARRAY_BUFFER", data, "DYNAMIC_DRAW")in PythonThere is no delete functions, once something is created it stays created (we are in a prototype environment).You will find some 'Extended' methods that can simplify some calls like thecreate_vertex_array_extthat will create and link the programs and buffers all at once.Not all the functions are exposed as of today.
If you need more, feel free to ask on githubhttps://github.com/JeromeEippers/ipywebgl.All the commands you call on the GLViewer are push to a commands buffer. That commands buffer is only flushed when you call the execute_commands() method.InstallationYou can install usingpip:pipinstallipywebgl
Package: ipywidgets
ipywidgets: Interactive HTML Widgetsipywidgets, also known as jupyter-widgets or simply widgets, areinteractive HTML widgetsfor Jupyter notebooks and the IPython kernel.This package contains the python implementation of the core interactive widgets bundled in ipywidgets.Core Interactive WidgetsThe fundamental widgets provided by this library are called core interactive
widgets. Ademonstration notebookprovides an overview of the core interactive widgets, including:slidersprogress barstext boxestoggle buttons and checkboxesdisplay areasand moreFor more information, see the maindocumentation.
Package: ipywidgets-bokeh
ipywidgets_bokehSupport for using ipywidgets withinBokeh. Ipywidgets are normally used in Jupyter notebooks, but this project allows them to be embedded into a Bokeh application so that they can be used alongside and with Bokeh-based plots and Bokeh widgets.  See the separatejupyter_bokehlibrary for support for using Bokeh plots and widgets in Jupyter and ipywidgets (the opposite case from what ipywidgets_bokeh supports).
Package: ipywidgets-extended
Jupyter Widgets - ExtendedThis package contains widget extensions to the standardipywidgetspackage.
The intent is to not produce completely new widgets, but ratherextendthe widgets already inipywidgetswith more possibilities and options.Current extended widgetsDropdownThe dropdown widget has been extended to include the possibility of:disabling options; andgrouping the options.DisablingThis can be doneviathedisabled_optionstraitlet, which must be a list of option labels.
If an option label is included in thedisabled_optionslist traitlet, it will be "grayed out", i.e., disabled (but still visible) in the dropdown widget.GroupingUsing thegroupingparameterinstead oftheoptionsparameter, options can be grouped as desired.
The format is similar to the value foroptions, but each grouping of options should be paired with a header, i.e., you'll the value to be an iterable of (header,options)-pairs.One can introduce un-grouped options by passing an empty header, i.e., an empty string ("").AboutAuthor: Casper Welzel Andersen (email,website).License:BSD-3-Clauseand copyright (c) 2020 Casper Welzel Andersen & parts by Jupyter Development Team.
Package: ipywidgets-game-jugs
Water Jug RiddleThe player has two ungraduated jugs with two different capacities. For instance, the first one has a 5 liters capacity and the second one a 7 liters capacity. The player has 3 possible actions on each jug:Fill the jug to its maximum capacityEmpty the jugPour the water of one jug into the other oneThe main goal is to obtain all volumes from 0L to 7L. In this version of the game, the player is allowed to try every combination of capacities from 0L to 10L.
To execute an action, the player can either :Click on the buttons below the pictureCall the class'methodsLink to the demonstration :Demo.ipynbBinder :Dependencies:notebookipywidgetsipycanvastraitletsInstall :pip install ipywidgets_game_jugs
Package: ipywidgets-game-wolf-goat-cabbage
Wolf Goat Cabbage game with Jupyter NotebookThe goal is to make the wolf, the goat and the cabbage cross the river with a two-seats boat.
The wolf cannot be left alone with the goat and the goat cannot be left alone with the cabbage.There are two ways to interact with the game :Using the buttonsExecute code in the cells below the visualisationLink to theDemo.ipynbBinder :Dependencies:ipywidgetsnotebooktraitletsInstallpip install ipywidgets_game_wolf_goat_cabbage
Package: ipywidgets-jsonschema
ipywidgets-jsonschema - A widget generator for your Jupyter notebooksUsageThis project allows you to generate Jupyter widgets from schemas
that follow theJSONSchema specification. If you already have
a schema available, creating a widget form for it is as simple
as this:from ipywidgets_jsonschema import Form
form = Form(schema)
form.show()The data can then be retrieved fromformby accessingform.data.FeaturesThese are the core features:Generation ofipywidgetswidgets for all basic typesRead and write access to the current document stateInstallationipywidgets-jsonschemacan be installed with pip:python -m pip install ipywidgets-jsonschemaAlternatively, you can get it fromconda-forge:conda install -c conda-forge ipywidgets-jsonschemaKnown limitationsSome aspects of the JSON Schema specification are hard to implement in
a form generator and are therefore omitted e.g.TheallOfandnotrules for schema composition are only partially or not at all supported.Media typesThere is only rudimentary support for conditional subschemas (likeif-then-else)Some annotations that are purely optional in the specification are required
for the schema to be usable withipywidgets-jsonschemae.g. atitlefield
when the resulting widget would otherwise not be self-explanatory.
Package: ipywidgets-toggle-buttons
Table of ContentsShort Overview.Installation via pip:Long Overview.Usage examplesToggleButtonsAutoSizeMultiToggleButtonsToggleButtonsWithHideMultiToggleButtonsWithHideLinksProject local LinksContactsLicenseShort Overview.ipywidgets_toggle_buttons is a simple python package(py>=3.6)
with more toggle buttons for ipywidgetsInstallation via pip:pipinstallipywidgets_toggle_buttonsLong Overview.This python package consists of other ToggleButtons classesToggleButtonsAutoSize - To adjust buttons size to show their’s full description automaticallyMultiToggleButtons - To select a few options at once with usual ToggleButtons interfaceToggleButtonsWithHide - ToggleButtonsAutoSize + Hidden optionsMultiToggleButtonsWithHide - MultiToggleButtons + Hidden optionsAll of them will adjust size of buttons if options are modified.Also they have usual interfaces to work with values and optionsUsage examplesToggleButtonsAutoSizeCreate and show this widgetfromipywidgets_toggle_buttonsimportToggleButtonsAutoSizewid=ToggleButtonsAutoSize(options=[str(i)foriinrange(10)])widprint(wid.value)# "0"print(wid.options)# ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')print(wid.layout.width)# '100%'wid.options=list(wid.options)+["ajhfkaghnkandjgnakdn"]MultiToggleButtonsCreate and show this widgetfromipywidgets_toggle_buttonsimportMultiToggleButtonswid=MultiToggleButtons(options=[str(i)foriinrange(10)],max_chosen_values=2,)widdefon_value_change(_):print("pew")wid.observe(on_value_change,'value')print(wid.value)# ()wid.value=["2","8"]# "pew"ToggleButtonsWithHideCreate and show this widgetfromipywidgets_toggle_buttonsimportToggleButtonsWithHidewid=ToggleButtonsWithHide(value="0",options_visible=[str(i)foriinrange(10)],options_hidden=[str(i)foriinrange(5,15)],)widAfter pressing the buttonShow Hidden OptionsSelect value 12And hide Hidden optionsprint(wid.value)# "12"wid.options_visible=[str(i)foriinrange(2)]wid.options_hidden=[f"another{i}"foriinrange(2)]MultiToggleButtonsWithHideCreate and show this widgetfromipywidgets_toggle_buttonsimportMultiToggleButtonsWithHidewid=MultiToggleButtonsWithHide(options_visible=[str(i)foriinrange(10)],options_hidden=[str(i)foriinrange(5,15)],max_chosen_values=4,)widAfter pressing the buttonShow Hidden OptionsSelect a few options and hide all Hidden optionsprint(wid.value)# ('1', '9', '11', '13')print(wid.options_hidden)# ('10', '11', '12', '13', '14')If at any moment you want to change the options then it can be done like shown belowwid.options_visible=[str(i)foriinrange(2)]wid.options_hidden=[f"another{i}"foriinrange(2)]LinksPYPIreadthedocsGitHubProject local LinksCONTRIBUTING.ContactsEmail:stas.prokopiev@gmail.comvk.comFacebookLicenseThis project is licensed under the MIT License.