自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(37)
  • 收藏
  • 关注

翻译 python翻译目录

原文链接:https://www.programiz.com/python-programmingPYTHON TUTORIAL Python Introduction Getting Started Keywords and Identifier Statements & Comments Python Variables Python Datatypes...

2019-02-27 02:21:05 191

原创 User-Agent

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, ...

2019-03-27 17:09:55 217

翻译 Python基础入门----数字,类型转换和数学

Python Numbers, Type Conversion and MathematicsIn this article, you'll learn about the different numbers used in Python, how to convert from one data type to the other, and the mathematical operatio...

2019-03-22 01:17:02 370

翻译 Python基础入门----包

Python PackageIn this article, you'll learn to divide your code base into clean, efficient modules using Python packages. Also, you'll learn to import and use your own or third party packagesin your...

2019-03-21 00:30:18 203

翻译 python基础入门----模块

Python ModulesIn this article, you will learn to create and import custom modules in Python. Also, you will find different techniques to import and use custom and built-in modules in Python.Tab...

2019-03-20 23:03:28 226

翻译 Python基础入门----全局,局部和非局部变量

Python Global, Local and Nonlocal variablesIn this article, you’ll learn about Python Global Variable, Local Variable, Nonlocal Variable and where to use them.Table of ContentsGlobal Variable...

2019-03-20 02:03:25 717

翻译 Python基础入门----匿名/ Lambda函数

Python Anonymous/Lambda FunctionIn this article, you'll learn about the anonymous function, also known as lambda functions. You'll learn what is it, its syntax and how to use it (with examples)....

2019-03-18 01:38:00 223

翻译 Python基础入门----递归

Python RecursionIn this article, you will learn to create a recursive function; a function that calls itself.Table of ContentsWhat is recursion in Python? Python Recursive Function Advantag...

2019-03-17 20:35:14 247

翻译 python基本入门----函数的参数

原文链接:https://www.programiz.com/python-programming/function-argumentPython Function ArgumentsIn Python, you can define a function that takes variable number of arguments. You will learn to define s...

2019-03-06 01:01:25 2350

翻译 python基础入门----函数

Python FunctionsIn this article, you'll learn about functions; what is a function, the syntax, components and types of a function. Also, you'll learn to create a function in Python.Table of Conten...

2019-03-05 00:33:00 753

翻译 python基础入门----pass语句

Python pass statementIn this article, you'll learn about pass statement. It is used as a placeholder for future implementation of functions, loops, etc.Table of ContentsWhat is pass statement in...

2019-03-04 10:55:30 261

翻译 python基础入门----break和continue语句

原文链接:https://www.programiz.com/python-programming/break-continuePython break and continueIn this article, you will learn to use break and continue statements to alter the flow of a loop.Table of...

2019-03-04 01:16:34 287

翻译 python基础入门----while循环

Python while LoopTable of ContentsWhat is while loop in Python? Syntax of while Loop in Python Flowchart of while loop Example: Python while Loop while loop with elsewhile 循环表格内容什么是w...

2019-03-04 00:27:32 669

翻译 python基础入门----for循环

原文链接:https://www.programiz.com/python-programming/for-loopPython for LoopTable of ContentsWhat is for loop in Python? Syntax of for Loop Flowchart of for loop Example: Python for Loop T...

2019-03-03 17:53:50 358

翻译 python基础入门----条件控制

原文链接:https://www.programiz.com/python-programming/if-elif-elsePython if...else StatementTable of ContentsWhat are if...else statement in Python? Python if Statement Syntax Python if Statemen...

2019-03-03 01:16:06 212

翻译 python基础入门----命名空间和变量作用域

原文链接:https://www.programiz.com/python-programming/namespaceTable of ContentsWhat is Name in Python? What is a Namespace in Python? Python Variable Scope Example of Scope and Namespace in Python...

2019-03-01 20:59:30 312

翻译 python基础入门----运算符

原文链接:https://www.programiz.com/python-programming/operatorsTable of ContentsWhat are operators in Python? Arithmetic Operators Comparison (Relational) Operators Logical (Boolean) Operators Bit...

2019-02-28 21:45:33 294

翻译 python基础入门----标准输出,输入和导包

原文:https://www.programiz.com/python-programming/input-output-importPython Input, Output and ImportTable of ContentsPython Output Using print() function Output formatting Python Input Pytho...

2019-02-27 12:52:17 665

翻译 python基础入门----类型转换

原文链接:https://www.programiz.com/python-programming/type-conversion-and-castingTable of ContentsType Conversion Implicit Type Conversion Explicit Type Conversion Key Points to RememberBefore lea...

2019-02-27 01:46:11 272

翻译 python基础入门----数据类型

Python Data TypesIn this tutorial, you will learn about different data types you can use in Python.Table of ContentsData Types in Python Python Numbers Python List Python Tuple Python St...

2019-02-25 01:31:50 421

转载 redis与Python交互应用实例----用户登录

示例:用户登录业务过程如下: 输入用户名、密码 密码加密 判断redis中是否记录了用户名,如果有则成功 如果redis中没有用户名,则到mysql中查询 从mysql中查询成功后,将用户名记录到redis中#encoding=utf-8import RedisConnetimport MysqlConnetimport hashlibname=raw_input("请...

2019-02-22 00:59:56 411

原创 redis与Python交互

