vscode python头部注释及代码片段

{
    
    
	"HEADER":{
    
    
		"prefix": "header",
		"body": [
		"#!/usr/bin/env python",
		"# -*- encoding: utf-8 -*-",
		"'''",
		"@File    :   $TM_FILENAME",
		"@Time    :   $CURRENT_YEAR/$CURRENT_MONTH/$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
		"@Author  :   manman",
		"@Contact :   [email protected]",
		"@Department   :  my-self",
		"@Desc    :   None",
		
		"'''",
		"",
		"# here put the import lib",
		"$0"
		],
	},
	"function": {
    
            
		"prefix": "function",        
		"body": [            
		"\"\"\"",            
		"@description  :",            
		"\r\r",            
		"@param  : ",            
		"-------",            
		"@Returns  :",            
		"\r\r",           
		"\"\"\"",            
		"",
		"$0"        
		],
	},
	//"COMMENT":{
    
    
    //    "prefix": "codecomment",
    //    "body": [
    //        "'''description",
    //        "$0",
    //        "Args:",
    //        "    param name (param type): describe the param",
    //        "$0",
    //        "Returns:",
    //        "    type: description",
    //        "'''"
    //    ],
    //},

    "COMMENT":{
    
    
         "prefix": "codecomment",
         "body": [
         "def $1($2):",
         "    \"\"\"",            
		 "    @description  :",            
		 "\r\r",            
		 "    @param  : ",            
		 "\r\r",            
		 "    @Returns  :",            
		 "\r\r",           
		 "\"\"\"",            
		 "",
		 "$0"        
	 ],
	},
	"":{
    
    
		"prefix": "codelambda",
		"body": [
		"\r\r ",
		"'''description :'''",
		"= lambda param : ",
		"\r\r"

		],
	},
	"":{
    
    
		"prefix": "code_import_for_linux_tools_project",
		"body": [
		"\r\r ",
		"import sys",
		"from os.path import expanduser",
		"from os import sep",
		"# 加载自定义模块",
		"project = \"{}{}{}\".format(expanduser(\"~\"),sep,\"linux_tools_for_chinese\")",
		"sys.path.append(project)",
		"# 加载各模块位置",
		"from file_tools import ml_model_dir, search_moduel_dir, data_preprocessing_dir, python_functional_script_dir, bash_functional_script_dir, data_structure_dir, question_data_dir, math_module_dir,info_table,onehot_matrix_static_list,word_frequency_of_each_articles_static_table,eigenvector_static_table,feature_static_dictionary,feature_static_vector,static_cache_dir",
		"# 加载机器学习模块",
		"sys.path.append(ml_model_dir)",
		"\r",
		"# 加载数据预处理模块",
		"sys.path.append(data_preprocessing_dir)",
		"\r",
		"# 加载数据结构模块",
		"sys.path.append(data_structure_dir)",
		"\r",
		"# 加载数学模块",
		"sys.path.append(math_module_dir)",
		"\r\r"
		],
	},
}


猜你喜欢

转载自blog.csdn.net/weixin_43069769/article/details/109440462