Pycharm+Neo4j红楼梦人物关系图谱

欢迎来到我的主页~【蜡笔小新..】

本篇收录于专栏【Python】

如果对你有帮助,希望点赞收藏加关注啦~

目录

前言

neo4j基础知识

Pycharm及代码实现

 py2neo

 数据集获取

代码介绍


前言

Python实验课时,老师提到用知识图谱构建红楼梦的人物关系图,所以课后根据视频和博客的学习,初尝试用neo4j进行构建,也在学习如何用Python直接进行手撕关系图并可视化,但是目前效果不佳,后续构建好继续分享在专栏。

neo4j基础知识

neo4j.com进行数据库下载安装

使用命令行输入

neo4j.bat console

 找到localhost:7474,复制到浏览器进行登录,初始用户名和密码均为neo4j

其实在最顶端的窗口可以直接进行图谱的搭建,但由于本文是实现 Python进行构建,所以不在此进行赘述。

Pycharm及代码实现

 py2neo

neo4j提供python接口,可以使用py2neo库通过python操作neo4j数据库,py2neo安装较为简单,仅需要使用pip install方式进行安装。使用如下命令:

pip install py2neo

 安装完后进行测试:

from py2neo import Graph, Node, Relationship

def connect_database(username, password, dbname):
    graph_db = Graph("http://localhost:7474", name=dbname, auth=(username, password))
    return graph_db
    
if __name__ == '__main__':
    graph = connect_database("neo4j", "password", "neo4j")

 数据集获取

 将以下内容复制到txt文件中,再改为csv文件

 

