InternLM学习笔记

入门岛

1. Linux基础知识





2. Python 基础知识

python 复制代码
from collections import Counter


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: str):
    text = text.lower().replace('.', '').replace(',', '').replace('\n', ' ')
    words = [word[:-2] if word.endswith("'s") else word for word in text.split(' ') if word]
    return dict(Counter(words))


if __name__ == '__main__':
    res = wordcount(text)
    print(res)
相关推荐
ctrl_v助手25 分钟前
VisionPro (R) QuickBuild相机的连接
服务器·笔记·数码相机·c#
代码搬运媛39 分钟前
Express 入门到精通笔记
笔记·express
Tbisnic41 分钟前
AI大模型学习第十四天:Coze项目实战中的分治智慧
人工智能·python·学习·大模型·工作流·智能体·coze
格兰芬多呼神护卫1 小时前
中国电信 TeleAI 开源 KungfuBot / PBHC 框架分析笔记
笔记·开源
小风吹啊吹~1 小时前
通过时态图学习意图驱动识别足球控球比赛阶段 论文详解
学习·transformer·论文笔记·gan·足球战术·战术分析系统
阿i索1 小时前
【C++学习笔记】【基础】4.string类(2)——模拟实现
c++·笔记·学习
数据皮皮侠AI2 小时前
上市公司战略性新兴产业专利数据库(2003-2024)
大数据·人工智能·笔记·机器学习·回归
袁小皮皮不皮2 小时前
6.HCIP OSPF域间防环机制与虚链路
服务器·网络·笔记·网络协议·学习·智能路由器
一口吃俩胖子2 小时前
【脉宽调制DCDC功率变换学习笔记026】补偿设计和闭环性能
笔记·学习