Obsidian Code Emitter
This plugin allows code blocks executed interactively like jupyter notebooks.
Currently, support languages:
- Rust
- Kotlin
- JavaScript
- TypeScript
- Python
- Java
Note: Only Python
、TypeScript
、JavaScript
are run locally in sandbox(js / webassembly). Other's will send code to third-party website to eval the results (eg: https://play.kotlinlang.org, https://play.rust-lang.org). Please take care to avoid sending your potentially-sensitive source code.
Ads: You might like my other plugins
Installation
- Create plugin folder
<your obsidian vault>/.obsidian\plugins\code-emitter
- Download files from releases into plugin folder.
Examples
Python
Install numpy through micropip
. All available packages are list in here (search whl
).
import micropip
await micropip.install('numpy')
import numpy as np
a = np.random.rand(3,2)
b = np.random.rand(2,5)
print(a@b)