<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Python_bh的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/Python_bh</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; Python_bh]]></copyright><item><title><![CDATA[sublime3的下载与使用]]></title><link>https://blog.csdn.net/Python_bh/article/details/116354907</link><guid>https://blog.csdn.net/Python_bh/article/details/116354907</guid><author>Python_bh</author><pubDate>Sun, 02 May 2021 17:02:59 +0800</pubDate><description><![CDATA[一 官方链接

http://www.sublimetext.cn/

二 下载

window可直接去软件管理下载

三 使用

使用Package Control安装插件

以安装WordHighlight为例

1安装插件：首选项--&gt;Package Control--&gt;WordHighlight

2 配置 ：Preferences -&gt; Package Settings-&gt;Settings-User


{
    "draw_outlined": false,
   ..]]></description><category></category></item><item><title><![CDATA[爬虫---生成随机的UA]]></title><link>https://blog.csdn.net/Python_bh/article/details/115800904</link><guid>https://blog.csdn.net/Python_bh/article/details/115800904</guid><author>Python_bh</author><pubDate>Sat, 17 Apr 2021 20:21:53 +0800</pubDate><description><![CDATA[随机生成UA伪装

## 安装所需要的包 pip install fake_useragent

from fake_useragent import UserAgent
USER_AGENT = UserAgent().random # 随机生成UA伪装
]]></description><category></category></item><item><title><![CDATA[计算机 常用系统命令 Linux-window]]></title><link>https://blog.csdn.net/Python_bh/article/details/115800821</link><guid>https://blog.csdn.net/Python_bh/article/details/115800821</guid><author>Python_bh</author><pubDate>Sat, 17 Apr 2021 20:16:42 +0800</pubDate><description><![CDATA[1Python isdigit() 方法检测字符串是否只由数字组成。
2re /d 0-9的数字  /w [A-Za-z0-9]
3 # window
dir 查看某一文件夹下的子文件夹或子文件名
ipconfig:查看本地网卡的ip信息
tasklist :查看运行的结果
4 print(hasattr(sys.modules[__name__],'A')) 当前模块的对象映射
5print(dir()) # 查看名称空间


1on_delete=models.CASCADE
2url(r'^', i.]]></description><category></category></item><item><title><![CDATA[Pycharm 中使用git]]></title><link>https://blog.csdn.net/Python_bh/article/details/115799265</link><guid>https://blog.csdn.net/Python_bh/article/details/115799265</guid><author>Python_bh</author><pubDate>Sat, 17 Apr 2021 18:09:37 +0800</pubDate><description><![CDATA[pycharm 使用GIt
1 clone代码
VCS----&gt;Get from Version Control--&gt;URL(复制远程地址)
2 进行编辑代码
3Commit 提交代码，生成版本
4 推送代码
VCS--&gt;git--&gt;Push（快捷键Ctrl +Shift+K）
5 拉取代码


其他相关命令

# 查看当前所在版本
git reset --hard

# 去除git版本控制
find . -name ".git" | xargs rm -Rf

git init..]]></description><category></category></item><item><title><![CDATA[django Django解决中文显示\u5....]]></title><link>https://blog.csdn.net/Python_bh/article/details/115669805</link><guid>https://blog.csdn.net/Python_bh/article/details/115669805</guid><author>Python_bh</author><pubDate>Tue, 13 Apr 2021 15:36:15 +0800</pubDate><description><![CDATA[1将数据转化为Json格式
2 解决中文乱码的问题
from django.http import JsonResponse


def query_valid(cls, request):
    task_id = request.GET.get('task_id')
    data =TcLabeled.objects.filter(task_id=task_id,user='valid').values('labels')
    data =list(data)
 ...]]></description><category></category></item><item><title><![CDATA[去除git版本控制]]></title><link>https://blog.csdn.net/Python_bh/article/details/115582682</link><guid>https://blog.csdn.net/Python_bh/article/details/115582682</guid><author>Python_bh</author><pubDate>Sat, 10 Apr 2021 19:27:40 +0800</pubDate><description><![CDATA[去除git版本控制

