Load Magic Command


In [ ]:
%classpath add jar ../../../doc/resources/jar/loadMagicJarDemo.jar

In [ ]:
%load_magic com.twosigma.beakerx.custom.magic.command.ShowEnvsCustomMagicCommand

In [ ]:
%showEnvs

Show Null Execution Result


In [ ]:
com.twosigma.beakerx.kernel.Kernel.showNullExecutionResult

In [ ]:
com.twosigma.beakerx.kernel.Kernel.showNullExecutionResult = true;
String seeNullString = null;
seeNullString

In [ ]:
com.twosigma.beakerx.kernel.Kernel.showNullExecutionResult = false;
String noNullString = null;
noNullString

JVM Repr


In [ ]:
import jupyter.Displayer;
import jupyter.Displayers;
Displayers.register(Integer.class, new Displayer<Integer>() {
  @Override
  public Map<String, String> display(Integer value) {
    return new HashMap<String, String>() {{
      put(MIMEContainer.MIME.TEXT_HTML, "<div><h1>" + value + "</h1></div>");

    }};
  }
});

In [ ]:
1+1

In [ ]: