加载中
简单的svm例子

数据来源:https://github.com/oumiga1314/Coursera-ML-AndrewNg-Notes/blob/master/code/ex6-SVM/data/ex6data1.mat import pandas as pd import numpy as np import scipy.io as sio impor...

pycharm中使用scrapy命命

这篇博客写的不错,亲测 https://blog.csdn.net/MAOZEXIJR/article/details/80678133

python装饰器的原理

原理:嵌套函数的使用,返回函数地址,闭包的原理 status_user = False def login(func): def inner(): global status_user _user = 'dong' _pwd = 'dong' if status_user == False: user = ...

08/27 15:59
6
Exception: HTTP 599: SSL certificate problem

在两个地方加validate_cert=False from pyspider.libs.base_handler import * class Handler(BaseHandler): crawl_config = { } @every(minutes=24 * 60) def on_start(self): self.crawl('h...

抓取微信文章部分信息

import requests from pyquery import PyQuery as pq from urllib.parse import urlencode basic_url ='http://weixin.sogou.com/weixin?' proxy_pool_url = 'http://127.0.0.1:5000/get' im...

获取http://www.89ip.cn/index_1.html网站的ip和端口的组合

import requests import re html = requests.get("http://www.89ip.cn/index_1.html") ok=html.text ok.replace(' ','') ok.replace('\t','') print(ok) pattern2 = re.compile('(\d+.\d+.\d...

08/24 21:25
7
抓取淘宝部分信息

from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expecte...

抓取今日头条部分信息

import requests import re from urllib.parse import urlencode from requests.exceptions import RequestException import json from bs4 import BeautifulSoup import codecs from conm i...

08/24 11:02
4
抓取36电影部分信息

import requests import re import json from multiprocessing import Pool def get_one_page(url): header = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (K...

抓取猫眼部分信息

import requests import re import json from multiprocessing import Pool def get_one_page(url): header = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (K...

django发送邮件

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_USE_TLS = False #是否使用TLS安全传输协议(用于在两个通信应用程序之间提供保密性和数据完整性。) EMAIL_USE_SSL =...

08/18 10:32
6
linux安装jdk

1.jDK一般安装到/usr目录下。输入命令:cd /usr/输入命令:mkdir java新建一个文件夹,用作Java的安装目录。 2.使用tar -zxvf [文件名]进行解压,解压缩文件包 3.任意使用编辑器打开 /etc/p...

08/15 15:31
1
python modelform的组合使用

from django import forms from app0 import models as mao class UserInfoModelForm(forms.ModelForm): class Meta: model = mao.UserInfo fields = 'all' def modelForm(request): if requ...

django更改数据

title = request.POST.get('title') simple_introduction = request.POST.get('simple_introduction') content = request.POST.get('content') content = mark_safe(content) type = (int)(r...

08/03 19:44
1
python中可能需要类型转换

return render(request,'index.html',{'article_list':article_list,'article_type':article_type,'nid':int(nid)}) {% if nid == 0%} <li><a href="/web/tag-0.html" class="active">全部<...

08/01 21:17
1
python使用kindEditor如何防止在前台显示乱码

1.(相比来说)from django.utils.safestring import mark_safe content=mark_safe(content) 2.safe(加在前台) 3. {% autoescape off %} <h3>{{ row.content }}</h3> {% endautoescape %}......

如何调用qq聊天

<a href="tencent://message/?Menu=yes&uin=1160628027&Site=唐人&Service=300&sigT=45a1e5847943b64c6ff3990f8a9e644d2b31356cb0b4ac6b24663a3c8dd0f8aa12a595b1714f9d45 " target="_blank...

07/29 17:32
3
python ifrme上传文件

<h1>采用iframe上传文件</h1> <form action="/xinwen/uploadfile/" enctype="multipart/form-data" target="ifr" method="post"> <iframe name="ifr" id="ifr"></iframe> <input type="file"...

07/27 20:31
0
python jquery上传文件

<script src="/static/jquery.min.js"></script> <script> function submitClick() { var file_obj = document.getElementById('fafa').files[0]; var fd=new FormData(); fd.append('fafa',...

python上传文件

<body> <input type="file" name="fafa" id="fafa"> <a href="">上传</a> <input type="submit" value="提交" onclick="submitClick();"> <script> function submitClick() { var file_obj ...

07/27 17:39
4

没有更多内容

加载失败,请刷新页面

返回顶部
顶部