命令：find . -name ".git" | xargs rm -Rf


]]></description><category></category></item><item><title><![CDATA[Gitte (https://gitee.com/) 常用git指令--实例]]></title><link>https://blog.csdn.net/Python_bh/article/details/115540277</link><guid>https://blog.csdn.net/Python_bh/article/details/115540277</guid><author>Python_bh</author><pubDate>Fri, 09 Apr 2021 10:33:25 +0800</pubDate><description><![CDATA[简易的命令行入门教程:

Git 全局设置:


git config --global user.name "华王"
git config --global user.email "huawang400@gmail.com"

创建 git 仓库:


mkdir suwen
cd suwen
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote add originhttps://gitee.]]></description><category></category></item><item><title><![CDATA[centos7跑django3 sqlite3 问题]]></title><link>https://blog.csdn.net/Python_bh/article/details/115205837</link><guid>https://blog.csdn.net/Python_bh/article/details/115205837</guid><author>Python_bh</author><pubDate>Thu, 25 Mar 2021 12:35:37 +0800</pubDate><description><![CDATA[使用django3.X版本在centos7系统运行抛错




# [django can't find new sqlite version? (SQLite 3.8.3 or later is required (found 3.7.17))](https://stackoverflow.com/questions/55674176/django-cant-find-new-sqlite-version-sqlite-3-8-3-or-later-is-required-found)


刚刚开始抛当.]]></description><category></category></item><item><title><![CDATA[Nginx快速入门]]></title><link>https://blog.csdn.net/Python_bh/article/details/114718772</link><guid>https://blog.csdn.net/Python_bh/article/details/114718772</guid><author>Python_bh</author><pubDate>Sat, 13 Mar 2021 02:42:48 +0800</pubDate><description><![CDATA[目录：


Nginx - 学相伴

	公司产品出现瓶颈？
		什么是Nginx？
		Nginx作用？
	
	Nginx的安装
	windows下安装
		linux下安装
		Nginx常用命令
	
	演示




Nginx - 学相伴



公司产品出现瓶颈？

我们公司项目刚刚上线的时候，并发量小，用户使用的少，所以在低并发的情况下，一个jar包启动应用就够了，然后内部tomcat返回内容给用户。
但是慢慢的，使用我们平台的用户越来越多了，并发量慢慢增大了，这时候一台服务器满足不了我们的需求...]]></description><category></category></item><item><title><![CDATA[Markdown_常用语法总结]]></title><link>https://blog.csdn.net/Python_bh/article/details/114717488</link><guid>https://blog.csdn.net/Python_bh/article/details/114717488</guid><author>Python_bh</author><pubDate>Sat, 13 Mar 2021 01:55:55 +0800</pubDate><description><![CDATA[目录：

示例：https://www.kuangstudy.com/bbs/1370399916911865857


一、标题
	这是一级标题
	这是二级标题
		这是三级标题
		
	
	二、字体
	三、引用
	四、分割线
	—-
	
	五、图片
	六、超链接
	七、列表
	八、表格
	九、代码
	十、美化
	
	总结
	


一、标题

在想要设置为标题的文字前面加#来表示

一个#是一级标题，二个#是二级标题，以此类推。支持六级标题。

注：标准语法一般在#后跟个空格再写文字，貌似简书不加空格也.]]></description><category></category></item><item><title><![CDATA[快速寻找项目所依赖的框架和模块--------pipreqs模块自动生成安装依赖的库]]></title><link>https://blog.csdn.net/Python_bh/article/details/113347780</link><guid>https://blog.csdn.net/Python_bh/article/details/113347780</guid><author>Python_bh</author><pubDate>Thu, 28 Jan 2021 16:31:45 +0800</pubDate><description><![CDATA[需求：老板给了一段代码，我该如何快速安装代码所需要的环境，安装所需要的模块和框架

解决
- 安装
 pip3 install pipreqs
-执行相关命令
   - 生成依赖文件：pipreqs ./ 
   - 安装依赖文件：pip3 install -r requirements.txt 
