原创 awk sed等神奇使用備忘

1、打印文本第一行                           :awk 'NR==1{print}' filename 2、打印文本第二行第一列                 :sed -n "2, 1p" filename

原创 JAVA繪製圖像並繪製不同字體符號

用JAVA實現的一段代碼,繪製圖像,並添加不同字體的glyph。 String imgPath = "./data/imgs/"; String imgName = "tryDrawFontGlyph.png";

原创 pdfbox 創建pdf文檔

pdfbox創建pdf文檔,hello world! 記下代碼: public class CreatPdfFile {     /**      * @param args      * @throws IOException    

原创 How to concatenate two matrices in Python?

The scipy.sparse module includes the functions hstack and vstack. For example: In [44]: import scipy.sparse as sp

原创 centOS郵件提醒

centos下默認在收到收件是會在執行命令後顯示提示 “You have new mail in /var/spool/mail/root” ,  可以通過在~/.bashrc文件中添加如下腳本,來禁止此消息的顯示: unset MA

原创 python 矩陣隨機生成

Generate a sparse matrix Generate a sparse matrix of the given shape and density with uniformly distributed values. s

原创 python Sparse matrices 單位矩陣

identity(n[, dtype, format]) Identity matrix in sparse format Returns an identity matrix with shape (n,n) using a given

原创 Save / load scipy array,sparse csr_matrix

A csr_matrix has 3 data attributes that matter: .data, .indices, and .indptr. All are simple ndarrays, so numpy.sav