https://avatars.githubusercontent.com/u/103393591

给轻量应用腾讯云服务器或阿里云服务器加上IPV6地址隧道(2023)

给轻量应用腾讯云服务器加上IPV6地址隧道

这里使用6in4方法解决宿主机本身没有IPV6地址的问题。

给宿主机附加免费的IPV6地址段

有的机器本身没有IPV6的/64子网,这里给出一个方法免费附加IPV6的子网。

这里是使用6in4方法解决宿主机本身没有IPV6地址的问题。

PageRank实战-西游记人物节点重要程度

PageRank节点重要度

在NetworkX中,计算有向图节点的PageRank节点重要度。

参考资料

networkx官方教程:https://networkx.org/documentation/stable/tutorial.html

nx.Graph https://networkx.org/documentation/stable/reference/classes/graph.html#networkx.Graph

给图、节点、连接添加属性:https://networkx.org/documentation/stable/tutorial.html#attributes

读写图:https://networkx.org/documentation/stable/reference/readwrite/index.html

导入工具包

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import networkx as nx # 图数据挖掘
import numpy as np # 数据分析
import random # 随机数
import pandas as pd
 
# 数据可视化
import matplotlib.pyplot as plt
%matplotlib inline
plt.rcParams['font.sans-serif']=['SimHei']  # 用来正常显示中文标签  
plt.rcParams['axes.unicode_minus']=False  # 用来正常显示负号
1
G = nx.star_graph(7)
1
nx.draw(G, with_labels = True)

计算PageRank节点重要度

数据下载地址:http://www.openkg.cn/dataset/ch4masterpieces