...]]></description><category></category></item><item><title><![CDATA[Redis添加到系统服务，以及添加到环境变量]]></title><link>https://blog.csdn.net/Python_bh/article/details/113264060</link><guid>https://blog.csdn.net/Python_bh/article/details/113264060</guid><author>Python_bh</author><pubDate>Wed, 27 Jan 2021 19:10:29 +0800</pubDate><description><![CDATA[一、需求

1 添加到系统服务（service），开机自启动

2 添加到环境变量

  ---启动服务端redis-server.exe

 ---启动客户端redis-cli.exe -h 127.0.0.1 -p 6379



二、步骤

命令流程：1添加到系统服务redis-server --service-install redis.windows.conf

         2启动服务：:redis-server --service-start

  ...]]></description><category></category></item><item><title><![CDATA[Python下划线方法中  __getattr__，__setattr__， __delattr__]]></title><link>https://blog.csdn.net/Python_bh/article/details/113247063</link><guid>https://blog.csdn.net/Python_bh/article/details/113247063</guid><author>Python_bh</author><pubDate>Wed, 27 Jan 2021 14:01:26 +0800</pubDate><description><![CDATA[1、__getattr__

当我们访问一个不存在的属性的时候，会抛出异常，提示我们不存在这个属性。而这个异常就是__getattr__方法抛出的，其原因在于他是访问一个不存在的属性的最后落脚点，作为异常抛出的地方提示出错再适合不过了。

看例子，我们找一个存在的属性和不存在的属性。可以看出，访问存在的属性时，会正常返回值，若该值不存在，则会进入最后的兜底函数__getattr__。


class A(object):
  def __init__(self, value):
    self...]]></description><category></category></item><item><title><![CDATA[python 函数与方法的区分与示例]]></title><link>https://blog.csdn.net/Python_bh/article/details/113183248</link><guid>https://blog.csdn.net/Python_bh/article/details/113183248</guid><author>Python_bh</author><pubDate>Tue, 26 Jan 2021 16:29:51 +0800</pubDate><description><![CDATA[- 什么是函数？什么是方法？

   from types import MethodType,FunctionType

   class Foo(object):
      def fetch(self):
         pass

##由类调用时函数
   print(isinstance(Foo.fetch,MethodType))
   print(isinstance(Foo.fetch,FunctionType)) # True

##在对象里面调用是方法
   obj = Foo().]]></description><category></category></item><item><title><![CDATA[墙裂建议收藏，整理100道Python练手题目]]></title><link>https://blog.csdn.net/Python_bh/article/details/112986915</link><guid>https://blog.csdn.net/Python_bh/article/details/112986915</guid><author>Python_bh</author><pubDate>Fri, 22 Jan 2021 16:27:58 +0800</pubDate><description><![CDATA[墙裂建议收藏，100道Python练手题目

目录

实例001：数字组合

实例002：“个税计算”

实例003：完全平方数

实例004：这天第几天

实例005：三数排序

实例006：斐波那契数列

实例007：copy

实例008：九九乘法表

实例009：暂停一秒输出

实例010：给人看的时间

实例011：养兔子

实例012：100到200的素数

实例013：所有水仙花数

实例014：分解质因数

实例015：分数归档

实例016：输出日期

实例017：字符串构成

实例018]]></description><category></category></item><item><title><![CDATA[问题：因为电脑缩放问题--在selenium中定位元素后使用location截取验证码图片有些电脑上经常失败。。]]></title><link>https://blog.csdn.net/Python_bh/article/details/112855692</link><guid>https://blog.csdn.net/Python_bh/article/details/112855692</guid><author>Python_bh</author><pubDate>Wed, 20 Jan 2021 00:20:15 +0800</pubDate><description><![CDATA[解决方案：

一、出现问题

  在selenium中定位元素后使用loction获取坐标值出现偏差，导致未能截取到指定验证码图片

二、原因分析

  之所以会出现这个坐标偏差是因为windows系统下电脑设置的显示缩放比例造成的，location获取的坐标是按显示100%时得到的坐标，但我们的电脑缩放比例并不是100，因此就出现了偏差。

