当前位置: 首页 > news >正文

网站建设西街小公司管理软件

网站建设西街,小公司管理软件,网站后端架构如何做,怎样做免费网站入门岛作业 Linux闯关任务#xff1a;完成 SSH 连接与端口映射并运行 hello_world.py。配置vscode作业内容 可选任务1#xff1a;将Linux基础命令在开发机上完成一遍作业内容 可选任务 2#xff1a;使用 VSCODE 远程连接开发机并创建一个conda环境作业内容 可选任务 3#… 入门岛作业 Linux闯关任务完成 SSH 连接与端口映射并运行 hello_world.py。配置vscode作业内容 可选任务1将Linux基础命令在开发机上完成一遍作业内容 可选任务 2使用 VSCODE 远程连接开发机并创建一个conda环境作业内容 可选任务 3创建并运行test.sh文件作业内容 Python闯关任务Python实现wordcount作业内容 闯关任务Vscode连接InternStudio debug笔记作业内容 Git任务1: 破冰活动自我介绍作业内容 任务2: 实践项目构建个人项目作业内容 Linux 闯关任务完成 SSH 连接与端口映射并运行 hello_world.py。 配置vscode 按照教学文档的内容来 打开vscode在应用商店中搜索Remote-SSH并安装 打开terminal输入ssh-keygen 创建一对钥匙 想要加密的可以输入ssh-keygen -t rsa 创建钥匙只是我自己实践下来发现用加密的钥匙远程的时候经常提示输入密码 使用Get-Content命令查看生成的密钥并复制下来 然后去开发机平台在首页点击配置SSH Key接着点击添加SSH公钥将复制的公钥粘贴到公钥框中名称会被自动识别到最后点击立即添加SSH Key就配置完成了 接着新建开发机点击SSH连接将弹框中的命令复制下来到vscode运行 登陆成功后控制台如图所示 作业内容 先安装gradio 使用命令安装依赖包 pip install gradio4.29.0然后在Web IDE的终端中创建一个hello_world.py vi hello_world.py输入以下内容并保存 import socket import re import gradio as gr# 获取主机名 def get_hostname():hostname socket.gethostname()match re.search(r-(\d)$, hostname)name match.group(1)return name# 创建 Gradio 界面 with gr.Blocks(gr.themes.Soft()) as demo:html_code fp aligncentera hrefhttps://intern-ai.org.cn/homeimg srchttps://intern-ai.org.cn/assets/headerLogo-4ea34f23.svg altLogo width20% styleborder-radius: 5px;/a/ph1 styletext-align: center;☁️ Welcome {get_hostname()} user, welcome to the ShuSheng LLM Practical Camp Course!/h1h2 styletext-align: center; Let’s go on a journey through ShuSheng Island together./h2p aligncentera hrefhttps://github.com/InternLM/Tutorial/blob/camp3img srchttps://oss.lingkongstudy.com.cn/blog/202406301604074.jpg altLogo width20% styleborder-radius: 5px;/a/pgr.Markdown(html_code)demo.launch()运行python脚本 python hello_world.py程序运行成功vscode自动帮我们做了端口映射 在浏览器中打开便可以看到程序运行的结果 可选任务1将Linux基础命令在开发机上完成一遍 作业内容 可选任务 2使用 VSCODE 远程连接开发机并创建一个conda环境 当我们要使用conda安装包的时候会非常慢我们可以设置国内镜像提升安装速度示例如下 #设置清华镜像 conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2作业内容 我们可以使用以下命令创建python版本为3.10、名字为internlm的虚拟环境 conda create -n internlm python3.10激活虚拟环境 conda activate internlm可选任务 3创建并运行test.sh文件 作业内容 根目录下创建test.sh文件写入以下内容 #!/bin/bash# 定义导出环境的函数 export_env() {local env_name$1echo 正在导出环境: $env_name# 导出环境到当前目录下的env_name.yml文件conda env export -n $env_name $env_name.ymlecho 环境导出完成。 }# 定义还原环境的函数 restore_env() {local env_name$1echo 正在还原环境: $env_name# 从当前目录下的env_name.yml文件还原环境conda env create -n $env_name -f $env_name.ymlecho 环境还原完成。 }# 检查是否有足够的参数 if [ $# -ne 2 ]; thenecho 使用方法: $0 操作 环境名echo 操作可以是 export 或 restoreexit 1 fi# 根据参数执行操作 case $1 inexport)export_env $2;;restore)restore_env $2;;*)echo 未知操作: $1exit 1;; esac运行test.sh chmod x test.sh ./test.sh export internlm ./test.sh restore internlmPython 闯关任务Python实现wordcount 实现一个 wordcount 函数统计英文字符串中每个单词出现的次数。返回一个字典key 为单词value 为对应单词出现的次数。 思路 文本转换为小写。 将所有标点符号(’s除外)转为空格。 分割文本为单词列表。 使用字典来记录单词出现的次数。 作业内容 text Got this panda plush toy for my daughters birthday, who loves it and takes it everywhere. Its soft and super cute, and its face has a friendly look. Its a bit small for what I paid though. I think there might be other options that are bigger for the same price. It arrived a day earlier than expected, so I got to play with it myself before I gave it to her. def wordcount(text):wordcount_result {}text text.lower()text text.replace(,,).replace(.,)for t in text.split():if t not in wordcount_result.keys():wordcount_result[t] 1else:wordcount_result[t] 1return wordcount_resultif __name__ __main__:print(wordcount(text))运行结果 {got: 2, this: 1, panda: 1, plush: 1, toy: 1, for: 3, my: 1, daughters: 1, birthday: 1, who: 1, loves: 1, it: 5, and: 3, takes: 1, everywhere: 1, its: 2, soft: 1, super: 1, cute: 1, its: 1, face: 1, has: 1, a: 3, friendly: 1, look: 1, bit: 1, small: 1, what: 1, i: 4, paid: 1, though: 1, think: 1, there: 1, might: 1, be: 1, other: 1, options: 1, that: 1, are: 1, bigger: 1, the: 1, same: 1, price: 1, arrived: 1, day: 1, earlier: 1, than: 1, expected: 1, so: 1, to: 2, play: 1, with: 1, myself: 1, before: 1, gave: 1, her: 1}闯关任务Vscode连接InternStudio debug笔记 作业内容 打开vscode安装python插件安装后即可打断点和debug 在此处打上断点然后点击run and debug观察分词情况 左上角可以看到运行这一步之前的变量的值可以看到分词没啥问题点击继续执行 debug结束 Git 任务1: 破冰活动自我介绍 作业内容 自我介绍 任务2: 实践项目构建个人项目 作业内容 个人项目
http://www.hkea.cn/news/14354647/

