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)
相关推荐
handler016 小时前
从源码到二进制:深度拆解 Linux 下 C 程序的编译与链接全流程
linux·c语言·开发语言·c++·笔记·学习
电子云与长程纠缠6 小时前
UE5 两种方式解决Decal Actor贴花拉伸问题
学习·ue5·游戏引擎
red_redemption6 小时前
自由学习记录(172)
学习·cache line 64b·重用距离
阿荻在肝了7 小时前
Agent学习六:LangGraph学习-持久化与记忆一
python·学习·agent
寒秋花开曾相惜9 小时前
(学习笔记)4.1 Y86-64指令集体系结构(4.1.4 Y86-64异常&4.1.5 Y86-64程序)
开发语言·jvm·数据结构·笔记·学习
莹宝思密达9 小时前
【AI学习】 playwright-cli + SKILL 替换 chrom-devTools-MCP
学习
cyr___9 小时前
Unity教程(二十七)技能系统 黑洞技能(下)黑洞状态
学习·游戏·unity·游戏引擎
Theodore_102210 小时前
深度学习(15):倾斜数据集 & 精确率-召回率权衡
人工智能·笔记·深度学习·机器学习·知识图谱
不会聊天真君64710 小时前
JavaScript基础语法(Web前端开发笔记第三期)
前端·javascript·笔记
Fᴏʀ ʏ꯭ᴏ꯭ᴜ꯭.10 小时前
Redis主从复制配置全攻略
数据库·redis·笔记