最新发布第16页
macOS Python 多版本管理-Stewed Noodles 资源

macOS Python 多版本管理

安装 Homebrew Homebrew 的官网 https://brew.sh/ 在终端输入以下命令进行安装 /bin/bash -c '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)' 安装完成后...
词的向量表示-Stewed Noodles 资源

词的向量表示

词向量 vs 词嵌入 词向量( Word Vector ) 通常也叫词嵌入(Word Embeding),是一种寻找词语词之间相似性的 NLP 技术。它把词汇各个维度上的特征用数值向量进行表示,利用这些维度上特征的相似...
XuX的头像-Stewed Noodles 资源烩之面大会员XuX2年前
0300
Day 4 - 随机化与列表-Stewed Noodles 资源

Day 4 – 随机化与列表

随机化 Python 提供random模块以实现随机化。详情可参考 https://docs.python.org/zh-cn/3.13/library/random.html # 导入 random 模块 import random # 1 到 10 的随机整数 rand_num = random....
Day 9 - 字典与嵌套-Stewed Noodles 资源

Day 9 – 字典与嵌套

字典 基本语法 字典是由键值对组成,基本的语法如下 {key1:value1, key2: value2, ...} 示例 # 字典示例 colors = { 'apple': 'red', 'pear': 'green', 'banana': 'yellow' } 基本使用 字典的基...
Day 16 - 面向对象编程(OOP)-Stewed Noodles 资源

Day 16 – 面向对象编程(OOP)

面向对象编程(Object Oriented Programming, OOP),模拟事物为对象(Object),每个对象都有自己的属性(attribute)以及方法(methods)。 对象与类 在 OOP 中,有类(Class)以及对象(Obje...
How to follow this guide 如何遵循本指南-Stewed Noodles 资源

How to follow this guide 如何遵循本指南

This guide is called Swift Concurrency by Example because it focuses on providing as many examples as possible. My goal is to stay laser-focused on real-world problems and real-wor...
How to use continuations to convert completion handlers into async functions 如何使用 continuations 将完成处理程序转换为异步函数-Stewed Noodles 资源

How to use continuations to convert completion handlers into async functions 如何使用 continuations 将完成处理程序转换为异步函数

Older Swift code uses completion handlers for notifying us when some work has completed, and sooner or later you’re going to have to use it from an async function –&nbs...
How to discard results in a task group 如何丢弃任务组中的结果-Stewed Noodles 资源

How to discard results in a task group 如何丢弃任务组中的结果

Swift has a special task group type called a discarding task group, which has a very specialized function: tasks that complete are automatically discarded and destroyed, ...
Understanding actor initialization 了解 actor 初始化-Stewed Noodles 资源

Understanding actor initialization 了解 actor 初始化

Swift's actors run on their own executor most of the time, so they manage how and where their work is done. However, during the actor's initialization its executor isn't ready to t...
How to serialize parameterized tests with Swift Testing 如何使用 Swift Testing 序列化参数化测试-Stewed Noodles 资源

How to serialize parameterized tests with Swift Testing 如何使用 Swift Testing 序列化参数化测试

Swift Testing's parameterized tests allow us to send multiple values into a single test, and they'll be run in parallel for maximum performance. If you don't want this – if you wa...