05-networkX-结构洞计算

教程仓库地址:github networkx_tutorial

import networkx as nx
import matplotlib.pyplot as plt
import pandas as pd
import networkx as nx
df= pd.read_csv('./df.csv',index_col=0)
df.head()
AB
0H04N5H04N7
1G06F3G02F1
2G06F3H03K17
3G02F1H03K17
4NaNNaN
# 检查 'A' 和 'B' 这两列是否有空值
df_cal = df.dropna(subset=['A', 'B'])
# 首先对数据进行分组,并聚合权重
grouped = df_cal.groupby(['A', 'B']).size().reset_index(name='weight')
grouped.head()
ABweight
0A61B6G01T12
1A61B6G01T72
2A61B6G03B421
3A61B6G06T11
4A61B6H01L312
# 使用 DataFrame 构建网络图
G = nx.from_pandas_edgelist(grouped, 'A', 'B',edge_attr='weight')
print(G.edges(data = True))
[('A61B6', 'G01T1', {'weight': 2}), ('A61B6', 'G01T7', {'weight': 2}), ('A61B6', 'G03B42', {'weight': 1}), ('A61B6', 'G06T1', {'weight': 1}), ('A61B6', 'H01L31', {'weight': 2}), ('A61B6', 'H04L29', {'weight': 2}), ('A61B6', 'H04N5', {'weight': 2}), ('G01T1', 'G01T7', {'weight': 2}), ('G01T1', 'G03B42', {'weight': 1}), ('G01T1', 'H01L31', {'weight': 2}), ('G01T1', 'H04L29', {'weight': 2}), ('G01T1', 'H04N5', {'weight': 2}), ('G01T7', 'G03B42', {'weight': 1}), ('G01T7', 'H01L31', {'weight': 2}), ('G01T7', 'H04L29', {'weight': 2}), ('G01T7', 'H04N5', {'weight': 2}), ('G03B42', 'H01L31', {'weight': 2}), ('G03B42', 'H04L29', {'weight': 2}), ('G03B42', 'H04N5', {'weight': 2}), ('H01L31', 'H04L29', {'weight': 2}), ('H01L31', 'H04N5', {'weight': 2}), ('H01L31', 'H01L33', {'weight': 1}), ('H04L29', 'G06C1', {'weight': 1}), ('H04L29', 'G06F13', {'weight': 1}), ('H04L29', 'G06F17', {'weight': 1}), ('H04L29', 'G06F3', {'weight': 1}), ('H04L29', 'H04B1', {'weight': 1}), ('H04L29', 'H04L12', {'weight': 3}), ('H04L29', 'G06F1', {'weight': 1}), ('H04L29', 'G06F11', {'weight': 1}), ('H04L29', 'G06F15', {'weight': 1}), ('H04L29', 'G06F21', {'weight': 3}), ('H04L29', 'G06F9', {'weight': 1}), ('H04L29', 'G11B20', {'weight': 1}), ('H04L29', 'H04L69', {'weight': 1}), ('H04L29', 'H04L7', {'weight': 1}), ('H04L29', 'H04N21', {'weight': 1}), ('H04L29', 'H04N5', {'weight': 3}), ('H04L29', 'H04N7', {'weight': 2}), ('H04L29', 'H04W12', {'weight': 1}), ('H04L29', 'H04W4', {'weight': 2}), ('H04L29', 'H04W84', {'weight': 1}), ('H04L29', 'H04Q1', {'weight': 1}), ('H04L29', 'H04Q7', {'weight': 1}), ('H04N5', 'G01N21', {'weight': 1}), ('H04N5', 'G02B19', {'weight': 1}), ('H04N5', 'G02B26', {'weight': 1}), ('H04N5', 'G02B27', {'weight': 1}), ('H04N5', 'G02F1', {'weight': 1}), ('H04N5', 'G03B19', {'weight': 1}), ('H04N5', 'G03B21', {'weight': 1}), ('H04N5', 'G03B7', {'weight': 1}), ('H04N5', 'G03B9', {'weight': 1}), ('H04N5', 'G06F12', {'weight': 1}), ('H04N5', 'G06F13', {'weight': 1}), ('H04N5', 'G06F21', {'weight': 2}), ('H04N5', 'G09G3', {'weight': 2}), ('H04N5', 'G09G5', {'weight': 1}), ('H04N5', 'G11B20', {'weight': 3}), ('H04N5', 'G11B27', {'weight': 2}), ('H04N5', 'G11B7', {'weight': 2}), ('H04N5', 'H04B7', {'weight': 1}), ('H04N5', 'H04L12', {'weight': 1}), ('H04N5', 'H04M1', {'weight': 1}), ('H04N5', 'H04N1', {'weight': 2}), ('H04N5', 'G03B13', {'weight': 1}), ('H04N5', 'G06K9', {'weight': 1}), ('H04N5', 'G06T7', {'weight': 1}), ('H04N5', 'G11B19', {'weight': 2}), ('H04N5', 'H04L69', {'weight': 1}), ('H04N5', 'H04N7', {'weight': 1}), ('H04N5', 'H04N9', {'weight': 1}), ('H04N5', 'H04W12', {'weight': 1}), ('H04N5', 'H04W4', {'weight': 2}), ('H04N5', 'H04W72', {'weight': 1}), ('H04N5', 'H04W84', {'weight': 1}), ('H04N5', 'H05K13', {'weight': 1}), ('A61B8', 'G06T17', {'weight': 1}), ('G06T17', 'B25J9', {'weight': 1}), ('G06T17', 'G06F17', {'weight': 1}), ('G06T17', 'G06F9', {'weight': 1}), ('G06T17', 'G06G7', {'weight': 1}), ('A61N1', 'G06F15', {'weight': 1}), ('G06F15', 'G03G21', {'weight': 1}), ('G06F15', 'G06F1', {'weight': 1}), ('G06F15', 'G06F11', {'weight': 1}), ('G06F15', 'G06F12', {'weight': 3}), ('G06F15', 'G06F13', {'weight': 2}), ('G06F15', 'G06F21', {'weight': 1}), ('G06F15', 'G06F40', {'weight': 1}), ('G06F15', 'G06F9', {'weight': 1}), ('G06F15', 'H04L12', {'weight': 2}), ('G06F15', 'G06F17', {'weight': 1}), ('A63F13', 'A63F9', {'weight': 1}), ('A63F13', 'G06F19', {'weight': 1}), ('A63F13', 'G09F23', {'weight': 1}), ('A63F13', 'A63F7', {'weight': 1}), ('A63F9', 'A63F7', {'weight': 1}), ('A63F9', 'G09F23', {'weight': 1}), ('A63F9', 'G06F19', {'weight': 1}), ('G06F19', 'A63F7', {'weight': 1}), ('G06F19', 'G05B17', {'weight': 1}), ('G06F19', 'G06F17', {'weight': 1}), ('G06F19', 'G06G7', {'weight': 1}), ('G06F19', 'G09F23', {'weight': 1}), ('G06F19', 'G06F9', {'weight': 1}), ('G09F23', 'A63F7', {'weight': 1}), ('B05B1', 'B08B3', {'weight': 1}), ('B05B1', 'H01L21', {'weight': 1}), ('B05B1', 'H05K3', {'weight': 1}), ('B08B3', 'H01L21', {'weight': 1}), ('B08B3', 'H05K3', {'weight': 1}), ('B08B3', 'G02F1', {'weight': 1}), ('H01L21', 'C25D21', {'weight': 1}), ('H01L21', 'C25D3', {'weight': 1}), ('H01L21', 'G03F7', {'weight': 3}), ('H01L21', 'G11C11', {'weight': 5}), ('H01L21', 'G11C16', {'weight': 1}), ('H01L21', 'H01F7', {'weight': 1}), ('H01L21', 'B29C43', {'weight': 1}), ('H01L21', 'B29C45', {'weight': 1}), ('H01L21', 'C07F7', {'weight': 2}), ('H01L21', 'C09J7', {'weight': 1}), ('H01L21', 'C11D1', {'weight': 1}), ('H01L21', 'C11D11', {'weight': 1}), ('H01L21', 'C23C16', {'weight': 1}), ('H01L21', 'G01B11', {'weight': 1}), ('H01L21', 'G01B9', {'weight': 1}), ('H01L21', 'G02F1', {'weight': 1}), ('H01L21', 'G06F11', {'weight': 1}), ('H01L21', 'H01L23', {'weight': 1}), ('H01L21', 'H01L27', {'weight': 6}), ('H01L21', 'H01L29', {'weight': 3}), ('H01L21', 'H01L41', {'weight': 1}), ('H01L21', 'H02K41', {'weight': 1}), ('H01L21', 'H02K7', {'weight': 1}), ('H01L21', 'H05K3', {'weight': 2}), ('H01L21', 'H01L43', {'weight': 2}), ('H05K3', 'C08G59', {'weight': 1}), ('H05K3', 'C08L101', {'weight': 1}), ('H05K3', 'C08L63', {'weight': 1}), ('H05K3', 'C25D21', {'weight': 1}), ('H05K3', 'C25D3', {'weight': 1}), ('H05K3', 'G03F7', {'weight': 1}), ('H05K3', 'H01H85', {'weight': 1}), ('H05K3', 'H01L23', {'weight': 1}), ('H05K3', 'H01R4', {'weight': 1}), ('H05K3', 'H01R43', {'weight': 1}), ('H05K3', 'H05K1', {'weight': 1}), ('H05K3', 'B32B37', {'weight': 1}), ('H05K3', 'H01Q1', {'weight': 1}), ('B22F3', 'H02N11', {'weight': 1}), ('B22F3', 'H01L35', {'weight': 1}), ('H02N11', 'H01L35', {'weight': 1}), ('B25J9', 'G06G7', {'weight': 1}), ('B25J9', 'G06F17', {'weight': 1}), ('B25J9', 'G06F9', {'weight': 1}), ('G06G7', 'G05B17', {'weight': 1}), ('G06G7', 'G06F17', {'weight': 2}), ('G06G7', 'G06F9', {'weight': 2}), ('B29C45', 'B29C43', {'weight': 1}), ('B29C65', 'C03B37', {'weight': 1}), ('B29C65', 'G02B6', {'weight': 1}), ('B29C65', 'B65H75', {'weight': 1}), ('C03B37', 'B65H75', {'weight': 1}), ('C03B37', 'G02B6', {'weight': 1}), ('G02B6', 'B65H75', {'weight': 1}), ('G02B6', 'G02B26', {'weight': 1}), ('G02B6', 'G02F1', {'weight': 1}), ('G02B6', 'H04B10', {'weight': 1}), ('G02B6', 'H04J14', {'weight': 1}), ('B41M5', 'C07D493', {'weight': 1}), ('B41M5', 'C07D209', {'weight': 1}), ('B41M5', 'C07D277', {'weight': 1}), ('B41M5', 'C09B23', {'weight': 1}), ('B41M5', 'G11B7', {'weight': 1}), ('C07D493', 'C07D209', {'weight': 1}), ('C07D493', 'C07D277', {'weight': 1}), ('C07D493', 'C09B23', {'weight': 1}), ('C07D493', 'G11B7', {'weight': 1}), ('B42D15', 'H01M2', {'weight': 1}), ('B42D15', 'G06K19', {'weight': 1}), ('H01M2', 'G01R31', {'weight': 1}), ('H01M2', 'G06K19', {'weight': 1}), ('H01M2', 'H01M10', {'weight': 1}), ('H01M2', 'H02J7', {'weight': 1}), ('B60K26', 'B60T17', {'weight': 1}), ('B60K26', 'B60T7', {'weight': 1}), ('B60K26', 'B60T8', {'weight': 1}), ('B60K26', 'B60W30', {'weight': 1}), ('B60K26', 'B60W40', {'weight': 1}), ('B60K26', 'G08B21', {'weight': 1}), ('B60K26', 'B60K28', {'weight': 1}), ('B60K26', 'B60R21', {'weight': 1}), ('B60K26', 'G08G1', {'weight': 1}), ('B60T17', 'B60K28', {'weight': 1}), ('B60T17', 'B60R21', {'weight': 1}), ('B60T17', 'B60W30', {'weight': 1}), ('B60T17', 'B60W40', {'weight': 1}), ('B60T17', 'G08B21', {'weight': 1}), ('B60T17', 'B60T7', {'weight': 1}), ('B60T17', 'B60T8', {'weight': 1}), ('B60T17', 'G08G1', {'weight': 1}), ('B60T7', 'B60K28', {'weight': 1}), ('B60T7', 'B60R21', {'weight': 1}), ('B60T7', 'B60T8', {'weight': 1}), ('B60T7', 'B60W30', {'weight': 1}), ('B60T7', 'B60W40', {'weight': 1}), ('B60T7', 'G08B21', {'weight': 1}), ('B60T7', 'G08G1', {'weight': 1}), ('B60T8', 'B60K28', {'weight': 1}), ('B60T8', 'B60R21', {'weight': 1}), ('B60T8', 'B60W30', {'weight': 1}), ('B60T8', 'B60W40', {'weight': 1}), ('B60T8', 'G08B21', {'weight': 1}), ('B60T8', 'G08G1', {'weight': 1}), ('B60W30', 'B60K28', {'weight': 1}), ('B60W30', 'B60R21', {'weight': 1}), ('B60W30', 'B60W40', {'weight': 1}), ('B60W30', 'G08B21', {'weight': 1}), ('B60W30', 'G08G1', {'weight': 1}), ('B60W40', 'B60K28', {'weight': 1}), ('B60W40', 'B60R21', {'weight': 1}), ('B60W40', 'G08B21', {'weight': 1}), ('B60W40', 'G08G1', {'weight': 1}), ('G08B21', 'B60K28', {'weight': 1}), ('G08B21', 'B60R21', {'weight': 1}), ('G08B21', 'G08G1', {'weight': 1}), ('B60K28', 'B60R21', {'weight': 1}), ('B60K28', 'G08G1', {'weight': 1}), ('B60R21', 'G08G1', {'weight': 1}), ('B65B1', 'B65B59', {'weight': 1}), ('B65B1', 'G06Q50', {'weight': 1}), ('B65B1', 'B65B57', {'weight': 1}), ('B65B1', 'G06Q90', {'weight': 1}), ('B65B59', 'B65B57', {'weight': 1}), ('B65B59', 'G06Q50', {'weight': 1}), ('B65B59', 'G06Q90', {'weight': 1}), ('G06Q50', 'B65B57', {'weight': 1}), ('G06Q50', 'G06Q10', {'weight': 1}), ('G06Q50', 'G06Q20', {'weight': 1}), ('G06Q50', 'G06Q30', {'weight': 1}), ('G06Q50', 'H04M15', {'weight': 1}), ('G06Q50', 'G06Q90', {'weight': 1}), ('G06Q50', 'G07F7', {'weight': 1}), ('B65B57', 'G06Q90', {'weight': 1}), ('B65H1', 'G06Q20', {'weight': 1}), ('B65H1', 'G07B17', {'weight': 1}), ('B65H1', 'G07D11', {'weight': 1}), ('B65H1', 'G07F19', {'weight': 1}), ('B65H1', 'B65H29', {'weight': 1}), ('G06Q20', 'B65H29', {'weight': 1}), ('G06Q20', 'G06Q10', {'weight': 1}), ('G06Q20', 'G06Q30', {'weight': 1}), ('G06Q20', 'G07D11', {'weight': 1}), ('G06Q20', 'H04M15', {'weight': 1}), ('G06Q20', 'G07B17', {'weight': 1}), ('G06Q20', 'G07F19', {'weight': 1}), ('G06Q20', 'G07F7', {'weight': 1}), ('G07B17', 'B65H29', {'weight': 1}), ('G07B17', 'G07D11', {'weight': 1}), ('G07B17', 'G07F19', {'weight': 1}), ('G07D11', 'B65H29', {'weight': 1}), ('G07D11', 'G07F19', {'weight': 1}), ('G07F19', 'B65H29', {'weight': 1}), ('C07D209', 'C07D277', {'weight': 1}), ('C07D209', 'C09B23', {'weight': 1}), ('C07D209', 'G11B7', {'weight': 1}), ('C07D277', 'C09B23', {'weight': 1}), ('C07D277', 'G11B7', {'weight': 1}), ('C09B23', 'G11B7', {'weight': 1}), ('C08G59', 'C08L101', {'weight': 1}), ('C08G59', 'C08L63', {'weight': 1}), ('C08G59', 'G03F7', {'weight': 1}), ('C08L101', 'C08K3', {'weight': 1}), ('C08L101', 'C08K5', {'weight': 1}), ('C08L101', 'G03F7', {'weight': 1}), ('C08L101', 'H05K5', {'weight': 1}), ('C08L101', 'C08L63', {'weight': 1}), ('C08L101', 'H04R1', {'weight': 1}), ('C08L63', 'G03F7', {'weight': 1}), ('G03F7', 'C11D1', {'weight': 1}), ('G03F7', 'C11D11', {'weight': 1}), ('G03F7', 'G01B11', {'weight': 1}), ('G03F7', 'G01B9', {'weight': 1}), ('G03F7', 'H01L41', {'weight': 1}), ('G03F7', 'H02K41', {'weight': 1}), ('G03F7', 'H02K7', {'weight': 1}), ('G03F7', 'H01F7', {'weight': 1}), ('C08K3', 'C08K5', {'weight': 1}), ('C08K3', 'H04R1', {'weight': 1}), ('C08K3', 'H05K5', {'weight': 1}), ('C08K5', 'H04R1', {'weight': 1}), ('C08K5', 'H05K5', {'weight': 1}), ('H05K5', 'H01G2', {'weight': 1}), ('H05K5', 'H04R1', {'weight': 1}), ('C11D1', 'C11D11', {'weight': 1}), ('C23C16', 'C07F7', {'weight': 1}), ('C25D21', 'C25D3', {'weight': 1}), ('F04D13', 'H02K21', {'weight': 1}), ('F04D13', 'H02K5', {'weight': 1}), ('F04D13', 'F04D29', {'weight': 1}), ('F04D13', 'F04D5', {'weight': 1}), ('F04D13', 'G06F1', {'weight': 1}), ('F04D13', 'H05K7', {'weight': 1}), ('H02K21', 'F04D29', {'weight': 1}), ('H02K21', 'F04D5', {'weight': 1}), ('H02K21', 'G06F1', {'weight': 1}), ('H02K21', 'H02K19', {'weight': 1}), ('H02K21', 'H02M7', {'weight': 1}), ('H02K21', 'H02P7', {'weight': 1}), ('H02K21', 'H02P9', {'weight': 1}), ('H02K21', 'H02K5', {'weight': 1}), ('H02K21', 'H02P27', {'weight': 1}), ('H02K21', 'H05K7', {'weight': 1}), ('H02K5', 'F04D29', {'weight': 1}), ('H02K5', 'F04D5', {'weight': 1}), ('H02K5', 'G06F1', {'weight': 1}), ('H02K5', 'H05K7', {'weight': 1}), ('F04D29', 'G06F1', {'weight': 1}), ('F04D29', 'H05K7', {'weight': 1}), ('F04D29', 'F04D5', {'weight': 1}), ('G06F1', 'F04D5', {'weight': 1}), ('G06F1', 'G06F11', {'weight': 1}), ('G06F1', 'G06F21', {'weight': 1}), ('G06F1', 'G06F9', {'weight': 1}), ('G06F1', 'H04B1', {'weight': 1}), ('G06F1', 'H05K7', {'weight': 1}), ('G06F1', 'H01L23', {'weight': 1}), ('G06F1', 'H04L12', {'weight': 1}), ('H05K7', 'F04D5', {'weight': 1}), ('H05K7', 'H01L23', {'weight': 1}), ('H05K7', 'F24F13', {'weight': 1}), ('F16B1', 'F16F15', {'weight': 1}), ('F16B1', 'F16M11', {'weight': 1}), ('F16B1', 'G01S13', {'weight': 1}), ('F16B1', 'H01Q1', {'weight': 1}), ('F16B1', 'H01Q3', {'weight': 1}), ('F16F15', 'F16M11', {'weight': 1}), ('F16F15', 'G01S13', {'weight': 1}), ('F16F15', 'H01Q1', {'weight': 1}), ('F16F15', 'H01Q3', {'weight': 1}), ('F16C19', 'G01D5', {'weight': 1}), ('F16C19', 'H02K11', {'weight': 1}), ('F16C19', 'F16C41', {'weight': 1}), ('F16C19', 'G01P3', {'weight': 1}), ('G01D5', 'F16C41', {'weight': 1}), ('G01D5', 'H02K11', {'weight': 1}), ('G01D5', 'G01P3', {'weight': 1}), ('H02K11', 'F16C41', {'weight': 1}), ('H02K11', 'G01P3', {'weight': 1}), ('F16C41', 'G01P3', {'weight': 1}), ('F16M11', 'G01S13', {'weight': 1}), ('F16M11', 'H01Q1', {'weight': 1}), ('F16M11', 'H01Q3', {'weight': 1}), ('G01S13', 'H01Q1', {'weight': 1}), ('G01S13', 'H01Q3', {'weight': 1}), ('H01Q1', 'H01L23', {'weight': 1}), ('H01Q1', 'H01Q13', {'weight': 1}), ('H01Q1', 'H01Q9', {'weight': 2}), ('H01Q1', 'H01R13', {'weight': 1}), ('H01Q1', 'H01R4', {'weight': 1}), ('H01Q1', 'H01Q3', {'weight': 1}), ('F25B21', 'H01L35', {'weight': 1}), ('G01B9', 'G01B11', {'weight': 1}), ('G01C21', 'G05G19', {'weight': 1}), ('G01C21', 'G07B15', {'weight': 1}), ('G01C21', 'G08G1', {'weight': 1}), ('G01C21', 'H04B7', {'weight': 1}), ('G01C21', 'G01D21', {'weight': 1}), ('G05G19', 'G01D21', {'weight': 1}), ('G07B15', 'G08G1', {'weight': 1}), ('G07B15', 'H04B7', {'weight': 1}), ('G08G1', 'H04B7', {'weight': 1}), ('H04B7', 'G06F12', {'weight': 1}), ('H04B7', 'G06F21', {'weight': 1}), ('H04B7', 'G11B20', {'weight': 1}), ('H04B7', 'G11B27', {'weight': 1}), ('H04B7', 'H03M7', {'weight': 1}), ('H04B7', 'H04B1', {'weight': 2}), ('H04B7', 'H04J99', {'weight': 1}), ('H04B7', 'H04L1', {'weight': 1}), ('H04B7', 'H04L12', {'weight': 1}), ('H04B7', 'H04L25', {'weight': 1}), ('H04B7', 'H04M1', {'weight': 1}), ('H04B7', 'H04N1', {'weight': 1}), ('H04B7', 'H04N9', {'weight': 1}), ('H04B7', 'H04Q7', {'weight': 1}), ('H04B7', 'H04W16', {'weight': 1}), ('H04B7', 'H04W24', {'weight': 1}), ('H04B7', 'H04W28', {'weight': 1}), ('H04B7', 'H04W4', {'weight': 1}), ('H04B7', 'H04W48', {'weight': 1}), ('H04B7', 'H04W72', {'weight': 1}), ('H04B7', 'H04W76', {'weight': 1}), ('H04B7', 'H04W84', {'weight': 2}), ('H04B7', 'H04W88', {'weight': 1}), ('H04B7', 'H04W99', {'weight': 1}), ('G01D11', 'H03M1', {'weight': 1}), ('G01D11', 'H01H19', {'weight': 1}), ('H03M1', 'H01H19', {'weight': 1}), ('G01L9', 'G01P1', {'weight': 1}), ('G01L9', 'G01P15', {'weight': 1}), ('G01L9', 'H01L29', {'weight': 1}), ('G01P1', 'G01P15', {'weight': 1}), ('G01P1', 'H01L29', {'weight': 1}), ('G01N21', 'H05K13', {'weight': 1}), ('G01P15', 'H01L29', {'weight': 1}), ('H01L29', 'G02B5', {'weight': 1}), ('H01L29', 'G02F1', {'weight': 2}), ('H01L29', 'G06K19', {'weight': 3}), ('H01L29', 'G11C11', {'weight': 1}), ('H01L29', 'G11C16', {'weight': 1}), ('H01L29', 'H01L23', {'weight': 3}), ('H01L29', 'H01L25', {'weight': 3}), ('H01L29', 'H01L27', {'weight': 5}), ('H01L29', 'H02H9', {'weight': 3}), ('G01R31', 'G11C16', {'weight': 1}), ('G01R31', 'H02J7', {'weight': 1}), ('G01R31', 'G11C29', {'weight': 2}), ('G01R31', 'H01M10', {'weight': 1}), ('G11C16', 'G06F12', {'weight': 1}), ('G11C16', 'G11C11', {'weight': 1}), ('G11C16', 'G11C13', {'weight': 1}), ('G11C16', 'G11C7', {'weight': 1}), ('G11C16', 'H01L27', {'weight': 2}), ('G11C16', 'G11C29', {'weight': 1}), ('G11C16', 'H01L45', {'weight': 1}), ('H02J7', 'H01M10', {'weight': 1}), ('G02B19', 'G02B27', {'weight': 1}), ('G02B19', 'G03B21', {'weight': 1}), ('G02B27', 'G02B26', {'weight': 1}), ('G02B27', 'G02F1', {'weight': 1}), ('G02B27', 'G09G3', {'weight': 1}), ('G02B27', 'G09G5', {'weight': 1}), ('G02B27', 'H04M1', {'weight': 1}), ('G02B27', 'H04N9', {'weight': 1}), ('G02B27', 'G03B21', {'weight': 1}), ('G02B26', 'G02F1', {'weight': 2}), ('G02B26', 'G09G5', {'weight': 1}), ('G02B26', 'H04J14', {'weight': 1}), ('G02B26', 'H04N9', {'weight': 1}), ('G02B26', 'G09G3', {'weight': 1}), ('G02F1', 'G02B5', {'weight': 1}), ('G02F1', 'G09G3', {'weight': 2}), ('G02F1', 'G09G5', {'weight': 1}), ('G02F1', 'H01L27', {'weight': 1}), ('G02F1', 'H01S3', {'weight': 1}), ('G02F1', 'H03K17', {'weight': 1}), ('G02F1', 'H04J14', {'weight': 1}), ('G02F1', 'G06F3', {'weight': 1}), ('G02F1', 'G09F9', {'weight': 1}), ('G02F1', 'H04N9', {'weight': 1}), ('G02F1', 'H05B37', {'weight': 1}), ('G09G5', 'G06F13', {'weight': 1}), ('G09G5', 'G09G3', {'weight': 2}), ('G09G5', 'H04B3', {'weight': 1}), ('G09G5', 'H03K19', {'weight': 1}), ('G09G5', 'H04N9', {'weight': 1}), ('H04N9', 'G06F12', {'weight': 1}), ('H04N9', 'G06F21', {'weight': 1}), ('H04N9', 'G09G3', {'weight': 1}), ('H04N9', 'G11B20', {'weight': 2}), ('H04N9', 'G11B27', {'weight': 2}), ('H04N9', 'H04M1', {'weight': 1}), ('H04N9', 'H04N1', {'weight': 1}), ('H04N9', 'H04W4', {'weight': 1}), ('H04N9', 'H04W72', {'weight': 1}), ('G09G3', 'G06F13', {'weight': 1}), ('G09G3', 'G11C11', {'weight': 1}), ('G09G3', 'H01L27', {'weight': 2}), ('G09G3', 'H01L51', {'weight': 1}), ('G09G3', 'H03K19', {'weight': 1}), ('G09G3', 'H04B3', {'weight': 1}), ('G09G3', 'H05B33', {'weight': 2}), ('H04M1', 'G06F12', {'weight': 1}), ('H04M1', 'G06F21', {'weight': 1}), ('H04M1', 'G11B20', {'weight': 1}), ('H04M1', 'G11B27', {'weight': 1}), ('H04M1', 'H04N1', {'weight': 1}), ('H04M1', 'H04Q7', {'weight': 1}), ('H04M1', 'H04W4', {'weight': 1}), ('H04M1', 'H04W72', {'weight': 1}), ('G02B5', 'G03H1', {'weight': 1}), ('G02B5', 'G11B7', {'weight': 1}), ('G02B5', 'H01S5', {'weight': 1}), ('G03H1', 'G11B7', {'weight': 1}), ('G11B7', 'G06F12', {'weight': 1}), ('G11B7', 'G11B20', {'weight': 1}), ('G11B7', 'G11B27', {'weight': 1}), ('G11B7', 'G11B19', {'weight': 2}), ('G11B7', 'H01S5', {'weight': 1}), ('H01L27', 'G06F12', {'weight': 1}), ('H01L27', 'G09F9', {'weight': 1}), ('H01L27', 'G11C11', {'weight': 3}), ('H01L27', 'H01L23', {'weight': 3}), ('H01L27', 'G06F11', {'weight': 1}), ('H01L27', 'G06K19', {'weight': 3}), ('H01L27', 'G11C13', {'weight': 1}), ('H01L27', 'G11C7', {'weight': 2}), ('H01L27', 'H01L25', {'weight': 3}), ('H01L27', 'H02H9', {'weight': 3}), ('H01L27', 'H05B33', {'weight': 1}), ('H01L27', 'H01L43', {'weight': 2}), ('H01L27', 'H01L45', {'weight': 1}), ('H01L27', 'H01L51', {'weight': 1}), ('H03K17', 'G06F3', {'weight': 1}), ('G03B19', 'G06K9', {'weight': 1}), ('G03B19', 'G06T7', {'weight': 1}), ('G03B19', 'H04N1', {'weight': 1}), ('G06K9', 'G06F3', {'weight': 1}), ('G06K9', 'G07C9', {'weight': 1}), ('G06K9', 'G08B13', {'weight': 1}), ('G06K9', 'H04N7', {'weight': 1}), ('G06K9', 'G06T7', {'weight': 1}), ('G06K9', 'H04N1', {'weight': 1}), ('G06T7', 'H04N1', {'weight': 1}), ('G03B7', 'G03B13', {'weight': 1}), ('H01L41', 'H01F7', {'weight': 1}), ('H01L41', 'H02K41', {'weight': 1}), ('H01L41', 'H02K7', {'weight': 1}), ('H02K41', 'H01F7', {'weight': 1}), ('H02K41', 'H02K7', {'weight': 1}), ('H02K7', 'H01F7', {'weight': 1}), ('G03G21', 'H04L12', {'weight': 1}), ('G03G21', 'G06F13', {'weight': 1}), ('H04L12', 'G06F12', {'weight': 1}), ('H04L12', 'G06F13', {'weight': 4}), ('H04L12', 'G06F21', {'weight': 1}), ('H04L12', 'G06F3', {'weight': 1}), ('H04L12', 'H04B1', {'weight': 1}), ('H04L12', 'G06C1', {'weight': 1}), ('H04L12', 'G06F11', {'weight': 1}), ('H04L12', 'G06F17', {'weight': 1}), ('H04L12', 'G06F9', {'weight': 1}), ('H04L12', 'H04L69', {'weight': 1}), ('H04L12', 'H04M3', {'weight': 1}), ('H04L12', 'H04W12', {'weight': 1}), ('H04L12', 'H04W28', {'weight': 1}), ('H04L12', 'H04W4', {'weight': 2}), ('H04L12', 'H04W84', {'weight': 2}), ('H04L12', 'H04W99', {'weight': 1}), ('H04L12', 'H04Q3', {'weight': 1}), ('H04L12', 'H04Q7', {'weight': 1}), ('H04L12', 'H04W76', {'weight': 1}), ('H04L12', 'H04W80', {'weight': 1}), ('G05B17', 'G06F17', {'weight': 1}), ('G05B17', 'G06F9', {'weight': 1}), ('G06F17', 'G06F12', {'weight': 1}), ('G06F17', 'G06F13', {'weight': 2}), ('G06F17', 'G06F3', {'weight': 1}), ('G06F17', 'G06F40', {'weight': 1}), ('G06F17', 'G06F9', {'weight': 2}), ('G06F17', 'H04Q1', {'weight': 1}), ('G06F11', 'G06F21', {'weight': 1}), ('G06F11', 'G06F13', {'weight': 1}), ('G06F11', 'G06F9', {'weight': 2}), ('G06F21', 'G06F12', {'weight': 1}), ('G06F21', 'G06F13', {'weight': 1}), ('G06F21', 'G11B20', {'weight': 1}), ('G06F21', 'H04L69', {'weight': 1}), ('G06F21', 'H04N1', {'weight': 1}), ('G06F21', 'H04W12', {'weight': 1}), ('G06F21', 'H04W4', {'weight': 2}), ('G06F21', 'H04W72', {'weight': 1}), ('G06F21', 'H04W84', {'weight': 1}), ('G06F21', 'G06F9', {'weight': 1}), ('G06F21', 'G11B27', {'weight': 1}), ('G06F9', 'G06F13', {'weight': 1}), ('H04B1', 'H03M7', {'weight': 1}), ('H04B1', 'H03H7', {'weight': 1}), ('H04B1', 'H04J99', {'weight': 1}), ('H04B1', 'H04L1', {'weight': 1}), ('H04B1', 'H04L25', {'weight': 1}), ('H04B1', 'H04W24', {'weight': 1}), ('H04B1', 'H04W28', {'weight': 1}), ('H04B1', 'H04W48', {'weight': 1}), ('H04B1', 'H04W76', {'weight': 1}), ('H04B1', 'H04W84', {'weight': 1}), ('H04B1', 'H04W88', {'weight': 1}), ('H04B1', 'H04Q3', {'weight': 1}), ('G06F12', 'G06F13', {'weight': 1}), ('G06F12', 'G11B20', {'weight': 4}), ('G06F12', 'G11B27', {'weight': 1}), ('G06F12', 'G11C11', {'weight': 1}), ('G06F12', 'G11C7', {'weight': 1}), ('G06F12', 'H04N1', {'weight': 1}), ('G06F12', 'H04W4', {'weight': 1}), ('G06F12', 'H04W72', {'weight': 1}), ('G06F13', 'G06F3', {'weight': 1}), ('G06F13', 'G06K7', {'weight': 1}), ('G06F13', 'G11C5', {'weight': 1}), ('G06F13', 'H03K19', {'weight': 1}), ('G06F13', 'H04B3', {'weight': 1}), ('G06F13', 'H04L69', {'weight': 1}), ('G06F13', 'H04W12', {'weight': 1}), ('G06F13', 'H04W4', {'weight': 1}), ('G06F13', 'H04W84', {'weight': 1}), ('G06F13', 'H04Q1', {'weight': 1}), ('G11B20', 'G06F3', {'weight': 1}), ('G11B20', 'G11B19', {'weight': 2}), ('G11B20', 'G11B27', {'weight': 1}), ('G11B20', 'H04N1', {'weight': 1}), ('G11B20', 'H04N21', {'weight': 1}), ('G11B20', 'H04N7', {'weight': 1}), ('G11B20', 'H04W4', {'weight': 1}), ('G11B20', 'H04W72', {'weight': 1}), ('G11B20', 'G11B21', {'weight': 1}), ('G11B20', 'G11B5', {'weight': 1}), ('G11B20', 'H04L7', {'weight': 1}), ('G11B27', 'G11B19', {'weight': 2}), ('G11B27', 'H04N1', {'weight': 1}), ('G11B27', 'H04W4', {'weight': 1}), ('G11B27', 'H04W72', {'weight': 1}), ('G11C11', 'G11C13', {'weight': 1}), ('G11C11', 'G11C29', {'weight': 1}), ('G11C11', 'G11C7', {'weight': 4}), ('G11C11', 'H01L43', {'weight': 2}), ('G11C11', 'H01L45', {'weight': 1}), ('G11C11', 'H01L51', {'weight': 1}), ('G11C11', 'H05B33', {'weight': 1}), ('G11C7', 'G11C29', {'weight': 1}), ('H04N1', 'H04W4', {'weight': 1}), ('H04N1', 'H04W72', {'weight': 1}), ('H04W4', 'H04Q7', {'weight': 1}), ('H04W4', 'H04L69', {'weight': 1}), ('H04W4', 'H04W12', {'weight': 1}), ('H04W4', 'H04W72', {'weight': 1}), ('H04W4', 'H04W84', {'weight': 1}), ('H04W72', 'H04J13', {'weight': 1}), ('H04W72', 'H04Q7', {'weight': 1}), ('H04W72', 'H04W16', {'weight': 1}), ('H04W72', 'H04W24', {'weight': 1}), ('H04W72', 'H04W28', {'weight': 1}), ('H04W72', 'H04W76', {'weight': 1}), ('G06F3', 'G11C5', {'weight': 1}), ('G06F3', 'G11B21', {'weight': 1}), ('G06F3', 'G11B5', {'weight': 1}), ('H03K19', 'H04B3', {'weight': 1}), ('H04L69', 'H04W12', {'weight': 1}), ('H04L69', 'H04W84', {'weight': 1}), ('H04W12', 'H04W84', {'weight': 1}), ('H04W84', 'H03M7', {'weight': 1}), ('H04W84', 'H04L1', {'weight': 1}), ('H04W84', 'H04L25', {'weight': 1}), ('H04W84', 'H04W24', {'weight': 1}), ('H04W84', 'H04W28', {'weight': 2}), ('H04W84', 'H04W48', {'weight': 1}), ('H04W84', 'H04W76', {'weight': 1}), ('H04W84', 'H04W88', {'weight': 1}), ('H04W84', 'H04W99', {'weight': 1}), ('G06K19', 'H01L23', {'weight': 3}), ('G06K19', 'H01L25', {'weight': 3}), ('G06K19', 'H02H9', {'weight': 3}), ('H01L23', 'H02H9', {'weight': 3}), ('H01L23', 'H01L25', {'weight': 3}), ('H01L25', 'H02H9', {'weight': 3}), ('G07C9', 'G08B13', {'weight': 1}), ('G07C9', 'H04N7', {'weight': 1}), ('G08B13', 'H04N7', {'weight': 1}), ('H04N7', 'H04L7', {'weight': 1}), ('H04N7', 'H04N19', {'weight': 2}), ('H04N7', 'H04N21', {'weight': 1}), ('G06Q10', 'H04M15', {'weight': 1}), ('G06Q10', 'G06Q30', {'weight': 1}), ('G06Q10', 'G07F7', {'weight': 1}), ('H04M15', 'G06Q30', {'weight': 1}), ('H04M15', 'G07F7', {'weight': 1}), ('G06Q30', 'G07F7', {'weight': 1}), ('H01L51', 'H05B33', {'weight': 1}), ('H04N21', 'H04L7', {'weight': 1}), ('G11B21', 'G11B25', {'weight': 1}), ('G11B21', 'G11B33', {'weight': 1}), ('G11B21', 'G11B5', {'weight': 2}), ('G11B21', 'H02N2', {'weight': 1}), ('G11B25', 'G11B33', {'weight': 1}), ('G11B25', 'G11B5', {'weight': 1}), ('G11B33', 'G11B5', {'weight': 1}), ('G11B5', 'H01L43', {'weight': 1}), ('G11B5', 'H02N2', {'weight': 1}), ('G11C13', 'H01L45', {'weight': 1}), ('H01H85', 'H01R4', {'weight': 1}), ('H01H85', 'H01R43', {'weight': 1}), ('H01H85', 'H05K1', {'weight': 1}), ('H01R4', 'H01R13', {'weight': 1}), ('H01R4', 'H01R43', {'weight': 1}), ('H01R4', 'H05K1', {'weight': 1}), ('H01R43', 'H05K1', {'weight': 1}), ('H01Q13', 'H01Q9', {'weight': 2}), ('H02H3', 'H02H7', {'weight': 1}), ('H02H3', 'H02M3', {'weight': 1}), ('H02H7', 'H02M3', {'weight': 1}), ('H02K19', 'H02M7', {'weight': 1}), ('H02K19', 'H02P7', {'weight': 1}), ('H02K19', 'H02P9', {'weight': 1}), ('H02K19', 'H02P27', {'weight': 1}), ('H02M7', 'H02P7', {'weight': 1}), ('H02M7', 'H02P9', {'weight': 1}), ('H02M7', 'H02P27', {'weight': 1}), ('H02P7', 'H02P27', {'weight': 1}), ('H02P7', 'H02P9', {'weight': 1}), ('H02P9', 'H02P27', {'weight': 1}), ('H03M7', 'H04L1', {'weight': 1}), ('H03M7', 'H04L25', {'weight': 1}), ('H03M7', 'H04W24', {'weight': 1}), ('H03M7', 'H04W28', {'weight': 1}), ('H03M7', 'H04W48', {'weight': 1}), ('H03M7', 'H04W76', {'weight': 1}), ('H03M7', 'H04W88', {'weight': 1}), ('H04L1', 'H04L25', {'weight': 1}), ('H04L1', 'H04W24', {'weight': 1}), ('H04L1', 'H04W28', {'weight': 1}), ('H04L1', 'H04W48', {'weight': 1}), ('H04L1', 'H04W76', {'weight': 1}), ('H04L1', 'H04W88', {'weight': 1}), ('H04L25', 'H04J11', {'weight': 1}), ('H04L25', 'H04L27', {'weight': 1}), ('H04L25', 'H04W24', {'weight': 1}), ('H04L25', 'H04W28', {'weight': 1}), ('H04L25', 'H04W48', {'weight': 1}), ('H04L25', 'H04W76', {'weight': 1}), ('H04L25', 'H04W88', {'weight': 1}), ('H04W24', 'H04J13', {'weight': 1}), ('H04W24', 'H04Q7', {'weight': 1}), ('H04W24', 'H04W16', {'weight': 1}), ('H04W24', 'H04W28', {'weight': 2}), ('H04W24', 'H04W48', {'weight': 1}), ('H04W24', 'H04W76', {'weight': 2}), ('H04W24', 'H04W88', {'weight': 1}), ('H04W28', 'H04J13', {'weight': 1}), ('H04W28', 'H04Q7', {'weight': 1}), ('H04W28', 'H04W16', {'weight': 1}), ('H04W28', 'H04W48', {'weight': 1}), ('H04W28', 'H04W76', {'weight': 3}), ('H04W28', 'H04W80', {'weight': 1}), ('H04W28', 'H04W88', {'weight': 2}), ('H04W28', 'H04W99', {'weight': 1}), ('H04W48', 'H04W76', {'weight': 1}), ('H04W48', 'H04W88', {'weight': 1}), ('H04W76', 'H04J13', {'weight': 1}), ('H04W76', 'H04Q7', {'weight': 1}), ('H04W76', 'H04W16', {'weight': 1}), ('H04W76', 'H04W80', {'weight': 1}), ('H04W76', 'H04W88', {'weight': 1}), ('H04Q7', 'H04J13', {'weight': 1}), ('H04Q7', 'H04W16', {'weight': 2}), ('H04W16', 'H04J13', {'weight': 1}), ('H04J11', 'H04L27', {'weight': 1})]