安装包联网安装sudo pip install redis交互代码xxx@ubuntu:~$ python3Python 3.5.2 (default, Nov 12 2018, 13:43:14) [GCC 5.4.0 20160609] on linuxType "help", "copyright", "credits" or "license" for more i...

2019-02-22 00:57:45 93

原创 redis----发布订阅

发布订阅命令订阅subscribe 频道名 [频道名 ...]例如:创建一个频道名为animal_channel127.0.0.1:6379> subscribe animal_channelReading messages... (press Ctrl-C to quit)1) "subscribe"2) "animal_channel"3) (integer...

2019-02-22 00:56:56 75

原创 redis数据操作----键的命令

键的命令查找所有的键keys *例如:127.0.0.1:6379> keys * 1) "ht3" 2) "s1" 3) "ht1" 4) "week" 5) "five" 6) "thursday" 7) "two" 8) "tuesday" 9) "t2"10) &quot

2019-02-21 23:53:11 87

原创 redis数据操作----string

stringstring是redis最基本的数据 最大能存储512M string类型是二进制安全的,即可以为任何数据,比如数字、图片、序列化对象等命令设置键值set key value例如:127.0.0.1:6379> set str 'monday'OK根据键获取值,如果不存在此键则返回nil例如:求str键的值127.0.0.1:6379&...

2019-02-21 22:53:27 78

原创 mysql---入门

新建数据库:create database 数据库名 charset=utf8;create database tudou charset=utf8;显示数据库:show databases;  删除数据库:drop database 数据库名;drop database tudou;   显示表格:show tabl...

2019-02-21 20:38:13 61

翻译 mysql2

表格:选择查询:select 字段 from 表名;select id,name from students;  消除重复行:select distinct 字段 from students;select distinct gender from student;查询 where的使用:where是筛选行,select是筛选列select...

2019-02-21 20:36:59 186

原创 redis数据操作----zset

zsetsorted set,有序数据 元素为string类型 元素具备唯一性,不重复 每个元素都关联一个double类型的score,表示权重,通过权重将元素从小到大排列 元素的score可以相同命令添加zadd key score member [score member ...]例如:添加成员127.0.0.1:6379> zadd z1 1 'jane...

2019-02-20 23:59:01 140

原创 redis数据操作----set

set无序集合 元素为string类型 元素具有唯一性,不重复命令设置添加元素,无法添加重复元素sadd key member [member ...]例如:在集合里添加成员127.0.0.1:6379> sadd s1 'jane' 'tony'(integer) 2例如:在集合中添加了重复的集合127.0.0.1:6379> smemb...

2019-02-20 23:07:01 110

原创 redis数据操作----list

list列表的元素类型为string 按照插入顺序排序 在列表的头部或者尾部添加元素命令设置在头部插入数据lpush key value [value ...]在尾部插入数据rpush key value [value ...]例如:在一个键插入字符串列表,键值及其顺序为first,two,three使用lpush命令为:(并用lrange查询排序是否正确)...

2019-02-19 22:03:18 100

原创 redis数据操作----hash

hash 数据类型hash 用于存储对象,对象的格式为键值对(json格式)命令设置一个键一个属性hset key(键名) field(属性) value(属性值)例如存储:{ name:张三}name 为属性(field),张三为属性值(value)设置命令:127.0.0.1:6379> hset ht1 name "张三"设置一个键多个属性HMS...

2019-02-19 00:15:14 160

原创 NoSQL之Redis----运行

启动Redis服务器 redis-server   启动客户端redis-cli运行客户端成功如图:xxxx@ubuntu:~$ redis-cli127.0.0.1:6379> 

2019-02-18 17:25:57 86

原创 selenium使用CSS定位web页面元素---2

以一个小说网站为例d = webdriver.Chrome()d.get("https://www.yangguiweihuo.com/")例 1.<div class="nav"> <ul> <li><a href="/">首页</a></li>

2018-07-03 23:13:02 1918

原创 selenium使用CSS定位web页面元素---1

css    解释.info class 选择器,匹配所有class 属性中包含info 的元素#footer id 选择器,匹配所有id 属性等于footer 的元素以一个小说网站为例d = webdriver.Chrome()d.get("https://www.yangguiweihuo.com/")例 1.<div class="ccc">属性为class,使用css表示则是...

2018-07-03 22:28:51 201

原创 selenium使用CSS定位web页面元素---3

以一个小说网站为例d = webdriver.Chrome()d.get("https://www.yangguiweihuo.com/")例 1.d.find_element_by_css_selector('a[href="/"]').texta[href="/"]  a是一个元素,现在取了a元素的href属性,href赋的值是"/"例 2.d.find_element_by_css_sel...

2018-07-03 20:10:19 240

翻译 每天一个linux命令

BASH_BUILTINS(1)NAME       bash,  :,  .,  [,  alias, bg, bind, break, builtin, caller, cd, command, compgen, complete, compopt, con-   tinue, declare, dirs, disown, echo, enable, eval, exec,

2016-06-17 00:37:35 927

原创 w不在sudoers文件中,此事将本报告

在linux中的操作【用户】是w。报告翻译过来是:该用户没有添加sudo权限。一般我都直接su root,切换至root用户。后来在网上百度,修改以下sudoers文件按以下操作输入命令:1.su root //必须切换为root2.visudo //这可以直接修改etc中的sudoers文件3.进入文件后,在这句话后面添加用户。小编的是CentOS64位版

2016-03-07 23:41:12 213

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除