原创 CNN-cr-1 0-優化

import numpy as np # 序列化和反序列化import pickle from sklearn.preprocessing import OneHotEncoder import warningswarnings.filte

原创 python爬蟲之JS鏈接跳轉抓取

實現步驟1、從民政數據網站中提取最新區劃代碼# 特點1、最新的在上面# 代碼實現import requestsfrom lxml import etreeimport re url = 'http://www.mca.gov.cn/arti

原创 卡牌 爬取全部卡牌

網頁分析通過源代碼和Network分析,發現返回的卡牌是用post請求的json文件請求數據爲:cardClass: hunter  #卡的類型:職業keywords: standard: 1t: 1576286199445 #時間串car

原创 極驗證碼3破解-selenium

import timefrom io import BytesIOfrom PIL import Imagefrom selenium import webdriverfrom selenium.webdriver import Actio

原创 經典問題:八皇后的Python解法

想了想,沒啥說的,代碼不算難,涉及到的知識點本文都有說明:#八皇后問題board=[[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0

原创 js清除圖片

 <!DOCTYPE html><html> <head>    <meta charset="UTF-8">    <meta name="viewport" content="width=device-width, initial-sc

原创 python cookie 獲取某寶商品信息

# //get_goods_from_taobaoimport requestsimport reimport xlsxwriter cok=''  # 此處寫入登錄之後自己的cookie# 獲取頁面def getHTMLText(url)

原创 python繪製皮卡皮卡

import turtle  def getPosition(x, y):    turtle.setx(x)    turtle.sety(y)    print(x, y)  class Pikachu:     def __init_

原创 異方差 Python運行

import pandas as pd import numpy as np from patsy import dmatrices from statsmodels.stats.outliers_influence import vari

原创 某度tb圖片爬蟲

#encoding:utf-8import urllibimport urllib.requestfrom lxml import etree class Spider(object):def __init__(self):self.tie

原创 leetcode_ 組合和

typing import Listclass Solution:def combinationSum1(self, candidates: List[int], target: int) -> List[List[int]]:#必須要排序

原创 scrapy爬取王者榮耀皮膚

一、項目需求爬取王者榮耀官網所有皮膚圖片要求:英雄名作爲文件夾名皮膚名作爲圖片名稱皮膚圖片按所屬英雄存入對應的文件夾二、項目解析定義items文件,設置hero_name、pf_names、image_urls、images字段分析網頁,確

原创 TKinter在多線程時刷新GUI的一些碎碎念

  首先要講的是一個TKinter使用時常常遇到的問題,因爲TKinter自身刷新GUI是單線程的,用戶在調用mainloop方法後,主線程會一直不停循環刷新GUI,但是如果用戶給某個widget綁定了一個很耗時的方法A時,這個方法A也是在

原创 神經網絡的構建與理解

#必須放開頭,否則報錯。作用:把python新版本中print_function函數的特性導入到當前版本from future import print_functionimport tensorflow.compat.v1 as tf#將

原创 Java開發常見基礎題大全

1.&和&&的區別?&:邏輯與(and),運算符兩邊的表達式均爲true時,整個結果才爲true。&&:短路與,如果第一個表達式爲false時,第二個表達式就不會計算了。 2.”==”和equals方法究竟有什麼區別?==:表示兩個變量的值