"head","tail","relation","label"
"贾代善","贾源","son","子"
"娄氏","贾源","daughter_in_law_of_grandson","重孙媳妇"
"贾母","贾代善","wife","妻"
"老姨奶奶","贾代善","concubine","妾"
"贾敏","贾代善","daughter","女"
"嫣红","贾赦","concubine","妾"
"翠云","贾赦","concubine","妾"
"娇红","贾赦","concubine","妾"
"贾迎春","贾赦","daughter","女"
"赵姨娘","贾政","concubine","妾"
"周姨娘","贾政","concubine","妾"
"贾珠","贾政","son","子"
"尤二姐","贾琏","concubine","妾"
"秋桐","贾琏","concubine","妾"
"平儿","贾琏","concubine","妾"
"薛宝衩","贾宝玉","wife","妻"
"花袭人","贾宝玉","concubine","妾"
"贾桂","贾宝玉","son","子"
"贾菌","娄氏","son","子"
"周秀才","贾巧姐","brother_in_law","姐夫"
"周财主","周秀才","father","父亲"
"周妈妈","周秀才","mother","母亲"
"孙亲太太","孙绍祖","mother","母亲"
"刑大舅二姐","邢夫人","younger_sister","妹"
"邢德全","邢夫人","younger_brother","弟"
"张大老爷","邢夫人","old_relatives","老亲"
"邢忠","邢夫人","elder_brother","兄"
"张大老爷之女","张大老爷","daughter","女"
"刑秞烟","邢忠","daughter","女"
"李婶","李守中","sister_in_law","弟媳"
"李婶之弟","李婶","younger_brother","弟"
"李纹","李婶","daughter","女"
"甄宝玉","李绮","husband","夫"
"甄应嘉","甄宝玉祖母","son","子"
"甄夫人","甄应嘉","wife","妻"
"大姑娘","甄应嘉","daughter","女"
"二姑娘","甄应嘉","daughter","女"
"三姑娘","甄应嘉","daughter","女"
"袭人之母","袭人","mother","母亲"
"花自芳","袭人","elder_brother","兄"
"周琼之子","贾探春","husband","夫"
"林如海之父","林如海","father","父亲"
"林如海之祖","林如海","grandfather","祖父"
"林如海之子","林如海","son","子"
"李妈","贾巧姐","nurser","乳母"
"昭儿","贾琏","servant","奴仆"
"兴儿","贾琏","servant","奴仆"
"隆儿","贾琏","servant","奴仆"
"庆儿","贾琏","servant","奴仆"
"赵嬷嬷","贾琏","nurser","乳母"
"赵天梁","赵嬷嬷","son","子"
"赵天栋","赵嬷嬷","son","子"
"王信","贾琏","servant","奴仆"
"王信媳妇","贾琏","servant","奴仆"
"鲍二","贾琏","servant","奴仆"
"善姐","尤二姐","servant_girl","丫鬟"
"迎春乳母","贾迎春","nurser","乳母"
"王住儿媳妇","迎春乳母","daughter_in_law","子媳"
"绣桔","贾迎春","servant_girl","丫鬟"
"莲花儿","贾迎春","servant_girl","丫鬟"
"秦思祺","贾迎春","servant_girl","丫鬟"
"潘又安","秦思祺","boy_friend","男友"
"贾琮奶妈","贾琮","nurser","乳母"
"篆儿","刑秞烟","servant_girl","丫鬟"
"新进来的奶子","贾兰","nurser","奶妈"
"素云","李纨","servant_girl","丫鬟"
"碧月","李纨","servant_girl","丫鬟"
"抱琴","贾元春","servant_girl","丫鬟"
"李嬷嬷","贾宝玉","nurser","乳母"
"赵嬷嬷","贾宝玉","nurser","乳母"
"张嬷嬷","贾宝玉","nurser","乳母"
"宋嬷嬷","贾宝玉","servant","奴仆"
"叶茗烟","贾宝玉","servant","奴仆"
"锄药","贾宝玉","servant","奴仆"
"扫红","贾宝玉","servant","奴仆"
"墨雨","贾宝玉","servant","奴仆"
"引泉","贾宝玉","servant","奴仆"
"扫花","贾宝玉","servant","奴仆"
"挑云","贾宝玉","servant","奴仆"
"伴鹤","贾宝玉","servant","奴仆"
"双瑞","贾宝玉","servant","奴仆"
"双寿","贾宝玉","servant","奴仆"
"老叶妈","叶茗烟","mother","母亲"
"李贵","李嬷嬷","son","子"
"李嬷嬷孙子","贾宝玉","servant","奴仆"
"王荣","贾宝玉","servant","奴仆"
"张若锦","贾宝玉","servant","奴仆"
"赵亦华","贾宝玉","servant","奴仆"
"周瑞","王夫人","servant","奴仆"
"周瑞女儿","周瑞","daughter","女"
"冷子兴","周瑞","son_in_law","女婿"
"周嫂子的儿子","周瑞","son","子"
"何三","周瑞","adopted_son","干儿子"
"白金钏","王夫人","servant_girl","丫鬟"
"白玉钏","王夫人","servant_girl","丫鬟"
"彩云","王夫人","servant_girl","丫鬟"
"彩鸾","王夫人","servant_girl","丫鬟"
"绣鸾","王夫人","servant_girl","丫鬟"
"绣凤","王夫人","servant_girl","丫鬟"
"白老媳妇","白金钏","mother","母亲"
"白老媳妇","白玉钏","mother","母亲"
"彩霞之母","彩霞","mother","母亲"
"小霞","彩霞","younger_sister","妹"
"小鹊","赵姨娘","servant_girl","丫鬟"
"小吉祥","赵姨娘","servant_girl","丫鬟"
"赵国基","赵姨娘","elder_brother","兄"
"钱槐","赵姨娘","elder_male_cousin","表兄"
"钱槐","贾环","servant","奴仆"
"雪雁","林黛玉","servant_girl","丫鬟"
"王嬷嬷","林黛玉","nurser","乳母"
"紫鹊","林黛玉","servant_girl","丫鬟"
"春纤","林黛玉","servant_girl","丫鬟"
"藕官","林黛玉","servant_girl","丫鬟"
"赖嬷嬷","赖大","mother","母亲"
"赖尚荣","赖大","son","子"
"赖大的女儿","赖大","daughter","女"
"来旺儿","王熙凤","servant","奴仆"
"旺儿媳妇","王熙凤","servant_girl","丫鬟"
"来喜家的","王熙凤","servant","奴仆"
"丰儿","王熙凤","servant_girl","丫鬟"
"彩明","王熙凤","servant_girl","丫鬟"
"林红玉","王熙凤","servant_girl","丫鬟"
"林之孝","林红玉","father","父亲"
"王善保","邢夫人","servant","奴仆"
"费婆子","邢夫人","servant_girl","丫鬟"
"金鸳鸯","贾母","servant_girl","丫鬟"
"琥珀","贾母","servant_girl","丫鬟"
"鹦鹉","贾母","servant_girl","丫鬟"
"珍珠","贾母","servant_girl","丫鬟"
"翡翠","贾母","servant_girl","丫鬟"
"玻璃","贾母","servant_girl","丫鬟"
"文官","贾母","servant_girl","丫鬟"
"傻大姐的娘","傻大姐","mother","母亲"
"金彩","鸳鸯","father","父亲"
"金文翔","鸳鸯","elder_brother","兄"
"多官","晴雯","elder_male_cousin","表哥"
"多浑虫父亲","晴雯","mothers_brother","舅"
"多姑娘儿","多官","wife","妻"
"吴贵","晴雯","elder_male_cousin","表兄"
"花芳官","贾宝玉","servant_girl","丫鬟"
"媚人","贾宝玉","servant_girl","丫鬟"
"麝月","贾宝玉","servant_girl","丫鬟"
"茜雪","贾宝玉","servant_girl","丫鬟"
"秋纹","贾宝玉","servant_girl","丫鬟"
"绮霞","贾宝玉","servant_girl","丫鬟"
"碧痕","贾宝玉","servant_girl","丫鬟"
"檀云","贾宝玉","servant_girl","丫鬟"
"四儿","贾宝玉","servant_girl","丫鬟"
"佳蕙","贾宝玉","servant_girl","丫鬟"
"坠儿","贾宝玉","servant_girl","丫鬟"
"紫绡","贾宝玉","servant_girl","丫鬟"
"良儿","贾宝玉","servant_girl","丫鬟"
"何春燕","贾宝玉","servant_girl","丫鬟"
"厨房中的柳家媳妇","柳五儿","mother","母亲"
"柳二媳妇的妹子","柳五儿","younger_sister","妹"
"哥嫂侄儿","柳五儿","nephew","侄"
"侍书","贾探春","servant_girl","丫鬟"
"翠墨","贾探春","servant_girl","丫鬟"
"艾官","贾探春","servant_girl","丫鬟"
"小蝉","贾探春","servant_girl","丫鬟"
"何婆","何春燕","mother","母亲"
"何婆","芳官","adopted_mother","干娘"
"小鸠儿","何春燕","younger_sister","妹"
"夏婆子","何春燕","maternal_aunt","姨妈"
"夏婆子","藕官","adopted_mother","干娘"
"夏婆子","小蝉","grandmother","外祖母"
"蒋玉菡","贾宝玉","friend","朋友"
"通判傅试","贾政","pupil","门生"
"傅秋芳","傅试","younger_sister","妹"
"太祖皇帝","先皇","father","父亲"
"太上皇","先皇","son","子"
"皇太后","太上皇","wife","妻"
"太妃","太上皇","kings_concubine","嫔妃"
"皇帝","太上皇","son","子"
"贾元春","皇帝","imperial_concubine","妃"
"吴贵妃","皇帝","imperial_concubine","妃"
"周贵人","皇帝","imperial_concubine","妃"
"周贵人父亲","周贵人","father","父亲"
"吴天佑","吴贵妃","father","父亲"
"戴权","皇帝","minister","臣"
"夏守忠","皇帝","minister","臣"
"贾代化","贾演","son","子"
"焦大","贾演","servant","奴仆"
"贾敷","贾代化","son","子"
"贾敬","贾代化","son","子"
"贾惜春","贾敬","daughter","女"
"史湘云爷爷","史侯","son","子"
"史鼐","史湘云爷爷","son","子"
"史鼎","史湘云爷爷","son","子"
"湘云母","史湘云爷爷","daughter_in_law","儿媳"
"史鼎的夫人","史鼎","wife","妻"
"史湘云","湘云母","daughter","女"
"卫若兰","史湘云","husband","夫"
"翠缕","史湘云","servant_girl","丫鬟"
"葵官","史湘云","servant_girl","丫鬟"
"周奶妈","史湘云","nurser","乳母"
"凤姐之祖王夫人之父","王公","son","子"
"王夫人之大兄凤姐之父","凤姐之祖王夫人之父","son","子"
"王子腾","凤姐之祖王夫人之父","son","子"
"王子胜","凤姐之祖王夫人之父","son","子"
"王夫人","凤姐之祖王夫人之父","daughter","女"
"薛姨妈","凤姐之祖王夫人之父","daughter","女"
"王成父","凤姐之祖王夫人之父","nephew","侄"
"老舅太太","王夫人之大兄凤姐之父","wife","妻"
"王仁","王夫人之大兄凤姐之父","son","子"
"王熙凤","王夫人之大兄凤姐之父","daughter","女"
"王子腾夫人","王子腾","wife","妻"
"王子腾之女","王子腾","daughter","女"
"保宁侯之子","王子腾之女","husband","夫"
"王成","王成父","son","子"
"王狗儿","王成","son","子"
"刘氏","王狗儿","wife","妻"
"王青儿","王狗儿","daughter","女"
"王板儿","王狗儿","son","子"
"刘姥姥","刘氏","mother","母亲"
"宝钗祖父","薛公","son","子"
"薛公之孙","宝钗祖父","son","子"
"薛宝琴父","宝钗祖父","son","子"
"薛姨妈","薛公之孙","wife","妻"
"薛宝钗","薛公之孙","daughter","女"
"薛蟠","薛公之孙","son","子"
"同喜","薛姨妈","servant_girl","丫鬟"
"同贵","薛姨妈","servant_girl","丫鬟"
"莺儿","薛宝钗","servant_girl","丫鬟"
"文杏","薛宝钗","servant_girl","丫鬟"
"喜儿","薛宝钗","servant_girl","丫鬟"
"蕊官","薛宝钗","servant_girl","丫鬟"
"夏金桂","薛蟠","wife","妻"
"老苍头","薛蟠","meme_ama","乳父"
"宝蟾","夏金桂","servant_girl","丫鬟"
"小舍儿","夏金桂","servant_girl","丫鬟"
"夏奶奶","夏金桂","mother","母亲"
"夏三","夏奶奶","son","子"
"臻儿","香菱","servant_girl","丫鬟"
"薛宝琴母","薛宝琴父","wife","妻"
"薛蝌","薛宝琴父","son","子"
"薛宝琴","薛宝琴父","daughter","女"
"邢岫烟","薛蝌","wife","妻"
"梅翰林之子","薛宝琴","husband","夫"
"小螺","薛宝琴","servant_girl","丫鬟"
"荳官","薛宝琴","servant_girl","丫鬟"
"梅翰林","梅翰林之子","father","父亲"
"贾瑞之父","贾代儒","son","子"
"贾瑞之母","贾瑞之父","wife","妻"
"贾瑞","贾瑞之父","son","子"
"贾琼","贾琼之母","son","子"
"贾四姐","贾琼之母","daughter","女"
"贾王扁","贾王扁之母","son","子"
"贾喜鸾","贾王扁之母","daughter","女"
"贾芸","五嫂子卜氏","son","子"
"卜世仁","五嫂子卜氏","brother","兄弟"
"小丫头子","贾芸","servant_girl","丫鬟"
"倪儿娘子","倪二","wife","妻"
"倪二女儿","倪二","daughter","女"
"马贩子王短腿","倪二","friend","友人"
"卜世仁娘子","卜世仁","wife","妻"
"卜银姐","卜世仁","daughter","女"
"王奶奶","卜世仁","neighbour","邻居"
"卜世仁店里伙计","卜世仁","partner","伙计"
"贾芹","周氏","son","子"
"金氏","贾璜","wife","妻"
"胡氏","金氏","elder_sister_in_law","嫂"
"金荣","胡氏","son","子"
"娇杏","贾化","wife","妻"
"贾雨村子","贾化","son","子"
"应天府门子","贾化","son","子"
"张如圭","贾化","friend","友人"
"王老爷","贾化","friend","友人"
"天子之妻","应天府门子","wife","妻"
"东安郡王穆莳拜","东平郡王","son","子"
"南安王太妃","南安郡王","wife","妻"
"南安郡王之孙","南安郡王","grandson","孙子"
"西宁郡王之孙","西宁郡王","grandson","孙子"
"西宁郡王妃","西宁郡王","wife","妻"
"北静王太妃","北静郡王","daughter_in_law","儿媳"
"北静王少妃","水溶","wife","妻"
"北静郡王长府官","水溶","minister","臣"
"镇国公诰命","牛清","wife","妻"
"镇国公诰命长男","牛清","son","子"
"牛继宗","牛清","grandson","孙子"
"柳芳","柳彪","grandson","孙子"
"陈瑞文","陈翼","grandson","孙子"
"马尚","马魁","grandson","孙子"
"侯孝康","侯明","grandson","孙子"
"缮国公诰命","缮国公","wife","妻"
"石光珠","缮国公","grandson","孙子"
"蒋子宁","平原侯","grandson","孙子"
"谢鲸","定城侯","grandson","孙子"
"戚建辉","襄阳侯","grandson","孙子"
"裘良","景田侯","grandson","孙子"
"锦乡侯诰命","锦乡侯","wife","妻"
"韩奇","锦乡侯","son","子"
"冯紫英","神武将军冯唐","son","子"
"锦田侯诰命","马道婆","donor","施主"
"蕊官","地藏庵的圆心","pupil","徒弟"
"藕官","圆心","pupil","徒弟"
"智能儿","净虚","pupil","徒弟"
"智善","净虚","pupil","徒弟"
"智通","净虚","pupil","徒弟"
"于老爷","净虚","donor","施主"
"胡老爷","净虚","donor","施主"
"胡老爷太太","净虚","donor","施主"
"胡老爷公子","净虚","donor","施主"
"张大财主","净虚","donor","施主"
"花芳官","智能","pupil","徒弟"
"张金哥","张大财主","daughter","女"
"李公子","张金哥","employer","雇主"
"长安原任守备","李公子","father","父亲"
"李衙内","长安府府太爷","mothers_brother","小舅子"
"贾代化","贾演","son","子"
"焦大","贾演","servant","奴仆"
"贾敷","贾代化","son","子"
"贾敬","贾代化","son","子"
"尤氏","尤老娘","daughter","女"
"贾蔷","贾演","great_great_grandson","玄孙"
"龄官","贾蔷","girl_friend","女友"
"佩凤","贾珍","concubine","妾"
"偕鸾","贾珍","concubine","妾"
"文花","贾珍","concubine","妾"
"茄官","尤氏","servant_girl","丫鬟"
"银蝶","尤氏","servant_girl","丫鬟"
"炒豆儿","尤氏","servant_girl","丫鬟"
"秦可卿","贾蓉","wife","妻"
"胡氏","贾蓉","step_wife","续弦"
"许氏","贾蓉","step_wife","续弦"
"入画","贾惜春","servant_girl","丫鬟"
"彩屏","贾惜春","servant_girl","丫鬟"
"彩儿","贾惜春","servant_girl","丫鬟"
"瑞珠","秦可卿","servant_girl","丫鬟"
"宝珠","秦可卿","servant_girl","丫鬟"
"秦钟","秦业","son","子"
"智能儿","秦钟","girl_friend","女友"
"净虚","智能儿","master","师父"
"智善","净虚","pupil","徒弟"
"智通","净虚","pupil","徒弟"
"喜儿","贾珍","servant","奴仆"
"寿儿","贾珍","servant","奴仆"
"尤三姐","柳湘莲","girl_friend","女友"
"杏奴","柳湘莲","servant","奴仆"
"尤二姐","贾琏","concubine","妾"
"善姐","尤二姐","servant_girl","丫鬟"
"甄宝玉","李绮","husband","夫"
"贾演","贾源","elder_brother","兄"
"贾赦","贾代善","son","子"
"贾政","贾代善","son","子"
"贾敏","贾政","younger_sister","妹"
"邢夫人","贾赦","wife","妻"
"贾琏","贾赦","son","子"
"贾琮","贾赦","son","子"
"王夫人","贾政","wife","妻"
"贾元春","贾政","daughter","女"
"贾宝玉","贾政","son","子"
"贾探春","贾政","daughter","女"
"贾环","贾政","son","子"
"王熙凤","贾琏","wife","妻"
"贾巧姐","贾琏","daughter","女"
"贾兰","贾珠","son","子"
"李纨","贾珠","wife","妻"
"孙绍祖","贾迎春","husband","夫"
"李守中","李纨","father","父亲"
"李绮","李婶","daughter","女"
"甄宝玉","甄应嘉","son","子"
"林如海","贾敏","husband","夫"
"林黛玉","林如海","daughter","女"
"王嬷嬷","贾宝玉","nurser","乳母"
"彩霞","王夫人","servant_girl","丫鬟"
"傻大姐","贾母","servant_girl","丫鬟"
"晴雯","贾宝玉","servant_girl","丫鬟"
"篆儿","贾宝玉","servant_girl","丫鬟"
"柳五儿","贾宝玉","servant_girl","丫鬟"
"贾珍","贾敬","son","子"
"贾母","史侯","daughter","女"
"香菱","薛蟠","concubine","妾"
"倪二","贾芸","friend","友人"
"水溶","北静郡王","grandson","孙子"
"尤氏","贾珍","wife","妻"
"尤二姐","尤老娘","daughter","女"
"尤三姐","尤老娘","daughter","女"
"贾蓉","贾珍","son","子"
"秦可卿","秦业","daughter","女"

