chapter2 chapter figure
SystemVerilog for Design Edition 2 Chapter 8
## SystemVerilog for Design Edition 2 Chapter 8 SystemVerilog enables modeling at a higher level of abstraction through the use of 2-state types, enum ......
SystemVerilog for Design Edition 2 Chapter 7
## SystemVerilog for Design Edition 2 Chapter 7 SystemVerilog adds several new operators and procedural statements to the Verilog language that allow ......
Chapter04_学习
# 多线程安全 现在 glibc 库函数大部分是线程安全的,特别是 `FILE*` 系列函数是安全的,但是两个或者多个函数组合到一起就不是安全的了。例如 `fseek()`、`fread()` 两个函数都是线程安全的,但是对某个文件先 `seek()` 再 `read()` ,这两步操作中间有可能会 ......
Chapter02_学习
# 死锁 # 条件变量和互斥量区别 互斥器是加锁原语,用来拍他性地访问共享数据,它不是等待原语。在使用 mutex 时,我们一般都会期望加锁不要阻塞,总是能立刻拿到锁,然后尽快访问数据,用完之后尽快解锁,这样才能不影响并发性和性能。 如果需要等待某个条件成立,我们应该使用条件变量。条件变量顾名思义是 ......
Chapter03_学习
# 多线程服务器常用的编程模型及适用场合 ## 线程与进程 * 先区分下线程和进程的概念,一个进程是内存中正在运行的程序,每个进程都有自己独立的地址空间,Linux操作系统通过 `fork()` 系统调用产生进程。 * 线程的特点是共享地址空间,从而可以高效地共享数据。一台机器上的多个进程能够高效地 ......
SystemVerilog for Design Edition 2 Chapter 6
## SystemVerilog for Design Edition 2 Chapter 6 The Verilog language provides a general purpose procedural block, called always, that is used to model ......
SystemVerilog for Design Edition 2 Chapter 5
## SystemVerilog for Design Edition 2 Chapter 5 SystemVerilog adds several enhancements to Verilog for representing large amounts of data. The Verilog ......
Professional C++阅读笔记 chapter 29 Writing Efficient C++
# chapter 29 Writing Efficient C++ 1. 作者建议将所有class function包括析构函数 但是除了构造函数,都设为virtual的,因为virtual function的开销非常小 2. design 和 algrithm 比语言层面的优化重要太多 3. 在 ......
C++ Primer 5th Edition, Chapter 2, Solutions
Exercise 2.1 Questions What are the differences between int, long, long long, and short? Between an unsigned and a signed type? Between a float and a ......
SystemVerilog for Design Edition 2 Chapter 3
SystemVerilog for Design Edition 2 Chapter 3 SystemVerilog extends Verilog’s built-in variable types, and enhances how literal values can be specified ......
SystemVerilog for Design Edition 2 Chapter 2
SystemVerilog for Design Edition 2 Chapter 2 SystemVerilog Declaration Spaces Verilog only has limited places in which designers can declare variables ......
SystemVerilog for Design Edition 2 Chapter 1
SystemVerilog for Design Edition 2 Chapter 1 Introduction to SystemVerilog: This chapter provides an overview of SystemVerilog. The topics presented i ......
Think Python-How to Think Like a Computer Scientist_chapter4_练习 4-3
# coding=gbk import math import turtle bob = turtle.Turtle() print(bob) def pie(t,r,n): """画一个包含 n 个三角形的饼图。 t:Turtle object r:三角形腰长 n:包含几个三角形或几边形 """ ......
a little schemer chapter 9 Y组合算子
内容参照 相关阅读推荐 首先是递归获得阶乘的例子 (define f (lambda (x) (cond ((= x 1) 1) (else (* x (f (- x 1))))))) 对应的lambda (f): (lambda (f) (lambda (x) (cond ((= x 1) 1) ......
Chapter4 朴素贝叶斯案例
朴素贝叶斯案例:过滤垃圾邮件 1. 案例的流程 示例:使用朴素贝叶斯对电子邮件进行分类 (1)收集数据:提供文本文件。 (2)准备数据:将文本文件解析成词条向量。 (3)分析数据:检查词条确保解析的正确性。 (4)训练算法:使用我们之前建立的trainNB0()函数。 (5)测试算法:使用class ......
Numerical Approximation Chapter 6 Notes
Weierstrass theorem approximation之间也有高低,所以我们在compact subset里面会有best approximation. 但是以polynomial interpolation为例,随着不断选更多的Chebyshev interpolation point ......
Serre算术教程Chapter 5笔记
二次型的范畴论定义 考虑这样一个范畴$S_n$,由一些free abelian group of rank $n$ $E$组成 Definition of free abelian group 一个有basis的abelian group. 这里basis就是那个基的意思,every element ......
Chapter4 朴素贝叶斯
朴素贝叶斯 1. 简介 朴素贝叶斯是一种基于概率论的分类方法。它主要借助条件概率和贝叶斯公式来对样本进行分类。 2. 优缺点 朴素贝叶斯优点:在数据较少的情况下仍然有效,可以处理多类别问题。 缺点:对于输入数据的准备方式较为敏感。 适用数据类型:标称型数据。 3. 条件概率与贝叶斯公式 在介绍朴素贝 ......
Chapter3 决策树案例
决策树案例-预测隐形眼镜类型 1. 步骤 示例:使用决策树预测隐形眼镜类型 (1)收集数据:提供的文本文件。 (2)准备数据:解析tab键分隔的数据行。 (3)分析数据:快速检查数据,确保正确地解析数据内容,使用createPlot()函数绘制最终的树形图。 (4)训练算法:使用3.1节的creat ......
AtCoder Regular Contest 106 F Figures
洛谷传送门 AtCoder 传送门 晚自习的时候胡出来的做法((( 首先你会发现题目等价于求 $\sum\limits_{(\sum\limits_{i=1}^n a_i) = 2(n-1) \land \forall i \in [1,n], 1 \le a_i \le d_i} \prod\li ......
Chapter3 绘制决策树
绘制决策树 1. 概述 我们在上个博客已经学会使用代码来构造决策树了。但是,为了让构造出来的决策树具有可读性,我们还需要绘制决策树。 2. 设定样式 # 该代码的作用是设定节点和箭头的样式 # 该代码位于treePlotter.py文件中 import matplotlib.pyplot as pl ......
Chapter5 注解
注解 import matplotlib.pyplot as plt import numpy as np x = np.linspace(-3,3,50) y = 2*x+1 plt.figure(num=1,figsize=(8,5),) plt.plot(x,y,) ax = plt.gca( ......
Chapter4 图例
Chapter4 图例 图例的作用就是对所绘制的图像,进行解释。 import matplotlib.pyplot as plt import numpy as np x = np.linspace(-3,3,50) y1 = 2*x+1 y2 = x**2 plt.figure() # 设置x轴的 ......
Serre算术教程Chapter 4笔记
考虑在交换环上的模$V$ Definition of module 相当于向量空间的扩展形式,不要求在域上面定义. module包含一个交换群$(M,+)$向量 以及$\cdot:R\times M\rightarrow M$标量乘法. 满足:结合律,分配律和$1_R\cdot x=x$ 定义一个函 ......
Chapter3 设置坐标轴
Chapter3 设置坐标轴 import matplotlib.pyplot as plt import numpy as np x = np.linspace(-3,3,50) y1 = 2*x+1 y2 = x**2 plt.figure() plt.plot(x,y2) plt.plot(x ......
Chapter2 figure 基本用法
figure 基本用法 import matplotlib.pyplot as plt import numpy as np # figure 可以理解为表示图像的窗口 # 我们可以创建多个窗口 # 该代码的作用就是将每一个函数都分别显示在单独的figure中 x = np.linspace(-3, ......
Chapter1 Matplotlib 基本用法
Chapter1 Matplotlib 基本用法 import matplotlib.pyplot as plt import numpy as np # 作为序列生成器, numpy.linspace()函数用于在线性空间中以均匀步长生成数字序列。 # array = numpy.linspace ......
Chapter3 决策树
决策树 1. 定义 上述图片就是一个决策树。其中,长方形代表判断模块,椭圆形代表中止模块。从判断模块引出的左右箭头叫做树的分支。它可以到达另外一个判断模块和中止模块。 2. 优缺点 优点:计算复杂度不高,输出结果易于理解,对中间值的缺失不敏感,可以处理不相关特征数据。 缺点:可能会产生过度匹配问题。 ......
深入浅出神经网络与深度学习 (迈克尔·尼尔森(Michael Nielsen)) Chapter1
1.1 感知机perceptron 20 世纪五六十年代,科学家Frank Rosenblatt 发明了感知机,其受到了 Warren McCulloch 和 Walter Pitts 早期研究的影响。 what's weighted sum in perceptron? In the contex ......