<jupyter_start><jupyter_text>use Julia from Python notebookReference: https://stackoverflow.com/questions/24091373/best-way-to-run-julia-code-in-an-ipython-notebook-or-python-code-in-an-ijulia-n<jupyter_code>%load_ext julia.magic
%%julia
mat=Float64[1 2; 3 4]
%%julia
for i in 1:10
    println(i+mat)
end
import numpy as np
print("Hello from Python")
print(np.arange(10))
from julia import Julia
j = Julia()
arr = j.eval('[1:10]')
type(arr)
%%julia
run(`ls`)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15778688524590165, 'fraction_numerical': 0.045081967213114756, 'mean_word_length': 6.086956521739131, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '157475', 'license': 'MIT', 'n_tokens_mistral': 219, 'n_tokens_neox': 204, 'n_words': 38, 'path': 'callJuliaFromPy/notebook/use julia from Python notebook.ipynb', 'repo_name': 'terasakisatoshi/juliaExer', 'size': '488'}