三、解决办法

  把电脑的显示缩放设置调回100%即可准确定位

以win10的系统为例，到桌面点击右键-&gt;显示设置-&gt;高级缩放设置-&gt;自定义缩放]]></description><category></category></item><item><title><![CDATA[redis 常用命令集合]]></title><link>https://blog.csdn.net/Python_bh/article/details/112849572</link><guid>https://blog.csdn.net/Python_bh/article/details/112849572</guid><author>Python_bh</author><pubDate>Tue, 19 Jan 2021 18:43:46 +0800</pubDate><description><![CDATA[Redis常用命令集

1）连接操作命令

quit：关闭连接（connection）
	auth：简单密码认证
	help cmd： 查看cmd帮助，例如：help quit
	
2）持久化

save：将数据同步保存到磁盘
	bgsave：将数据异步保存到磁盘
	lastsave：返回上次成功将数据保存到磁盘的Unix时戳
	shundown：将数据同步保存到磁盘，然后关闭服务

3）远程服务控制

info：提供服务器的信息和统计
	monitor：实时转储收到的请求
	slaveof：改变复制策略.]]></description><category></category></item><item><title><![CDATA[redis概述和windows下的安装]]></title><link>https://blog.csdn.net/Python_bh/article/details/112849488</link><guid>https://blog.csdn.net/Python_bh/article/details/112849488</guid><author>Python_bh</author><pubDate>Tue, 19 Jan 2021 18:39:33 +0800</pubDate><description><![CDATA[Redis 概述（一种基于内存的数据库）

在我们日常的Java Web开发中，无不都是使用数据库来进行数据的存储，由于一般的系统任务中通常不会存在高并发的情况，所以这样看起来并没有什么问题，可是一旦涉及大数据量的需求，比如一些商品抢购的情景，或者是主页访问量瞬间较大的时候，单一使用数据库来保存数据的系统会因为面向磁盘，磁盘读/写速度比较慢的问题而存在严重的性能弊端，一瞬间成千上万的请求到来，需要系统在极短的时间内完成成千上万次的读/写操作，这个时候往往不是数据库能够承受的，极其容易造成数据库系统瘫痪，最终]]></description><category></category></item><item><title><![CDATA[字符串拼接方法总结（5种常用方法）]]></title><link>https://blog.csdn.net/Python_bh/article/details/112685809</link><guid>https://blog.csdn.net/Python_bh/article/details/112685809</guid><author>Python_bh</author><pubDate>Fri, 15 Jan 2021 19:19:04 +0800</pubDate><description><![CDATA[1、来自C语言的%方式
print(’%s %s’ % (‘Hello’, ‘world’))



Hello world



%号格式化字符串的方式继承自古老的C语言，这在很多编程语言都有类似的实现。上例的%s是一个占位符，它仅代表一段字符串，并不是拼接的实际内容。实际的拼接内容在一个单独的%号后面，放在一个元组里。
类似的占位符还有：%d（代表一个整数）、%f（代表一个浮点数）、%x（代表一个16进制数），等等。%占位符既是这种拼接方式的特点，同时也是其限制，因为每种占位符都有特定意义，实际使用起来]]></description><category></category></item><item><title><![CDATA[Database returned an invalid datetime value. Are time zone definitions for your database installed?]]></title><link>https://blog.csdn.net/Python_bh/article/details/111390756</link><guid>https://blog.csdn.net/Python_bh/article/details/111390756</guid><author>Python_bh</author><pubDate>Fri, 18 Dec 2020 19:42:19 +0800</pubDate><description><![CDATA[在做文章归档的会后,打印结果时报了这个错误


ret = models.Article.objects.filter(user=user).annotate(month=TruncMonth('created_time')).values('month').annotate(
    count=Count('nid')).values_list(
    'month', 'count')
print(r'------&gt;', ret)

原因是时区问题



解决方案

在mysql设置时区

.]]></description><category></category></item></channel></rss>