Don't repeat yourself

简介:   今天工作上要测试不同版本mysql在不同系统的速度,学习了怎么源码安装mysql后,就开始敲命令安装和编译执行测试程序。   这么走了两遍后,想起一句话——当一件事重复做三遍后,要考虑把它工具化,自动化。

  今天工作上要测试不同版本mysql在不同系统的速度,学习了怎么源码安装mysql后,就开始敲命令安装和编译执行测试程序。

  这么走了两遍后,想起一句话——当一件事重复做三遍后,要考虑把它工具化,自动化。

  于是我决定开始动手写脚本。

  mysql的安装过程,虽然命令挺多,但一一写在脚本里是很简单的事情,然后是创建测试用的数据库,这个我不会,不过百度一下也很简单。

  写好脚本后,工作就轻松许多。所以呀,不要去做那些重复的事,多思考自己的工作,寻找更高效的解决方法。

  准备开始看《程序员修炼之道》。

目录
打赏
0
0
0
0
3
分享
相关文章
Warning: Don’t paste code into the DevTools Console that you don’t understand or haven’t reviewed yo
Warning: Don’t paste code into the DevTools Console that you don’t understand or haven’t reviewed yo
Avoid mutating a prop directly since the value will be overwritten whenever the parent comp
Avoid mutating a prop directly since the value will be overwritten whenever the parent comp
flag_in_your_hand
flag_in_your_hand
67 0
【完美解决】RuntimeError: one of the variables needed for gradient computation has been modified by an inp
将loss.backward()函数内的参数retain_graph值设置为True, loss.backward(retain_graph=True),如果retain_graph设置为False,计算过程中的中间变量使用完即被释放掉。
1969 0
RuntimeError: Integer division of tensors using div or / is no longer supported, and in a future rel
RuntimeError: Integer division of tensors using div or / is no longer supported, and in a future rel
133 0
syntax error, expect {, actual [, pos 0 at
syntax error, expect {, actual [, pos 0 at
270 0
error: implicit declaration of function ‘RAND_egd’ [-Werror=implicit-function-declaration]
error: implicit declaration of function ‘RAND_egd’ [-Werror=implicit-function-declaration]
159 0
解决RuntimeError: running_mean should contain 36864 elements not 4096
一般在卷积层Conv2d后添加正则化BNBatchNormal,使得数据在relu激活前不会因为数据过大而导致网络不稳定,而我在代码中BatchNorm2d的输入通道数与前一层Conv2d的输出通道数不一致,导致报这个错,两者修改一直即可(这里修改为36864即可)。
1051 0
Uncaught ReferenceError: Invalid left-hand side in assignment
Uncaught ReferenceError: Invalid left-hand side in assignment
474 0
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等