笔记
文章平均质量分 82
weixin_43139613
这个作者很懒,什么都没留下…
展开
-
windows系统下安装kellte及连接mysql服务器
Kettle简介Kettle是一款国外开源的ETL工具,纯java编写,可以在Window、Linux、Unix上运行,数据抽取高效稳定。Kettle是“Kettle E.T.T.L. Envirnonment“只取首字母的缩写,这意味着它被设计用来帮助你实现你的 ETTL 需要:抽取、转换、装入和加载数据;翻译成中文名称应该叫水壶,名字的起源是开发者希望把各种数据放到一个壶里然后以一种指定的格式流出。Spoon 是一个图形用户界面,它允许你运行转换或者任务,其中转换是用 Pan 工具来运行,任务是用原创 2021-06-19 11:16:23 · 360 阅读 · 0 评论 -
记录自建ALIDDNS服务域名解析和外网访问
本文参考https://blog.csdn.net/y1534414425/article/details/90699532除上文外要补充的有AccessKey ID和AccessKey Secret可以使用子账号只需要添加一个AliyunECSReadOnlyAccess权限就可以了需要路由器上虚拟机服务设计端口映射完事就可外网访问了...原创 2020-11-03 17:43:00 · 524 阅读 · 0 评论 -
superset在linux和windows下的安装和部署
前言Superset 是 Airbnb开源的数据探查与可视化平台,是个轻量级的BI工具,开发者可以在其开源代码上根据需要进行二次开发。最近在探索数据分析平台的应用,就来试一试,然而superset更新迭代的速度太快,里面也有太多的坑,花了两天的时间踩完,下面就把流程以及相应的坑分享~superset github地址:https://github.com/apache/incubator-superset官方文档:http://superset.apache.org/installation.html原创 2020-10-27 18:56:28 · 363 阅读 · 0 评论 -
天天基金爬虫
import requestsfrom requests.exceptions import ConnectionErrorfrom pyquery import PyQuery as pqimport operatorfrom functools import reduceimport reimport jsonimport pandas as pdimport numpy as npheaders = { 'Host':'club.jd.com', '原创 2020-08-04 15:28:49 · 960 阅读 · 0 评论 -
ubuntu安装记录
记录安装ubuntu系统的mysql和samba共享服务的坑1.安装mysql8.0的话,需要先安装一个mysql-apt-config_0.8.15-1_all.deb的文件,dpkg -i mysql-apt-config_0.8.15-1_all.deb2.然后sudo apt install mysql-server3.按部就班的安装,MySQL8.0采用了新的加密方式,一定要注意,正是因为这个加密方式才导致Ubuntu18.04用设置的root密码登录不了MySQL,因为Ubuntu18.0原创 2020-05-31 21:55:19 · 173 阅读 · 0 评论 -
python操作Excel实用技巧
1.使用“|””对字符串进行分隔,然后可以筛选出保函有的品类m = "|".join(list(pbpd['品牌信息']))uhpb['种类'] = uhpb['商品信息'].str.findall(m)2.多张Excel合成为一张,并加入A列以区分dfs = []p = os.listdir(r'D:\xml\............')for i in range(len(p)...原创 2020-03-31 15:19:00 · 139 阅读 · 0 评论 -
数据归一化处理方法
最值归一化 Normalization# 最值归一化 Normalizationimport numpy as npx = np.random.randint(1,100,size=100)#进行最值归一化x = (x - np.min(x)) / (np.max(x) - np.min(x))#多维数组的最值归一化X = np.random.randint(1,100,(50,...原创 2020-02-09 18:15:53 · 1145 阅读 · 0 评论 -
K近邻算法--鸢尾花数据集
from sklearn import datasetsiris = datasets.load_iris()x = iris.datay = iris.targetfrom sklearn.model_selection import train_test_splitx_train, x_test,y_train, y_test = train_test_split(x,y,te...原创 2020-02-09 17:11:10 · 455 阅读 · 0 评论 -
selenium爬虫丁香医生实时播报
from pyecharts.faker import Fakerfrom pyecharts import options as optsfrom pyecharts.charts import Mapfrom selenium import webdriverfrom selenium.webdriver.common.by import Byfrom selenium.webdri...原创 2020-02-01 14:37:18 · 1310 阅读 · 0 评论 -
实时的可视化疫情地图
多难兴邦,希望疫情尽快结束,等待春暖花开from pyecharts.faker import Fakerfrom pyecharts import options as optsfrom pyecharts.charts import Mapfrom selenium import webdriverfrom selenium.webdriver.common.by import By...原创 2020-01-31 12:47:11 · 14084 阅读 · 6 评论 -
pandas生意参谋数据处理
import os import pandas as pdhhye = os.listdir(r'C:\Users\18352\Desktop\Python\read_Excel\01-天猫行业数据分析')for k in range(len(hhye)): wwdu = os.listdir(r'C:\Users\18352\Desktop\Python\read_Excel...原创 2020-01-15 16:03:14 · 720 阅读 · 0 评论 -
简单层的实现
class MulLayer: def __init__(self): self.x = None self.y = None def forward(self,x,y): self.x = x self.y = y out = x*y return out ...原创 2019-12-27 18:05:46 · 398 阅读 · 0 评论 -
天猫超市requests爬虫
import pymongoimport requestsfrom requests.exceptions import ConnectionErrorfrom pyquery import PyQuery as pqimport timeclient = pymongo.MongoClient('localhost')db = client['tmmc']#PROXY_POOL...原创 2019-12-23 11:20:41 · 988 阅读 · 0 评论 -
30行Python代码爬取LOL全英雄皮肤
受到~wangweijun的20行Python代码爬取王者荣耀全英雄皮肤的启发我去试试同样的方法爬取LOL皮肤,果然方法大同小异,毕竟都是腾讯系的首先进入LOL官网进入资料库获取全英雄的详细列表,包括ID、绰号、英文名、中文名等等url = 'https://game.gtimg.cn/images/lol/act/img/js/heroList/hero_list.js'herol...原创 2019-12-20 14:17:04 · 836 阅读 · 1 评论 -
python爬虫天猫超市
# -*- coding: utf-8 -*-from selenium import webdriverfrom selenium.webdriver.common.by import Byfrom selenium.webdriver.common.keys import Keysfrom selenium.webdriver.support import expected_condi...原创 2019-12-19 13:30:27 · 1130 阅读 · 0 评论 -
爬虫天猫超市失败
# -*- coding: utf-8 -*-"""Created on Fri Dec 6 09:33:51 2019@author: 18352"""from selenium import webdriverfrom selenium.webdriver.common.by import Byfrom selenium.webdriver.common.keys impo...原创 2019-12-13 14:11:04 · 316 阅读 · 0 评论 -
selenium的基础用法
from selenium import webdriverfrom selenium.webdriver.common.by import Byfrom selenium.webdriver.common.keys import Keysfrom selenium.webdriver.support import expected_conditions as ECfrom seleniu...原创 2019-12-05 17:14:36 · 194 阅读 · 0 评论 -
pandas清洗Kobe数据
清洗Kobe数据import pandas as pdimport matplotlib.pyplot as pltimport matplotlib.cm as cmimport numpy as npraw = pd.read_csv('.\data\kobe_data.csv')print(raw.shape)kobe = raw[pd.notnull(raw['shot_...原创 2019-11-05 23:25:20 · 246 阅读 · 0 评论 -
scikit-learn__03.2__Regression-Forests
Supervised Learning In-Depth: Random Forests(随机森林)以前,我们看到了一个强大的判别分类器** Support Vector Machines **。在这里,我们将探讨激励另一个强大的算法。 这是一种称为“随机森林”的非参数算法。%matplotlib inlineimport numpy as npimport matplotlib.pyp...翻译 2019-11-05 17:16:52 · 226 阅读 · 0 评论 -
scikit-learn__03.1__Classification-SVMs
深度监督学习:支持向量机之前,我们介绍了有监督的机器学习。有许多监督学习算法可用。 在这里,我们将简要介绍最强大且有趣的方法之一:支持向量机(SVM)。%matplotlib inlineimport numpy as npimport matplotlib.pyplot as pltfrom scipy import statsplt.style.use('seaborn')...翻译 2019-11-05 16:54:19 · 209 阅读 · 0 评论 -
scikit-learn__02.2__Basic-Principles
机器学习的基本原则在这里,我们将深入探讨机器学习的基本原理,以及如何通过Scikit-Learn API使用它们。在简要介绍scikit-learn的Estimator对象之后,我们将介绍有监督的学习,包括分类和回归问题,以及无监督的学习,包括降维和聚类问题。%matplotlib inlineimport numpy as npimport matplotlib.pyplot as p...翻译 2019-11-05 14:51:28 · 223 阅读 · 0 评论 -
scikit-learn__02.1__iMachine-Learnng
Scikit-Learn简介:使用Python进行机器学习本课程将涵盖Scikit-Learn的基础知识,Scikit-Learn是一个受欢迎的软件包,其中包含用Python编写的机器学习工具集合。 有关更多信息,请访问http://scikit-learn.org。大纲主要目标:介绍机器学习的中心概念,以及如何使用Scikit-learn软件包将其应用在Python中。机器学习的定义s...翻译 2019-11-05 11:59:28 · 189 阅读 · 0 评论 -
scikit-learn__01__Preliminaries
scikit-learn简介:Python中的机器学习本教程的目标介绍机器学习的基础知识,以及一些在实践中有用的技能。介绍scikit-learn的语法,以便您可以使用可用的丰富工具集。时间表:预备课程:设置和介绍(15分钟)确保您的计算机已安装机器学习和Scikit学习界面的基本原理(45分钟)什么是机器学习?机器学习数据布局监督学习分类回归衡量绩效无监督学习聚类...翻译 2019-11-05 10:57:41 · 124 阅读 · 0 评论 -
SQL server 2008数据备份与还原
选择位置添加备份文件,然后点击确定备份然后随便插入一些内容在数据库属性选择单用户模式,确定选择原设备勾上覆盖,点确定完成原创 2019-11-04 17:54:45 · 168 阅读 · 0 评论 -
Linux基础命令
原创 2019-10-27 23:48:34 · 133 阅读 · 0 评论 -
python将Excel导入SQL server 中
import xlrdimport pymssqlimport datetime # 连接本地sql server 地址 用户名 密码 数据库conn = pymssql.connect("192.168.**.***", "sa", "********", "*****")# 建立cursor...原创 2019-10-24 11:58:22 · 844 阅读 · 0 评论 -
python淘宝爬虫存入MonggoDB
# -*- coding: utf-8 -*-#定向爬取淘宝商品页面import requestsimport reimport pymongoclient = pymongo.MongoClient('localhost')db = client['taobao']headers = { 'Cookie':'thw=c9B567C18', 'Ho...原创 2019-10-23 09:43:26 · 268 阅读 · 0 评论 -
简单爬取知乎热榜到mongodb
import pymongoimport requestsfrom requests.exceptions import ConnectionErrorfrom pyquery import PyQuery as pqclient = pymongo.MongoClient('localhost')db = client['zhihu']base_url = 'https://...原创 2019-10-21 14:13:54 · 165 阅读 · 0 评论 -
使用代理把搜索结果导入mongo
# -*- coding: utf-8 -*-"""Spyder EditorThis is a temporary script file."""import pymongoimport requestsfrom requests.exceptions import ConnectionErrorfrom pyquery import PyQuery as pqclient...原创 2019-10-20 09:59:34 · 167 阅读 · 0 评论 -
正则表达式的练习笔记
import re表示或者C D都可以匹配re.search(r’Fish(C|D)’,“FishC”)re.search(r’Fish(C|D)’,“FishD”)'^'这个是作为字符串的开头'$'这个是作为字符串的结尾re.search(r’^FishC’,‘FishC.com’)re.search(r’FishC$’,‘I lover FishC’)''可以将一个普通字符变为...原创 2018-09-17 22:58:04 · 141 阅读 · 0 评论 -
爬虫框架Scrapy的第一个爬虫示例入门教程
Scrapy 框架之初窥探门径使用Scrapy抓取一个网站一共四个步骤:创建一个Scrapy项目定义Item容器编写爬虫存储内容创建一个Scrapy项目在cmd命令下输入C:\Users\Administrator>d:D:\>cd mypythonD:\mypython&原创 2018-09-18 11:50:16 · 836 阅读 · 0 评论 -
Scrapy练习笔记-2
继续-1的天气爬虫先爬后取在weather文件夹下出现两张网页的源代码之前顶了item容器,现在从两个网页中的源代码中找出titlelinkdesc分别保存提取出来。在cmd命令中C:\D\mypython\weather>scrapy shell "http://www.weather.com.cn/weather/101190401.shtml"将它载入之后就可以...原创 2018-09-19 11:47:06 · 92 阅读 · 0 评论 -
numpy练习笔记1
import numpy as nplst = [[1,3,5],[2,4,6]]print(type(lst))np_lst = np.array(lst)print(type(np_lst))np_lst = np.array(lst,dtype = np.float32)print(np_lst.shape)print(np_lst.ndim)#维度print(np_lst...原创 2018-09-20 15:34:31 · 189 阅读 · 0 评论 -
numpy练习笔记2
线性方程组计算from numpy.linalg import *import numpy as npprint(np.eye(3))#单位矩阵lst = np.array([[1,2], [3,4]])print('inv逆矩阵:')print(inv(lst))print('T:')print(lst.transpose())print(...原创 2018-09-20 16:13:38 · 129 阅读 · 0 评论 -
numpy练习笔记3
import numpy as npFFT不知道是什么print('FFT:')print(np.fft.fft(np.array([1,1,1,1,2,2,2])))输出结果:FFT:[ 10.0+0.j -0.5+2.19064313j -0.5-0.24078731j -0.5+0.62698017j -0.5-0.62698017j -0.5+0...原创 2018-09-20 16:29:20 · 128 阅读 · 0 评论 -
pandas的数据结构——Series
SeriesSeries是一种类似于数组的对象,它由一种数据以及一组与之相关的数据索引组成。from pandas import Series,DataFrameimport pandas as pdimport numpy as npobj = Series([4,7,-5,3])objOut[3]: 0 41 72 -53 3dtype: i...原创 2018-09-26 10:09:36 · 157 阅读 · 0 评论 -
pandas的数据结构——DataFrame
DataFrameDataFrame是一个表格性的数据结构,它含有一组有序数列,每类可以是不同的值类型(数值、字符串、布尔值等)from pandas import Series,DataFrameimport pandas as pd import numpy as npdata = {'英雄':['李白','程咬金','公孙离','芈月','典韦'], '定位':...原创 2018-09-26 11:50:15 · 153 阅读 · 0 评论 -
绘制cos和sin图表
import numpy as np import matplotlib.pyplot as pltx = np.linspace(-np.pi,np.pi,64,endpoint = True)c , s = np.cos(x) , np.sin(x)plt.figure(1)plt.plot(x,c,color = 'red',linewidth = 1.0,linestyle = ...原创 2018-09-20 17:58:19 · 4562 阅读 · 0 评论 -
MySQL基础-3
idstuNamecoursescore1张三语文912张三数学903张三英语874李四语文795李四数学956李四英语807王五语文778王五数学819王五英语89count()函数mysql> select count(*) from t_grade;+...原创 2018-10-11 09:30:54 · 86 阅读 · 0 评论 -
plot折线图
import matplotlib.pyplot as pltsquare = [1,4,9,16,25]plt.plot(square,linewidth = 5)plt.title('Square numbers',fontsize = 24)plt.xlabel('Value',fontsize = 24)plt.ylabel('Suqare of Value',fontsize...原创 2018-09-20 21:35:30 · 1130 阅读 · 0 评论