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

任务2:python+InternStudio 关卡

任务地址

https://github.com/InternLM/Tutorial/blob/camp3/docs/L0/Python/task.md

文档

https://github.com/InternLM/Tutorial/tree/camp3/docs/L0/Python

任务

Python实现wordcount

import re 
import collectionstext = """
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):words = re.findall(r'\b\w+\b', text.lower())word_count = collections.Counter(words)output = dict(word_count.most_common())return outputoutput = wordcount(text)
print(f"{output}")# {'it': 7, 'i': 4, 'for': 3, 's': 3, 'and': 3, 'a': 3, 'got': 2, 'to': 2, 'this': 1, 'panda': 1, 'plush': 1, 'toy': 1, 'my': 1, 'daughter': 1, 'birthday': 1, 'who': 1, 'loves': 1, 'takes': 1, 'everywhere': 1, 'soft': 1, 'super': 1, 'cute': 1, 'its': 1, 'face': 1, 'has': 1, 'friendly': 1, 'look': 1, 'bit': 1, 'small': 1, 'what': 1, '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, 'play': 1, 'with': 1, 'myself': 1, 'before': 1, 'gave': 1, 'her': 1}

Vscode连接InternStudio debug笔记

远程连接成功

远程连接成功

debug结果

debug结果

知识点笔记

1.vscode如何连接服务器 首先需要安装Remote-SSH插件
命令:
ssh -p 47425 root@ssh.intern-ai.org.cn -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null

相关文章:

  • 北京网站建设多少钱?
  • 辽宁网页制作哪家好_网站建设
  • 高端品牌网站建设_汉中网站制作
  • 第五节shell脚本中的运行流程控制(3)
  • 智能水果保鲜度检测:基于YOLO和深度学习的完整实现
  • 学习TS -类型
  • 区块链技术在智能家居中的创新应用探索
  • vscode 文件颜色变绿色
  • “论面向方面的编程技术及其应”,写作框架,软考高级论文,系统架构设计师论文
  • 【IntelliJ IDEA】一篇文章集合所有IDEA的所有设置
  • Spring Boot 3.3 【三】Spring Boot RESTful API 增删改查详细教程
  • UNiapp 微信小程序渐变不生效
  • ue5笔记
  • 渗透测试过程中如何做好个人防护?
  • C++分词工具:Jieba分词
  • 关于git clone速度极慢的解决方法
  • 海思arm-hisiv400-linux-gcc 交叉编译rsyslog 记录心得
  • 初识C++|模板初阶
  • 【译】JS基础算法脚本:字符串结尾
  • 【347天】每日项目总结系列085(2018.01.18)
  • AngularJS指令开发(1)——参数详解
  • CentOS学习笔记 - 12. Nginx搭建Centos7.5远程repo
  • C学习-枚举(九)
  • express + mock 让前后台并行开发
  • HTTP请求重发
  • Laravel 菜鸟晋级之路
  • Nodejs和JavaWeb协助开发
  • 对话 CTO〡听神策数据 CTO 曹犟描绘数据分析行业的无限可能
  • 基于阿里云移动推送的移动应用推送模式最佳实践
  • 解析 Webpack中import、require、按需加载的执行过程
  • 排序算法学习笔记
  • 浅谈Golang中select的用法
  • 入门到放弃node系列之Hello Word篇
  • 深度学习入门:10门免费线上课程推荐
  • 首页查询功能的一次实现过程
  • 通过npm或yarn自动生成vue组件
  • 新手搭建网站的主要流程
  • 字符串匹配基础上
  • 3月7日云栖精选夜读 | RSA 2019安全大会:企业资产管理成行业新风向标,云上安全占绝对优势 ...
  • Mac 上flink的安装与启动
  • $.ajax()参数及用法
  • (1)Hilt的基本概念和使用
  • (1)svelte 教程:hello world
  • (2)空速传感器
  • (C语言)fgets与fputs函数详解
  • (C语言)fread与fwrite详解
  • (done) ROC曲线 和 AUC值 分别是什么?
  • (Matalb回归预测)PSO-BP粒子群算法优化BP神经网络的多维回归预测
  • (附程序)AD采集中的10种经典软件滤波程序优缺点分析
  • (附源码)spring boot球鞋文化交流论坛 毕业设计 141436
  • (十七)Flink 容错机制
  • (图)IntelliTrace Tools 跟踪云端程序
  • (五)网络优化与超参数选择--九五小庞
  • (转)Linux下编译安装log4cxx
  • .h头文件 .lib动态链接库文件 .dll 动态链接库
  • .NET core 自定义过滤器 Filter 实现webapi RestFul 统一接口数据返回格式
  • .net framework profiles /.net framework 配置
  • :中兴通讯为何成功