Snippets Collections
from ipywidgets import interact

@interact
def plot_polynom(a=[0,1,2,3], b=2):
    x = np.arange(-10, 10, 0.1)
    y = a*x**3+ b*x**2    
    plt.plot(x,y); plt.xlim(xmin=-10, xmax=10); plt.ylim(ymin=-100, ymax=100)
from ipywidgets import interact

@interact
def plot_polynom(a=[0,1,2,3], b=2):
    x = np.arange(-10, 10, 0.1)
    y = a*x**3+ b*x**2    
    plt.plot(x,y); plt.xlim(xmin=-10, xmax=10); plt.ylim(ymin=-100, ymax=100)
def my_decorator(func):
    def wrapper():
        func()
		func()

    return wrapper
def my_decorator(func):
    def wrapper():
        print("I'm before the method call")
        func()
        print("I'm after the method call")
    
    return wrapper

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension