Skip to main content

Collection of Jupyter Widgets

Project description

wigglystuff

"A collection of expressive Jupyter widgets."

The project uses anywidget under the hood so our tools should work in Jupyter, VSCode, Colab and Marimo. That also means that you get a proper widget that can interact with ipywidgets natively.

Installation

Installation occurs via pip.

python -m pip install wigglystuff

Usage

Slider2D

from wigglystuff import Slider2D

widget = Slider2D()
widget

This widget allows you to grab the widget.x and widget.y properties to get the current position of the slider. But you can also use the widget.observe method to listen to changes in the widget.

Example of widget.observe
import ipywidgets
from wigglystuff import Slider2D

widget = Slider2D()
output = ipywidgets.Output()
state = [[0.0, 0.0]]

@output.capture(clear_output=True)
def on_change(change):
    if abs(widget.x - state[-1][0]) > 0.01:
        if abs(widget.y - state[-1][1]) > 0.01:
            state.append([widget.x, widget.y])
    for elem in state[-5:]:
        print(elem)

widget.observe(on_change)
on_change(None)
ipywidgets.HBox([widget, output])

Matrix

from wigglystuff import Matrix

arr = Matrix(rows=1, cols=2, triangular=True, step=0.1)
mat = Matrix(matrix=np.eye(2), triangular=True, step=0.1)

This widget allows you to grab the mat.matrix property after editing the matrix. This returns a list of lists which can easily be cast into a numpy array via np.array(mat.matrix).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wigglystuff-0.1.7.tar.gz (121.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wigglystuff-0.1.7-py2.py3-none-any.whl (123.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file wigglystuff-0.1.7.tar.gz.

File metadata

  • Download URL: wigglystuff-0.1.7.tar.gz
  • Upload date:
  • Size: 121.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.14

File hashes

Hashes for wigglystuff-0.1.7.tar.gz
Algorithm Hash digest
SHA256 4a76600fc65ce911c81a6629f62c28c30b72813c0a139b1f9343d691ddad1a81
MD5 1ce7ce9619eb5baa52e62c17af428c56
BLAKE2b-256 d065783d2fefd581981207b3d9e92662a20ec42f326d9a1632f3e0d8e8729005

See more details on using hashes here.

File details

Details for the file wigglystuff-0.1.7-py2.py3-none-any.whl.

File metadata

  • Download URL: wigglystuff-0.1.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 123.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.14

File hashes

Hashes for wigglystuff-0.1.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f0483cda2b55b41175c0a905481a520600596d6da840505f7b3b43b9639398f2
MD5 04a21a0439c174e1385a810e9b614332
BLAKE2b-256 214b6751a39bef17b136d071d5bc13b5125fd1f1f0e7bd8b6cfa94c4b6d5a8ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page