from tqdm import tqdmdef calculate_constraints_with_progress(G, nodes=None, weight='weight'):if nodes is None:nodes = list(G.nodes)constraint = {}# 包装nodes列表到tqdm进度条中for v in tqdm(nodes, desc="Calculating constraints"):# Constraint is not defined for isolated nodesif len(G[v]) == 0:constraint[v] = float("nan")continueconstraint[v] = sum(nx.local_constraint(G, v, n, weight) for n in set(nx.all_neighbors(G, v)))return constraintdef degree_centrality_with_progress(G):if len(G) <= 1:return {n: 1 for n in G}s = 1.0 / (len(G) - 1.0)centrality = {}# 使用tqdm显示进度条for n, d in tqdm(G.degree(), desc="Calculating degree centrality"):centrality[n] = d * sreturn centrality``````python
# 结构洞
print('****cal 结构洞 ********')
holes_dict= calculate_constraints_with_progress(G, nodes=None, weight='weight')# 度数中心度
print('****cal degree_centrality ********')
degree_cen = degree_centrality_with_progress(G) 
****cal 结构洞 ********Calculating constraints: 100%|██████████| 236/236 [00:00<00:00, 237.18it/s]****cal degree_centrality ********Calculating degree centrality: 100%|██████████| 236/236 [00:00<?, ?it/s]

