自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 资源 (7)
  • 收藏
  • 关注

原创 根据Geohash编码画中心点和边框

#得到司机的Geohash后返回前六位Geohash的图像from pygeohash import encode, decodeimport plotlyimport plotly.plotly as pyfimport plotly.graph_objs as goimport numpy as npimport pandas as pdimport mathfrom mat...

2020-01-18 14:13:08 1380

原创 测试_根据位置经纬度返回最近的Geohash

# 现在要做:# 2:取Geohash的前N位# 3:计算前位Geohash的demand#4 返回离司机最近的最有可能接单的Geohash位置和demandfrom pygeohash import encode, decodeimport plotlyimport plotly.plotly as pyfimport plotly.graph_objs as goimport...

2020-01-17 15:51:45 389

原创 Python常用技巧

1把str转为list列表taxi_geo1=taxi_geo1.split(",") #把str转为list列表

2020-01-17 13:13:14 161

原创 控制台输入Geohash的位数得到对应Geohash的订单量和占比

MySQL语句包含嵌套查询# 现在要做:# 2:取Geohash的前N位# 3:计算前位Geohash的demand# 4:根据出租车的位置经纬度返回最近的Geohashfrom pygeohash import encode, decodeimport plotlyimport plotly.plotly as pyfimport plotly.graph_objs as go...

2020-01-17 10:51:17 268

原创 取Geohash的前N位

def top_geohash(geohash1,n): new_total = [] # 根据total 得到的前4位全部的编码 block_dict = {} central_dict = {} for i in geohash1: new_total.append(i[:n]) # 取前n个geohash return new_to...

2020-01-17 08:51:50 329

原创 MySQL里的经纬度转为Geohash后插回数据库

MySQL里的经纬度转为Geohash后插回数据库from pygeohash import encode, decodeimport plotlyimport plotly.plotly as pyfimport plotly.graph_objs as goimport numpy as npimport pandas as pdimport mathfrom matplotl...

2020-01-16 21:30:30 1072

原创 MySQL分组后统计

MySQL分组后统计select count(*) as number ,BeginLongitude , BeginLatitude FROM Order_Data where FROM_UNIXTIME(BeginTime) <'2016-11-01 00:05:00' GROUP BY BeginLongitude, BeginLatitude

2020-01-16 17:52:27 1214

原创 把经纬度转换为Geohash(准确)

# 现在要做:# 1:把数据库的经纬度读出生成Geohash# 2:取Geohash的前N位# 3:计算前N未Geohash的demandfrom pygeohash import encode, decodeimport plotlyimport plotly.plotly as pyfimport plotly.graph_objs as goimport numpy as ...

2020-01-16 17:24:25 4879

原创 根据经纬度生成Geohash

#---zhangpengxu---#-*- coding: utf-8 -*-from pygeohash import encode, decodeimport plotlyimport plotly.plotly as pyfimport plotly.graph_objs as goimport numpy as npimport pandas as pdimport m...

2020-01-16 15:02:24 1713

原创 Python读取MySQL数据生成热力图

port numpy as npimport pandas as pdimport foliumimport webbrowserfrom folium.plugins import HeatMapimport datetimeimport timeimport pymysql.cursorsimport decimal# 创建一个游标conn = pymysql.connec...

2020-01-14 20:05:38 698

原创 Python用plotly画图

import plotly.offline as ofimport plotly.graph_objs as goof.offline.init_notebook_mode(connected=True)trace0 = go.Scatter( x=[1, 2, 3, 4], y=[10, 15, 13, 17], mode='markers')trace1 =...

2020-01-14 15:46:54 389

原创 python读取数据写入MySQL数据库

#—zhangpengxu—#-- coding: utf-8 --import datetimeimport timeimport pymysql.cursorsimport decimal创建一个游标conn = pymysql.connect(host=‘localhost’,port=3306,user=‘root’,passwd=‘xu19931026’,db=‘...

2020-01-14 11:16:46 1072

原创 机器学习测试002

sort_values函数import datetimeimport pandas as pddf = pd.DataFrame({'col1' : ['A', 'A', 'B', 'F', 'D', 'C'],'col2' : [2, 1, 9, 8, 7, 4],'col3': [0, 1, 9, 4, 2, 3],})print(df)输出:| col1 col2 col3...

2020-01-09 09:13:45 344

原创 Python网络爬虫学习

获取一个网页内容的标准方法:import requestsdef zpx(url): try: r=requests.get(url,timeout=30) r.raise_for_status() //如果状态不是200引发异常 r.encoding=r.apparent_encoding return r.text excep...

2020-01-09 09:08:19 253

原创 Python实现Excel生成汇总直方图

# -*- coding: utf-8 -*-import geohash as geohashimport xlwt # 写入excel文件的库import xlrd #读取Excelimport timeimport datetimeimport geohash #把经纬度转换为geohashimport randomstart_time=datetime.datet...

2020-01-08 12:10:35 2237

原创 把一个Excel中的经纬度转换为geohash写入另一个Excel

# -*- coding: utf-8 -*-import geohash as geohashimport xlwt # 写入excel文件的库import xlrd #读取Excelimport timeimport datetimeimport geohash #把经纬度转换为geohashstart_time=datetime.datetime.now()han...

2020-01-08 09:43:23 801 2

原创 matplotlib.pyplot画图

import matplotlib.pyplot as pltimport pandas as pdimport numpy as npfig,axes = plt.subplots(2,2,figsize=(15,5))s = pd.Series(np.random.randint(0,10,15),index = list('abcdefghijklmno'))#series是一个一...

2020-01-07 15:30:56 504

原创 Python多线程与多进程

多线程:def run(name): print(name, "线程执行了") time.sleep(10)# 程序执行时,程序本身就是一个线程,叫主线程# 手动创建的线程,叫子线程# 主线程的执行中不会等待子线程执行完毕,就会直接执行后面的代码# 创建线程t1 = threading.Thread(target=run, args=("t1",))t2 = th...

2020-01-03 08:34:09 183

原创 Python爬取豆瓣短评

豆瓣短评.pyfrom multiprocessing import Process #多进程import threading #多线程from lxml import etreeimport requestsimport timeimport randomimport ciyun as cy# //*[@id="comments"]/div[1]/div[2]/h3/s...

2020-01-03 08:32:14 1732

原创 简单的机器学习

# Regressor example# Code: https://github.com/keloli/KerasPractise/edit/master/Regressor.pyimport numpy as np #NumPy 通常与 SciPy(Scientific Python)和 Matplotlib(绘图库)一起使用, 这种组合广泛用于替代 MatLabnp.random....

2020-01-02 16:03:08 276

上班使用的打字小键盘考试程序

ZIP文件中有1源代码,2做完图标的安装文件msi发给运管的就是这个,3:使用说明PDF,4:作弊说明Word

2022-07-27

C#编写打字考试和数字录入考试

C#和sqlite数据库编写打字考试和数字录入考试

2022-05-12

多边形裁剪算法.rar

此代码为多边形裁剪算法,为光栅图形学算法续,此代码可以直接运行

2019-06-17

扫描线转换算法.rar

改进的多边形扫描转换算法(改进的X扫描线算法)此代码可以直接运行

2019-06-17

中点画线算法.rar

本代码可以直接运行,采用中点画线算法,优于DDA画线算法

2019-06-17

移动对象的轨迹查询

时空数据库查询与推理:本PPT介绍了移动对象的轨迹查询的基本理论

2019-02-25

空间数据库最近邻查询与反向最近邻查询

时空数据库查询与推理,本PPT介绍了空间数据库最近邻查询与反向最近邻查询

2019-02-25

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除