相关文章:

  • 游戏类企业网站模板结婚网站模版
  • 做任务领礼品的网站wordpress怎么和手机连接数据库
  • 健身网站开发项目总结查企业app
  • 做c语言的题目的网站温州论坛
  • 廊坊学校网站建设wordpress建站方向
  • 企业网站的推广方法有哪些西安建设公司网站
  • 网站设计原则的历史wordpress如何跳转外部链接
  • 酒店网站制作策划开发网站如何赚钱
  • 曹县 做网站的公司wordpress给文章增加标签
  • 教育培训网站木兰姐网站建设
  • 怎样建立自己网站wordpress分类id在哪里
  • 电商网站排名asp.net mvc 统计网站流量数据
  • 专做ppt的网站个人养老保险怎么缴纳
  • 网站怎么加ico任县城乡建设局网站
  • 罗源城乡建设网站个人网站备案所需材料
  • 酒店预定网站建设方案聊城那里有做网站
  • iis网站创建向导广州网站建设推广服务
  • 影视会员代理平台网站现在最长用的做网站软件是什么
  • 自建网站推广苏州哪家做网站好
  • 实体服务器做网站wordpress新窗口
  • 常规网站建设价格实惠公司设计网站需要多少钱
  • 谷歌优化网站链接怎么做电子工程网名又知道你是做工程
  • 平台型网站建设汨罗网站seo
  • 专门做超市dm网站昆山网站建设jofuns
  • 现在给别人做网站阜阳哪里做网站
  • 免费个人网站注册网站空间更换
  • 国内模板建站公司做个app需要多少费用
  • 青海 网站开发 app团购网站怎么推广
  • 天津网站建设公司网站设计建
  • 企智网络网站建设公司wordpress切换中文