# 将结果转换为 DataFrame
print('****将结果转换为 DataFrame ********')
holes_df = pd.DataFrame.from_dict(holes_dict, orient='index', columns=['Constraint'])
degree_cen_df = pd.DataFrame.from_dict(degree_cen, orient='index', columns=['Degree Centrality'])print('****合并两个 DataFrame ********')
combined_df = pd.concat([holes_df, degree_cen_df], axis=1)# 将结果保存为 Excel 文件
output_filepath = 'network_analysis_results_加权.xlsx'
combined_df.to_excel(output_filepath)output_filepath
****将结果转换为 DataFrame ********
****合并两个 DataFrame ********'network_analysis_results_加权.xlsx'

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/151721.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

C语言模拟实现Liunx操作系统与用户之间的桥梁shell(代码详解)

什么是shell&#xff1f; Shell&#xff08;壳&#xff09;是指命令行界面&#xff08;CLI&#xff09;或脚本语言&#xff0c;它为用户提供了与操作系统交互的方式。它是一个程序&#xff0c;从用户那里接收命令&#xff0c;并通过与操作系统内核交互来执行这些命令。Shell充当…

CDN加速在社会发展中的挑战与机遇

随着互联网的迅猛发展&#xff0c;CDN&#xff08;内容分发网络&#xff09;加速技术在网络领域的应用逐渐成为推动社会进步的关键因素之一。CDN加速通过在全球范围内分布的服务器群&#xff0c;将内容快速分发到用户&#xff0c;提升了网络性能和用户体验。然而&#xff0c;CD…

