Recent | Popular
#decorators #jupyter
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)
#python #decorators
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
Sat Nov 26 2022 10:31:08 GMT+0000 (UTC)
Sat Nov 26 2022 10:31:06 GMT+0000 (UTC)
Sat Nov 26 2022 10:29:53 GMT+0000 (UTC)
Sat Nov 26 2022 10:28:52 GMT+0000 (UTC)