04 2020 档案
摘要:原文: https://www.imooc.com/article/301601 快速使用 github:https://github.com/apanly/python3_flask_frame 码云:https://gitee.com/apanly/python3_flask_frame
阅读全文
摘要:#模块管理 from flask import Blueprint route_icc = Blueprint('icc',__name__) @route_icc.route('/') def index(): return 'icc index' @route_icc.route('/hello
阅读全文
摘要:去配置中添加额外配置,flask run生效
阅读全文
摘要://安装python sudo yum -y install python3 //安装虚拟环境 sudo pip3 install virtualenv //创建虚拟环境 virtualenv -p /usr/bin/python3 文件夹名字 //进入虚拟环境 cd 文件夹 -->source b
阅读全文
摘要:0、centOS7 mini版安装及网络配置 //可从我的网盘保存下载,可用虚拟机安装 链接:https://pan.baidu.com/s/10_AHxN0DtJ75s1oFOaaZ3A 密码:udsn //初始用户名是root,密码自己安装前设置 //安装网络查看工具ifconfig yum i
阅读全文
摘要:from keras.datasets import mnist (train_images,train_labels),(test_images,test_labels)=mnist.load_data() 此处会报 SSL: CERTIFICATE_VERIFY_FAILED] certific
阅读全文
摘要:对于一组数据排序 算法使用环境不一样,需要选更优的算法 1、是否包含大量重复元素? -->三路快速排序,否则普通快速排序 2、是否近乎有序?-->插入排序 3、是否取值范围有限?-->计数排序(利用数组下标来确定元素的正确位置。) 4、是否需要稳定排序?-->归并排序,否则快排 5、是否使用链表存储
阅读全文
摘要:处理含有负权环的图 #include <iostream> #include <vector> #include <stack> #include "Edge.h" #include "IndexMinHeap.h" using namespace std; template<typename Gr
阅读全文
摘要:前提不能有负权边,同样借助最小索引堆实现 #include <iostream> #include <vector> #include <stack> #include "Edge.h" #include "IndexMinHeap.h" using namespace std; template<
阅读全文
摘要:先排序,挑最小权值,并利用并查集判断不能形成环 #include <iostream> #include <vector> #include "MinHeap.h" #include "UnionFind5.h" #include "Edge.h" using namespace std; temp
阅读全文
摘要:利用最小索引堆优化prim #include <iostream> #include <vector> #include <cassert> #include "Edge.h" #include "IndexMinHeap.h" using namespace std; template<typen
阅读全文
摘要:#include "MinHeap.h" using namespace std; template<typename Graph,typename Weight> class LazyPrimMST { private: Graph &G; MinHeap<Edge<Weight>> pq;//最
阅读全文
摘要:稠密图 #ifndef DENSEGRAPH_H #define DENSEGRAPH_H #include <iostream> #include <vector> #include <cassert> #include "Edge.h" using namespace std; //稠密图 --
阅读全文
摘要:#include <cassert> #include <vector> template<typename Graph> class ShortestPath { private: Graph &G; int s; //某一个点 bool* visited; int* from;//路径 int
阅读全文
摘要:#include <cassert> #include <vector> template<typename Graph> class Path { private: Graph &G; int s; //某一个点 bool* visited; int* from;//路径 void dfs(int
阅读全文
摘要:#ifndef COMPONENT_H #define COMPONENT_H #include <iostream> #include <cassert> using namespace std; //图的深度优先遍历 template<typename Graph> class Componen
阅读全文
摘要:稀疏图 #ifndef SPARSEGRAPH_H #define SPARSEGRAPH_H #include <iostream> #include <vector> #include <cassert> using namespace std; //稀疏图图 -- 邻接表 class Spar
阅读全文
摘要:查询两个节点是否连接,把两个节点相连,并查集 #ifndef UNIONFIND_UNIONFIND5_H #define UNIONFIND_UNIONFIN5_H #include <iostream> #include <cassert> using namespace std; namesp
阅读全文