CTFHub Git泄露

Log 前言 根据题目描述&#xff0c;这个题目需要使用到工具 GitHack 来完成&#xff0c;而 CTFHub 上提供的工具需要在 python2 环境中执行&#xff0c;注意 python3 环境无法使用。 GitHack准备&#xff08;kali Linux&#xff09; 打开虚拟机 sudo su 以管理员的身份运行…

开源更安全? yum源配置/rpm 什么是SSH?

文章目录 1.开放源码有利于系统安全2.yum源配置&#xff0c;这一篇就够了&#xff01;(包括本地&#xff0c;网络&#xff0c;本地共享yum源)3.rpm包是什么4.SSH是什么意思&#xff1f;有什么功能&#xff1f; 1.开放源码有利于系统安全 开放源码有利于系统安全 2.yum源配置…

Java 11及更高版本的Oracle JDK版本

2021 年 9 月 14 日&#xff0c;Oracle 发布了可以长期支持的 JDK17 版本&#xff0c;那么从 JDK11 到 JDK17&#xff0c;到底带来了哪些特性呢&#xff1f;亚毫秒级的 ZGC 效果到底怎么样呢&#xff1f;值得我们升级吗&#xff1f;而且升级过程会遇到哪些问题呢&#xff1f;带…

【Spring boot】RedisTemplate中String、Hash、List设置过期时间

