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)
相关推荐
05664641 分钟前
RAG 向量检索:从“查字“到“查意“
数据库·人工智能·学习·oracle
却道天凉_好个秋1 小时前
音视频学习(一百零二):全彩夜视
学习·音视频·全彩夜视
0566461 小时前
agent学习Day23——文件上传与 Embedding 语义检索
python·学习·embedding
小白说大模型1 小时前
【MYSQL】MYSQL学习的一大重点:索引(下)- B+树
b树·学习·mysql
却道天凉_好个秋1 小时前
音视频学习(一百零一):IR-Cut
学习·音视频·ir-cut
森诺Alyson1 小时前
前沿技术借鉴研讨-2026.8.6(影响中国育龄妇女生育偏好的因素/分孕周血压与不良妊娠结局的风险)
论文阅读·经验分享·学习·论文笔记
若无情我 纸小铭1 小时前
Nginx学习笔记(二) Nginx--connection&request
笔记·学习·nginx
TimeLess薄凉2 小时前
嵌入式调试笔记<4>使用可调电源接负载电压被拉低
笔记
paopaokaka_luck2 小时前
基于springboot3+vue3的云南本土影视文旅推荐平台(协同过滤算法、Echarts图形化分析)
前端·spring boot·学习·算法·echarts·mybatis
paopaokaka_luck12 小时前
基于springboot3+vue3的企业考勤管理系统(部门树递归、Echarts图形化分析)
开发语言·spring boot·学习·echarts·mybatis·需求分析·代码规范