摘要: class Node(): """节点""" def __init__(self,elem): self.elem = elem self.next = Noneclass SingleLinkList(): def __init__(self,node=None): self.__head = n 阅读全文
posted @ 2018-01-22 11:35 hyolyn 阅读(107) 评论(0) 推荐(0) 编辑
摘要: from timeit import Timerimport time# l = []# k = []# s_time = time.time()# for i in range(1000):# l.append(i)# e_time = time.time()# f_time = s_time-e 阅读全文
posted @ 2018-01-21 10:37 hyolyn 阅读(113) 评论(0) 推荐(0) 编辑
摘要: create table mydb(id in auto_increment primary key not null,price varchar(10),title varchar(100),detail varchar(500), url varchar(50),seller_id varcha 阅读全文
posted @ 2018-01-21 04:18 hyolyn 阅读(100) 评论(0) 推荐(0) 编辑
摘要: import osimport os.pathrootname = 'D:\Python\spider3.6'rootdir = os.listdir(rootname)for z in rootdir[1:]: file_detail= rootname+'\\'+z dir_detail = o 阅读全文
posted @ 2018-01-21 04:16 hyolyn 阅读(140) 评论(0) 推荐(0) 编辑
摘要: from django.shortcuts import render,HttpResponse,redirectfrom django.template import Template,Contextfrom myapp.models import User_info,Ariticle# Crea 阅读全文
posted @ 2018-01-18 07:22 hyolyn 阅读(115) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-t 阅读全文
posted @ 2018-01-17 10:15 hyolyn 阅读(415) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd import numpy as np import matplotlib.pyplot as plt mac_info = pd.read_csv('MacDB.dat') print(mac_info.dtypes) price float64 title 阅读全文
posted @ 2018-01-16 09:21 hyolyn 阅读(178) 评论(0) 推荐(0) 编辑
摘要: from bs4 import BeautifulSoupimport timeimport pymongoimport requests# import randomfrom multiprocessing import Poolclient = pymongo.MongoClient('loca 阅读全文
posted @ 2018-01-16 01:46 hyolyn 阅读(528) 评论(0) 推荐(0) 编辑
摘要: import randomlove = ['i','l','o','v','e','y','o','u']kk = 'iloveyou'z = []n = 0i = 0while True: i = i + 1 print(i) for k in range(7): z.append(random. 阅读全文
posted @ 2018-01-15 23:59 hyolyn 阅读(111) 评论(0) 推荐(0) 编辑
摘要: def timefun_arg(pre='hello'): def timefunc(function): def inner(): print('10086') print(pre) function() return inner return timefunc@timefun_arg('1008 阅读全文
posted @ 2018-01-14 06:02 hyolyn 阅读(83) 评论(0) 推荐(0) 编辑