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)
相关推荐
xqqxqxxq23 分钟前
AI Agent学习:打通真实世界:Agent 工具分类与设计原则(李博杰《深入理解 AI Agent》4.1 4.2观后总结)
学习·ai
TJHHH.27 分钟前
SQL注入学习总结
数据库·笔记·sql·学习·注入
m4Rk_30 分钟前
【论文阅读】Agent 记忆机制(43):Mem²Evolve——让经验与能力在双记忆中共同进化
论文阅读·人工智能·学习·开源·github
自小吃多36 分钟前
Capture软件原理图添加元器件笔记
笔记·嵌入式硬件
TJHHH.1 小时前
文件包含漏洞
笔记·安全·文件包含
个 人 练 习 生1 小时前
数据结构入门:算法复杂度
开发语言·数据结构·经验分享·学习·程序人生·算法
ι:1 小时前
DeepSeek Harness 桌面一键启动与网页背景修改指南
windows·学习·deepseekharness
其实防守也摸鱼1 小时前
红队技能总结导图:从入门到精通的完整知识体系
开发语言·人工智能·学习·安全·web安全
zjnlswd1 小时前
C# 学习笔记
笔记·学习
远离UE42 小时前
UE5 显存 虚拟内存 深入学习笔记
笔记·学习·ue5