Saravanan666/pypi-org huggingface dataset:
Package: ipython-suggestions
IPython Extension: ipython-suggestions(i) Number one feature: system wide symbol searching!
When ipython is loaded, suggestions module will scan your python paths for
symbols and will create a cache. On the author's old 2008 computer (this
readme is from 2017), 50000 symbols load in 10 seconds.
But then you get a very easy way to import any symbol, without typing or
remembering the entrine import path.
First example:In [1]: %findsymbol DecisionTreeClasifir  # two typos here on purpose
Out[1]: 0 (C) from sklearn.tree import DecisionTreeClassifierIn [2]: %suggestion 0
from sklearn.tree import DecisionTreeClassifier  # it's now imported!%findsymbol searches string up to two character edits (deletion, substitution, transpose
and insertion).Second example:In [1]: %findsymbol pypl  # now hit tab!
[this completes to:]
In [1]: %findsymbol pyplot...matplotlib  # press enter now.
from matplotlib import pyplot
[pyplot is now imported]Even better example:In [1]: %findsymbol pypl  # now hit tab!
[this completes to:]
In [1]: %findsymbol pyplot...matplotlib
[now add -as parameter]
In [1]: %findsymbol pyplot...matplotlib -as plt
from matplotlib import pyplot as plt
[pyplot is now imported as plt]The completions offered by pressing tab in a %findsymbol line are all the
symbols that begin with what you wrote. Note that this is case-sensitive.This also works in jupyter :)(ii) Get suggestions on misspelled names:In [1]: my_awesome_variable = 10In [2]: 10 * my_awsome_variable ** 3NameError                                 Traceback (most recent call last)
 in ()
----> 1 10 * my_awsome_variable ** 3NameError: name 'my_awsome_variable' is not defined
Did you mean:
0 my_awesome_variableIn [3]: %suggestion 0
[ipython automatically fills the next line]
In [4]: 10 * my_awesome_variable ** 3Auto-filling of corrected code currently only works inside the shell and not
in jupyter.InstallationRun:pip install git+https://github.com/drorspei/ipython-suggestions# from Githubthen append the output ofipython -m ipython_suggestionsto the output ofipython profile locate(typically~/.ipython/profile_default/ipython_config.py).
Package: ipython-tempmagic
# Magics for temporary workspace%cdtemp– Creates a temporary directory that is magically cleaned up
when you exit IPython session.%%with_temp_dir– Run Python code in a temporary directory and
clean up it after the execution.# InstallationInstall using pip:` pip installipython-tempmagic# PyPI published version `or` pip installgit+https://github.com/Lightslayer/ipython-tempmagic# development version `For older Jupyter versions (< 5.0):`text %install_exthttps://raw.github.com/tkf/ipython-tempmagic/master/tempmagic.py`
Package: ipythontutor
jupytext:
cell_metadata_filter: all,-hidden,-heading_collapsed
formats: md:myst
notebook_metadata_filter: all,-language_info,-toc,-jupytext.text_representation.jupytext_version,-jupytext.text_representation.format_version
text_representation:
extension: .md
format_name: myst
kernelspec:
display_name: Python 3
language: python
name: python3Licence CC BY-NC-ND - Thierry Parmentelat+++Embeddingpythontutor.comillustrations in Jupyterthis notebook is stored in text (markdown) format using jupytext,
make sure to have this tool installed if you want to open it locally+++Installation$ pip3 install ipythontutor+++ScreeshotAs github won't render iframes embedded in aipynb, here's a screenshot+++Basic Usage# required to load the extension
%load_ext ipythontutorIn its simplest form, the code in the cell is handed over (as python3) to the excellenthttp://pythontutor.com/%%ipythontutor
original = reference = [1, 2]
original[0] = 'boom'
print(reference)Setting sizes%%ipythontutor height=400 width=850
def fact(n):
    return 1 if n <= 1 else n * fact(n-1)
