<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[BishopTylaor的博客]]></title><description><![CDATA[工作学习记录本]]></description><link>https://blog.youkuaiyun.com/github_37443078</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; github_37443078]]></copyright><item><title><![CDATA[通过pip安装pytorch超时问题解决]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/113882874</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/113882874</guid><author>github_37443078</author><pubDate>Mon, 22 Feb 2021 10:42:40 +0800</pubDate><description><![CDATA[前言

这篇文章只记录通过pip安装pytorch超时问题的解决方案。
默认阅读者已经安装了Python2.7或者其他3.x的版本

版本信息
系统：macos-11.1
pip：21.0.1
python：3.8
解决方案
第一步：
去官网查询合适的版本和命令

第二步：
&gt;pip install torch torchvision torchaudio
Collecting torch
  Downloading torch-1.7.1-cp38-none-macosx_10_9_x86_64.w]]></description><category></category></item><item><title><![CDATA[Python 文件相关操作]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/86679824</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/86679824</guid><author>github_37443078</author><pubDate>Mon, 28 Jan 2019 18:20:38 +0800</pubDate><description><![CDATA[内置函数文件读取

通常我们在读取文件的时候，会用到read()， readline()， readlines()。
read ()的方法是一次性把文件的内容以字符串的方式读到内存， 放到一个字符串变量中
readlines()的方法是一次性读取所有内容， 并按行生成一个list
因为read()和readlines()是一次性把文件加载到内存， 如果文件较大， 甚至比内存的大小还大， 内存就会爆...]]></description><category></category></item><item><title><![CDATA[python 判断字符串相似度]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/86552838</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/86552838</guid><author>github_37443078</author><pubDate>Sat, 19 Jan 2019 15:27:16 +0800</pubDate><description><![CDATA[方法1
import difflib
def get_equal_rate(str1, str2):
   return difflib.SequenceMatcher(None, str1, str2).quick_ratio()

方法2
import Levenshtein
def get_equal_rate(str1, str2):
   return Levenshtein.ratio...]]></description><category></category></item><item><title><![CDATA[python中去掉字符串中的\xa0、\t、\n等字符]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/86552563</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/86552563</guid><author>github_37443078</author><pubDate>Sat, 19 Jan 2019 15:08:28 +0800</pubDate><description><![CDATA[\xa0是不间断空白符 &amp;amp;nbsp;
我们通常所用的空格是 \x20，是在标准ASCII可见字符 0x20~0x7e 范围内。
而 \xa0属于 latin1 （ISO/IEC_8859-1）中的扩展字符集字符，代表空白符nbsp(non-breaking space)。
latin1 字符集向下兼容 ASCII （ 0x20~0x7e ）。
inputstring = u'\n     ...]]></description><category></category></item><item><title><![CDATA[LeetCode.206.Reverse Linked List]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/82465462</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/82465462</guid><author>github_37443078</author><pubDate>Thu, 06 Sep 2018 17:50:10 +0800</pubDate><description><![CDATA[原题链接：Reverse Linked List

题目内容： 
Reverse a singly linked list.

Example:


  Input: 1-&amp;amp;gt;2-&amp;amp;gt;3-&amp;amp;gt;4-&amp;amp;gt;5-&amp;amp;gt;NULL 
  Output: 5-&amp;amp;gt;4-&amp;amp;gt;3-&amp;amp;gt;2-&amp;amp;gt;1-&amp;amp;gt;NULL
]]></description><category></category></item><item><title><![CDATA[LeetCode.19.Remove Nth Node From End of List]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/82186470</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/82186470</guid><author>github_37443078</author><pubDate>Wed, 29 Aug 2018 16:54:26 +0800</pubDate><description><![CDATA[原题链接：Remove Nth Node From End of List

题目内容： 
Given a linked list, remove the n-th node from the end of list and return its head.

Example:


  Given linked list: 1-&amp;gt;2-&amp;gt;3-&amp;gt;4-&amp;gt;5, and n = 2....]]></description><category></category></item><item><title><![CDATA[阿里云主机CENTOS设置虚拟内存(交换分区)]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/81483441</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/81483441</guid><author>github_37443078</author><pubDate>Tue, 07 Aug 2018 16:19:22 +0800</pubDate><description><![CDATA[1.添加swap文件大小为2G

默认情况下， of=/swapfile 即swapfile文件创建在/var/目录下。 
若我在创建在/opt/image/目录下， 则下面所有的操作里有/swapfile的都要改为/opt/image/swap

# dd if=/dev/zero of=/swapfile bs=1k count=2048000



2.创建SWAP文件

# mkswap ...]]></description><category></category></item><item><title><![CDATA[JQuery 特殊字符转义(Uncaught Error: Syntax error, unrecognized expression:的处理)]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/81483328</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/81483328</guid><author>github_37443078</author><pubDate>Tue, 07 Aug 2018 16:14:24 +0800</pubDate><description><![CDATA[一般情况下，在jQuery选择器中，我们很少会用到诸如“.”、“#”、“(”、“[”等特殊字符，因为根据W3C规定，HTML文档中属性的值是不能包含有这些个特殊字符的，但是在实际应用中，偶尔也会遇到表达式中含有“#”和“.”等特殊字符。这时候需要对这些字符进行转义



option.replace(/\//, '\\\/').replace(/\s/g, &quot;-&quot;).replace(&quot;(&quot;, &quot;\...]]></description><category></category></item><item><title><![CDATA[CENTOS 7 TENSORFLOW 安装]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/81179980</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/81179980</guid><author>github_37443078</author><pubDate>Tue, 24 Jul 2018 10:27:22 +0800</pubDate><description><![CDATA[1、centos 系统库更新



yum -y update

2、centos安装系统依赖库



yum install -y libxslt-devel.x86_64 libX11-devel pcre-devel zlib-devel.x86_64 libxml2 gettext.x86_64 freetype-devel vim ant libffi tcl leptonica cur...]]></description><category></category></item><item><title><![CDATA[LeetCode.88.Merge Sorted Array]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/80229178</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/80229178</guid><author>github_37443078</author><pubDate>Mon, 07 May 2018 17:51:00 +0800</pubDate><description><![CDATA[原题链接：Merge Sorted Array

题目内容： 
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.

Note:

The number of elements initialized in nums1 and nums2 are m and n r...]]></description><category></category></item><item><title><![CDATA[MongoDB.oplog相关浅析]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/80015821</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/80015821</guid><author>github_37443078</author><pubDate>Fri, 20 Apr 2018 11:03:19 +0800</pubDate><description><![CDATA[1. oplog里面有啥

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MongoDB 的Replication是通过一个日志来存储写操作的，这个日志就叫做oplog。 
在默认情况下,oplog分配的是5%的空闲磁盘空间。通常而言,这是一种合理的设置。可以通过mongod --oplogSize来改变oplog的日志大小。 
oplog是cap...]]></description><category></category></item><item><title><![CDATA[Python.Sqlalchemy.使用OEM相关语句]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/79994125</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/79994125</guid><author>github_37443078</author><pubDate>Wed, 18 Apr 2018 18:25:49 +0800</pubDate><description><![CDATA[新增数据



user = User(name='a')
session.add(user)
user = User(name='b')
session.add(user)
user = User(name='a')
session.add(user)
user = User()
session.add(user)
session.commit()

使用User表相关操作



from sq...]]></description><category></category></item><item><title><![CDATA[MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/79964939</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/79964939</guid><author>github_37443078</author><pubDate>Mon, 16 Apr 2018 19:15:47 +0800</pubDate><description><![CDATA[今天运行Redis时发生错误，错误信息如下：


  (error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Red...]]></description><category></category></item><item><title><![CDATA[Python文件下载总结]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/79960638</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/79960638</guid><author>github_37443078</author><pubDate>Mon, 16 Apr 2018 14:54:44 +0800</pubDate><description><![CDATA[1. Requests模块



import requests 
print &quot;download with requests&quot;
url = 'https://linux.linuxidc.com/linuxconf/download.php?file=Li9saW51eGZpbGVzL0xpbnV4JUI5JUFCJUM5JUU3LnBuZw==' 
r = requests.get(url) ...]]></description><category></category></item><item><title><![CDATA[正则表达式基础总结.断言]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/79894017</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/79894017</guid><author>github_37443078</author><pubDate>Wed, 11 Apr 2018 11:36:39 +0800</pubDate><description><![CDATA[1. 正则基础


  
    元字符 
    描述
  
  
    \
    将下一个字符标记符、或一个向后引用、或一个八进制转义符。例如，“\\n”匹配\n。“\n”匹配换行符。序列“\\”匹配“\”而“\(”则匹配“(”。即相当于多种编程语言中都有的“转义字符”的概念。
  
  
    ^
    匹配输入字符串的开始位置。如果设置了RegExp对象的Multiline属性，^...]]></description><category></category></item><item><title><![CDATA[jQuery - 获得内容和属性]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/79891856</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/79891856</guid><author>github_37443078</author><pubDate>Wed, 11 Apr 2018 09:52:42 +0800</pubDate><description><![CDATA[获得内容 - text()、html() 以及 val() 
三个简单实用的用于 DOM 操作的 jQuery 方法： 
  ● text() - 设置或返回所选元素的文本内容 
  ● html() - 设置或返回所选元素的内容（包括 HTML 标记） 
  ● val() - 设置或返回表单字段的值



$(&quot;#btn1&quot;).click(function(){
  alert(&quot;Text: ...]]></description><category></category></item><item><title><![CDATA[LeetCode.8.String to Integer (atoi)]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/79883635</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/79883635</guid><author>github_37443078</author><pubDate>Tue, 10 Apr 2018 16:45:05 +0800</pubDate><description><![CDATA[原题链接：String to Integer (atoi)

题目内容： Implement atoi to convert a string to an integer.

Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask your...]]></description><category></category></item><item><title><![CDATA[LeetCode.7.Reverse Integer]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/79881510</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/79881510</guid><author>github_37443078</author><pubDate>Tue, 10 Apr 2018 15:04:19 +0800</pubDate><description><![CDATA[原题链接：Reverse Integer

题目内容： Given a 32-bit signed integer, reverse digits of an integer.

Example 1:


  Input: 123 
  Output:  321


Example 2:


  Input: -123 
  Output: -321


Example 3:


  Input:...]]></description><category></category></item><item><title><![CDATA[Python.json.常见两个错误处理(Expecting , delimiter)(Invalid control character at)]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/79868968</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/79868968</guid><author>github_37443078</author><pubDate>Mon, 09 Apr 2018 16:49:23 +0800</pubDate><description><![CDATA[ValueError: Invalid control character at: line 1 column 122(char 123)

出现错误的原因是字符串中包含了回车符（\r）或者换行符（\n） 
解决方案：


转义




json_data = json_data.replace('\r', '\\r').replace('\n', '\\n')


使用关键字strict



...]]></description><category></category></item><item><title><![CDATA[vim指令详解]]></title><link>https://blog.youkuaiyun.com/github_37443078/article/details/79865501</link><guid>https://blog.youkuaiyun.com/github_37443078/article/details/79865501</guid><author>github_37443078</author><pubDate>Mon, 09 Apr 2018 13:56:34 +0800</pubDate><description><![CDATA[转载自https://blog.youkuaiyun.com/xiajun07061225/article/details/7039413

一、我们为什么要学习vim编辑器？

Linux的命令行界面下面有非常多的文本编辑器。比如经常听说的就有Emacs、pico、nano、joe与vim等。vim可以看做是vi的高级版。我们为什么一定要学习vim呢？有以下几个原因：

(1)所有的Unix like系统都...]]></description><category></category></item></channel></rss>