文章目录 前言Redis中String设置时间的方法Redis中Hash和List设置时间的方法Redis中Hash的put、putAll、putIfAbsent区别 前言 时间类型&#xff1a;TimeUnit import java.util.concurrent.TimeUnit;TimeUnit.SECONDS:秒 TimeUnit.MINUTES&#xff1a;分 TimeUnit.HOURS&…

Javaweb之Ajax的详细解析

1.1 Ajax介绍 1.1.1 Ajax概述 我们前端页面中的数据&#xff0c;如下图所示的表格中的学生信息&#xff0c;应该来自于后台&#xff0c;那么我们的后台和前端是互不影响的2个程序&#xff0c;那么我们前端应该如何从后台获取数据呢&#xff1f;因为是2个程序&#xff0c;所以…

cobol基本语法

字符集 包括78个字符 A-Z a-z 0-9 &#xff08;空格 - * / $ ,&#xff08;逗号&#xff09; ;&#xff08;分号&#xff09; .&#xff08;小数点或英文句号&#xff09; ""&#xff08;双引号&#xff09; (&#xff08;左括号&#xff09; )&#xff08;右括号&…

“移动机器人课程群实践创新的困境与突围”素材

以下是一篇应用型本科教研论文“移动机器人课程群实践创新的困境与突围”的大纲。您可以根据这个大纲展开您的论文写作&#xff1a; 一、引言 移动机器人技术的发展和应用价值移动机器人课程群在应用型本科教育中的重要性论文目的和研究问题&#xff1a;解析移动机器人课程群实…

