Calculus

I can’t stand my poor math anymore, and start to re-learn math from calculus.

This notes will record some formulas and anything intersting about calculus.

Trigonometry

ASTC method

ASTC method

Trig Identities

$$ \begin{array}{l} cos^2(x) + sin^2(x) =1 \\
1 + tan^2(x) = sec^2(x) \end{array} $$

$$ \begin{array}{ll} sin(A+B) & = & sin(A)cos(B) + cos(A)sin(B) \\
cos(A+B) & = & cos(A)cos(B) - sin(A)sin(B) \\
sin(2x) & = & 2 sin(x) cos(x) \\
cos(2x) & = & 2 cos^2(x) - 1 = 1 - 2 sin^2(x) \end{array} $$


Linear Algebra

Linear Algebra notes.

Matrix multiplication

The origin of matrix multiplication

参考:数学家最初发明行列式和矩阵是为了解决什么问题? - 马同学的回答 - 知乎

最初目的:解线性方程组

举例:\(YC_rC_b \to RGB\)

  • 黑白电视到彩色电视
    • 兼容问题
    • \(Y\): 灰度图
$$ \begin{cases} 0.299R + 0.587G + 0.114B = Y \\ 0.500R - 0.419G - 0.081B + 128 = C_r \\ -0.169R - 0.331G + 0.500B + 128 = C_b \end{cases} $$


Color

We live in a colorful world, but color isn’t that simple. This article will introduce some knowledges of color, including:

  • How does human recognize colors
  • Different color space


CSGO

My favorite game - Counter Strike: Global Offensive.


Adobe

In this article, you will see:

  • Shortcuts of Photoshop and Illustrator
  • Some tricks
  • Highly recommended materials for learning


Data Augmentation

Data augmentation is the process of increasing the size of a dataset by transforming it in ways that a neural network is unlikely to learn by itself.

After reanding this post, you will know:

  • Common data augmentation methods.
  • Image augmentation with imgaug.
  • Popular tools for data augmentation.


Metrics

Sometimes it’s hard to tell the differences between precision, accuracy, recall and so on especially for newbees like me.

But let’s try to distinguish them with stories. In this article, you will see some common used metrics, including:

  • Metrics for binary classification: accuracy, precision, reacall, f1-score and so on


CSS

Quick notes

Safe fonts

A complete collection of web safe CSS font stacks.

Add two common fonts for Chinese characters: PingFang SC, Microsoft YaHei.

$font-family-serif:           Palatino, Georgia, "Times New Roman", "PingFang SC", "Microsoft YaHei", serif !default;
$font-family-sans-serif:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;

Difference between Serif and Sans Serif

See this great inforgraphic: The Difference Between Serif And Sans-Serif Explained In One Infographic

Serif (left) and Sans Serif (right)


JavaScript

This is a note about JavaScript.

Quick notes

Ignore SSL issue

Error: (node:99469) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error: Hostname/IP doesn’t match certificate’s altnames: “IP: <ip> is not in the cert’s list: “

https://github.com/axios/axios/issues/535

https = require('https')
axios = require('axios')

// At instance level
const instance = axios.create({
  httpsAgent: new https.Agent({  
    rejectUnauthorized: false
  })
});
instance.get('https://something.com/foo');

// At request level
const agent = new https.Agent({  
  rejectUnauthorized: false
});
axios.get('https://something.com/foo', { httpsAgent: agent });


黄酒

我知道你为什么不喝黄酒

黄酒是用稻谷酿造的,稻谷本不含糖,必须要将淀粉转化为糖,然后再把糖发酵成酒精,而帮助稻谷糖化并发酵的就是曲。

酿造工艺

  1. 浸米
  2. 蒸米
  3. 落缸,根据不同的风格,用不同方式投入米、麦曲、酒药、水等各种原料,等待酒发酵。
  4. 开粑,发酵过程中温度会提升,酵母就不再作用了,必须由酿酒师把酒醪表面的漂浮物铲下去,从而起到降温的作用。开耙师傅是匠人,不同的时间点开耙都会酿出风格截然不同的酒。
  5. 装坛
  6. 压榨,从小坛中倒出黄酒,过滤、压榨、澄清、杀菌,每一个步骤都有利于增加黄酒的保质期,但是都会损失一部分风味。
  7. 装瓶

【李子柒】我这儿有清香甘甜的荷花酒,你有故事吗?