我正在学习使用ipython笔记本的课程.当我尝试下载笔记本时(通过文件 - >下载为 - > ipython笔记本),我得到一个以".ipynb.json"结尾的文件.它不作为ipython笔记本打开,而是作为.json文件打开,所以像这样:
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"_You are currently looking at **version 1.1** of this notebook. To download notebooks and datafiles, as well as get help on Jupyter notebooks in the Coursera platform, visit the [Jupyter Notebook FAQ](https://www.coursera.org/learn/python-data-analysis/resources/0dhYG) course resource._\n",
"\n",
"---"
]
},
...
}
Run Code Online (Sandbox Code Playgroud)
我已经尝试删除文件名中的".json",但它不起作用.如何将此文件转换回可以作为ipython笔记本打开和运行的文件?非常感谢你!
我想在我的闪亮应用程序中显示一个链接,该链接指向根据用户输入生成的URL.我不想显示URL的全文.我知道如果事先知道URL,可以使用a(href ="",label ="")函数,但在这种情况下,URL取决于用户的输入.以下不起作用:
ui <- fluidPage(
titlePanel("Show map of a given state"),
sidebarLayout(
sidebarPanel(
textInput("state", label = "State", value = "CA", placeholder = "California or CA"),
actionButton("showU","Show map")
),
mainPanel(
conditionalPanel(
condition = "input.showU > 0",
htmlOutput("url"),
a(href=htmlOutput("url"),"Show in Google Map",target="_blank")
)
)
)
)
server <- function(input, output){
observeEvent(input$showU,{
output$url <-renderUI({paste("https://www.google.com/maps/place/", input$state, sep="")})
})
}
shinyApp(ui,server)
Run Code Online (Sandbox Code Playgroud)
我希望我可以点击"在谷歌地图上显示",然后转到即时生成的网址.请帮帮我,谢谢.