original = [fact(3), fact(4)]
reference = original[:]
original[0] = 'boom'
print(reference)ScalingIf your page is smaller than what pythontutor can reasonably work with, you can specify a scaling ratio.%%ipythontutor width=600 height=200 ratio=0.7
import copy
original = [1, [2, 3]]
reference = copy.deepcopy(original)
original[1][0] = 'boom'
print(reference)Add a button to open pythontutor in a new tab%%ipythontutor linkButton=true
def fact(n):
    return 1 if n <= 1 else n * fact(n-1)
original = [fact(3), fact(4)]
reference = original[:]
original[0] = 'boom'
print(reference)Other settingsThe following list shows the settings that can be tweaked on the magic line. See alsothis page about embedding pythontutorfor more details on these settings:from ipythontutor import Magics
for var, default in Magics.defaults.items():
    print(f"{var:>20} - defaults to - {default:<}")Note onprotoThe default is to usehttpsto reachpythontutor, as this is exepcted to work in most cases. If that's not working for you, instead of settingproto=httpon each magic cell, you can change this globally - like any other default btw - this way:from ipythontutor import Magics
Magics.defaults['proto'] = 'http'Using python2%%ipythontutor py=2
print "Hey"
original = [1, 2]
copy = original[:]
original[0] = 'boom'See alsoCheck out another pure approach, that does not rely on pythontutor,at thenbtutorproject.
Package: ipython-venv-path-prompt
AboutA simple IPython extension to show the path and virtualenv in the prompt.
The extension attempts to detect bothvenvandAnacondaenvironments,
and shows it along with the path above the standard IPython input prompt.InstallationInstall as usual from PyPI:pip install ipython-venv-path-promptor from git:git clone https://github.com/javidcf/ipython_venv_path_prompt.git
cd ipython_venv_path_prompt/
python setup.py installThe extension can be loaded from within an IPython session with%load_ext ipython_venv_path_prompt. To load the extension automatically,
edit your IPython profile file. This file is located under your profile
directory, which by default is~/.ipython/profile_default, but you can
check the exact location with the following command:ipython -c "import IPython; print(IPython.get_ipython().profile_dir.location)"If there is noipython_config.pyfile in that directory, create one. Then,
edit the file and add the extension name to the list of extensions to load on
startup. Your configuration file could look like this:c=get_config()c.InteractiveShellApp.extensions=['ipython_venv_path_prompt']For more information about IPython configuration, seeIntroduction to IPython
documentation.
Package: ipytone
Interactive audio in JupyterIpytone exposes many features of theTone.jslibrary
to Python asJupyter widgets. It allows
turning Jupyter into a versatile DAW (Digital Audio Workstation) for music
creation, sound design, data sonification, and more......like this little piece of music entirely composed and played in a Jupyter notebook,
with a custom Earth Globe VU-meter!https://user-images.githubusercontent.com/4160723/172623510-3423505f-cd27-4770-8553-b2f0dc75384f.movTry Ipytone!Clickhereor
on the JupyterLite badge above to try ipytone in your browser without installing anything.For more advanced examples, check this repository:https://github.com/benbovy/ipytone-examplesDocumentationhttps://ipytone.readthedocs.ioRequirementsJupyterLab >= 3.0 or Jupyter notebook.numpyInstallYou can install ipytone either withpiporconda.With pippipinstallipytoneWith condacondainstall-cconda-forgeipytoneor mambamambainstall-cconda-forgeipytoneFrom sourceFor a development installation of ipytone, check the installation section in the documentation.
Package: ipytoolbox
ipytoolboxA collection of IPython magic commands and other utilities.Features%autocudaAutomatically select the local CUDA device(s) with most free memory.%animateAutomatically captureplt.plot(); plt.show()calls and display them as an animation once the cell has finished executing.Example notebookInstallFirst make sure Python is installed, then run:pipinstallipytoolboxThen you can use it in IPython or Jupyter Notebooks by%load_ext ipytoolboxDevelopFirst clone the repo and set it as working directory. Then install the package in development mode (preferably within its own virtual environment):pipinstall-e".[tests]"If you havedirenvinstalled, you can rundirenv allowto automatically create and activate a Python virtual environment when you enter the directory.TestpytestLintpre-commitrun--all-filesOrpre-commit installto run automatically ongit commit.Publishghreleasecreate
Package: ipyTransferFunction
Transfer FunctionTransfer function editor widget for Jupyter NotebookInstallationvirtualenvenv
../env/bin/activate
pipinstall-rrequirements.txtUsage (in Jupyter notebook)Create widgetfromipyTransferFunctionimportTransferFunctionEditordefdisplay_palette_info(transfer_function):print(transfer_function.data_range)tf=TransferFunctionEditor(name='rainbow',size=32,alpha=0.5,continuous_update=False,on_change=display_palette_info)Change palettetf.set_palette('seismic')Set value rangetf.set_range((0,255))Screenshot
Package: ipyturtle3
DemoTurtle graphics based on ipycanvas which can run on jupyter lab/notebook/vscode.https://github.com/williamnavaraj/ipyturtle3/blob/main/Images/TurtleWin.gifUsage: Installationpip install ipyturtle3Example ipynb code. Run this in a cell.import ipyturtle3 as turtle
from ipyturtle3 import hold_canvas
myCanvas=turtle.Canvas(width=500,height=250)
display(myCanvas)
myTS=turtle.TurtleScreen(myCanvas)
myTS.clear()
myTS.bgcolor("lightgreen")
bob=turtle.Turtle(myTS)
jess=turtle.Turtle(myTS,isHolonomic=True)
jess.shape("square")
bob.shape("turtle")

