From sciris
References advanced Sciris Python features: nested dicts (makenested, getnested, iternested), context blocks (capture, tryexcept), smoothinterp, asd optimization, animation, savemovie.
npx claudepluginhub sciris/scirisThis skill uses the workspace's default tool permissions.
Reference for nested dicts, context blocks, interpolation, optimization, and animation. See full tutorial: `docs/tutorials/tut_advanced.ipynb`.
Provides code patterns for basic Sciris features: array operations like findinds, date-formatted plotting, objdict containers, object save/load, and parallelization.
Provides best practices for ManimGL (3Blue1Brown OpenGL animation engine) including InteractiveScene, Tex/t2c, 3D rendering, camera control, interactive mode, and CLI workflows.
Guides Matplotlib for creating line, scatter, bar, histogram, heatmap, 3D plots, subplots; pyplot and OO APIs; exports PNG/PDF/SVG for scientific visualizations.
Share bugs, ideas, or general feedback.
Reference for nested dicts, context blocks, interpolation, optimization, and animation. See full tutorial: docs/tutorials/tut_advanced.ipynb.
If you need more detail, use your MCP tools (Context7 or GitMCP) to look up current Sciris documentation, or consult the other Sciris skills.
nest = {}
sc.makenested(nest, ['key1', 'key1.1']) # Create nested structure
sc.makenested(nest, ['key2', 'key2.1', 'key2.1.1'])
# Iterate over all "twigs" (leaf paths)
for twig in sc.iternested(nest):
sc.setnested(nest, twig, value) # Set value at path
val = sc.getnested(nest, twig) # Get value at path
# Search by key or value
sc.search(nest, 'key2.1.1') # Find by key pattern
sc.search(nest, value=5) # Find by value
# Transform all values
sc.iterobj(nest, transform_func, inplace=True)
sc.printjson(nest) # Pretty-print as JSON
with sc.capture() as text:
verbose_function() # All print output → text variable
lines = text.splitlines()
# Simple: exit gracefully at first exception
with sc.tryexcept():
risky_function()
# Advanced: accumulate exception history
tryexc = None
for i in range(1000):
with sc.tryexcept(history=tryexc, verbose=False) as tryexc:
fickle_function()
tryexc.disp() # Show all exceptions
# Smoother than np.interp, more conservative than scipy cubic spline
y_new = sc.smoothinterp(newx, origx, origy, smoothness=5)
result = sc.asd(objective_func, x0, verbose=False)
# Often faster and more accurate than scipy.optimize.minimize for noisy problems
frames = [plt.plot(np.cumsum(np.random.randn(100))) for i in range(20)]
sc.savemovie(frames, 'animation.gif')