From a72eadf87b7ef2420f7d3bcc7f7013de2375ab65 Mon Sep 17 00:00:00 2001 From: Deepthi M <79050917+deepthi1107@users.noreply.github.com> Date: Sun, 3 Apr 2022 17:42:45 +0530 Subject: [PATCH 1/5] Add files via upload --- .../deepthi1107/nx_tutorial_script.py | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 2022-round-1/deepthi1107/nx_tutorial_script.py diff --git a/2022-round-1/deepthi1107/nx_tutorial_script.py b/2022-round-1/deepthi1107/nx_tutorial_script.py new file mode 100644 index 0000000..e7b1168 --- /dev/null +++ b/2022-round-1/deepthi1107/nx_tutorial_script.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python +# coding: utf-8 + +# In[82]: + + +#importing the required libraries +import networkx as nx + + +# In[83]: + + +#Creating DiGraph +graph1=nx.DiGraph() + + +# In[84]: + + +#adding node 11,"N1",1,2,3 +graph1.add_node(11) +graph1.add_node("N1") +L=[1,2,3] +graph1.add_nodes_from(L) + + +# In[85]: + + +#view of all the nodes inserted to the DiGraph +graph1.nodes() + + +# In[86]: + + +#adding edges 11->"N1","N1"->1,1->2,2->3,3->11 +graph1.add_edge(11,"N1") +graph1.add_edge("N1",1) +graph1.add_edge(1,2) +graph1.add_edge(2,3) +graph1.add_edge(3,11) + + +# In[87]: + + +#view of edges, connecting the nodes +graph1.edges() + + +# In[88]: + + +#visualization of DiGraph created +nx.draw(graph1,with_labels=1) + + +# In[90]: + + +#finding the shoretes path between the nodes and printing the shortest path +s_path = nx.shortest_path(graph1) +print(s_path) + From 27820a53d3d6f76c43d15a499d195a93883ae82a Mon Sep 17 00:00:00 2001 From: Deepthi M <79050917+deepthi1107@users.noreply.github.com> Date: Sun, 3 Apr 2022 17:44:46 +0530 Subject: [PATCH 2/5] Delete nx_tutorial_script.py --- .../deepthi1107/nx_tutorial_script.py | 66 ------------------- 1 file changed, 66 deletions(-) delete mode 100644 2022-round-1/deepthi1107/nx_tutorial_script.py diff --git a/2022-round-1/deepthi1107/nx_tutorial_script.py b/2022-round-1/deepthi1107/nx_tutorial_script.py deleted file mode 100644 index e7b1168..0000000 --- a/2022-round-1/deepthi1107/nx_tutorial_script.py +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env python -# coding: utf-8 - -# In[82]: - - -#importing the required libraries -import networkx as nx - - -# In[83]: - - -#Creating DiGraph -graph1=nx.DiGraph() - - -# In[84]: - - -#adding node 11,"N1",1,2,3 -graph1.add_node(11) -graph1.add_node("N1") -L=[1,2,3] -graph1.add_nodes_from(L) - - -# In[85]: - - -#view of all the nodes inserted to the DiGraph -graph1.nodes() - - -# In[86]: - - -#adding edges 11->"N1","N1"->1,1->2,2->3,3->11 -graph1.add_edge(11,"N1") -graph1.add_edge("N1",1) -graph1.add_edge(1,2) -graph1.add_edge(2,3) -graph1.add_edge(3,11) - - -# In[87]: - - -#view of edges, connecting the nodes -graph1.edges() - - -# In[88]: - - -#visualization of DiGraph created -nx.draw(graph1,with_labels=1) - - -# In[90]: - - -#finding the shoretes path between the nodes and printing the shortest path -s_path = nx.shortest_path(graph1) -print(s_path) - From 12df2800a5ec9c943ce684ce448cea56d50604bb Mon Sep 17 00:00:00 2001 From: Deepthi M <79050917+deepthi1107@users.noreply.github.com> Date: Sun, 3 Apr 2022 17:47:10 +0530 Subject: [PATCH 3/5] Add files via upload second contribution --- .../deepthi1107/nx_tutorial_script.py | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 2022-round-1/deepthi1107/nx_tutorial_script.py diff --git a/2022-round-1/deepthi1107/nx_tutorial_script.py b/2022-round-1/deepthi1107/nx_tutorial_script.py new file mode 100644 index 0000000..bee1dc7 --- /dev/null +++ b/2022-round-1/deepthi1107/nx_tutorial_script.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python +# coding: utf-8 + +# In[1]: + + +#importing the required libraries +import networkx as nx + + +# In[2]: + + +#Creating DiGraph +graph1=nx.DiGraph() + + +# In[3]: + + +#adding node 11,"N1",1,2,3 +graph1.add_node(11) +graph1.add_node("N1") +L=[1,2,3] +graph1.add_nodes_from(L) + + +# In[4]: + + +#view of all the nodes inserted to the DiGraph +graph1.nodes() + + +# In[5]: + + +#adding edges 11->"N1","N1"->1,1->2,2->3,3->11 +graph1.add_edge(11,"N1") +graph1.add_edge("N1",1) +graph1.add_edge(1,2) +graph1.add_edge(2,3) +graph1.add_edge(3,11) + + +# In[6]: + + +#view of edges, connecting the nodes +graph1.edges() + + +# In[7]: + + +#visualization of DiGraph created +nx.draw(graph1,with_labels=1) + + +# In[8]: + + +#finding the shoretes path between the nodes and printing the shortest path +s_path = nx.shortest_path(graph1) +print(s_path) + From 406cfede8fefe1df06747b56b0727e12e649ca20 Mon Sep 17 00:00:00 2001 From: Deepthi M <79050917+deepthi1107@users.noreply.github.com> Date: Mon, 4 Apr 2022 11:06:52 +0530 Subject: [PATCH 4/5] Delete nx_tutorial_script.py --- .../deepthi1107/nx_tutorial_script.py | 66 ------------------- 1 file changed, 66 deletions(-) delete mode 100644 2022-round-1/deepthi1107/nx_tutorial_script.py diff --git a/2022-round-1/deepthi1107/nx_tutorial_script.py b/2022-round-1/deepthi1107/nx_tutorial_script.py deleted file mode 100644 index bee1dc7..0000000 --- a/2022-round-1/deepthi1107/nx_tutorial_script.py +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env python -# coding: utf-8 - -# In[1]: - - -#importing the required libraries -import networkx as nx - - -# In[2]: - - -#Creating DiGraph -graph1=nx.DiGraph() - - -# In[3]: - - -#adding node 11,"N1",1,2,3 -graph1.add_node(11) -graph1.add_node("N1") -L=[1,2,3] -graph1.add_nodes_from(L) - - -# In[4]: - - -#view of all the nodes inserted to the DiGraph -graph1.nodes() - - -# In[5]: - - -#adding edges 11->"N1","N1"->1,1->2,2->3,3->11 -graph1.add_edge(11,"N1") -graph1.add_edge("N1",1) -graph1.add_edge(1,2) -graph1.add_edge(2,3) -graph1.add_edge(3,11) - - -# In[6]: - - -#view of edges, connecting the nodes -graph1.edges() - - -# In[7]: - - -#visualization of DiGraph created -nx.draw(graph1,with_labels=1) - - -# In[8]: - - -#finding the shoretes path between the nodes and printing the shortest path -s_path = nx.shortest_path(graph1) -print(s_path) - From ac40ab1fb7e71c5ee31cae770e2e47b30c784576 Mon Sep 17 00:00:00 2001 From: Deepthi M <79050917+deepthi1107@users.noreply.github.com> Date: Mon, 4 Apr 2022 11:07:06 +0530 Subject: [PATCH 5/5] Add files via upload --- .../deepthi1107/nx_tutorial_script.py | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 2022-round-1/deepthi1107/nx_tutorial_script.py diff --git a/2022-round-1/deepthi1107/nx_tutorial_script.py b/2022-round-1/deepthi1107/nx_tutorial_script.py new file mode 100644 index 0000000..12c5130 --- /dev/null +++ b/2022-round-1/deepthi1107/nx_tutorial_script.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python +# coding: utf-8 + +# In[1]: + + +#importing the required libraries +import networkx as nx + + +# In[2]: + + +#Creating DiGraph +graph1=nx.DiGraph() + + +# In[3]: + + +#adding node 11,"N1",1,2,3,(4,5) +graph1.add_node(11) +graph1.add_node("N1") +L=[1,2,3] +graph1.add_nodes_from(L) +graph1.add_node((4,5)) + + +# In[4]: + + +#view of all the nodes inserted to the DiGraph +graph1.nodes() + + +# In[5]: + + +#adding edges 11->"N1",1->2,2->3,3->11,N1->(4,5),(4,5)->1 +graph1.add_edge(11,"N1") +graph1.add_edge(1,2) +graph1.add_edge(2,3) +graph1.add_edge(3,11) +graph1.add_edge("N1",(4,5)) +graph1.add_edge((4,5),1) + + +# In[6]: + + +#view of edges, connecting the nodes +graph1.edges() + + +# In[7]: + + +#visualization of DiGraph created +nx.draw(graph1,with_labels=1) + + +# In[8]: + + +#finding the shoretes path between the nodes and printing the shortest path +s_path = nx.shortest_path(graph1) +print(s_path) +