如何在Linux里实现黑客帝国矩阵效果(对外装13利器(*^_^*))

 效果图

 

 


 前言

想必大家在一些影视中会看到过黑客这类人的电脑中总是绿色的字母、符合在哗啦啦向下坠的炫酷状态,以至于在之前对黑客的刻板印象就是这个图,但实际学了一点东西后发现实现这样的状态其实很简单(而且会不会这个跟是不是黑客一点关系都没有),仅仅只需要安装一些源码包即可,这里本monkey拍着胸脯告诉你,一定能教会你实现这个非常简单的小技术。


实际操作:linux-安装cmatrix

1、安装aalib

第一步,安装源码包。打开终端,输入wget https://nchc.dl.sourceforge.net/project/ aa-project/aa-lib/1.4rc5/aalib-1.4rc5.tar.gz

当出现安装的语句时即正确,这是输入ls便能看见你所安装好的压缩包。

第二步,解压压缩包。输入tar -zxvf  aalib-1.4rc5.tar.gz这时会出现一大段东西,而且输入ls后也就能看见解压好后的目录,这时输入cd aalib-1.4.0/进入到该目录即可。

第三步,安装对应源码包的程序。输入./configure来定制组件(从下往上出现creating Makefile即可),接着输入make来生成程序,最后输入make install安装即可。

2、安装aview(安装步骤基本同上)

第一步,安装源码包。输入wget http://prdownloads.sourceforge.net/aa-project/aview-1.3.0rc1.tar.gz

第二步,解压压缩包。输入tar -zxvf aview-1.3.0rc1.tar.gz 再输入cd aview-1.3.0 进入该目录。

三步,安装对应源码包的程序。分别输入./configure       make      make install 即可

3、安装ImageMagick

第一步,安装前置文件。想要安装这个源码包得先安装他的前置文件(扩展源EPEL),只需要输入yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm即可安装该前置。

第二步,直接安装文件。输入yum install ImageMagick和yum install ncurses-devel便可以安装。

4、安装cmatrix(安装步骤同 1、2)

第一步,安装源码包。输入wget https://jaist.dl.sourceforge.net/project/cmatrix/cmatrix/1.2a/cmatrix-1.2a.tar.gz 

第二步,解压压缩包。输入tar -zxvf cmatrix-1.2a.tar.gz

三步,安装对应源码包的程序。分别输入./configure       make      make install 即可。

可能出现的错误:
1 cmatrix.c:86 :对 ‘curs_set’ 未定义的引用
报错:致命错误: curses.h :没有那个文件或目录
原因:主要因为系统中没有找到 ncurses-devel 软件包
解决: yum install -y ncurses-devel
2 cmatrix.c:516 :对 ‘LINES’ 未定义的引用
报错: make: *** [cmatrix] 错误 1
原因:需要的包都安装了,可能是软件配置时出现了问题
解决:删除该目录,重新解压,重新配置

运行黑客帝国效果

第一种:原版绿色下坠字幕。输入cmatrix即可。

第二种:可调节颜色的下坠字幕。输入cmatrix -b -u 3 -C blue(颜色的英文名)   即可。其中包含的颜色如图

  • 27
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Introduction ============ This is a class for symmetric matrix related computations. It can be used for symmetric matrix diagonalization and inversion. If given the covariance matrix, users can utilize the class for principal component analysis(PCA) and fisher discriminant analysis(FDA). It can also be used for some elementary matrix and vector computations. Usage ===== It's a C++ program for symmetric matrix diagonalization, inversion and principal component anlaysis(PCA). To use it, you need to define an instance of CMatrix class, initialize matrix, call the public funtions, and finally, free the matrix. For example, for PCA, CMarix theMat; // define CMatrix instance float** C; // define n*n matrix C = theMat.allocMat( n ); Calculate the matrix (e.g., covariance matrix from data); float *phi, *lambda; // eigenvectors and eigenvalues int vecNum; // number of eigenvectors (<=n) phi = new float [n*vecNum]; lambda = new float [vecNum]; theMat.PCA( C, n, phi, lambda, vecNum ); delete phi; delete lambda; theMat.freeMat( C, n ); The matrix diagonalization function can also be applied to the computation of singular value decomposition (SVD), Fisher linear discriminant analysis (FLDA) and kernel PCA (KPCA) if forming the symmetric matrix appropriately. For data of very high dimensionality (n), the computation of nxn matrix is very expensive on personal computer. But if the number m of samples (vectors) is smaller than dimenionality, the problem can be converted to the computation of mxm matrix. The users are recommended to read the paper KPCA for how to form mxm matrix: B. Sch枚lkopf, A. Smola, K.-R. M眉ller. Nonlinear component analysis as a kernel eigenvalue problem, Neural Computation, 10(5): 1299-1319, 1998. Example ======= Refer to `example' directory for a simple demonstration.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值