书生大模型第三期作业

入岛

第一关

闯关任务:完成SSH连接与端口映射并运行hello_world.py

ssh连接:

Hello world

vscode连接

可选任务1:将Linux基础命令在开发机上完成一遍

3.1.1~3.1.6 touch、cat、mkdir、cd、pwd、vi or vim

3.1.7~3.1.9 cp or ln 、mv or rm 、find

ls、sed

3.2、进程管理:ps、top、pstree、pgrep、nice、jobs、bg和fg、

nvidia-smi

第二关

任务一:Python实现wordcount

text = """
Got this panda plush toy for my daughter's birthday,
who loves it and takes it everywhere. It's soft and
super cute, and its face has a friendly look. It's
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):
    char=[",",".","?","!"] #定义符号列表
    out_str=""
    for i in text: #去除符号
        if i in char: 
            continue
        out_str+=i
    out_str=out_str.lower().strip().replace('\n', ' ') #去除大小写、前后空格、换行符
    out_list=out_str.split(" ") #按空格转换成单词列表
    out_dict={}
    for i in out_list:
        if i in out_dict:
            out_dict[i]+=1
        else:
            out_dict[i]=1
    print(out_dict)
    pass
wordcount(text)

 运行结果:

任务二:Vscode连接InternStudio debug笔记

启动debug server服务:

python -m debugpy --listen 5678 --wait-for-client ./wordcount.py

调试:

第三关

任务1: 破冰活动:自我介绍

任务2: 实践项目:构建个人项目

https://github.com/Ohhsleep/itemhouse

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值