- 博客(14)
- 收藏
- 关注
原创 ubuntu安装xgboost
sudo pip install xgboost有时不是sudo用户,提示错误,并且卡住不运行The directory '/home/jiyuan/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check
2016-08-31 11:49:32 325
转载 ubuntu安装pip
Ubuntu14.04上安装pip的方法在Ubuntu14.04上,建议通过下面的方法安装,这是一种通用的方法,也适用于Windows,当然在Windows下手动下载下来就行了wget https://bootstrap.pypa.io/get-pip.py --no-check-certificatesudo python get-pip.py 如果在Ubun
2016-08-31 11:28:31 2336
转载 ubuntu安装gensim
1. 安装依赖库:Python >= 2.6. Tested with versions 2.6, 2.7, 3.3 and 3.4. Support for Python 2.5 was discontinued starting gensim 0.10.0; if you must use Python 2.5, install gensim 0.9.1.NumPy >= 1.3.
2016-08-31 11:13:38 1194
转载 python 安装jieba...
1.安装Python的GUI(IDLE)自认为python的GUI还是比较好用的,所以在Ubuntu14.04上进行了尝试。ubuntu默认安装好了python,但是并没有安装IDLE需要我们使用简单的命令:sudo apt-get install idle2.安装中文分词工具结巴(jieba)最近在做数据挖掘的作业,要用到jieba,所以不得不安装。github上的安装方法并不能正确
2016-08-30 19:51:49 6829
转载 Python os.path常用操作
Python: os.path —常用路径名操作这个模块实现了操作路径名的常用的函数。读写文件参见open(),访问文件系统参见os模块。注意在Windows上,许多函数不能正确的支持UNC路径名。splitunc()和ismount()可以正确的处理它们。和Unix shell不一样,Python不做任何自动的路径扩展。当应用需要shell一样的路径扩展的功能,可
2016-08-29 15:47:27 22684
原创 python df.mode()
Parameters: axis : {0 or ‘index’, 1 or ‘columns’}, default 00 or ‘index’ : get mode of each column1 or ‘columns’ : get mode of each rownumeric_only : boolean, default Falseif True, only apply to num
2016-08-29 15:36:54 8495
原创 python dataframe的索引
df.loc[index,columns]df.iloc[i,j] 数值df.ix[ ] 数值和字符都可以的混合索引
2016-08-22 11:06:43 1230
原创 python判断文件是否存在,是否为空,然后写入
# 将每次运行的KS值存入一个文件,每次运行时加入文件,再读取文件画出连续一些天数的ks曲线图 if os.path.exists('./ks_accumulate.csv'): if os.path.getsize('./ks_accumulate.csv'): print('文件存在且不为空') ks_temp.t
2016-08-18 11:22:08 39595 1
原创 sql中的union用法
union前后可以连接两个select语句,列数需要一样,可以上下拼接select 2 as 'a'unionselect 3 as'b'得到: a1 22 3
2016-08-11 17:42:41 661
原创 python中pd.read_sql()读取多个select后得到多个datafram
def ExceQuery(sql, database, chunksizes): engine = create_engine(database) if chunksizes == None: df_list = pd.read_sql(sql, engine) else: df_list = [] for
2016-08-11 17:39:17 14484
原创 Python画图基本方法总结
import pandas as pdimport numpy as npfrommatplotlib.ticker import MultipleLocator, FormatStrFormatterimport matplotlib as mpl# matplotlib.use('Agg')import matplotlib.pyplot as plt
2016-08-11 17:34:29 16847
转载 ubuntu忘记密码,开机时重新设置密码的方法
修改GRUB进入单用户模式修改密码重启ubuntu系统,开机时长按shift按键进入GRUB菜单,选择第二个高级模式。(不同版本可能按键不一样,可以根据界面提示最下面的提示操作,可能是F2,ESC)在高级模式中选择Recovery mode模式,键盘按键E进入编辑模式。(直接按e,不要手快按enter键)关键步骤:在编辑模式中寻找RO修改为RW模
2016-08-11 16:36:59 1736
原创 ubutu 将svn上的文件同步到自己的文件夹下面
svn check out(同步)1. ubutu 打开teminal【将mobile同步到/home下】2. 输入 svn co http://svn.corp.ppdai.com:8080/svn/RiskTeam/mobile/3. 输入用户名4. 密码5. 或者【svn co http://111.1111.111.11:8080/a/b/c,need username
2016-08-11 16:23:20 254
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人