入岛
第一关
闯关任务:完成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