代码介绍

由于大部分代码都进行了注释,所以大家可以直接拷贝代码进行学习,在此不赘述代码作用

import csv
from py2neo import Graph, Node, Relationship

# 创建与 Neo4j 数据库的连接
g = Graph('http://localhost:7474', user='neo4j', password='neo4j123..', name="neo4j")

# 打开 CSV 文件
with open('HongLou.csv', 'r', encoding='utf-8') as f:
    # 创建一个 CSV 读取器
    reader = csv.reader(f)
    # 遍历 CSV 文件中的每一行
    for item in reader:
        # 跳过标题行,因为从第二行开始才是人物信息
        if reader.line_num == 1:
            continue
        # 打印当前行号和内容
        print("当前行数:", reader.line_num, "当前内容:", item)

        # 使用 CSV 中的值创建起始节点和结束节点,节点标签为 'Person',名称属性来自 CSV
        start_node = Node("Person", name=item[0])
        end_node = Node("Person", name=item[1])

        # 使用 CSV 中的值创建起始节点和结束节点之间的关系,关系类型为 CSV 中的值
        relation = Relationship(start_node, item[3], end_node)

        # 将起始节点和结束节点合并到图中,使用节点标签 'Person' 和名称属性进行匹配
        g.merge(start_node, "Person", "name")
        g.merge(end_node, "Person", "name")
        # 将关系合并到图中,使用节点标签 'Person' 和名称属性进行匹配
        g.merge(relation, "Person", "name")

 最后回到我们的neo4j中就能看到关系图谱啦

 

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

