上一页 1 2 3 4 5 6 7 ··· 21 下一页
摘要: 1 import math 2 import datetime 3 import multiprocessing as mp 4 5 # 调用 Python 自带的多进程库 Multiprocessing, 就可以进行 多核并行 计算 6 7 # 定义目标函数 8 def train_on_para 阅读全文
posted @ 2021-09-06 15:49 土博姜山山 阅读(615) 评论(0) 推荐(0)
摘要: 1 import threading 2 import math 3 import datetime 4 5 # 多线程本质上是在一个 Python 程序里做的一个资源再分配,把几段代码的运行顺序进行先后调整达到 CPU 资源利用的最大化。 6 # 但是这么做的一个缺点就是资源竞争Resource 阅读全文
posted @ 2021-09-06 15:48 土博姜山山 阅读(295) 评论(0) 推荐(0)
摘要: 1 import threading 2 3 # 多线程本质上是在一个 Python 程序里做的一个资源再分配,把几段代码的运行顺序进行先后调整达到 CPU 资源利用的最大化。 4 # 但是这么做的一个缺点就是资源竞争Resource Contention,意思就是有可能几段代码同时在读写一个参数的 阅读全文
posted @ 2021-09-06 15:47 土博姜山山 阅读(730) 评论(0) 推荐(0)
摘要: 1 import threading 2 3 # 多线程本质上是在一个 Python 程序里做的一个资源再分配,把几段代码的运行顺序进行先后调整达到 CPU 资源利用的最大化。 4 5 # 直接继承线程类,然后覆盖继承类函数的方法 6 class ThreadChild(threading.Thre 阅读全文
posted @ 2021-09-06 15:45 土博姜山山 阅读(94) 评论(0) 推荐(0)
摘要: 一、PostgreSQL 10+ PostGIS 3已经安装完成 二、OSM(beijing-latest.osm)文件已经成功转换成EPSG:2436平面坐标系,并且已经完成在交点处分割道路,最后保存成OSM格式(也可以是shp格式) 三、利用osmosis将.osm文件存入PostgreSQL+ 阅读全文
posted @ 2021-08-13 14:41 土博姜山山 阅读(694) 评论(0) 推荐(0)
摘要: 一、环境安装+工具下载【请自行安装并配置完成】 1. PostgreSQL 10(一个开源的对象-关系型数据库管理系统ORDBMS): https://www.enterprisedb.com/downloads/postgres-postgresql-downloads 2. PostGIS 3( 阅读全文
posted @ 2021-08-12 15:22 土博姜山山 阅读(490) 评论(0) 推荐(0)
摘要: window下源码编译mmcv-full==1.2.1 软件准备: Git、vs2019_community、Miniconda3-4.6.14、cuda_10.2+cudnn_7.6.5 一、确认NVIDIA GeForce RTX 2080 Ti已安装 cmd 命令:nvidia-smi OR 阅读全文
posted @ 2021-08-10 19:53 土博姜山山 阅读(587) 评论(0) 推荐(1)
摘要: 1 import pickle 2 import psycopg2 3 import alphashape 4 import numpy as np 5 import geopandas as gpd 6 import matplotlib.pyplot as plt 7 from shapely. 阅读全文
posted @ 2021-08-08 16:43 土博姜山山 阅读(730) 评论(0) 推荐(0)
摘要: 1 import math 2 3 # visualisation 4 import matplotlib.pyplot as plt 5 import matplotlib.lines as lines 6 # visualisation 7 8 def Sum_points(P1, P2): 9 阅读全文
posted @ 2021-08-08 15:04 土博姜山山 阅读(848) 评论(0) 推荐(0)
摘要: 1 def matrix2gray(mat): 2 """ 3 convert matrix image into gray image 4 :param mat: matrix (n x m) with numpy type 5 :return: mat 6 """ 7 min_v = int(m 阅读全文
posted @ 2021-08-08 14:48 土博姜山山 阅读(103) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 21 下一页