- 博客(9)
- 收藏
- 关注
原创 NVCC简单学习
1、NVCC Identification Macro 预定义的宏,并且给出NVCC的版本号 nvcc predefines the following macros: NVCC Defined when compiling C/C++/CUDA source files. CUDACC Defined when compiling CUDA source files. CUDACC_
2017-01-25 19:41:57 3657
原创 C++11标准——变长参数模板
举个栗子 test.cpp#include<iostream>#include<vector>using namespace std;int SetDims(vector<int> temp){ int size=1; for(int i = 0; i < temp.size(); ++i){ size*=temp[i]; } return size;}int S
2017-01-08 13:44:39 647
原创 python 简单文本汉字提取
# -*- coding: utf-8 -*-"""Created on Fri Jan 6 11:17:32 2017@author: yang"""fid = open('./file.txt')fidw = open('./file_save.txt','w')lines = fid.readlines()character = {}exclude = ['','','”'
2017-01-06 15:23:50 4802
原创 python property 简单使用
def minus(self): self.id-=1.0 self.name='temp3'@property def my_name(self): return self.name@property def my_id(self): return self.idclass man: id=1.0 name='temp1' d
2017-01-06 10:32:20 343
原创 python easydict 简单使用
#在这里面.和[]的作用和效果都是一样的from easydict import EasyDict as edicttemp = edict()temp.train = edict()temp.test = edict()temp.train.val = 1.0temp.test.val = 1.0#调用temp.traintemp.testtemp.train.valtemp
2017-01-05 10:39:55 9105
原创 python pkl 文件读写
import cPickle as picklefr = open('filename')inf = pickle.load(fr)fr.close()
2017-01-05 10:17:31 31729 2
原创 python 数据转 voc xml
# -*- coding: utf-8 -*-"""Created on Tue Jan 3 15:40:29 2017@author: yang"""from xml.dom.minidom import Documentdef save_to_xml(save_path, im_width, im_height, im_depth, objects_axis, label_name):
2017-01-03 20:09:35 2420 6
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人