实战webSocket压测(二)jmeter配置webSocket连接

背景 我们可以通过Jmeter添加插件实现webSocket脚本编写。WebSocket的插件较多,我选择以WebSocket Samplers by Peter Doornbosch为例来进行配置。 步骤1、WebSocket Samplers插件安装 下载地址:JMeter WebSocket Samplers,建议下载最新版本…

如何在pgAdmin中用替换的值更新jsonb列?(二)

上一篇提到怎么替换jsonb,链接如下: 如何在pgAdmin中用替换的值更新jsonb列?-CSDN博客 那么当jsonb嵌套jsonb应该怎么替换呢?像这样,类型依然是jsonb,只不过嵌套一层,JsonData:&qu…

C++ //练习 11.9 定义一个map,将单词与一个行号的list关联,list中保存的是单词所出现的行号。

C Primer(第5版) 练习 11.9 练习 11.9 定义一个map,将单词与一个行号的list关联,list中保存的是单词所出现的行号。 环境:Linux Ubuntu(云服务器) 工具:vim 代码块 /***********…

九河云:在AWS上实现跨region VPC互联

如何跨region实现不同VPC之间的对等链接?九河云为您介绍AWS跨region连接方案。 说明:VPC-A位于弗吉尼亚region,VPC-B位于俄勒冈region 本文将在同一账户的弗吉尼亚和俄勒冈VPC中各启用一台EC2(本文已提前创建好VPC、EC2等资源&am…

hive的使用(本地数据上传到idea)

1.首先第一步是先启动hive,hive的启动指令如下 nohup hiveserver2 & 2.然后我们进入idea中 这里我们使用的是idea里的Apache Hive的插件,进行配置,等我们跟moba连接好后,就可以进行数据的导入了。 hive的sql和mysql里的sql语…

WPS二次开发系列:以自动播放模式打开PPT文档

在前面文章中 WPS SDK打开文档并实现保存回传 介绍了如何使用WPS SDK打开文档,那么我们是否能够实现在打开WPS 文档的时候能够传递一些参数来控制打开文档的行为呢,经过研究WPS SDK相关文档和API,最终实现了 以自动播放方式打开PPT文档功能。…

LeetCode-146. LRU 缓存【设计 哈希表 链表 双向链表】

LeetCode-146. LRU 缓存【设计 哈希表 链表 双向链表】 题目描述:解题思路一:双向链表,函数 get 和 put 必须以 O(1) 的平均时间复杂度运行。一张图:知识点__slots__ 解题思路二:0解题思路三:0 题目描述&am…

【Web】2024红明谷CTF初赛个人wp(2/4)

目录 ezphp playground 时间原因只打了2个小时,出了2道,简单记录一下 ezphp 参考文章 PHP filter chains: file read from error-based oracle https://github.com/synacktiv/php_filter_chains_oracle_exploit 用上面的脚本爆出部分源码&#xff…

uniapp开发app使用谷歌地图(ios跟安卓)

前提条件&#xff1a; 谷歌地图需要翻墙&#xff0c;否则无法加载 谷歌地图说明 文档地址&#xff1a;概览 | Maps JavaScript API | Google for Developers 设置地图语言 <script asyncsrc"https://maps.googleapis.com/maps/api/js?keyYOUR_API_KEY&lang…

HarmonyOS NEXT应用开发之ForEach:循环渲染

ForEach接口基于数组类型数据来进行循环渲染&#xff0c;需要与容器组件配合使用&#xff0c;且接口返回的组件应当是允许包含在ForEach父容器组件中的子组件。例如&#xff0c;ListItem组件要求ForEach的父容器组件必须为 List组件 。 说明&#xff1a; 从API version 9开始&a…

vue3+echarts:echarts地图打点显示的样式

colorStops是打点的颜色和呼吸灯、label为show是打点是否显示数据、rich里cnNum是自定义的过滤模板用来改写显示数据的样式 series: [{type: "effectScatter",coordinateSystem: "geo",rippleEffect: {brushType: "stroke",},showEffectOn: &quo…

外链工具源码版V2

请将zip文件全部解压缩即可访问&#xff01; 源码全部开源&#xff0c;支持上传二级目录访问 #已更新增加大量高质量外链&#xff08;若需要增加修改其他外链请打开txt文件&#xff09; #修复优化页面端 源码下载地址&#xff1a;外链工具源码版V2

记录一次官网访问很慢的情况

客户查看云监控,带宽未超限,客户取的是1分钟的原生值,也就是1分钟也是个平均值。 但是客户的原始值&#xff0c;其实就是1分钟内的平均值。所以客户的瞬时超限&#xff0c;其实是看不出来的。但是后端同事从实时监控里面可以看到超限的情况。 客户升带宽后&#xff0c; 发现还…

二维动画制作软件 Animate 2024 for mac激活版

Animate 2024 for Mac是一款功能强大的二维动画制作软件&#xff0c;专为Mac用户打造。它提供了丰富的动画编辑功能&#xff0c;使用户能够轻松创建出生动逼真的动画作品。无论是短片、广告还是游戏等应用领域&#xff0c;Animate 2024都能发挥出出色的表现。 软件下载&#xf…

Vue和FastAPI实现前后端分离

前言 近期接触了一些开源大模型应用服务&#xff0c;发现很多用的都是FastAPI web框架&#xff0c;于是乎研究了一下它的优势&#xff0c;印象最深有两个&#xff1a;一个是它的异步处理性能比较好&#xff0c;二是它可以类似java swagger的API交互文档&#xff0c;这个对应前…

微服务连接不上rabbitmq解决

1.把端口port: 15672改成port&#xff1a;5672 2&#xff1a;virtual-host: my_vhost一定对应上

VSCode安装及Python、Jupyter插件安装使用

VSCode 介绍 Visual Studio Code&#xff08;简称VSCode&#xff09;是一个由微软开发的免费、开源的代码编辑器。VSCode是一个轻量级但是非常强大的代码编辑器&#xff0c;它支持多种编程语言&#xff08;如C,C#&#xff0c;Java&#xff0c;Python&#xff0c;PHP&#xff0…

云存储中常用的相同子策略的高效、安全的基于属性的访问控制的论文阅读

参考文献为2022年发表的Efficient and Secure Attribute-Based Access Control With Identical Sub-Policies Frequently Used in Cloud Storage 动机 ABE是实现在云存储中一种很好的访问控制手段&#xff0c;但是其本身的计算开销导致在实际场景中应用收到限制。本论文研究了…

Raven:一款功能强大的CICD安全分析工具

关于Raven Raven是一款功能强大的CI/CD安全分析工具&#xff0c;该工具旨在帮助广大研究人员对GitHub Actions CI工作流执行大规模安全扫描&#xff0c;并将发现的数据解析并存储到Neo4j数据库中。 Raven&#xff0c;全称为Risk Analysis and Vulnerability Enumeration for C…

4大企业实例解析:为何MongoDB Atlas成为AI服务构建的首选

随着人工智能和生成式AI技术的迅猛发展&#xff0c;众多企业和机构正积极利用自然语言处理&#xff08;NLP&#xff09;、大型语言模型&#xff08;LLM&#xff09;等前沿技术&#xff0c;打造出一系列AI驱动的产品、服务和应用程序。 本文将展示四家已在AI创新领域取得显著成…