http://traefik.cn
docker
gitlab CI/CD
https://docs.gitlab.com/ee/ci/README.html
python 单元测试
unittest
https://docs.python.org/2/library/unittest.html
A testcase is created by subclassing unittest.TestCase. The three individual tests are defined with methods whose names start with the letters test. This naming convention informs the test runner about which methods represent tests.
The crux of each test is a call to assertEqual() to check for an expected result; assertTrue() or assertFalse() to verify a condition; or assertRaises() to verify that a specific exception gets raised. These methods are used instead of the assert statement so the test runner can accumulate all test results and produce a report.
The setUp() and tearDown() methods allow you to define instructions that will be executed before and after each test method. They are covered in more detail in the section Organizing test code.
The final block shows a simple way to run the tests. unittest.main() provides a command-line interface to the test script. When run from the command line, the above script produces an output that looks like this:
PCA – 数据降维
原数据,2维:(3,4),(6,8)
新数据,2维:(5,0), (10,0)
最终简化为一维:5, 10
从几何来理解,就是坐标轴的旋转。
这里降维的理由:所有的点实际上都是分布在y=(4/3)X这条斜线上的。
related posts:
1. http://www.iro.umontreal.ca/~pift6080/H09/documents/papers/pca_tutorial.pdf
2. https://stats.stackexchange.com/questions/90331/step-by-step-implementation-of-pca-in-r-using-lindsay-smiths-tutorial
3. http://www.cnblogs.com/pangxiaodong/archive/2011/10/15/2212786.html
excel求和函数(=sum)失真
当我选择单元格格式为常规的时候,一组显然等于0的数字相加,不等于0。
0.49 |
-1.21 |
0.99 |
0.29 |
1.09 |
0.79 |
-0.31 |
-0.81 |
-0.31 |
-1.01 |
3.55271E-16 |