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)
相关推荐
bylander32 分钟前
【AI学习】wirelessGPT多任务无线基础模型摘要
学习
幻奏岚音2 小时前
统计学(第8版)——假设检验学习笔记(考试用)
笔记·学习·算法
nenchoumi31192 小时前
UE5 学习系列(一)创建一个游戏工程
c++·学习·游戏·ue5
泽韦德2 小时前
【Redis】笔记|第10节|京东HotKey实现多级缓存架构
redis·笔记·缓存
crary,记忆2 小时前
MFE(微前端) Module Federation:Webpack.config.js文件中每个属性的含义解释
前端·学习·webpack
2301_790225882 小时前
unity加载资源学习笔记
笔记·学习
重庆小透明2 小时前
【从零学习JVM|第三篇】类的生命周期(高频面试题)
java·jvm·后端·学习
小前端大牛马3 小时前
java教程笔记(十四)-线程池
java·笔记·python
寻丶幽风4 小时前
论文阅读笔记——Muffin: Testing Deep Learning Libraries via Neural Architecture Fuzzing
论文阅读·笔记·深度学习·网络安全·差分测试
我是初九4 小时前
【李沐-动手学深度学习v2】1.Colab学习环境配置
人工智能·python·学习·colab