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)
相关推荐
狐5712 分钟前
2026-01-19-LeetCode刷题笔记-1292-元素和小于等于阈值的正方形的最大边长
笔记·算法·leetcode
张祥64228890427 分钟前
误差理论与测量平差基础笔记六
笔记·算法·概率论
zpedu38 分钟前
软考想一次过,有一个学习衡量标准吗?
人工智能·笔记
HyperAI超神经1 小时前
具身智能资源汇总:机器人学习数据集,在线体验世界建模模型,英伟达/字节/小米等最新研究论文
人工智能·深度学习·学习·机器学习·机器人·ai编程·图形生成
孞㐑¥2 小时前
算法—滑动窗口
开发语言·c++·经验分享·笔记·算法
历程里程碑2 小时前
Linux 3 指令(3):进阶指令:文件查看、资源管理、搜索打包压缩详解
linux·运维·服务器·c语言·数据结构·笔记·算法
AI-小柒2 小时前
从零入门大语言模型(LLM):系统学习路线与实践指南
大数据·开发语言·人工智能·学习·信息可视化·语言模型·自然语言处理
咋吃都不胖lyh2 小时前
GBDT 中的前向分布算法和贪婪学习
学习·算法
LUCIFER2 小时前
学习随笔:摄像头采集数据后进行视频编解码的常见概念与疑问
学习·音视频
LXY_BUAA3 小时前
《C++学习》Qt软件安装_20260123
学习