【发布时间】:2021-06-22 09:38:45
【问题描述】:
有没有一种方便的方法可以将使用 Jupyter notebook 生成的多个 .ipynb Julia 文件转换为 .jl 工作文件?
如果保留使用 Jupyter 编写的降价,但对我的使用不是强制性的,那很好。
这是我的文件包含的示例:
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Some useful functions required to build the model"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"distance (generic function with 1 method)"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Euclidean distances between point p1 and p2\n",
"function distance(p1,p2)\n",
" dist=((p1[1]-p2[1])^2+(p1[2]-p2[2])^2)^(1/2)\n",
" return dist\n",
"end"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Tripletas (generic function with 1 method)"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
【问题讨论】:
标签: file jupyter-notebook julia file-conversion