myTS.delay(200)
# Usual turtle Non-holonomic example
bob.forward(50)
bob.left(90)
bob.forward(50)
bob.left(90)
bob.forward(50)
bob.left(90)
bob.forward(50)


#Holonomic
jess.moveleft(200)
jess.moveup(100)
jess.moveright(100)
jess.movedown(100)
jess.turnright(45)
jess.turn(-45)
jess.distance_at_angle(50,45)

myTS.clear()

# Rainbow benzene
colors = ['red', 'purple', 'blue', 'green', 'orange', 'yellow']
t = turtle.Turtle(myTS)
myTS.bgcolor('black')
for x in range(50):
    with(hold_canvas(myCanvas)):
        t.pencolor(colors[x%6])
        t.width(x//100 + 1)
        t.forward(x)
        t.left(59)
Package: ipyturtlenext
Creating Turtle Graphics in IPython/Jupyter with ipycanvasThis is inspired byhttps://github.com/gkvoelkl/ipython-turtle-widget.
Thanks.I am usingipycanvas(https://github.com/martinRenou/ipycanvas).
Thanks to Martin Renou.If you like it, use it. If you have some suggestions, tell me
(hebi@python-ninja.com).InstallTo install use pip:` $ pip install ipyturtlenext `ExamplesThe most examples are inspired byHarold Abelson, Andrea diSessa:
Turtle Geometry, MIT Press 1986ipyturtlenextshould work in every jupyter environment, where
ipycanvas works.Startfrom ipyturtlenext import Turtle

t = Turtle(width=200, height=200)
tWithwidthandheightyou can change the extension of the drawing
canvas.In Jupyterlab you can create withnew view for outouta separeted tab.First Stepst.right(90)
t.heading()t.forward(150)
t.left(45)t.back(100)t.left(45)
t.penup()
t.forward(100)Squaret.reset() #clear canvas and start againt.back(40)
t.forward(100)
t.position()def square(size):
    for i in range(4):
        t.forward(size)
        t.right(90)square(20)Triangelt.reset()def triangle(size):
    for i in range(3):
        t.forward(size)
        t.right(120)triangle(100)Houset.reset()def house(size):
    square(size)
    t.forward(size)
    t.right(30)
    triangle(size)t.back(100)
house(100)Circlet.reset()

def circle():
    for i in range(360):
        t.forward(1)
        t.right(1)circle()Polyt.reset()def poly(side, angle):
    turn = 0
    while turn == 0 or turn % 360 != 0:
        t.forward(side)
        t.right(angle)
        turn += anglepoly(44,135)ColorReturn the current pen color as RGB tuple or web color namet.reset()
t.pencolor()Set pen color as web color namet.pencolor('Green')Set pen color with RGB valuet.pencolor(255,0,0)t.forward(40)
t.right(120)
t.pencolor('Blue')
t.forward(40)t.pencolor('Red')
t.pendown()t.forward(100)Branchdef lbranch(length, angle, level):
    t.pencolor('Green')
    t.forward(2*length)
    node(length, angle, level)
    t.back(2*length)

def rbranch(length, angle, level):
    t.pencolor('Brown')
    t.forward(length)
    node(length, angle, level)
    t.back(length)

def node(length, angle, level):
    if level==0:
        return
    t.left(angle)
    lbranch(length, angle, level-1)
    t.right(2*angle)
    rbranch(length, angle, level-1)
    t.left(angle)t.reset()
node(8,24,7)Nested Triangledef nested_triangle(size):
    if size < 10:
        return
    for i in range(3):
        nested_triangle(size/2)
        t.forward(size)
        t.right(120)t.reset()
nested_triangle(100)Snowflakedef snowflake(size, level):
    for i in range(3):
        side(size, level)
        t.right(120)

def side(size, level):
    if level == 0:
        t.forward(size)
        return
    side(size/3, level - 1)
    t.left(60)
    side(size/3, level - 1)
    t.right(120)
    side(size/3, level - 1)
    t.left(60)
    side(size/3, level - 1)t.reset()
snowflake(100,4)Nested squarest.reset()
sideLength = 40
for square in range(5):
    for side in range(4):
        t.forward(sideLength)
        t.left(90)
    sideLength += 10Changelog0.1.0 First published version
Package: ipyumbrella
ipyumbrellaImproved ipywidgets for collections.Making widgets in Jupyter is super helpful and it unlocks a lot of potential. But I often find that they can be really cumbersome to work with and I'm constantly writing wrapper functions to capture output, add them to tabs, and set the title (using the child index..... ugh).This wraps much of that functionality up so that you can wrap a for loop without thinking and each iteration will output to a new tab, parsing the title from the iterable elements. YAY!N=6defplot_something(i=0,n=N):plt.plot([min(i,n/2),min(n-i,n/2)])plt.ylim(0,n/2+1)plt.title('i={}'.format(i))importipyumbrellaasuwimportmatplotlib.pyplotaspltforiinuw.Carousel().D.items(range(N)):plot_something(i)InstallpipinstallipyumbrellaUsageWidgetsCarousel: sideways scrolling outputsTabs: same as ipywidgetsAccordion: same as ipywidgetsAll of the described methods work for all widgets here. So you can interchange any of the widgets in the example.Convenient inline displayI come from Javascript so I've grown quite accustomed to chaining. You can use either.display()or.Dinline to display your widget before any items are added to it. This saves you from having to make a new line to store to a variable and a new line to display the widget.Displaying the widget before you start is essential for longer running tasks so you can see the progress as it's running.carousel=uw.Carousel()withcarousel.D.item():plot_something()# all equivalent - should display 5 times (including the time above)carousel.display()carousel.Ddisplay(carousel)carousel# last line in cellIterable (.items(iterable))Sometimes you have a list or generator of items that you want to show in tabs or a carousel. This is useful when you're plotting like 20 graphs and doing them one on top of the other makes navigating the notebook insufferable. You can optionally set a title function which will receive the current iterable item as input.uw.h4('Carousel').display()foriinuw.Carousel().D.items(range(N),title='item{}'.format):plot_something(i)uw.h4('Tabs').display()foriinuw.Tabs().D.items(range(N),title='this is tab{}'.format):plot_something(i)uw.h4('Accordion').display()foriinuw.Accordion().D.items(range(N),title='see:{}'.format):plot_something(i)Function capturing (@.function)This gives you a bit more flexibility than wrapping an iterable. Anything from this function will be added to it's own tab.tb=uw.Tabs().D@tb.function(title='plotting{}'.format)deftabfunc(i,**kw):plot_something(i,**kw)tabfunc(3)tabfunc(4,n=5)tabfunc(5)Context Manager (with .item():)This is the underlying mechanics for the other functions. What it does is, makes a new tab and append a ipywidgets.Output widget. It then uses the output widget to capture all output, like prints and plt.show() so it can display it in a tab.carousel=uw.Carousel().Dforiinrange(N):withcarousel.item():plot_something(i)acc=uw.Accordion().Dforiinrange(N):withacc.item(title='Item{}'.format(i)):plot_something(i)Internally, it's doing this. So if you want to, you can to.# manually add an output as a tab abovetabs=uw.Tabs().Dwithtabs.append(uw.Output(),title='something'):plot_something(2)
Package: ipyuploads
ipyuploadsipyuploadsis a Jupyter file widget with a variety of improvements over theFileUploadcomponent that comes inipywidgets. It is designed to serve as a drop-in replacement for the aforementioned component. Features include:Progress indicator on uploads over 1 mb"Chunked" file upload supports larger files thanFileUploadallowsThe ability to write chunks to disk reduces the memory requirement for large file uploadsCallback hooks on file upload completion, chunk upload completion and all-files completionRequirementsipywidgets >= 7.5.0InstallationpipinstallipyuploadsDevelopmentgitclonehttps://github.com/g2nb/ipyuploads.git
pipinstall-eipyuploadsUsageIn a Jupyter notebook, run the following:importipyuploadsipyuploads.Upload()Various options can also be set, including:importipyuploadsipyuploads.Upload(accept='txt',# Accept only text filesmultiple=True,# Upload multiple files at oncedisabled=True,# Disable the widgeticon='cloud-upload',# Change the upload iconbutton_stye='primary',# Change the button styleerror='Bad Error',# Set the error messagebusy=False,# Whether an upload is in progresschunk_complete=foo,# Callback when a chunk upload completesfile_complete=bar,# Callback when a file upload completesall_files_complete=fo2,# Callback when all files complete)
Package: ipyurl
ipyurlA Jupyter Widget Library for accessing the server's URLInstallationYou can install usingpip:pipinstallipyurlIf you are using Jupyter Notebook 5.2 or earlier, you may also need to enable
the nbextension:jupyternbextensionenable--py[--sys-prefix|--user|--system]ipyurlDevelopment InstallationCreate a dev environment:condacreate-nipyurl-dev-cconda-forgenodejsyarnpythonjupyterlab
condaactivateipyurl-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 ipyurl
jupyter nbextension enable --sys-prefix --py ipyurlNote 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.
Package: ipyvanish
version number: 0.0.1
author: Bradley McElroyOverviewA python package that can be installed with pip.Installation / UsageTo install use pip:$ pip install ipyvanishOr clone the repo:$ git clonehttps://github.com/limx0/ipyvanish.git$ python setup.py installExamplePoll for all servers$ ipyvanish pollOr for specific country / city (or multiple) via–countriesor–cities$ ipyvanish poll –countries=[Australia, Canada]
Package: ipyvasp
ipyvaspAn successor ofpivotpyfor VASP-based DFT pre and post processing tool.InstallCurrently the package is being built and not stable. If you want to use development version, install this way:(recommended to install in a virtual environment)git clone https://github.com/massgh/ipyvasp.git
cd ipyvasp
pip install -e .Showcase ExamplesPlot 2D BZ layer on top of 3D!importipyvaspasipvpos=ipv.POSCAR('FCC POSACR FILE').set_zdir([1,1,1])ax=pos.splot_bz(vectors=None,color='skyblue',lw=0.2,alpha=0.2,fill=True)kpts=[[0,-1/2,0],[0,0,0]]pos.splot_kpath(kpts,labels=[str(k)forkinkpts],zorder=-1)# At 3D BZpos2=pos.transform(lambdaa,b,c:(a-c,b-c,a+b+c))# 111 planepos2.splot_bz('xy',ax=ax,zoffset=0.15,vectors=None,color='navy')kp2=pos.bz.map_kpoints(pos2.bz,kpts)pos2.splot_kpath(kp2,labels=[str(k)forkinkp2.round(1).tolist()],color='navy',fmt_label=lambdalab:(lab+'\n',dict(va='center',color='navy')),zorder=3)ax.set_axis_off()Interactively select bandstructure path by clicking on high symmetry points on plot!More coming soon!
Package: ipyvizzu-story
ipyvizzu-story- Build, present and share animated data stories in Jupyter Notebook and similar environmentsDocumentation·Examples·Code reference·Repository·Blogipyvizzu-storyAbout The Extensionipyvizzu-storyis an extension of the animated charting toolipyvizzuthat enables users to create and
present interactive data presentations within the data science notebook of their
choice and to share them as anHTMLfile. The extension provides a widget that
contains the presentation and adds controls for navigating between slides -
predefined stages within the story being presented. Navigation also works with
keyboard shortcuts - arrow keys,PgUp,PgDn,Home,End- and you can
also use a clicker to switch between the slides.Installationpipinstallipyvizzu-storyVisitInstallation chapterfor more options and details.UsageYou can check and download the code behind the animation on the top of the page
in ourExample gallery.You can create the story below with the following code snippet.fromipyvizzuimportData,ConfigfromipyvizzustoryimportStory,Slide,Stepdata=Data()data.add_series("Foo",["Alice","Bob","Ted"])data.add_series("Bar",[15,32,12])data.add_series("Baz",[5,3,2])story=Story(data=data)slide1=Slide(Step(Config({"x":"Foo","y":"Bar"}),))story.add_slide(slide1)slide2=Slide(Step(Config({"color":"Foo","x":"Baz","geometry":"circle"}),))story.add_slide(slide2)story.play()DocumentationVisit ourDocumentation sitefor
more details and a step-by-step tutorial intoipyvizzu-storyor check out ourExample gallery.Environmentsipyvizzu-storycan be used in a wide variety of environments, visitEnvironments chapterfor more details.NotebooksJupyter NotebookColabDatabricksDataCampDeepnoteJupyterLabJupyterLiteKaggleNoteableApp platformsStreamlitFlaskPanelMercuryVoilàBI toolsModeIDEsPyCharmVSCode PythonPythonContributingWe welcome contributions to the project, visit ourContributing guidefor
further info.ContactJoin our Slack if you have any questions or comments:vizzu-community.slack.comDrop us a line athello@vizzuhq.comFollow us on Twitter:VizzuHQUsage Statisticsipyvizzu-storycollects aggregate usage statistics by default to follow the
progress and overall trends of our library. This feature is optional, and users
can choose to opt-out. However, we do not track, collect, or store any personal
data or personally identifiable information. Please note that even when this
feature is enabled, publishing anything made withipyvizzu-storyremains GDPR
compatible. For more details, please visitAnalytics chapter.LicenseCopyright © 2022-2023Vizzu Inc.Released under theApache 2.0 License.
Package: ipyvolume
IPython widget for rendering 3d volumes and glyphs (e.g. scatter and quiver) in the Jupyter notebookscreencastInstallationTo install use pip:$ pip install ipyvolume
$ jupyter nbextension enable --py --sys-prefix ipyvolumeTo install use pip (as non-admin):$ pip install ipyvolume --user
$ jupyter nbextension enable --py --user ipyvolumeFor a development installation (requires npm),$ git clone https://github.com/maartenbreddels/ipyvolume.git
$ cd ipyvolume
$ pip install -e .
$ jupyter nbextension install --py --symlink --sys-prefix ipyvolume
$ jupyter nbextension enable --py --sys-prefix ipyvolume