利用OpenCV做个熊猫表情包 二

之前写了一篇 利用OpenCV做个熊猫表情包吧_Leen的博客-CSDN博客 回想起来觉得有点太弱了&#xff0c;意犹未尽&#xff0c;每次使用需要自己去手动截取人脸&#xff0c;清除黑边什么的才能使用demo去合成表情&#xff0c;无奈之前由于安装的vs&#xff0c;opencv版本都比较低…

扩散模型实战(十):Stable Diffusion文本条件生成图像大模型

推荐阅读列表&#xff1a; 扩散模型实战&#xff08;一&#xff09;&#xff1a;基本原理介绍 扩散模型实战&#xff08;二&#xff09;&#xff1a;扩散模型的发展 扩散模型实战&#xff08;三&#xff09;&#xff1a;扩散模型的应用 扩散模型实战&#xff08;四&#xff…

【推荐】智元兔AI:一款集写作、问答、绘画于一体的全能工具!

在当今技术飞速发展的时代&#xff0c;越来越多的领域开始应用人工智能&#xff08;Artificial Intelligence&#xff0c;简称AI&#xff09;。其中&#xff0c;AI写作工具备受瞩目&#xff0c;备受推崇。在众多的选择中&#xff0c;智元兔AI是一款在笔者使用过程中非常有帮助的…

