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)
相关推荐
wp123_12 小时前
硬件设计笔记:1μH功率电感选型实战——线艺 XFL4020-102MEC 与 国产 pin to pin MVLH4020-1R0M 详细参数测评
笔记·科技·硬件架构·硬件工程
zyf1044162 小时前
暑期实践日志 Day48:复盘大纲与知识点对照表,系统汇总整理成果
学习·计算机网络·剪辑·暑期实践·课题任务
摇滚侠2 小时前
《SpringBoot 3:入门与应用实战》第 14 章 打包与部署 Spring Boot 应用打包 阅读笔记 41
spring boot·笔记·后端
金立基包装胶水2 小时前
纸袋热封胶常见都有哪些问题?
大数据·笔记·其他
chnyi6_ya3 小时前
论文阅读笔记 | HoneyBee: Data Recipes for Vision-Language Reasoners
论文阅读·笔记
repetitiononeoneday3 小时前
【每日规划与反思】2026.9.4
笔记
江湖人称菠萝包3 小时前
【Windows】《深入浅出Windows API程序设计:编程基础篇》笔记-Chapter1-基础知识
windows·笔记
m4Rk_3 小时前
【论文阅读】Agent 记忆机制(61):CFGM——用粗到细的记忆落地贯通经验采集、知识蒸馏与在线纠错
论文阅读·人工智能·学习·开源·github
边境悍匪3 小时前
蜗牛学苑 Java 智能体学习 Day33|AOP 面向切面编程、日志技术思维导图复盘
学习
我是你的开心果7783 小时前
ai全栈软件开发day21(第四阶段喽)
人工智能·学习