代码改变世界

随笔档案-2018年07月

条件判断

2018-07-18 15:35 by 改改~_~, 239 阅读, 收藏,
摘要: 1 age = 6 2 if age>=18: 3 print('Your age is ',age) 4 print('adult') 5 elif age>=6: 6 print('Your age is ',age) 7 print('teenager') 8 else: 9 print('k 阅读全文

使用list和tuple

2018-07-18 15:08 by 改改~_~, 286 阅读, 收藏,
摘要: 1 'create a list ' 2 classmates = ['Jo','Joo','Jooo'] 3 4 print(len(classmates)) 5 6 print(classmates[0]) 7 print(classmates[1]) 8 print(classmates[2] 阅读全文

高级信息系统项目管理师 通过了

2018-07-11 16:05 by 改改~_~, 231 阅读, 收藏,
摘要: 刚查了成绩,通过了 考完后立马大病了一场 此处略去一万字 阅读全文

json.dumps与json.loads实例

2018-07-05 18:05 by 改改~_~, 354 阅读, 收藏,
摘要: 1 import json 2 3 data= { 4 'no' : 1, 5 'name' : 'Runoob', 6 'url' : 'http:\\www.runoob.com' 7 } 8 9 json_str = json.dumps(data) 10 11 print(repr(data 阅读全文

多线程

2018-07-05 18:02 by 改改~_~, 253 阅读, 收藏,
摘要: 1 import _thread 2 import time 3 4 def print_time(threadName,delay): 5 count = 0 6 while count < 5: 7 time.sleep(delay) 8 count += 1 9 print('{0}: {1} 阅读全文

安装 pymongo

2018-07-05 17:43 by 改改~_~, 249 阅读, 收藏,
摘要: 阅读全文

安装Appium

2018-07-04 14:08 by 改改~_~, 364 阅读, 收藏,
摘要: 官网:http://appium.io/ 所以,我们需要先安装node.js 。node.js官方网站:https://nodejs.org/ 直接根据提示安装,验证是否安装成功 appium官网(https://github.com/appium/appium-desktop/releases/t 阅读全文

Appium-Python-Client安装

2018-07-04 13:34 by 改改~_~, 11450 阅读, 收藏,
摘要: 官网是这个:https://pypi.org/project/Appium-Python-Client/#files 下载下来后是这样的文件不知道怎么安装: 不用下载,直接这样就可以 了~~ 安装后导入模块不再出错 1 from appium import webdriver 阅读全文

selenium-python:登录网站并签到

2018-07-04 10:24 by 改改~_~, 587 阅读, 收藏,
摘要: 测试网站的图像验证码统一设置成了:121 Elements中定位元素比较费眼睛~~ 阅读全文

selenium python 启动Firefox

2018-07-04 09:51 by 改改~_~, 1781 阅读, 收藏,
摘要: 我的火狐浏览器版本是最新的: 下载geckodrive:https://github.com/mozilla/geckodriver/releases/ 下载完后将exe文件放到这里“D:\firefox”即firefox安装目录的快捷方式所在的文件夹,同时将这个路径放到path中: D:\Pyth 阅读全文

selenium python 启动Chrome

2018-07-04 09:46 by 改改~_~, 6765 阅读, 收藏,
摘要: 启动Chrom浏览器 下载chromedriver: http://chromedriver.storage.googleapis.com/index.html 当时找chromedriver与chrome的的对应版本的好麻烦,如今整理下: 驱动的下载地址如下: http://chromedrive 阅读全文

安装selenium python

2018-07-03 17:48 by 改改~_~, 337 阅读, 收藏,
摘要: https://pypi.org/project/selenium/#files selenium-3.13.0-py2.py3-none-any.whl 安装成功后才能用 from selenium import webdriver 阅读全文

网络编程32

2018-07-03 16:09 by 改改~_~, 134 阅读, 收藏,
摘要: 服务端 1 import socket 2 import os 3 4 serversocket = socket.socket( 5 socket.AF_INET,socket.SOCK_STREAM) 6 7 host = socket.gethostname() 8 port = 9999 9 阅读全文

pyrhon3与mysql:查、更、删49

2018-07-03 14:40 by 改改~_~, 344 阅读, 收藏,
摘要: 1 import pymysql 2 3 conn = pymysql.connect(host='localhost',user='root',passwd='123456',db='jodb1',port=3307,charset='utf8') 4 # 172.31.10.225 5 6 # 阅读全文

MySQL错误:You are using safe update mode and you tried to update a table without a WHERE that uses a K

2018-07-03 13:52 by 改改~_~, 4032 阅读, 收藏,
摘要: 今日用MySQL Workbench进行数据库的管理更新时,执行一个更新的语句碰到以下错误提示: Error Code: 1175 You are using safe update mode and you tried to update a table without a WHERE that 阅读全文

将excel导入mysql(使用navicat)

2018-07-03 13:43 by 改改~_~, 10696 阅读, 收藏,
摘要: 来源:https://www.cnblogs.com/xjnotxj/p/5304052.html excel: 注: 1、mysql里建立一张跟excel一样的表结构的表(包含id) 2、excel最好没有任何格式,只是纯值,不然会出现导入不了的错误 ① ② 注:选择文件路径的时候,一定要确保该e 阅读全文

python3与mysql:创建表、插入数据54

2018-07-03 11:04 by 改改~_~, 2783 阅读, 收藏,
摘要: 1 import pymysql 2 db = pymysql.connect(host='localhost',user='root',passwd='123456',db='jodb1',port=3307,charset='utf8') 3 # #测试连接开发库成功 4 # db = pymy 阅读全文

python3中pymysql模块安装及连接数据库(同‘python安装HTMLTestRunner’)

2018-07-02 17:15 by 改改~_~, 582 阅读, 收藏,
摘要: https://pypi.org/project/PyMySQL/#files 安装完成之后就是连接数据库了 机器上安装了mysql的数据库,并且已经创建了两张表用于测试 python3连接数据库及删除其中的一张表 这个过程了开始一直在试图导图入#import MySQLdb as mdb,但是提示 阅读全文

0702面向对象180

2018-07-02 14:51 by 改改~_~, 243 阅读, 收藏,
摘要: 1 print('hehda ') 2 3 class MyClass: 4 i = 123456 5 def f(self): 6 # print('The function in class') 7 return 'hhe ' 8 x = MyClass() 9 # print(MyClass. 阅读全文