Halcon Solution Guide I basics(2): Image Acquisition(图像加载)

文章目录 文章专栏前言文章解读文章开头流程图算子介绍案例自主练习读取一张图片读取多张图片 文章专栏 Halcon开发 Halcon学习 练习项目gitee仓库 前言 今天来看Halcon的第二章&#xff0c;图像获取。在第二章之后&#xff0c;后面文章就会提供案例了。到时候我会尽量完成每一…

场景交互与场景漫游-交运算与对象选取(8-1)

交运算与对象选取 在面对大规模的场景管理时&#xff0c;场景图形的交运算和图形对象的拾取变成了一项基本工作。OSG作为一个场景管理系统&#xff0c;自然也实现了场景图形的交运算&#xff0c;交运算主要封装在osgUtil 工具中在OSG中&#xff0c;osgUtil是一个非常强有力的工…

@AutoConfigurationPackage的使用

作用 参考&#xff1a;https://blog.csdn.net/yasinawolaopo/article/details/121319977 不过文章最后这个结论是有点问题的&#xff0c;这个注解的作用只导入了一个bean&#xff0c;就是AutoConfigurationPackages.class.getName()。 了解introspectedClass&#xff08;内省…

【Python】给定一个长度为n的数列,将这个数列按从小到大的顺序排列。1<=n<=200

