上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页

2018年12月28日

把数据放到服务上去 python启动服务

摘要: 1、python -m SimpleHTTPServer 8000 执行这段命令、在需要放到网页上的文件夹中、 2、http://127.0.0.1:8000 在页面上访问这个网址、就可以从这个网页上面、拿到文件夹的数据、 阅读全文

posted @ 2018-12-28 09:32 袁佳佳 阅读(209) 评论(0) 推荐(0) 编辑

2018年12月27日

网站服务

摘要: # coding:utf-8import socketfrom multiprocessing import ProcessHTML_ROOT_DIR = ""def handle_client(client_socket): """处理客户端请求""" # 获取客户端请求数据 request_da 阅读全文

posted @ 2018-12-27 22:22 袁佳佳 阅读(174) 评论(0) 推荐(0) 编辑

2018年12月26日

访问网页里面的数据、修改对应的属性、

摘要: <!--StartFragment --> 阅读全文

posted @ 2018-12-26 17:36 袁佳佳 阅读(108) 评论(0) 推荐(0) 编辑

按照上下游图谱关系、增加上下游标签、生成json文件

摘要: '''调整下游'''import csvimport psycopg2import jsonclass IO_rw(object): def __init__(self): self.conn = psycopg2.connect(database="postgres", user="postgre 阅读全文

posted @ 2018-12-26 10:03 袁佳佳 阅读(538) 评论(0) 推荐(0) 编辑

2018年12月25日

递归查找数据库、生成list包含 tuple的情况

摘要: '''调整下游'''import csvimport psycopg2import jsonclass IO_rw(object): def __init__(self): self.conn = psycopg2.connect(database="postgres", user="postgre 阅读全文

posted @ 2018-12-25 17:18 袁佳佳 阅读(245) 评论(0) 推荐(0) 编辑

2018年12月21日

行业递归

摘要: #上下游递归寻找 阅读全文

posted @ 2018-12-21 16:29 袁佳佳 阅读(158) 评论(0) 推荐(0) 编辑

2018年12月19日

追加写入

摘要: import csvwith open('example.csv', 'a+') as f: writer = csv.writer(f) datas = [['name', 'age'], ['Bob', 14], ['Tom', 23], ['Jerry', '18']] writer.writ 阅读全文

posted @ 2018-12-19 17:34 袁佳佳 阅读(215) 评论(0) 推荐(0) 编辑

写csv

摘要: import csvimport psycopg2class IO_rw(object): def __init__(self): self.csvfile = open("weobo_9.csv", "w") self.writer = csv.writer(self.csvfile) self. 阅读全文

posted @ 2018-12-19 15:14 袁佳佳 阅读(170) 评论(0) 推荐(0) 编辑

2018年12月15日

腾讯二维码登陆

摘要: import requestsimport refrom PIL import Imageimport urllib3from bs4 import BeautifulSoupurllib3.disable_warnings() #不看警告'''扫描以后返回的地址https://wx2.qq.com 阅读全文

posted @ 2018-12-15 21:16 袁佳佳 阅读(897) 评论(0) 推荐(0) 编辑

2018年12月12日

拼接str 类型的字符串 按照规则生成变量名。然后给他赋值

摘要: >>> var = "This is a string" >>> b = "var" #设置一个新的字符串 >>> s = locals()[b] #把b字符串空间的值, 变相的给s变量 >>> s #打印s变量 'This is a string' #这样就成功实现,用一个值,去充当变量名 这个b 阅读全文

posted @ 2018-12-12 14:01 袁佳佳 阅读(386) 评论(0) 推荐(0) 编辑

上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页

导航