- 博客(8)
- 资源 (1)
- 收藏
- 关注
原创 ubuntu中运行jupyter notebook创建Python文件的时候报错
创建Python文件的时候遇到下面的错误:Creating Notebook Failed An error occurred while creating a new notebook. Unexpected error while saving file: arma/Untitled.ipynb [Errno 13] Permission denied: ‘/home/wang/.local
2017-04-29 16:06:31 14263 1
原创 Ubuntu安装anaconda
具体安装步骤:https://www.howtoing.com/how-to-install-the-anaconda-python-distribution-on-ubuntu-16-04/1、下载好安装包之后直接进入目录运行: bash Anaconda3-4.2.0-Linux-x86_64.sh2、之后一直输入 yes 即可 3、输入以下命令以激活安装 source ~/.bashr
2017-04-29 15:38:43 1809
原创 python3.5中urlopen出错
在Python3.5中urllib已经被整合了 具体官方文档: a new urllib package was created. It consists of code from urllib, urllib2, urlparse, and robotparser. The old modules have all been removed. The new pac
2017-04-16 10:49:13 3114
原创 Python中实现字符串翻转
第一种:切片 def reverse_string_by_word(s): lst = s.split() # split by blank space by default return ’ ‘.join(lst[::-1])s = ‘Power of Love’ print reverse_string_by_word(s) … Love of Powers = ‘Hello Wo
2017-04-15 16:35:24 1209
原创 Python 如何打开.pkl文件
.pkl 文件是Python保存的一种数据文件,其正确打开方式:import cPickle as pickle f = open('path') info = pickle.load(f) print info #show file
2017-04-15 15:14:28 27876 3
原创 django.core.exceptions.ImproperlyConfigured: No DjangoTemplates backend is configured.
Python中使用template模板创建template时,报错,原因以及修改方法: 1**.必须是在一个django 项目目录下使用python manage.py shell 而不能随便在某一个目录下使用ipython 或者python 进入shell界面。**wang@ubuntu:/home/wpython/blog$ python manage.py shell Python 3.
2017-04-08 10:58:16 2548
原创 pycharm中创建运行django
1>file —–new project..—-选择django 2> 选择Edit configurations —–script:选择manage.py所有在的目录, script parameters : runserver 3>添加应用:tools–>run manage.py Task——-在控制台写:startapp blog (创建一个名称为blog的应用) 4>对项目数据进
2017-04-08 10:54:04 2060
转载 python中正则表达式
http://www.cnblogs.com/huxi/archive/2010/07/04/1771073.html要匹配一个模式,前后的数字块是相同的,中间是字母,比如111aadf111这就用正则表达式中的反向引用首先要定义一个模式,并给其定义id(?P...),比如 (?P\d+)反向引用就是(?P=nameId),比如(?P=mytag)可以这样做,(?P
2017-04-04 13:44:04 1236
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人