2、问题描述 给定一个长度为n的数列&#xff0c;将这个数列按从小到大的顺序排列。1<n<200 样例输入 5 8 3 6 4 9 样例输出 3 4 6 8 9 n int(input()) a list(map(int,input().split())) a.sort() for i in a:print(i,end ) 运行结果&#xff1a;

深度学习基础

深度强化学习 教程链接 DataWhale强化学习课程JoyRL https://johnjim0816.com/joyrl-book/#/ch7/main 深度学习基础 强化学习的问题可以拆分成两类问题&#xff0c;即预测与控制。预测的主要目的是根据环境的状态以及动作来预测状态的价值与动作的价值&#xff0c;而控制的…

毕业设计JSP 2384网上diy蛋糕店管理系统【程序源码+讲解视频+调试运行】

一、摘要 本文将介绍一个功能全面、易于使用的网上DIY蛋糕店管理系统。该系统包括用户和管理员两种用户&#xff0c;每种用户都有相应的功能模块。系统实现了网站首页、用户注册/登录、蛋糕展示、综合排行、购物车、蛋糕DIY和用户中心等功能&#xff0c;同时管理员还可以进行管…

CISP全真模式测试题(二)

免责声明 文章仅做经验分享用途,利用本文章所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,作者不为此承担任何责任,一旦造成后果请自行承担!!! 1、下列关于信息安全保障的说法错误的是: A.信息安全保障的问题就是安全的效用问题,在解决或预…