Skip to content

Commit

Permalink
clear notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
tb06904 committed Aug 16, 2024
1 parent 4ad28d3 commit 3551d4e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 162 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,67 +21,18 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Could not find a valid configuration. Do not forget to validate your settings using %graph_notebook_config.\n"
]
}
],
"outputs": [],
"source": [
"%reload_ext graph_notebook.magics"
]
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"set notebook config to:\n",
"{\n",
" \"host\": \"localhost\",\n",
" \"port\": 8080,\n",
" \"proxy_host\": \"\",\n",
" \"proxy_port\": 8182,\n",
" \"ssl\": false,\n",
" \"ssl_verify\": true,\n",
" \"sparql\": {\n",
" \"path\": \"\"\n",
" },\n",
" \"gremlin\": {\n",
" \"traversal_source\": \"g\",\n",
" \"username\": \"\",\n",
" \"password\": \"\",\n",
" \"message_serializer\": \"graphsonv3\"\n",
" },\n",
" \"neo4j\": {\n",
" \"username\": \"neo4j\",\n",
" \"password\": \"password\",\n",
" \"auth\": true,\n",
" \"database\": null\n",
" }\n",
"}\n"
]
},
{
"data": {
"text/plain": [
"<graph_notebook.configuration.generate_config.Configuration at 0x73ded0e2b8b0>"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"\n",
"%%graph_notebook_config\n",
Expand All @@ -107,24 +58,9 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "8cb7916be19f4cdf953dae968a635f11",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Tab(children=(Output(layout=Layout(max_height='600px', max_width='940px', overflow='scroll')), Force(network=<…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"%%gremlin -p v,oute,inv\n",
"g.V().hasLabel('person').outE('created').inV().path().by(elementMap())"
Expand All @@ -140,24 +76,9 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2cd0e1e65aa0404daf81dd95b93be409",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Tab(children=(Output(layout=Layout(max_height='600px', max_width='940px', overflow='scroll')), Force(network=<…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"%%gremlin -p v\n",
"g.V('3').repeat(both('created').simplePath()).until(hasLabel('software')).limit(5).path().by(elementMap())"
Expand All @@ -172,24 +93,9 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "0db22ab73ba9433eadcbd903ae01dfd1",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Tab(children=(Output(layout=Layout(max_height='600px', max_width='940px', overflow='scroll')), Force(network=<…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"%%gremlin\n",
"g.V('1').out('knows').has('age', P.gt(30)).elementMap()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -41,7 +41,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -61,20 +61,9 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[{'name': ['marko'], 'age': [29]}]"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"g.V('1').valueMap().to_list()"
]
Expand All @@ -88,20 +77,9 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[]"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"g.V('1', '2').hasLabel('person').outE('knows').values().is_(P.lt(1)).to_list()"
]
Expand All @@ -115,21 +93,9 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[path[{'name': ['marko'], 'age': [29]}, {'name': ['lop'], 'lang': ['java']}],\n",
" path[{'name': ['marko'], 'age': [29]}, {'name': ['josh'], 'age': [32]}, {'name': ['lop'], 'lang': ['java']}]]"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"g.V('1').repeat(__.both().simplePath()).until(__.has('name', 'lop')).limit(3).path().by(__.valueMap()).to_list()"
]
Expand All @@ -143,23 +109,9 @@
},
{
"cell_type": "code",
"execution_count": 45,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[{'p': {<T.id: 1>: '1',\n",
" <T.label: 4>: 'person',\n",
" 'name': ['marko'],\n",
" 'age': [29]}}]"
]
},
"execution_count": 45,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"results = client.submit(\"g.with(\\\"cypher\\\", \\\"MATCH (p:person) WHERE ID(p) = '1' RETURN p\\\").call()\")\n",
"results.all().result()"
Expand Down

0 comments on commit 3551d4e

Please sign in to comment.